ofbiz学习笔记--form

1.显示信息的表单
[color=brown]<form name="ListOrders" type="list"
title="Orders" default-title-style="tableheadtext" target=""
default-widget-style="tabletext" default-tooltip-style="tabletext"
default-table-style="crmsfaListTable" header-row-style="crmsfaListTableHeader" even-row-style="rowWhite" odd-row-style="rowLightGray"
paginate-target="${listSortTarget}" paginate-target-anchor="ListOrders" paginate-size-field="ordersSize" paginate-index-field="ordersIndex"
[color=red]list-name="ordersListIt">[/color]
<field name="orderDate" title="${uiLabelMap.OrderOrderDate}"
[color=red]header-link="${listSortTarget}?ordersOrderBy=orderDate&${findParams}#ListOrders"[/color] header-link-style="orderByHeaderLink">
[color=red]<display description="${groovy:org.ofbiz.base.util.UtilDateTime.timeStampToString(orderDate, org.ofbiz.base.util.UtilDateTime.getDateTimeFormat(locale), timeZone, locale)}"/>[/color]
</field>
<field name="orderId" title="${uiLabelMap.CrmOrderNameID}" widget-style="linktext"
use-when="(isLookup==void) || (isLookup==null) || !(isLookup.equals("true"))"
header-link="${listSortTarget}?ordersOrderBy=orderName&${findParams}#ListOrders" header-link-style="orderByHeaderLink">
<hyperlink also-hidden="false" target-type="plain" description="${orderName} (${orderId})" [color=red]target="orderview?orderId=${orderId}"[/color]/>
</field>
<field name="orderId" title="${uiLabelMap.CrmOrderNameID}" widget-style="linktext"
use-when="(isLookup!=void) && (isLookup!=null) && (isLookup.equals("true"))"
header-link="${listSortTarget}?ordersOrderBy=orderName&${findParams}#ListOrders" header-link-style="orderByHeaderLink">
<hyperlink also-hidden="false" target-type="plain" description="${orderName} (${orderId})" [color=red]target="javascript:set_value('${orderId}')[/color]"/>
</field>
<field name="correspondingPoId" title="${uiLabelMap.OpentapsPONumber}"
header-link="${listSortTarget}?ordersOrderBy=correspondingPoId&${findParams}#ListOrders" header-link-style="orderByHeaderLink">
<display/>
</field>
<field name="partyId" title="${uiLabelMap.CrmCustomer}"
header-link="${listSortTarget}?ordersOrderBy=partyId&${findParams}#ListOrders" header-link-style="orderByHeaderLink">
<display description="${groovy:org.ofbiz.party.party.PartyHelper.getPartyName(delegator, partyId, false)} (${partyId})"/>
</field>
<field name="statusId" title="${uiLabelMap.CommonStatus}"
header-link="${listSortTarget}?ordersOrderBy=statusId&${findParams}#ListOrders" header-link-style="orderByHeaderLink">
[color=red] <display-entity entity-name="StatusItem"/>[/color]
</field>
<field name="shipByDate" title="${uiLabelMap.OrderShipBeforeDate}" [color=red]widget-area-style="fieldWidth100"[/color]>
<display description="${groovy:org.opentaps.common.order.UtilOrder.getEarliestShipByDate(delegator, orderId, timeZone, locale);}"/>
</field>
<field name="grandTotal" title="${uiLabelMap.OrderAmount}"
header-link="${listSortTarget}?ordersOrderBy=grandTotal&${findParams}#ListOrders" header-link-style="orderByHeaderLink">
<display type="currency" currency="${currencyUom}"/>
</field>
</form>[/color]
2.请求的表单
[color=brown]<form name="FindOrders" type="single" target="${findOrdersTarget}"
default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
<field name="orderId" title="${uiLabelMap.OrderOrderId}" position="1">
<text/>
</field>
<field name="externalId" title="${uiLabelMap.OrderExternalId}" position="2">
<text/>
</field>
<field name="orderName" title="${uiLabelMap.OrderOrderName}">
<text/>
</field>
<field name="partyIdSearch" title="${uiLabelMap.ProductCustomer}" position="1">
<lookup target-form-name="LookupClients" size="20" maxlength="20" default-value="${parameters.partyId}"/>
</field>
<field name="productStoreId" title="${uiLabelMap.ProductProductStore}" position="2">
<drop-down allow-empty="true" current="selected">
<entity-options description="${storeName}" entity-name="ProductStore" key-field-name="productStoreId">
<entity-constraint name="payToPartyId" operator="equals" value="${configProperties.organizationPartyId}"/>
<entity-order-by field-name="storeName"/>
</entity-options>
</drop-down>
</field>
<field name="statusId" title="${uiLabelMap.CommonStatus}">
<drop-down allow-empty="true" current="selected">
<entity-options description="${description}" entity-name="StatusItem" key-field-name="statusId">
<entity-constraint name="statusTypeId" operator="equals" value="ORDER_STATUS"/>
<entity-order-by field-name="sequenceId"/>
</entity-options>
</drop-down>
</field>
<field name="correspondingPoId" title="${uiLabelMap.OpentapsPONumber}">
<text/>
</field>
<field name="fromDate" title="${uiLabelMap.CommonFromDate}" position="1" encode-output="false">
<date-time type="timestamp" input-method="time-dropdown" clock="12"/>
</field>
<field name="thruDate" title="${uiLabelMap.CommonThruDate}" position="2" encode-output="false">
<date-time type="timestamp" input-method="time-dropdown" clock="12"/>
</field>
<field name="createdBy" title="${uiLabelMap.CommonCreatedBy}">
<text/>
</field>
<field name="lotId" title="${uiLabelMap.ProductLotId}">
<lookup target-form-name="LookupLot" size="20" maxlength="20" default-value="${parameters.lotId}"/>
</field>
<field name="serialNumber" title="${uiLabelMap.ProductSerialNumber}">
<text/>
</field>

<field name="submitButton" title="${uiLabelMap.CrmFindOrders}" widget-style="smallSubmit"><submit/></field>
</form>[/color]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值