简体   繁体   中英

javax.faces.el.PropertyNotFoundException:Illegal Syntax for Set Operation

I have a quite troublesome problem with JSF (myfaces 1.1, xhtml) when updating the model. For example this snippet (inside a column of a datatable) works quite well when rendering:

<t:inputText value="#{interlocuteur.commercial.nom} " id="pop_out_4365" />

But when submitting I get the exception. So I ran in debug mode and here is the stack:

堆栈跟踪到异常

When I look into the code, the exception is happening there:

public void setValue(EvaluationContext ctx, Object value)
        throws ELException {
    throw new PropertyNotWritableException(MessageFactory.get("error.syntax.set"));
}

As you can see it seems there was almost no chance to escape it. I think this might be the default behavior for when it does not retrieve the correct node and uses a default node which does not override that method.

All of this makes me guessing this might be a scope related problem: Indeed, if the original datatable structure has been stored in a request-scope, when submitting it would not be able to find it back? But as for my model, I already controlled that it is stored in a session-scoped bean so I think the update should work if it reaches this part of the code.

Found this question on same topic, but my problem seems different, please provide hints about what to check to make sure the datatable structure is updated as intended, because I am a little out of imagination about where to investigate next.

Don't know why, but after submitting the question, I had a flash: The trailing space in the snipet was the key:

<t:inputText value="#{interlocuteur.commercial.nom} " id="pop_out_4365" />

Not a problem for an outputText, but inputText don't like it. Sorry for bothering you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM