[ 
https://issues.apache.org/jira/browse/OFBIZ-863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487327
 ] 

Scott Gray commented on OFBIZ-863:
----------------------------------

Thanks Adrian, I had wondered the same thing when I initially came across it.  

Perhaps we need to find a way to log a warning or error if ModelForm comes 
across a field that has both conditional and unconditional declarations?  But 
checking for that might be a pain because we don't want to have to run through 
the field list on every addition.  

Another option might be to have a map for when the form fields are being 
rendered then log a warning if the same field name is rendered more than once, 
that would help catch when 2 useWhen's evaluate to true as well.

Otherwise we could just add a note to the extends attribute documentation 
warning against overriding conditional fields.

> A form cannot override a parent form's field if the field contains the 
> useWhen attribute
> ----------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-863
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-863
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Scott Gray
>            Priority: Minor
>
> When a form definition extends another form it is unable to override a parent 
> field if that field contains a useWhen condition.  So when the parent field's 
> useWhen condition is true, both the child and parent field end up in the 
> generated form.
> For an example of the problem see 
> https://issues.apache.org/jira/browse/OFBIZ-753

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to