Hi Michael,

Due to the change to the Unified EL from MyFaces 1.1 to 1.2 some EL related
things changed. The problem you're describing is one of those, I'm afraid.

Looking at the first item in the stacktrace you can see that the Exception
does not come from MyFaces, but from tomcat's implementation of the Unified
EL: org.apache.jasper.el.JspValueExpression.

You can workaround this by moving the logic to a managed bean property.

Regards,

Jakob Korherr


2009/12/17 Michael Heinen <[email protected]>

> Hi,
>
> are conditional Expressions not allowed anymore in value attributes in JSF
> 1.2?
>
> Stack:
> Caused by: org.apache.jasper.el.JspPropertyNotWritableException:
> /pages/search.jsp(13,2)
> '#{sessionScope.visit.user.restrictedToSearchInBatches?FlatBatchForReviewerCacheBean:NullBean}'
> Illegal Syntax for Set Operation
>                at
> org.apache.jasper.el.JspValueExpression.setValue(JspValueExpression.java:88)
>                at
> org.apache.myfaces.custom.savestate.UISaveState.restoreState(UISaveState.java:125)
>                at
> javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:849)
>                ... 48 more
>
> Tag:
> <t:saveState id="flatBatchForReviewerCacheBean"
> value="#{user.allowedToDoIt?FlatBatchForReviewerCacheBean:NullBean}"/>
>
> It is working if I use either FlatBatchForReviewerCacheBean or NullBean
> without the condition.
>
>
> Input tags are also not working with conditions in the value attribute:
> Message:
> org.apache.jasper.el.JspPropertyNotWritableException:
> /pages/search.jsp(154,14)
> '#{searchEntry.type=='dateFrom'?search.attributes[searchEntry.name].begin:search.attributes[searchEntry.name].end}'
> Illegal Syntax for Set Operation
>
> JSP snippet
> <t:dataList id="taxList"
>  value="#{MyController.fields}"
>  var="searchEntry" ... >
>
>    <t:inputText id="s_date"
>
>  
> value="#{searchEntry.type=='dateFrom'?search.attributes[searchEntry.name].begin:search.attributes[searchEntry.name].end}">
>    </t:inputText>
>
> Both tags worked well with myfaces 1.1.6 and tomahawk 1.1.7 but not with
> myfaces 1.2.8 and tomahawk12_1.1.9
>
> Is it a bug?
> Do I have to change anything or is there a workaround?
>
> Michael
>
>

Reply via email to