Author: jleroux
Date: Sun Jul 15 01:43:56 2007 New Revision: 556373 URL: http://svn.apache.org/viewvc?view=rev&rev=556373 Log: A bunch of changes around <option value="Y">${uiLabelMap.CommonY} problems. using this scheme <#if (()!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> <#if (()!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> The "new" ! operator (I did not find the 1st version where it appeared, seems recent anyway) replaces here the ?default() operator There is also a new ?? interesting operator : http://freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_missing_default This definitively closes the "various values in allowSolicitation variable break some screens" (https://issues.apache.org/jira/browse/OFBIZ-1041). I used the same simple scheme everywhere but where no data was reloaded (like apparently in EditCategoryProducts.ftl and EditProductPromoRules.ftl) Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/custsettings.ftl ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/genericaddress.ftl ofbiz/trunk/applications/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl ofbiz/trunk/applications/order/webapp/ordermgr/entry/custsettings.ftl ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStorePaySetup.ftl Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl?view=diff&rev=556373&r1=556372&r2=556373 ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl Sun Jul 15 01:43:56 2007 @@ -212,7 +212,8 @@ <td width="5"> </td> <td width="74%"> <select name="allowSolicitation" class='selectBox'> - <option>${(partyContactMechData.allowSolicitation?if_exists)?default("Y")}</option> + <#if ((partyContactMechData.allowSolicitation)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((partyContactMechData.allowSolicitation)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl?view=diff&rev=556373&r1=556372&r2=556373 ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl Sun Jul 15 01:43:56 2007 @@ -191,7 +191,8 @@ <div class="form-label">${uiLabelMap.PartyAllowAddressSolicitation}</div> <div class="form-field"> <select name="CUSTOMER_ADDRESS_ALLOW_SOL" class='selectBox'> - <option>${requestParameters.CUSTOMER_ADDRESS_ALLOW_SOL?default("Y")}</option> + <#if ((requestParameters.CUSTOMER_ADDRESS_ALLOW_SOL)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((requestParameters.CUSTOMER_ADDRESS_ALLOW_SOL)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> @@ -223,7 +224,8 @@ ${uiLabelMap.PartyExtension} <input type="text" class='inputBox' name="CUSTOMER_HOME_EXT" value="${requestParameters.CUSTOMER_HOME_EXT?if_exists}" size="6" maxlength="10"> <br/> <select name="CUSTOMER_HOME_ALLOW_SOL" class='selectBox'> - <option>${requestParameters.CUSTOMER_HOME_ALLOW_SOL?default("Y")}</option> + <#if ((requestParameters.CUSTOMER_HOME_ALLOW_SOL)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((requestParameters.CUSTOMER_HOME_ALLOW_SOL)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> @@ -240,7 +242,8 @@ ${uiLabelMap.PartyExtension} <input type="text" class='inputBox' name="CUSTOMER_WORK_EXT" value="${requestParameters.CUSTOMER_WORK_EXT?if_exists}" size="6" maxlength="10"> <br/> <select name="CUSTOMER_WORK_ALLOW_SOL" class='selectBox'> - <option>${requestParameters.CUSTOMER_WORK_ALLOW_SOL?default("Y")}</option> + <#if ((requestParameters.CUSTOMER_WORK_ALLOW_SOL)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((requestParameters.CUSTOMER_WORK_ALLOW_SOL)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> @@ -256,7 +259,8 @@ - <input type="text" class='inputBox' name="CUSTOMER_FAX_CONTACT" value="${requestParameters.CUSTOMER_FAX_CONTACT?if_exists}" size="15" maxlength="15"> <br/> <select name="CUSTOMER_FAX_ALLOW_SOL" class='selectBox'> - <option>${requestParameters.CUSTOMER_FAX_ALLOW_SOL?default("Y")}</option> + <#if ((requestParameters.CUSTOMER_FAX_ALLOW_SOL)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((requestParameters.CUSTOMER_FAX_ALLOW_SOL)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> @@ -272,7 +276,8 @@ - <input type="text" class='inputBox' name="CUSTOMER_MOBILE_CONTACT" value="${requestParameters.CUSTOMER_MOBILE_CONTACT?if_exists}" size="15" maxlength="15"> <br/> <select name="CUSTOMER_MOBILE_ALLOW_SOL" class='selectBox'> - <option>${requestParameters.CUSTOMER_MOBILE_ALLOW_SOL?default("Y")}</option> + <#if ((requestParameters.CUSTOMER_MOBILE_ALLOW_SOL)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((requestParameters.CUSTOMER_MOBILE_ALLOW_SOL)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> @@ -295,7 +300,8 @@ <div><input type="text" class='inputBox' name="CUSTOMER_EMAIL" value="${requestParameters.CUSTOMER_EMAIL?if_exists}" size="40" maxlength="255" onchange="changeEmail()" onkeyup="changeEmail()"> *</div> <div> <select name="CUSTOMER_EMAIL_ALLOW_SOL" class='selectBox'> - <option>${requestParameters.CUSTOMER_EMAIL_ALLOW_SOL?default("Y")}</option> + <#if ((requestParameters.CUSTOMER_EMAIL_ALLOW_SOL)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((requestParameters.CUSTOMER_EMAIL_ALLOW_SOL)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/custsettings.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/custsettings.ftl?view=diff&rev=556373&r1=556372&r2=556373 ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/custsettings.ftl (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/custsettings.ftl Sun Jul 15 01:43:56 2007 @@ -84,7 +84,8 @@ <td width="5"> </td> <td width="74%"> <select name="homeSol" class="selectBox"> - <option>${parameters.homeSol?default("Y")}</option> + <#if ((parameters.homeSol?)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((parameters.homeSol?)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> @@ -123,8 +124,11 @@ <td width="5"> </td> <td width="74%"> <select name="emailSol" class="selectBox"> - <option>${parameters.emailSol?default("Y")}</option> - <option></option><option value="Y">${uiLabelMap.CommonY}</option><option value="N">${uiLabelMap.CommonN}</option> + <#if ((parameters.emailSol)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((parameters.emailSol)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> + <option></option> + <option value="Y">${uiLabelMap.CommonY}</option> + <option value="N">${uiLabelMap.CommonN}</option> </select> </td> </tr> Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/genericaddress.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/genericaddress.ftl?view=diff&rev=556373&r1=556372&r2=556373 ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/genericaddress.ftl (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/genericaddress.ftl Sun Jul 15 01:43:56 2007 @@ -103,7 +103,8 @@ <td width="5"> </td> <td width="74%"> <select name="allowSolicitation" class='selectBox' <#if requestParameters.useShipAddr?exists>disabled</#if>> - <option>${(parameters.allowSolicitatio?if_exists)?default("Y")}</option> + <#if ((parameters.allowSolicitation)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((parameters.allowSolicitatio)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl?view=diff&rev=556373&r1=556372&r2=556373 ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl Sun Jul 15 01:43:56 2007 @@ -101,7 +101,8 @@ <td><div class="tableheadtext">${uiLabelMap.EcommercePublic}?</div></td> <td> <select name="isPublic" class="selectBox"> - <option>${shoppingList.isPublic?default("Y")}</option> + <#if ((shoppingList.isPublic)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((shoppingList.isPublic)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> @@ -112,7 +113,8 @@ <td><div class="tableheadtext">${uiLabelMap.EcommerceActive}?</div></td> <td> <select name="isActive" class="selectBox"> - <option>${shoppingList.isActive?default("Y")}</option> + <#if ((shoppingList.isActive)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((shoppingList.isActive)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/custsettings.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/custsettings.ftl?view=diff&rev=556373&r1=556372&r2=556373 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/custsettings.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/custsettings.ftl Sun Jul 15 01:43:56 2007 @@ -74,7 +74,8 @@ ext <input type="text" class="inputBox" name="homeExt" value="${requestParameters.homeExt?if_exists}" size="6" maxlength="10"/> <BR> <select name="homeSol" class="selectBox"> - <option>${requestParameters.homeSol?default("Y")}</option> + <#if ((requestParameters.homeSol)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((requestParameters.homeSol)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> @@ -91,7 +92,8 @@ ext <input type="text" class="inputBox" name="workExt" value="${requestParameters.CUSTOMER_WORK_EXT?if_exists}" size="6" maxlength="10"/> <BR> <select name="workSol" class="selectBox"> - <option>${requestParameters.workSol?default("Y")}</option> + <#if ((requestParameters.workSol)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((requestParameters.workSol)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> @@ -108,7 +110,8 @@ <input type="text" class="inputBox" name="emailAddress" value="" size="60" maxlength="255"> <BR> <select name="emailSol" class="selectBox"> - <option>${requestParameters.emailSol?default("Y")}</option> + <#if ((requestParameters.emailSol)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((requestParameters.emailSol)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl?view=diff&rev=556373&r1=556372&r2=556373 ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl Sun Jul 15 01:43:56 2007 @@ -222,13 +222,11 @@ <td class="label">${uiLabelMap.PartyContactAllowSolicitation}?</td> <td> <select name="allowSolicitation"> - <#if (mechMap.partyContactMech.allowSolicitation)?has_content> - <#if (mechMap.partyContactMech.allowSolicitation?default("") == "Y")><option value="Y">${uiLabelMap.CommonY}</option></#if> - <#if (mechMap.partyContactMech.allowSolicitation?default("") == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> - </#if> - <option></option> - <option value="Y">${uiLabelMap.CommonY}</option> - <option value="N">${uiLabelMap.CommonN}</option> + <#if ((mechMap.partyContactMech.allowSolicitation)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((mechMap.partyContactMech.allowSolicitation)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> + <option></option> + <option value="Y">${uiLabelMap.CommonY}</option> + <option value="N">${uiLabelMap.CommonN}</option> </select> </td> </tr> Modified: ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl?view=diff&rev=556373&r1=556372&r2=556373 ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl Sun Jul 15 01:43:56 2007 @@ -52,7 +52,8 @@ <td> <div class="tabletext"> <select name="postedAnonymous" class="selectBox"> - <option>${review.postedAnonymous?default("N")}</option> + <#if ((review.postedAnonymous)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((review.postedAnonymous)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="N">${uiLabelMap.CommonN}</option> <option value="Y">${uiLabelMap.CommonY}</option> Modified: ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStorePaySetup.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStorePaySetup.ftl?view=diff&rev=556373&r1=556372&r2=556373 ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStorePaySetup.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStorePaySetup.ftl Sun Jul 15 01:43:56 2007 @@ -96,7 +96,8 @@ <td><span class="tableheadtext">${uiLabelMap.ApplyToAll} ${uiLabelMap.ProductProducts}</span></td> <td> <select name="applyToAllProducts" class="smallSelect"> - <option>${(editSetting.applyToAllProducts?if_exists)?default("Y")}</option> + <#if ((editSetting.applyToAllProducts)!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if> + <#if ((editSetting.applyToAllProducts)!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if> <option></option> <option value="Y">${uiLabelMap.CommonY}</option> <option value="N">${uiLabelMap.CommonN}</option> |
Free forum by Nabble | Edit this page |