You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Greg <de...@gmail.com> on 2006/03/24 19:28:00 UTC

SettingProperties [UIComponentBase / UIComponentTagUtils]

Can someone clarify this:

Eg:
HtmlDataScrollerTag.setProperties
  setBooleanProperty(component, JSFAttr.IMMEDIATE_ATTR, _immediate);

Thus:
UIComponentTagUtils.setBooleanProperty(getFacesContext(), component,
propName, value);

Where UIComponentTagUtils.setBooleanProperty will then determine if
the given value is a value reference, if so it invokes
component.setValueBinding(propName, vb) otherwise it invokes
component.getAttributes().put(propName, Boolean.valueOf(value)).

Where component.setValueBinding will invoke
UIComponentBase.setValueBinding which will update _valueBindingMap.

And component.getAttributes().put will update UIComponentBase._attributesMap.

However, javax.faces.component.UIComponentBase.getValueBinding only
looks in _valueBindingMap and so those properties automatically
determined when invoking the setters in UIComponentTagUtils will
always be returned null, i.e. those non value references.

I ask this because, for example the immediate attribute in the
t:dataScroller always returns the HtmlDataScroller.DEFAULT_IMMEDIATE
value.

So it would seem that this would apply to all (UIComponentTagUtils)
setters, e.g. setStringProperty ?

Maybe UIComponentTagUtils needs to have a getValueBinding method ?

G.