Author: jleroux Date: Tue Sep 21 13:07:57 2010 New Revision: 999390 URL: http://svn.apache.org/viewvc?rev=999390&view=rev Log: Removes dependencies from Example component to Party component by replacing Party lookups by Geo lookups. Removes useless specific party lookups in Example component
Removed: ofbiz/trunk/framework/example/widget/example/FormWidgetExampleLookupForms.xml ofbiz/trunk/framework/example/widget/example/FormWidgetExampleLookupScreens.xml Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml ofbiz/trunk/framework/common/widget/LookupForms.xml ofbiz/trunk/framework/common/widget/LookupScreens.xml ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml?rev=999390&r1=999389&r2=999390&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml (original) +++ ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml Tue Sep 21 13:07:57 2010 @@ -209,6 +209,7 @@ under the License. </request-map> <request-map uri="LookupGeo"><security https="true" auth="true"/><response name="success" type="view" value="LookupGeo"/></request-map> + <request-map uri="LookupGeoName"><security https="true" auth="true"/><response name="success" type="view" value="LookupGeoName"/></request-map> <!--========================== AJAX events =====================--> @@ -234,4 +235,5 @@ under the License. <view-map name="viewBlocked" type="screen" page="component://common/widget/CommonScreens.xml#viewBlocked"/> <view-map name="LookupGeo" type="screen" page="component://common/widget/LookupScreens.xml#LookupGeo"/> + <view-map name="LookupGeoName" type="screen" page="component://common/widget/LookupScreens.xml#LookupGeoName"/> </site-conf> Modified: ofbiz/trunk/framework/common/widget/LookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/LookupForms.xml?rev=999390&r1=999389&r2=999390&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/LookupForms.xml (original) +++ ofbiz/trunk/framework/common/widget/LookupForms.xml Tue Sep 21 13:07:57 2010 @@ -59,4 +59,12 @@ under the License. <field name="abbreviation" title="${uiLabelMap.CommonGeoAbbr}"><display/></field> <field name="wellKnownText" title="${uiLabelMap.CommonGeoWellKnownText}"><display/></field> </form> + + <form name="LookupGeoName" extends="LookupGeo" target="LookupGeoName"/> + <form name="listLookupGeoName" extends="listLookupGeo" paginate-target="LookupGeoName"> + <field name="geoId" widget-style="buttontext" title="${uiLabelMap.CommonGeoId}"> + <hyperlink also-hidden="false" target-type="plain" description="${geoId}" target="javascript:set_values('${geoName}', '${geoId}')"/> + </field> + </form> + </forms> Modified: ofbiz/trunk/framework/common/widget/LookupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/LookupScreens.xml?rev=999390&r1=999389&r2=999390&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/LookupScreens.xml (original) +++ ofbiz/trunk/framework/common/widget/LookupScreens.xml Tue Sep 21 13:07:57 2010 @@ -44,7 +44,30 @@ under the License. </widgets> </section> </screen> - + + <screen name="LookupGeoName"> + <section> + <actions> + <set field="title" value="${uiLabelMap.PageTitleLookupGeo}"/> + <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"/> + <set field="entityName" value="Geo"/> + <set field="searchFields" value="[geoName, geoId, geoCode]"/> + </actions> + <widgets> + <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="search-options"> + <include-form name="LookupGeoName" location="component://common/widget/LookupForms.xml"/> + </decorator-section> + <decorator-section name="search-results"> + <include-form name="listLookupGeoName" location="component://common/widget/LookupForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <!-- Locales Lookup Screen --> <screen name="ListLocales"> <section> Modified: ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml?rev=999390&r1=999389&r2=999390&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml (original) +++ ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml Tue Sep 21 13:07:57 2010 @@ -298,18 +298,18 @@ under the License. <!-- Lookup Examples --> <form name="ExampleLookupFields" type="single" title=""> - <!-- Old style lookup (in a popup window) --> - <field name="partyId" title="${uiLabelMap.CommonPartyId}"> - <lookup target-form-name="LookupPartyName" presentation="window"/> + <!-- Old style lookup (in a popup window), 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... --> - <field name="partyName" title="${uiLabelMap.CommonPartyGroupName}"> - <lookup target-form-name="LookupPartyGroupByName" description-field-name="partyGroupId"/> + <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--> - <field name="partyGroupId" title="${uiLabelMap.CommonPartyId}"><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="partyGroupId"><hidden/></field--> + <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> <field-group> <sort-field name="partyId"/>