Dinamic List
marcelomagno Jun 30, 2009 2:25 AMHi,
I Was triying to implement some dinamic behavior to the list pages of my application, following what is sugested in this post:
http://seamframework.org/Documentation/SeamDynamicCRUD
Everything worket fine for displaying values in the view, but when I try to update I get this error:
20:54:08,850 ERROR [STDERR] 29/06/2009 20:54:08 javax.faces.component.UIInput updateModel SEVERE: /layout/templateList.xhtml @85,113 value="#{e:evalEl(e:concat(entityList, '.', _templateListSearchFieldList.fieldValue))}": Illegal Syntax for Set Operation
I am using this custom facelet el function in order to apply values (sugested in this post: http://seamframework.org/Documentation/SeamDynamicCRUD):
public static Object evalEl(String expression) { String framedExpr = "#{" + expression + "}"; Object value = Expressions.instance().createValueExpression(framedExpr).getValue(); return value; }
Searching in Google about the Illegal Syntax for Set Operation
error I got this:
http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/javax/faces/component/UIComponent.html#setValueExpression(java.lang.String, javax.el.ValueExpression)
Set the ValueExpression used to calculate the value for the specified attribute or property name, if any.
The implementation must call Expression.isLiteralText() on the argument expression. If isLiteralText() returns true, invoke ValueExpression.getValue(javax.el.ELContext) on the argument expression and pass the result as the value parameter in a call to this.getAttributes().put(name, value) where name is the argument name. If an exception is thrown as a result of calling ValueExpression.getValue(javax.el.ELContext), wrap it in a FacesException and re-throw it. If isLiteralText() returns false, simply store the un-evaluated expression argument in the collection of ValueExpressions under the key given by the argument name.
Is there any workarroud ?
I am using seam 2.1.1 GA
Thanks for you help,
Best Regards,