Author: jacopoc
Date: Sun Oct 28 23:55:51 2007 New Revision: 589525 URL: http://svn.apache.org/viewvc?rev=589525&view=rev Log: Fixed errors reported in issue OFBIZ-1224: however the EditCommEvent form really needs to be refactored/rewritten. Modified: ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml Modified: ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml?rev=589525&r1=589524&r2=589525&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml Sun Oct 28 23:55:51 2007 @@ -53,19 +53,19 @@ <field name="partyId" map-name="parameters"><hidden/></field> <field name="communicationEventId" use-when="communicationEvent!=null"><display/></field> - <field name="communicationEventTypeId" use-when="communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")"> + <field name="communicationEventTypeId" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}"> <drop-down> <entity-options entity-name="CommunicationEventType" description="${description}"> <entity-order-by field-name="description"/> </entity-options> </drop-down> </field> - <field name="communicationEventTypeId" use-when="communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")"> + <field name="communicationEventTypeId" use-when="${bsh:(communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED"))}"> <display-entity entity-name="CommunicationEventType" description="${description}" key-field-name="communicationEventTypeId"/> </field> <!-- parent communications --> - <field name="parentCommEventId" use-when="communicationEvent!=null&&communicationEvent.getString("parentCommEventId")!=null"> + <field name="parentCommEventId" use-when="${bsh:communicationEvent!=null&&communicationEvent.getString("parentCommEventId")!=null}"> <hyperlink description="${communicationEvent.parentCommEventId}" target="EditCommunicationEvent?communicationEventId=${communicationEvent.parentCommEventId}&partyId=${partyId}" target-type="intra-app"/> </field> <field name="parentCommEventId" map-name="parameters" use-when="communicationEvent==null" > @@ -91,13 +91,13 @@ </field> <!-- auto email fields --> - <field name="fromString" use-when="communicationEvent!=null&&communicationEvent.getString("fromString")!=null"> + <field name="fromString" use-when="${bsh:communicationEvent!=null&&communicationEvent.getString("fromString")!=null}"> <display/> </field> - <field name="toString" use-when="communicationEvent!=null&&communicationEvent.getString("toString")!=null"> + <field name="toString" use-when="${bsh:communicationEvent!=null&&communicationEvent.getString("toString")!=null}"> <display/> </field> - <field name="toString" map-name="parameters" use-when="communicationEvent==null&&toString!=null"> + <field name="toString" map-name="parameters" use-when="${bsh:communicationEvent==null&&toString!=null}"> <text size="60"/> </field> @@ -113,20 +113,20 @@ </field> <!-- contact mech type --> - <field name="contactMechTypeId" use-when="communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")"> + <field name="contactMechTypeId" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}"> <drop-down> <entity-options description="${description}" entity-name="ContactMechType" key-field-name="contactMechTypeId"> <entity-order-by field-name="description"/> </entity-options> </drop-down> </field> - <field name="contactMechTypeId" use-when="communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")"> + <field name="contactMechTypeId" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}"> <display-entity entity-name="ContactMechType" description="${description}" key-field-name="contactMechTypeId"/> </field> <!-- this is an example of how to display different types of contact mech to the user --> <field name="contactMechIdFrom" title="${uiLabelMap.PartyFromEmailAddress}" - use-when="(parameters.get("communicationEventTypeId")!=null)&&(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION")||parameters.get("communicationEventTypeId").equals("AUTO_EMAIL_COMM"))"> + use-when="${bsh:(parameters.get("communicationEventTypeId")!=null)&&(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION")||parameters.get("communicationEventTypeId").equals("AUTO_EMAIL_COMM"))}"> <drop-down allow-empty="false" current="selected"> <entity-options entity-name="PartyAndContactMech" description="${infoString}" key-field-name="contactMechId"> <entity-constraint name="partyId" operator="equals" value="${partyIdFrom}"/> @@ -134,56 +134,56 @@ </drop-down> </field> <field name="contactMechIdFrom" title="${uiLabelMap.PartyFromContactMech}" - use-when="(parameters.get("communicationEventTypeId")==null)||!(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION")||parameters.get("communicationEventTypeId").equals("AUTO_EMAIL_COMM"))"> + use-when="${bsh:(parameters.get("communicationEventTypeId")==null)||!(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION")||parameters.get("communicationEventTypeId").equals("AUTO_EMAIL_COMM"))}"> <lookup target-form-name="LookupPreferredContactMech" target-parameter="partyIdFrom"/></field> <!-- TODO: somehow show the address or email here, rather than just a contactMechId --> <field name="contactMechIdTo" title="${uiLabelMap.PartyToEmailAddress}" - use-when="(parameters.get("communicationEventTypeId")!=null)&&(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION"))"> + use-when="${bsh:(parameters.get("communicationEventTypeId")!=null)&&(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION"))}"> <drop-down allow-empty="false" current="selected" no-current-selected-key="${parameters.contactMechIdTo}"> <list-options key-name="contactMechId" list-name="targetEmailAddresses" description="${infoString}"/> </drop-down> </field> <field name="contactMechIdTo" title="${uiLabelMap.PartyToContactMech}" - use-when="(parameters.get("communicationEventTypeId")==null)||!(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION"))"> + use-when="${bsh:(parameters.get("communicationEventTypeId")==null)||!(parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION"))}"> <lookup target-form-name="LookupPreferredContactMech" target-parameter="partyIdTo"/></field> <!-- role type info --> - <field name="roleTypeIdFrom" use-when="communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")"> + <field name="roleTypeIdFrom" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}"> <drop-down no-current-selected-key="_NA_"> <entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId"> <entity-order-by field-name="description"/> </entity-options> </drop-down> </field> - <field name="roleTypeIdFrom" use-when="communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")"> + <field name="roleTypeIdFrom" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}"> <display-entity entity-name="RoleType" description="${description}" key-field-name="roleTypeId"/> </field> - <field name="roleTypeIdTo" use-when="communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")"> + <field name="roleTypeIdTo" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}"> <drop-down no-current-selected-key="_NA_"> <entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId"> <entity-order-by field-name="description"/> </entity-options> </drop-down> </field> - <field name="roleTypeIdTo" use-when="communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")"> + <field name="roleTypeIdTo" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}"> <display-entity entity-name="RoleType" description="${description}" key-field-name="roleTypeId"/> </field> <!-- contact list --> - <field name="contactListId" use-when="communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")"> + <field name="contactListId" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}"> <lookup size="20" target-form-name="LookupContactList"> <sub-hyperlink target="/marketing/control/EditContactList?contactListId=${communicationEvent.contactListId}" target-type="inter-app" link-style="smallSubmit"/> </lookup> </field> - <field name="contactListId" use-when="communicationEvent!=null&&communicationEvent.getString("contactListId")!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")"><display/></field> + <field name="contactListId" use-when="${bsh:communicationEvent!=null&&communicationEvent.getString("contactListId")!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}"><display/></field> <field name="datetimeStarted" title="${uiLabelMap.CommonStartDate}"><date-time/></field> <field name="datetimeEnded" title="${uiLabelMap.CommonFinishDate}"><date-time/></field> - <field name="subject" use-when="communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")"><text size="60"/></field> - <field name="subject" use-when="communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")"><display/></field> + <field name="subject" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}"><text size="60"/></field> + <field name="subject" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}"><display/></field> <field name="reasonEnumId"> <drop-down no-current-selected-key="" allow-empty="true"> @@ -193,20 +193,20 @@ </entity-options> </drop-down> </field> - <field name="contentMimeTypeId" use-when="communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")"> + <field name="contentMimeTypeId" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}"> <drop-down no-current-selected-key="text/plain" allow-empty="false"> <entity-options description="${mimeTypeId}" entity-name="MimeType" key-field-name="mimeTypeId"> <entity-order-by field-name="mimeTypeId"/> </entity-options> </drop-down> </field> - <field name="contentMimeTypeId" use-when="communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")"><display/></field> + <field name="contentMimeTypeId" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}"><display/></field> - <field name="content" title="${uiLabelMap.CommonContent}" use-when="communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")"><textarea cols="60" rows="10"/></field> - <field name="content" title="${uiLabelMap.CommonContent}" use-when="communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")"><textarea cols="60" rows="10" read-only="true"/></field> + <field name="content" title="${uiLabelMap.CommonContent}" use-when="${bsh:communicationEvent==null||communicationEvent.getString("statusId").equals("COM_ENTERED")}"><textarea cols="60" rows="10"/></field> + <field name="content" title="${uiLabelMap.CommonContent}" use-when="${bsh:communicationEvent!=null&&!communicationEvent.getString("statusId").equals("COM_ENTERED")}"><textarea cols="60" rows="10" read-only="true"/></field> <field name="note" title="${uiLabelMap.CommonNote}"><textarea cols="60" rows="3"/></field> - <field name="messageId" use-when="communicationEvent!=null&&communicationEvent.getString("messageId")!=null"><display/></field> + <field name="messageId" use-when="${bsh:communicationEvent!=null&&communicationEvent.getString("messageId")!=null}"><display/></field> <field name="submitButton" title="${uiLabelMap.CommonSave}"><submit button-type="button"/></field> </form> |
Free forum by Nabble | Edit this page |