Author: jleroux
Date: Tue Sep 21 13:58:18 2010
New Revision: 999419
URL: http://svn.apache.org/viewvc?rev=999419&view=rev
Log:
Introduces an example of autocompleted dropdown use in Example. Still some work
to do as the value returned contains also the Description, should contain only
the Id.
TODO : return only the Id, else you need to edit the field to remove the
description
Modified:
ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
ofbiz/trunk/framework/example/widget/example/ExampleForms.xml
ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml
Modified: ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleUiLabels.xml?rev=999419&r1=999418&r2=999419&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/config/ExampleUiLabels.xml (original)
+++ ofbiz/trunk/framework/example/config/ExampleUiLabels.xml Tue Sep 21
13:58:18 2010
@@ -40,6 +40,14 @@
<value xml:lang="ru">ÐÑиложение ÐÑимеÑ</value>
<value
xml:lang="th">à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¹à¸à¸£à¹à¸à¸£à¸¡à¸à¸à¸¡à¸à¸´à¸§à¹à¸à¸à¸£à¹</value>
<value xml:lang="zh">æ ·ä¾åºç¨</value>
+ </property>
+ <property key="ExampleAutocompleteDropdown">
+ <value xml:lang="en">Autocomplete Dropdown</value>
+ <value xml:lang="fr">Liste déroulante à auto complétion</value>
+ </property>
+ <property key="ExampleAutocompleteTooltip">
+ <value xml:lang="en">GROUP type based example, use Geo.Geoid and
Geo.GeoName Entity.fields for completion</value>
+ <value xml:lang="fr">Exemple sur le type GROUP et utilisant Geo.Geoid
et Geo.GeoName comme Entité.champs pour la complétion</value>
</property>
<property key="ExampleBirtChartReport">
<value xml:lang="en">HTML chart report</value>
Modified: ofbiz/trunk/framework/example/widget/example/ExampleForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleForms.xml?rev=999419&r1=999418&r2=999419&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/ExampleForms.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/ExampleForms.xml Tue Sep 21
13:58:18 2010
@@ -239,18 +239,6 @@ under the License.
<field name="exampleFeatureId" title="${uiLabelMap.ExampleFeature}">
<lookup target-form-name="LookupExampleFeature"/>
</field>
- <!-- most feature rich for autocomplete, ie partial text entry
searches the full string,
- doesn't require custom request to function, etc; Note that for
usability this is still a bit lame since you can't see the full list,
- you HAVE to know part of the ID or description in order to see
options -->
- <!--field name="exampleFeatureId">
- <drop-down>
- <auto-complete/>
- <entity-options entity-name="ExampleFeature"
description="${exampleFeatureId}: ${description}">
- <entity-order-by field-name="exampleFeatureId"/>
- </entity-options>
- </drop-down>
- </field-->
-
<field name="exampleFeatureApplTypeId"
title="${uiLabelMap.CommonType}">
<drop-down allow-empty="false">
<entity-options entity-name="ExampleFeatureApplType"
description="${description}">
Modified:
ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml?rev=999419&r1=999418&r2=999419&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml
(original)
+++ ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml Tue
Sep 21 13:58:18 2010
@@ -229,9 +229,26 @@ under the License.
</drop-down>
</field>
<!-- ****************************** -->
+ <!-- *** Autocomplete dropdown *** -->
+ <!-- ****************************** -->
+ <!-- most feature rich for autocomplete, ie partial text entry
searches the full string,
+ doesn't require custom request to function, etc; Note that for
usability this is still a bit lame since you can't see the full list,
+ you HAVE to know part of the ID or description in order to see
options -->
+ <field name="emptyField1"
title="${uiLabelMap.CommonEmptyHeader}"><display/></field>
+ <field name="geoId" title="${uiLabelMap.ExampleAutocompleteDropdown}"
+ tooltip="${uiLabelMap.ExampleAutocompleteTooltip}">
+ <drop-down>
+ <auto-complete/>
+ <entity-options entity-name="Geo" description="${geoId}:
${geoName}">
+ <entity-constraint name="geoTypeId" value="GROUP"/>
+ <entity-order-by field-name="geoName"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <!-- ****************************** -->
<!-- *** Dependent dropdowns *** -->
<!-- ****************************** -->
- <field name="emptyField"
title="${uiLabelMap.CommonEmptyHeader}"><display/></field>
+ <field name="emptyField2"
title="${uiLabelMap.CommonEmptyHeader}"><display/></field>
<field name="dependendDropDownFields"
title="${uiLabelMap.ExampleDependentDropDowns}">
<display
description="${uiLabelMap.ExampleDependentDropDownTooltip}"/>
</field>