> 
> > [snip] 
> > 
> > PROBLEMS 
> > 
> > [snip] 
> > 
> > ### 3. ### Undesirable overriding. 
> > 
> > As I mentioned above, in case of 
> >  
> > the 'value' is passed to the component overriding the 'value' in the 
> > component declaration. 
> > 
> > Scenario: 
> > web designer has created a mockup that contains some buttons and wants to 
> > keep the title on the buttons as designed for further possible re-design. 
> > page writer should take the actual title on the buttons from the bundle or 
> > manage beans properties. However, the declaration: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > does not work without removing 'value' from the html tag. 
> > 
> > So, we need a way how to disable overwriting in the particular cases 
> > 
> > PROPOSALS 
> > 
> > [snip] 
> > 
> > ### 3. #### 
> > 
> > Introduce the new attribute for tag that names allowOverriding that 
> > might disable the subsequent overriding. The default value should be true. 
> > In this case we can resolve the conflict mentioned in the #3# : scenario. 
> 
> Another possible solution is that the component always overwrites the values 
> in 
> the html template. 
> 

Today it just the opposite.  The attribute values in the html override the ones 
from the XML.   This is true only for attributes that are htmlish. Ones that 
are not binding events.

"accesskey", "dir","disabled", "lang", "onblur", "onchange", "onclick", 
"ondblclick", "onfocus", "onkeydown", "onkeypress", "onkeyup", 
"onmousedown","onmousemove", "onmouseout", "onmouseover", 
"onmouseup","onselect", "readonly", "size", "style", 
"styleClass","tabindex","title"

The attributes excluded from the html that we want to through into the mix are 
method and value binding events (jsf attributes).

"converter","validator", "valueChangeListener", "action", "actionListener", 
"value", "for","immediate", "rendered", "required", 
"disabledClass","enabledClass"

I would prefer to see the html attributes always override the xml definitions.  
I say that because it favors the web designer instead of the developer.  
However, this new proposed attribute (allowOverriding="false")  would give the 
developer the final decision.  I think we should make the default value "true". 
 The developer could also choose to make "false" the default value using some 
inheritance.

<component jsfid="baseSubmit" extends="commandButton">
    <attributes>
        <set name="value" allowOverriding="false"/>
    </attributes>
</component>
<component jsfid="formSubmit" extends="baseSubmit">
    <attributes>
        <set name="value" name="Shale Rocks"/>
    </attributes>
</component>
   

Reply via email to