Re: svn commit: r581146 - in /ofbiz/trunk/applications: party/webapp/partymgr/party/EditPartyRelationships.ftl party/webapp/partymgr/party/findparty.ftl party/webapp/partymgr/party/viewroles.ftl product/webapp/catalog/store/EditProductStoreRoles.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r581146 - in /ofbiz/trunk/applications: party/webapp/partymgr/party/EditPartyRelationships.ftl party/webapp/partymgr/party/findparty.ftl party/webapp/partymgr/party/viewroles.ftl product/webapp/catalog/store/EditProductStoreRoles.ftl

David E Jones

Is this really the best idea? If a PartyRole.description field is empty it really _should_ be an error. In other words, that's not a field that we should allow to be empty, and because those are usually setup in a controlled way or by someone who should test and know better, this shouldn't ever happen in "production" and such.

-David


[hidden email] wrote:

> Author: hansbak
> Date: Mon Oct  1 23:53:02 2007
> New Revision: 581146
>
> URL: http://svn.apache.org/viewvc?rev=581146&view=rev
> Log:
> avoid display errors when the role description is blank
>
> Modified:
>     ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl
>     ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
>     ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl
>     ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl
>
> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl?rev=581146&r1=581145&r2=581146&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl (original)
> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl Mon Oct  1 23:53:02 2007
> @@ -116,7 +116,7 @@
>            ${uiLabelMap.PartyPartyInTheRoleOf}
>            <select name="roleTypeIdTo">
>              <#list roleTypes as roleType>
> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>              </#list>
>            </select>
>            ${uiLabelMap.CommonIsA}
> @@ -128,7 +128,7 @@
>            ${uiLabelMap.PartyPartyOfTheRoleParty}
>            <select name="roleTypeIdFrom">
>              <#list roleTypesForCurrentParty as roleType>
> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>              </#list>
>            </select>
>            <#-- set security group specific to this party relationship -->
> @@ -153,7 +153,7 @@
>            ${uiLabelMap.PartyPartyCurrentInTheRoleOf}
>            <select name="roleTypeIdTo">
>              <#list roleTypesForCurrentParty as roleType>
> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>              </#list>
>            </select>
>            ${uiLabelMap.CommonIsA}
> @@ -168,7 +168,7 @@
>            ${uiLabelMap.PartyPartyInTheRoleOf}
>            <select name="roleTypeIdFrom">
>              <#list roleTypes as roleType>
> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>              </#list>
>            </select>
>            <br/>${uiLabelMap.CommonAnd} ${uiLabelMap.PartyRelationSecurity}
>
> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl?rev=581146&r1=581145&r2=581146&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original)
> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Mon Oct  1 23:53:02 2007
> @@ -85,7 +85,7 @@
>                  </#if>
>                  <option value="ANY">${uiLabelMap.CommonAnyRoleType}</option>
>                  <#list roleTypes as roleType>
> -                  <option value="${roleType.roleTypeId}">${roleType.get("description",locale)}</option>
> +                  <option value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}</option>
>                  </#list>
>                </select>
>              </td>
>
> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl?rev=581146&r1=581145&r2=581146&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl (original)
> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl Mon Oct  1 23:53:02 2007
> @@ -29,7 +29,7 @@
>          <#list partyRoles as userRole>
>            <tr>
>              <td class="label">${uiLabelMap.PartyRole}</td>
> -            <td>${userRole.get("description",locale)} [${userRole.roleTypeId}]</td>
> +            <td>${userRole.get("description",locale)?if_exists} [${userRole.roleTypeId}]</td>
>              <#if hasDeletePermission>
>                <td class="button-col align-float">
>                  <a href="<@ofbizUrl>deleterole?partyId=${partyId}&roleTypeId=${userRole.roleTypeId}</@ofbizUrl>">${uiLabelMap.CommonRemove}</a>&nbsp;
>
> Modified: ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl?rev=581146&r1=581145&r2=581146&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl (original)
> +++ ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl Mon Oct  1 23:53:02 2007
> @@ -36,7 +36,7 @@
>          <#assign roleType = role.getRelatedOne("RoleType")>
>          <tr>
>            <td><a href="/partymgr/control/viewprofile?partyId=${role.partyId}&externalLoginKey=${requestAttributes.externalLoginKey}" class="buttontext">${role.partyId}</a></td>
> -          <td><span class="tabletext">${roleType.get("description",locale)}</span></td>
> +          <td><span class="tabletext">${roleType.get("description",locale)?if_exists}</span></td>
>            <td><span class="tabletext">${role.fromDate?string}</span></td>
>            <td><span class="tabletext">${role.thruDate?default("${uiLabelMap.CommonNA}")?string?if_exists}</span></td>
>            <#if role.thruDate?exists>
> @@ -61,7 +61,7 @@
>          <td>
>            <select class="selectBox" name="roleTypeId">
>              <#list roleTypes as roleType>
> -              <option value="${roleType.roleTypeId}">${roleType.get("description",locale)}</option>
> +              <option value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}</option>
>              </#list>
>            </select>
>          </td>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r581146 - in /ofbiz/trunk/applications: party/webapp/partymgr/party/EditPartyRelationships.ftl party/webapp/partymgr/party/findparty.ftl party/webapp/partymgr/party/viewroles.ftl product/webapp/catalog/store/EditProductStoreRoles.ftl

