You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Andy Schwartz <an...@gmail.com> on 2012/11/27 16:50:40 UTC
[Trinidad] API: UIXCollection.setupELVariable()
Gang -
As described in the following issue:
TRINIDAD-2343 Hook for overriding UIXCollection temp var storage
https://issues.apache.org/jira/browse/TRINIDAD-2343
I would like to expose a protected hook allow subclasses to provide
alternate storage for the temporary EL variables that are set up by
UIXCollection - ie. I want to provide a protected replacement for this
existing private method:
private Object _setELVar(String varName, Object newData)
{
if (varName == null)
return null;
// we need to place each row at an EL reachable place so that it
// can be accessed via the 'var' variable. Let's place it on the
// requestMap:
return TableUtils.setupELVariable(getFacesContext(), varName, newData);
}
My proposal is to add the following new UIXCollection API:
/**
* Called by UIXCollection to set values for the "var" and
* "varStatus" EL variables.
*
* @param context the FacesContext for the current request
* @param name the non-null name of the EL variable
* @param value the value of the EL variable
* @return the previous value of the EL variable, or null if
* the value was not previously set.
*/
protected Object setupELVariable(
FacesContext context,
String name,
Object value
)
(I picked the method name to match the related utility method on
TableUitls.)
If anyone has questions/comments on this new hook, please let me know.
Andy