[OFBiz技术讨论] ofbiz form有没有办法存两个context的值
Java小菜哈
2012-07-02
<?xml version="1.0" encoding="UTF-8"?>
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> <form name="formName" type="list" target="updateForm" title="" list-name="list" odd-row-style="alternate-row" default-table-style="basic-table" > <field name="name"><display/></field> <field name="id"><hidden/></field> <field name="value"><display/></field> <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> </form> </forms> 比如我有两张表,A和B,这个form的list是包含A的,即List<A>,但是我现在的field字段,我需要用到B表的value,怎么处理好呢?如果<field name="value"><text/></field>又怎么办呢? |
|
jiasudu1649
2012-07-03
这个你可以提交到后台service里面再进行拆分
很简单的。 |
|
Java小菜哈
2012-07-05
不是获取哦,是修改功能的时候需要显示
|
|
skycray
2012-07-05
<field name="attrValue" entity-name="ProductAttribute" widget-style="text">
<text default-value="${groovy:org.ofbiz.product.product.ProductWorker.getAttributeValue(delegator, productId, attrName)}" /> </field> 可以在field里面调用groovy去拿,如果你B表的primary key只有一个的话 可以用display field去拿 http://www.opensourcestrategies.com/ofbiz/ofbiz_form_widget_cookbook.txt FYI |
|
Java小菜哈
2012-07-05
good,谢了
|