hans_bakker
Is fine David, i got the message.
However this was really confusing when this happens and was a real user
problem. Half of the screen was not shown and there was no error
message. If the drop was selected the browser crashed.

But it seems that you like this more, so I will revert it.

Regards.


On Tue, 2007-10-02 at 06:53 +0000, [hidden email] wrote:

> Author: hansbak
> Date: Mon Oct  1 23:53:02 2007
> New Revision: 581146
>
> URL: http://svn.apache.org/viewvc?rev=581146&view=rev
> Log:
> avoid display errors when the role description is blank
>
> Modified:
>     ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl
>     ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
>     ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl
>     ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl
>
> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl?rev=581146&r1=581145&r2=581146&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl (original)
> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl Mon Oct  1 23:53:02 2007
> @@ -116,7 +116,7 @@
>            ${uiLabelMap.PartyPartyInTheRoleOf}
>            <select name="roleTypeIdTo">
>              <#list roleTypes as roleType>
> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>              </#list>
>            </select>
>            ${uiLabelMap.CommonIsA}
> @@ -128,7 +128,7 @@
>            ${uiLabelMap.PartyPartyOfTheRoleParty}
>            <select name="roleTypeIdFrom">
>              <#list roleTypesForCurrentParty as roleType>
> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>              </#list>
>            </select>
>            <#-- set security group specific to this party relationship -->
> @@ -153,7 +153,7 @@
>            ${uiLabelMap.PartyPartyCurrentInTheRoleOf}
>            <select name="roleTypeIdTo">
>              <#list roleTypesForCurrentParty as roleType>
> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>              </#list>
>            </select>
>            ${uiLabelMap.CommonIsA}
> @@ -168,7 +168,7 @@
>            ${uiLabelMap.PartyPartyInTheRoleOf}
>            <select name="roleTypeIdFrom">
>              <#list roleTypes as roleType>
> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>              </#list>
>            </select>
>            <br/>${uiLabelMap.CommonAnd} ${uiLabelMap.PartyRelationSecurity}
>
> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl?rev=581146&r1=581145&r2=581146&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original)
> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Mon Oct  1 23:53:02 2007
> @@ -85,7 +85,7 @@
>                  </#if>
>                  <option value="ANY">${uiLabelMap.CommonAnyRoleType}</option>
>                  <#list roleTypes as roleType>
> -                  <option value="${roleType.roleTypeId}">${roleType.get("description",locale)}</option>
> +                  <option value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}</option>
>                  </#list>
>                </select>
>              </td>
>
> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl?rev=581146&r1=581145&r2=581146&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl (original)
> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl Mon Oct  1 23:53:02 2007
> @@ -29,7 +29,7 @@
>          <#list partyRoles as userRole>
>            <tr>
>              <td class="label">${uiLabelMap.PartyRole}</td>
> -            <td>${userRole.get("description",locale)} [${userRole.roleTypeId}]</td>
> +            <td>${userRole.get("description",locale)?if_exists} [${userRole.roleTypeId}]</td>
>              <#if hasDeletePermission>
>                <td class="button-col align-float">
>                  <a href="<@ofbizUrl>deleterole?partyId=${partyId}&roleTypeId=${userRole.roleTypeId}</@ofbizUrl>">${uiLabelMap.CommonRemove}</a>&nbsp;
>
> Modified: ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl?rev=581146&r1=581145&r2=581146&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl (original)
> +++ ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl Mon Oct  1 23:53:02 2007
> @@ -36,7 +36,7 @@
>          <#assign roleType = role.getRelatedOne("RoleType")>
>          <tr>
>            <td><a href="/partymgr/control/viewprofile?partyId=${role.partyId}&externalLoginKey=${requestAttributes.externalLoginKey}" class="buttontext">${role.partyId}</a></td>
> -          <td><span class="tabletext">${roleType.get("description",locale)}</span></td>
> +          <td><span class="tabletext">${roleType.get("description",locale)?if_exists}</span></td>
>            <td><span class="tabletext">${role.fromDate?string}</span></td>
>            <td><span class="tabletext">${role.thruDate?default("${uiLabelMap.CommonNA}")?string?if_exists}</span></td>
>            <#if role.thruDate?exists>
> @@ -61,7 +61,7 @@
>          <td>
>            <select class="selectBox" name="roleTypeId">
>              <#list roleTypes as roleType>
> -              <option value="${roleType.roleTypeId}">${roleType.get("description",locale)}</option>
> +              <option value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}</option>
>              </#list>
>            </select>
>          </td>
>
>
>
--
http://Antwebsystems.com : OFBiz Quality support for competitive rates.



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r581146 - in /ofbiz/trunk/applications: party/webapp/partymgr/party/EditPartyRelationships.ftl party/webapp/partymgr/party/findparty.ftl party/webapp/partymgr/party/viewroles.ftl product/webapp/catalog/store/EditProductStoreRoles.ftl

