You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/09/14 19:34:25 UTC

svn commit: r575761 - /ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml

Author: jacopoc
Date: Fri Sep 14 10:34:24 2007
New Revision: 575761

URL: http://svn.apache.org/viewvc?rev=575761&view=rev
Log:
Improved readability of the list of contact mechs associated to a work effort.
This is a simple way of presenting contact mech data that can be improved but it is also an example of nice little things you can do with widgets.

Modified:
    ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml

Modified: ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=575761&r1=575760&r2=575761&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml Fri Sep 14 10:34:24 2007
@@ -961,8 +961,17 @@
                 <field-map env-name="workEffortId" field-name="workEffortId" />
             </entity-and>
         </actions>
-        <auto-fields-entity entity-name="WorkEffortContactMech" default-field-type="display"/>
+        <row-actions>
+            <entity-one entity-name="ContactMech" value-name="contactMech"/>
+            <set field="contactMechTypeId" from-field="contactMech.contactMechTypeId"/>
+            <entity-one entity-name="PostalAddress" value-name="postalAddress"/>
+            <entity-one entity-name="TelecomNumber" value-name="telecomNumber"/>
+        </row-actions>
         <field name="workEffortId"><hidden/></field>
+        <field name="contactMechTypeId"><display-entity entity-name="ContactMechType"/></field>
+        <field name="contactMechId" use-when="telecomNumber != null"><display description="${telecomNumber.contryCode} ${telecomNumber.areaCode} ${telecomNumber.contactNumber} ${telecomNumber.askForName}"/></field>
+        <field name="contactMechId" use-when="postalAddress != null"><display description="${postalAddress.address1} ${postalAddress.address2} ${postalAddress.city} ${postalAddress.postalCode} ${postalAddress.countryGeoId} ${postalAddress.stateProvinceGeoId}"/></field>
+        <field name="contactMechId" use-when="telecomNumber == null &amp;&amp; postalAddress == null"><display description="${infoString}aaa"/></field>
         <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
             <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deleteWorkEffortContactMech?workEffortId=${workEffortId}&amp;contactMechId=${contactMechId}"/>
         </field>