Author: jleroux
Date: Mon Oct 25 21:06:40 2010
New Revision: 1027268
URL: http://svn.apache.org/viewvc?rev=1027268&view=rev
Log:
Better comments
Modified:
ofbiz/branches/jquery/framework/common/widget/LookupScreens.xml
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleForms.xml
Modified: ofbiz/branches/jquery/framework/common/widget/LookupScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/widget/LookupScreens.xml?rev=1027268&r1=1027267&r2=1027268&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/widget/LookupScreens.xml (original)
+++ ofbiz/branches/jquery/framework/common/widget/LookupScreens.xml Mon Oct 25
21:06:40 2010
@@ -29,8 +29,21 @@ under the License.
<set field="queryString" from-field="result.queryString"/>
<set field="viewIndex" from-field="parameters.VIEW_INDEX"
type="Integer"/>
<set field="viewSize" from-field="parameters.VIEW_SIZE"
type="Integer" default-value="20"/>
+
+ <!-- entries needed for lookup ajax auto completer -->
+ <!-- required: entity to search in -->
<set field="entityName" value="Geo"/>
+
+ <!-- required: fields to search a match -->
+ <!-- the first element from searchFields is returned after
user selection -->
+ <!-- it might be hidden based on
widget.autocompleter.displayReturnField property in widget.properties -->
<set field="searchFields" value="[geoId, geoName, geoCode]"/>
+
+ <!-- optional: fields to display in the given order, default
is searchFields -->
+ <set field="displayFields" value="[geoId, geoName, geoCode]"/>
+
+ <!-- optional: additional entity condition (named
andCondition) added to search query -->
+ <!-- example : script
location="component://party/webapp/partymgr/WEB-INF/actions/party/StatusCondition.groovy"
/-->
</actions>
<widgets>
<decorator-screen name="LookupDecorator"
location="component://common/widget/CommonScreens.xml">
@@ -52,8 +65,22 @@ under the License.
<set field="queryString" from-field="result.queryString"/>
<set field="viewIndex" from-field="parameters.VIEW_INDEX"
type="Integer"/>
<set field="viewSize" from-field="parameters.VIEW_SIZE"
type="Integer" default-value="20"/>
+
+ <!-- entries needed for lookup ajax auto completer -->
+ <!-- required: entity to search in -->
<set field="entityName" value="Geo"/>
- <set field="searchFields" value="[geoName, geoId, geoCode]"/>
+
+ <!-- required: fields to search a match -->
+ <!-- the first element from searchFields is returned after
user selection -->
+ <!-- it might be hidden based on
widget.autocompleter.displayReturnField property in widget.properties -->
+ <set field="searchFields" value="[geoName, geoId, geoCode]"/>
+
+ <!-- optional: fields to display in the given order, default
is searchFields -->
+ <set field="displayFields" value="[geoId, geoName, geoCode]"/>
+
+ <!-- optional: additional entity condition (named
andCondition) added to search query -->
+ <!-- example : script
location="component://party/webapp/partymgr/WEB-INF/actions/party/StatusCondition.groovy"
/-->
+
</actions>
<widgets>
<decorator-screen name="LookupDecorator"
location="component://common/widget/CommonScreens.xml">
Modified:
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleForms.xml?rev=1027268&r1=1027267&r2=1027268&view=diff
==============================================================================
---
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleForms.xml
(original)
+++
ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleForms.xml
Mon Oct 25 21:06:40 2010
@@ -332,16 +332,16 @@ under the License.
<!-- Lookup Examples -->
<form name="ExampleLookupFields" type="single" title="">
- <!-- Old style lookup (in a popup window), geoIdAlone because we have
another geoId below -->
+ <!-- Old style lookup (in a popup window without autocompletion),
geoIdAlone because we have another geoId below -->
<field name="geoIdAlone" title="${uiLabelMap.CommonGeoId}">
<lookup target-form-name="LookupGeo" presentation="window"/>
</field>
- <!-- Standard lookup (in a layer)-->
- <!-- passes the name in one field and the id in another, this does not
work yet with autcompletion, WIP... -->
+ <!-- Standard lookup (in a layer with autocompletion) -->
+ <!-- passes the name in one field and the id in another, passing the
id in the other field does not work yet with autocompletion, WIP... -->
<field name="geoName" title="${uiLabelMap.CommonGeoName}">
<lookup target-form-name="LookupGeoName"
description-field-name="geoId"/>
</field>
- <!-- This field may be hidden and the name rendered in partyName using
default-value if partyGroupId is known when loading the form-->
+ <!-- This field may be hidden and the name rendered in geoName using
default-value if geoId is known when loading the form-->
<field name="geoId"
title="${uiLabelMap.CommonGeoId}"><text/></field><!-- the text field is only
used for rendering. In the "real life" you would use the hidden field commented
below to pass the data to the request -->
<!--field name="geoId"><hidden/></field-->
<sort-order>