Jacopo Cappellato
Hans Bakker wrote:
> Is fine David, i got the message.
> However this was really confusing when this happens and was a real user
> problem. Half of the screen was not shown and there was no error
> message. If the drop was selected the browser crashed.
>
> But it seems that you like this more, so I will revert it.
>

Hans,

the best approach would be that of converting the ftl forms to form
widgets; I'm working on this in my free time but your (and everyone
else) help on this would be great because the workload is heavy.
After that all the forms are converted, many of these weird broken (by
bad data) screens will be better handled (or at least it will be easier
to improve the error message in a centralized way).

Please help,

Jacopo

> Regards.
>
>
> On Tue, 2007-10-02 at 06:53 +0000, [hidden email] wrote:
>> Author: hansbak
>> Date: Mon Oct  1 23:53:02 2007
>> New Revision: 581146
>>
>> URL: http://svn.apache.org/viewvc?rev=581146&view=rev
>> Log:
>> avoid display errors when the role description is blank
>>
>> Modified:
>>     ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl
>>     ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
>>     ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl
>>     ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl
>>
>> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl?rev=581146&r1=581145&r2=581146&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl (original)
>> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl Mon Oct  1 23:53:02 2007
>> @@ -116,7 +116,7 @@
>>            ${uiLabelMap.PartyPartyInTheRoleOf}
>>            <select name="roleTypeIdTo">
>>              <#list roleTypes as roleType>
>> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
>> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>>              </#list>
>>            </select>
>>            ${uiLabelMap.CommonIsA}
>> @@ -128,7 +128,7 @@
>>            ${uiLabelMap.PartyPartyOfTheRoleParty}
>>            <select name="roleTypeIdFrom">
>>              <#list roleTypesForCurrentParty as roleType>
>> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
>> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>>              </#list>
>>            </select>
>>            <#-- set security group specific to this party relationship -->
>> @@ -153,7 +153,7 @@
>>            ${uiLabelMap.PartyPartyCurrentInTheRoleOf}
>>            <select name="roleTypeIdTo">
>>              <#list roleTypesForCurrentParty as roleType>
>> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
>> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>>              </#list>
>>            </select>
>>            ${uiLabelMap.CommonIsA}
>> @@ -168,7 +168,7 @@
>>            ${uiLabelMap.PartyPartyInTheRoleOf}
>>            <select name="roleTypeIdFrom">
>>              <#list roleTypes as roleType>
>> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
>> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if> value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
>>              </#list>
>>            </select>
>>            <br/>${uiLabelMap.CommonAnd} ${uiLabelMap.PartyRelationSecurity}
>>
>> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl?rev=581146&r1=581145&r2=581146&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original)
>> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Mon Oct  1 23:53:02 2007
>> @@ -85,7 +85,7 @@
>>                  </#if>
>>                  <option value="ANY">${uiLabelMap.CommonAnyRoleType}</option>
>>                  <#list roleTypes as roleType>
>> -                  <option value="${roleType.roleTypeId}">${roleType.get("description",locale)}</option>
>> +                  <option value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}</option>
>>                  </#list>
>>                </select>
>>              </td>
>>
>> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl?rev=581146&r1=581145&r2=581146&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl (original)
>> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl Mon Oct  1 23:53:02 2007
>> @@ -29,7 +29,7 @@
>>          <#list partyRoles as userRole>
>>            <tr>
>>              <td class="label">${uiLabelMap.PartyRole}</td>
>> -            <td>${userRole.get("description",locale)} [${userRole.roleTypeId}]</td>
>> +            <td>${userRole.get("description",locale)?if_exists} [${userRole.roleTypeId}]</td>
>>              <#if hasDeletePermission>
>>                <td class="button-col align-float">
>>                  <a href="<@ofbizUrl>deleterole?partyId=${partyId}&roleTypeId=${userRole.roleTypeId}</@ofbizUrl>">${uiLabelMap.CommonRemove}</a>&nbsp;
>>
>> Modified: ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl?rev=581146&r1=581145&r2=581146&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl (original)
>> +++ ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl Mon Oct  1 23:53:02 2007
>> @@ -36,7 +36,7 @@
>>          <#assign roleType = role.getRelatedOne("RoleType")>
>>          <tr>
>>            <td><a href="/partymgr/control/viewprofile?partyId=${role.partyId}&externalLoginKey=${requestAttributes.externalLoginKey}" class="buttontext">${role.partyId}</a></td>
>> -          <td><span class="tabletext">${roleType.get("description",locale)}</span></td>
>> +          <td><span class="tabletext">${roleType.get("description",locale)?if_exists}</span></td>
>>            <td><span class="tabletext">${role.fromDate?string}</span></td>
>>            <td><span class="tabletext">${role.thruDate?default("${uiLabelMap.CommonNA}")?string?if_exists}</span></td>
>>            <#if role.thruDate?exists>
>> @@ -61,7 +61,7 @@
>>          <td>
>>            <select class="selectBox" name="roleTypeId">
>>              <#list roleTypes as roleType>
>> -              <option value="${roleType.roleTypeId}">${roleType.get("description",locale)}</option>
>> +              <option value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}</option>
>>              </#list>
>>            </select>
>>          </td>
>>
>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r581146 - in /ofbiz/trunk/applications: party/webapp/partymgr/party/EditPartyRelationships.ftl party/webapp/partymgr/party/findparty.ftl party/webapp/partymgr/party/viewroles.ftl product/webapp/catalog/store/EditProductStoreRoles.ftl

