This content has been marked as final.
Show 1 reply
-
1. Re: rich:columns & dynamic components binding
andrei_exadel Dec 29, 2008 7:01 AM (in response to midnighter123)Hi,
The problem is that you use outputText bound on the same bean variable.
I detected that outputText displays only for the last column in this case.
So, don't use the same variable. Create the new htmlOutput instance for each column:public HtmlOutputText getText() { HtmlOutputText retVal = null; if (retVal == null) { retVal = (HtmlOutputText) FacesContext.getCurrentInstance() .getApplication().createComponent( HtmlOutputText.COMPONENT_TYPE); FacesContext ctx = FacesContext.getCurrentInstance(); ELContext elCtx = ctx.getELContext(); ExpressionFactory ef = ctx.getApplication().getExpressionFactory(); ValueExpression ve = ef.createValueExpression(elCtx, "#{model[ind].model}", String.class); retVal.setValueExpression("value", ve); } return retVal; }
If you have not to create new HtmlOutputText variable you can use expression for outputText that references to bean static variable.