Hi, i'm looking the method getValue() of UISelectItems:
public Object getValue()
{
if (_value != null) return _value;
ValueBinding vb = getValueBinding("value");
return vb != null ? vb.getValue(getFacesContext()) : null;
}
And I see that if a value property of the SelectItemsTag is setted with
a ValueBinding format, then every time I get getValue() the value is
rebuilded. This could be a problem for example in the case I have a
property value of my managed bead used for value binding that access to
DB to return the result, because in the life cycle of a page, this
getValue() is called more than one time. My question is:
Why the getValueBinding("value") result is not cached? For example:
private Object _vb=null;
private boolean vbCalculated=false;
public Object getValue()
{
if (_value != null) return _value;
if(!vbCalculated) {
ValueBinding moment = getValueBinding("value");
_vb= moment.getValue(getFacesContext());
vbCalculated=true;
}
return _vb;
}
Ciao
Mario
This message is for the designated recipient only and may contain privileged,
proprietary, or otherwise private information. If you have received it in
error, please notify the sender immediately and delete the original. Any other
use of the email by you is prohibited.