Author: hansbak
Date: Sat Dec 13 19:39:37 2008 New Revision: 726349 URL: http://svn.apache.org/viewvc?rev=726349&view=rev Log: added more null checking to avoid many log error messages and changed from if/else to ?/: Modified: ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml Modified: ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml?rev=726349&r1=726348&r2=726349&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml Sat Dec 13 19:39:37 2008 @@ -71,7 +71,7 @@ <field name="partyId" title="${uiLabelMap.AccountingOrganizationPartyId}"><display/></field> <!-- if there is no partyAcctgPreference yet, then we show drop-downs for the fields and a submit button --> <field name="fiscalYearStartMonth" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("fiscalYearStartMonth")!=null)return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh:agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("fiscalYearStartMonth")!=null?"AccountingInheritedValue":""}}"> <drop-down> <option key="1" description="${uiLabelMap.AccountingFiscalMonth01}"/> <option key="2" description="${uiLabelMap.AccountingFiscalMonth02}"/> @@ -88,7 +88,7 @@ </drop-down> </field> <field name="fiscalYearStartDay" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("fiscalYearStartDay")!=null) return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh: agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("fiscalYearStartDay")!=null?"AccountingInheritedValue":""}}"> <drop-down> <option key="1"/><option key="2"/><option key="3"/><option key="4"/><option key="5"/> <option key="6"/><option key="7"/><option key="8"/><option key="9"/><option key="10"/> @@ -100,7 +100,7 @@ </drop-down> </field> <field name="taxFormId" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("taxFormId")!=null) return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh:agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("taxFormId")!=null?"AccountingInheritedValue":""}}"> <drop-down> <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId"> <entity-constraint name="enumTypeId" operator="equals" value="TAX_FORMS"/> @@ -109,7 +109,7 @@ </drop-down> </field> <field name="cogsMethodId" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("cogsMethodId")!=null) return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh:agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("cogsMethodId")!=null?"AccountingInheritedValue":""}}"> <drop-down> <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId"> <entity-constraint name="enumTypeId" operator="equals" value="COGS_METHODS"/> @@ -118,7 +118,7 @@ </drop-down> </field> <field name="baseCurrencyUomId" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("baseCurrencyUomId")!=null) return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh:agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("baseCurrencyUomId")!=null?"AccountingInheritedValue":""}}"> <drop-down> <entity-options key-field-name="uomId" description="${abbreviation} - ${description}" entity-name="Uom"> <entity-constraint name="uomTypeId" operator="equals" value="CURRENCY_MEASURE"/> @@ -127,11 +127,11 @@ </drop-down> </field> <field name="invoiceIdPrefix" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("invoiceIdPrefix")!=null) return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh:agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("invoiceIdPrefix")!=null?"AccountingInheritedValue":""}}"> <text maxlength="10" size="5"/> </field> <field name="invoiceSequenceEnumId" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("invoiceSequenceEnumId")!=null) return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh:agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("invoiceSequenceEnumId")!=null?"AccountingInheritedValue":""}}"> <drop-down> <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId"> <entity-constraint name="enumTypeId" operator="equals" value="INVOICE_SEQMD"/> @@ -140,17 +140,17 @@ </drop-down> </field> <field name="useInvoiceIdForReturns" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("useInvoiceIdForReturns")!=null) return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh:agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("useInvoiceIdForReturns")!=null?"AccountingInheritedValue":""}}"> <drop-down allow-empty="true"> <option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/> </drop-down> </field> <field name="quoteIdPrefix" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("quoteIdPrefix")!=null) return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh:agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("quoteIdPrefix")!=null?"AccountingInheritedValue":""}}"> <text maxlength="10" size="5"/> </field> <field name="quoteSequenceEnumId" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("quoteSequenceEnumId")!=null) return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh:agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("quoteSequenceEnumId")!=null?"AccountingInheritedValue":""}}"> <drop-down> <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId"> <entity-constraint name="enumTypeId" operator="equals" value="QUOTE_SEQMD"/> @@ -159,11 +159,11 @@ </drop-down> </field> <field name="orderIdPrefix" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("orderIdPrefix")!=null) return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh:agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("orderIdPrefix")!=null?"AccountingInheritedValue":""}}"> <text maxlength="10" size="5"/> </field> <field name="orderSequenceEnumId" use-when="partyAcctgPreference==null" - tooltip="${uiLabelMap.${bsh: if(agregatedPartyAcctgPreference.get("orderSequenceEnumId")!=null) return "AccountingInheritedValue"; else return "";}}"> + tooltip="${uiLabelMap.${bsh:agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("orderSequenceEnumId")!=null?"AccountingInheritedValue":""}}"> <drop-down> <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId"> <entity-constraint name="enumTypeId" operator="equals" value="ORDER_SEQMD"/> @@ -176,112 +176,95 @@ <!-- otherwise, we just display the fields. there is no submit button because we shouldn't try to create it again and don't support an update option right now--> <field name="fiscalYearStartMonth" use-when="partyAcctgPreference!=null" tooltip="${bsh: - if(partyAcctgPreference.get("fiscalYearStartMonth")==null&&agregatedPartyAcctgPreference.get("fiscalYearStartMonth")!=null) - return "AccountingInheritedValue"; - else return "";}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("fiscalYearStartMonth")==null&&agregatedPartyAcctgPreference.get("fiscalYearStartMonth")!=null? + "AccountingInheritedValue":""}"> <display/> </field> <field name="fiscalYearStartDay" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("fiscalYearStartDay")==null&&agregatedPartyAcctgPreference.get("fiscalYearStartDay")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("fiscalYearStartDay")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("fiscalYearStartDay")!=null? + "AccountingInheritedValue":""}}"> <display/> </field> <field name="taxFormId" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("taxFormId")==null&&agregatedPartyAcctgPreference.get("taxFormId")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("taxFormId")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("taxFormId")!=null? + "AccountingInheritedValue":""}}"> <display-entity entity-name="Enumeration" key-field-name="enumId"/> </field> <field name="cogsMethodId" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("cogsMethodId")==null&&agregatedPartyAcctgPreference.get("cogsMethodId")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("cogsMethodId")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("cogsMethodId")!=null? + "AccountingInheritedValue":""}}"> <display-entity entity-name="Enumeration" key-field-name="enumId"/> </field> <field name="baseCurrencyUomId" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("baseCurrencyUomId")==null&&agregatedPartyAcctgPreference.get("baseCurrencyUomId")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("baseCurrencyUomId")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("baseCurrencyUomId")!=null? + "AccountingInheritedValue":""}}"> <display/> </field> <field name="invoiceIdPrefix" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("invoiceIdPrefix")==null&&agregatedPartyAcctgPreference.get("invoiceIdPrefix")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("invoiceIdPrefix")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("invoiceIdPrefix")!=null? + "AccountingInheritedValue":""}}"> <display/> </field> <field name="invoiceSequenceEnumId" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("invoiceSequenceEnumId")==null&&agregatedPartyAcctgPreference.get("invoiceSequenceEnumId")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("invoiceSequenceEnumId")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("invoiceSequenceEnumId")!=null? + "AccountingInheritedValue":""}}"> <display-entity entity-name="Enumeration" key-field-name="enumId"/> </field> <field name="useInvoiceIdForReturns" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("useInvoiceIdForReturns")==null&&agregatedPartyAcctgPreference.get("useInvoiceIdForReturns")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("useInvoiceIdForReturns")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("useInvoiceIdForReturns")!=null? + "AccountingInheritedValue":""}}"> <display/> </field> <field name="quoteSequenceEnumId" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("quoteSequenceEnumId")==null&&agregatedPartyAcctgPreference.get("quoteSequenceEnumId")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("quoteSequenceEnumId")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("quoteSequenceEnumId")!=null? + "AccountingInheritedValue":""}}"> <display-entity entity-name="Enumeration" key-field-name="enumId"/> </field> <field name="quoteIdPrefix" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("quoteIdPrefix")==null&&agregatedPartyAcctgPreference.get("quoteIdPrefix")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("quoteIdPrefix")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("quoteIdPrefix")!=null? + "AccountingInheritedValue":""}}"> <display/> </field> <field name="lastQuoteNumber" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("lastQuoteNumber")==null&&agregatedPartyAcctgPreference.get("lastQuoteNumber")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("lastQuoteNumber")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("lastQuoteNumber")!=null? + "AccountingInheritedValue":""}}"> <display/> </field> <field name="orderSequenceEnumId" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("orderSequenceEnumId")==null&&agregatedPartyAcctgPreference.get("orderSequenceEnumId")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("orderSequenceEnumId")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("orderSequenceEnumId")!=null? + "AccountingInheritedValue":""}}"> <display-entity entity-name="Enumeration" key-field-name="enumId"/> </field> <field name="orderIdPrefix" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("orderIdPrefix")==null&&agregatedPartyAcctgPreference.get("orderIdPrefix")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("orderIdPrefix")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("orderIdPrefix")!=null? + "AccountingInheritedValue":""}}"> <display/> </field> <field name="lastOrderNumber" use-when="partyAcctgPreference!=null" tooltip="${uiLabelMap.${bsh: - if(partyAcctgPreference.get("lastOrderNumber")==null&&agregatedPartyAcctgPreference.get("lastOrderNumber")!=null) - return "AccountingInheritedValue"; - else return "";}}"> + partyAcctgPreference!= null&&partyAcctgPreference.get("lastOrderNumber")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("lastOrderNumber")!=null? + "AccountingInheritedValue":""}}"> <display/> </field> <!-- these 2 are ONLY displayed, never allow manual editing --> <field name="lastInvoiceNumber" tooltip="${uiLabelMap.${bsh: - if((partyAcctgPreference==null&&agregatedPartyAcctgPreference.get("lastInvoiceNumber")!=null) || - (partyAcctgPreference!=null&&partyAcctgPreference.get("lastInvoiceNumber")==null&&agregatedPartyAcctgPreference.get("lastInvoiceNumber")!=null)) - return "AccountingInheritedValue"; - else return "";}}"> + (partyAcctgPreference==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("lastInvoiceNumber")!=null) || + (partyAcctgPreference!=null&&partyAcctgPreference.get("lastInvoiceNumber")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("lastInvoiceNumber")!=null)? + "AccountingInheritedValue":""}}"> <display/> </field> <field name="lastInvoiceRestartDate" tooltip="${uiLabelMap.${bsh: - if((partyAcctgPreference==null&&agregatedPartyAcctgPreference.get("lastInvoiceRestartDate")!=null) || - (partyAcctgPreference!=null&&partyAcctgPreference.get("lastInvoiceRestartDate")==null&&agregatedPartyAcctgPreference.get("lastInvoiceRestartDate")!=null)) - return "AccountingInheritedValue"; - else return "";}}"> + (partyAcctgPreference==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("lastInvoiceRestartDate")!=null) || + (partyAcctgPreference!=null&&partyAcctgPreference.get("lastInvoiceRestartDate")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("lastInvoiceRestartDate")!=null)? + "AccountingInheritedValue":""}}"> <display/> </field> <!-- these 2 are always can be updated --> <field name="refundPaymentMethodId" tooltip="${uiLabelMap.${bsh: - if((partyAcctgPreference==null&&agregatedPartyAcctgPreference.get("refundPaymentMethodId")!=null) || - (partyAcctgPreference!=null&&partyAcctgPreference.get("refundPaymentMethodId")==null&&agregatedPartyAcctgPreference.get("refundPaymentMethodId")!=null)) - return "AccountingInheritedValue"; - else return "";}}"> + (partyAcctgPreference==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("refundPaymentMethodId")!=null) || + (partyAcctgPreference!=null&&partyAcctgPreference.get("refundPaymentMethodId")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("refundPaymentMethodId")!=null)? + "AccountingInheritedValue":""}}"> <drop-down> <entity-options entity-name="PaymentMethod" description="${description}" key-field-name="paymentMethodId"> <entity-constraint name="partyId" operator="equals" env-name="organizationPartyId"/> @@ -289,10 +272,9 @@ </drop-down> </field> <field name="errorGlJournalId" tooltip="${uiLabelMap.${bsh: - if((partyAcctgPreference==null&&agregatedPartyAcctgPreference.get("errorGlJournalId")!=null) || - (partyAcctgPreference!=null&&partyAcctgPreference.get("errorGlJournalId")==null&&agregatedPartyAcctgPreference.get("errorGlJournalId")!=null)) - return "AccountingInheritedValue"; - else return "";}}"> + (partyAcctgPreference==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("errorGlJournalId")!=null) || + (partyAcctgPreference!=null&&partyAcctgPreference.get("errorGlJournalId")==null&&agregatedPartyAcctgPreference!= null&&agregatedPartyAcctgPreference.get("errorGlJournalId")!=null)? + "AccountingInheritedValue":""}}"> <drop-down allow-empty="true"> <entity-options entity-name="GlJournal" key-field-name="glJournalId" description="${glJournalName} [${glJournalId}]"> <entity-constraint name="organizationPartyId" operator="equals" env-name="organizationPartyId"/> |
Free forum by Nabble | Edit this page |