Jacques Le Roux
Administrator
1st I did not saw Jacopo's suggestion and I wrote "Hi Hans, Just a quick interference without any thinking and no serious review, do
you see another way to deal with it without crashing the
browser but been clear about the error happening; to let production people understand the problem origin ? Thanks Jacques"


+1 to Jacopo's suggestion

Jacques

De : "Jacopo Cappellato" <[hidden email]>


> Hans Bakker wrote:
> > Is fine David, i got the message.
> > However this was really confusing when this happens and was a real user
> > problem. Half of the screen was not shown and there was no error
> > message. If the drop was selected the browser crashed.
> >
> > But it seems that you like this more, so I will revert it.
> >
>
> Hans,
>
> the best approach would be that of converting the ftl forms to form
> widgets; I'm working on this in my free time but your (and everyone
> else) help on this would be great because the workload is heavy.
> After that all the forms are converted, many of these weird broken (by
> bad data) screens will be better handled (or at least it will be easier
> to improve the error message in a centralized way).
>
> Please help,
>
> Jacopo
>
> > Regards.
> >
> >
> > On Tue, 2007-10-02 at 06:53 +0000, [hidden email] wrote:
> >> Author: hansbak
> >> Date: Mon Oct  1 23:53:02 2007
> >> New Revision: 581146
> >>
> >> URL: http://svn.apache.org/viewvc?rev=581146&view=rev
> >> Log:
> >> avoid display errors when the role description is blank
> >>
> >> Modified:
> >>     ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl
> >>     ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
> >>     ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl
> >>     ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl
> >>
> >> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl
> >> URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl?rev=581146&r1=581145&r2=581146&view=diff
> >> ==============================================================================
> >> --- ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl (original)
> >> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/EditPartyRelationships.ftl Mon Oct  1 23:53:02 2007
> >> @@ -116,7 +116,7 @@
> >>            ${uiLabelMap.PartyPartyInTheRoleOf}
> >>            <select name="roleTypeIdTo">
> >>              <#list roleTypes as roleType>
> >> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if>
value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> >> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if>
value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
> >>              </#list>
> >>            </select>
> >>            ${uiLabelMap.CommonIsA}
> >> @@ -128,7 +128,7 @@
> >>            ${uiLabelMap.PartyPartyOfTheRoleParty}
> >>            <select name="roleTypeIdFrom">
> >>              <#list roleTypesForCurrentParty as roleType>
> >> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if>
value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> >> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if>
value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
> >>              </#list>
> >>            </select>
> >>            <#-- set security group specific to this party relationship -->
> >> @@ -153,7 +153,7 @@
> >>            ${uiLabelMap.PartyPartyCurrentInTheRoleOf}
> >>            <select name="roleTypeIdTo">
> >>              <#list roleTypesForCurrentParty as roleType>
> >> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if>
value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> >> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if>
value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
> >>              </#list>
> >>            </select>
> >>            ${uiLabelMap.CommonIsA}
> >> @@ -168,7 +168,7 @@
> >>            ${uiLabelMap.PartyPartyInTheRoleOf}
> >>            <select name="roleTypeIdFrom">
> >>              <#list roleTypes as roleType>
> >> -              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if>
value="${roleType.roleTypeId}">${roleType.get("description",locale)}<#-- [${roleType.roleTypeId}]--></option>
> >> +              <option <#if "_NA_" == roleType.roleTypeId>selected="selected"</#if>
value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}<#-- [${roleType.roleTypeId}]--></option>
> >>              </#list>
> >>            </select>
> >>            <br/>${uiLabelMap.CommonAnd} ${uiLabelMap.PartyRelationSecurity}
> >>
> >> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
> >> URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl?rev=581146&r1=581145&r2=581146&view=diff

