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

Adrian Crum commented on OFBIZ-863:
-----------------------------------

Scott,

I spent some time looking into this and it is hard to tell whether this is 
really a bug or the intended behavior. Here are some things I ran across...

1. Field list comment from ModelForm.java:

    /** This List will contain one copy of each field for each field name in 
the order
     * they were encountered in the service, entity, or form definition; field 
definitions
     * with constraints will also be in this list but may appear multiple times 
for the same
     * field name.
     *
     * When rendering the form the order in this list should be following and 
it should not be
     * necessary to use the Map. The Map is used when loading the form 
definition to keep the
     * list clean and implement the override features for field definitions.
     */

2. Around line 843 of ModelForm.java it seems that fields of type hidden are 
skipped and not rendered.

3. "use-when" comment from widget-form.xsd:

            <xs:annotation><xs:documentation>Used to specify a condition that 
must be true to use this field; the condition should be written using the Java 
syntax and can operate on values in the form context; if this is used the field 
will only be put on the field list, and not in the field map meaning that 
values for this field cannot be overridden.</xs:documentation></xs:annotation>


> 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