[
https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504438
]
Adrian Crum commented on OFBIZ-1041:
------------------------------------
It's a good idea to keep a sharp line drawn between the service layer and the
presentation layer. This patch introduces UI elements into the service layer.
Perhaps a better approach in the service layer is to simply check for "Y" - if
it is anything else, default to "N".
Also, a UI pattern I have been using lately is to have the current data select
the correct list element, instead of displaying it twice. Example:
<select name="allowSolicitation">
<#assign allowSolicitation =
(mechMap.partyContactMech.allowSolicitation)?default("N")>
<option value="Y"<#if allowSolitation == "Y">
selected="selected"</#if>>${uiLabelMap.CommonY}</option>
<option value="N"<#if allowSolitation == "N">
selected="selected"</#if>>${uiLabelMap.CommonN}</option>
</select>
Not that this approach is any better, it's just different.
> various values in allowSolicitation variable break some screens
> ----------------------------------------------------------------
>
> Key: OFBIZ-1041
> URL: https://issues.apache.org/jira/browse/OFBIZ-1041
> Project: OFBiz
> Issue Type: Bug
> Components: party
> Affects Versions: SVN trunk, Release Branch 4.0
> Reporter: Krzysztof Podejma
> Assignee: Si Chen
> Priority: Minor
> Fix For: SVN trunk, Release Branch 4.0
>
> Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or
> uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing
> if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.