> >> ==============================================================================
> >> --- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original)
> >> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Mon Oct  1 23:53:02 2007
> >> @@ -85,7 +85,7 @@
> >>                  </#if>
> >>                  <option value="ANY">${uiLabelMap.CommonAnyRoleType}</option>
> >>                  <#list roleTypes as roleType>
> >> -                  <option value="${roleType.roleTypeId}">${roleType.get("description",locale)}</option>
> >> +                  <option value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}</option>
> >>                  </#list>
> >>                </select>
> >>              </td>
> >>
> >> Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl
> >> URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl?rev=581146&r1=581145&r2=581146&view=diff

> >> ==============================================================================
> >> --- ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl (original)
> >> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/viewroles.ftl Mon Oct  1 23:53:02 2007
> >> @@ -29,7 +29,7 @@
> >>          <#list partyRoles as userRole>
> >>            <tr>
> >>              <td class="label">${uiLabelMap.PartyRole}</td>
> >> -            <td>${userRole.get("description",locale)} [${userRole.roleTypeId}]</td>
> >> +            <td>${userRole.get("description",locale)?if_exists} [${userRole.roleTypeId}]</td>
> >>              <#if hasDeletePermission>
> >>                <td class="button-col align-float">
> >>                  <a
href="<@ofbizUrl>deleterole?partyId=${partyId}&roleTypeId=${userRole.roleTypeId}</@ofbizUrl>">${uiLabelMap.CommonRemove}</a>&nbsp;
> >>
> >> Modified: ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl
> >> URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl?rev=581146&r1=581145&r2=581146&view=diff
> >> ==============================================================================
> >> --- ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl (original)
> >> +++ ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl Mon Oct  1 23:53:02 2007
> >> @@ -36,7 +36,7 @@
> >>          <#assign roleType = role.getRelatedOne("RoleType")>
> >>          <tr>
> >>            <td><a
href="/partymgr/control/viewprofile?partyId=${role.partyId}&externalLoginKey=${requestAttributes.externalLoginKey}"
class="buttontext">${role.partyId}</a></td>

> >> -          <td><span class="tabletext">${roleType.get("description",locale)}</span></td>
> >> +          <td><span class="tabletext">${roleType.get("description",locale)?if_exists}</span></td>
> >>            <td><span class="tabletext">${role.fromDate?string}</span></td>
> >>            <td><span class="tabletext">${role.thruDate?default("${uiLabelMap.CommonNA}")?string?if_exists}</span></td>
> >>            <#if role.thruDate?exists>
> >> @@ -61,7 +61,7 @@
> >>          <td>
> >>            <select class="selectBox" name="roleTypeId">
> >>              <#list roleTypes as roleType>
> >> -              <option value="${roleType.roleTypeId}">${roleType.get("description",locale)}</option>
> >> +              <option value="${roleType.roleTypeId}">${roleType.get("description",locale)?if_exists}</option>
> >>              </#list>
> >>            </select>
> >>          </td>
> >>
> >>
> >>
>
>