[jboss-user] [JBoss Seam] - exception
atao
do-not-reply at jboss.com
Sat Aug 18 06:40:31 EDT 2007
In a page with only a h:outputText and a h:form, as soon as I click on the submit button of the form, I get this exception
anonymous wrote :
| 12:23:22,468 WARN [lifecycle] executePhase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl at 13cf3bb) threw exception
| javax.el.PropertyNotWritableException: /home.xhtml @18,57 binding="#{bindingtest.testText()}": Illegal Syntax for Set Operation
| at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:98)
| [...]
| Caused by: javax.el.PropertyNotWritableException: /home.xhtml @18,57 binding="#{bindingtest.testText()}": Illegal Syntax for Set Operation
| at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:98)
| at com.sun.faces.lifecycle.RestoreViewPhase.doPerComponentActions(RestoreViewPhase.java:245)
| at com.sun.faces.lifecycle.RestoreViewPhase.doPerComponentActions(RestoreViewPhase.java:250)
| at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:193)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| ... 37 more
|
|
|
It must be obvious but i have no idea why.
The application is generated with seam2/seam-gen from today cvs. The only changes are:
- outputText and form in home.xhtml
- class BindingTest.java
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:h="http://java.sun.com/jsf/html"
| >
| <head>
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
| <title>popsuite-binding</title>
| <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
| </head>
|
| <body>
|
| <h:messages/>
|
| Test<br />
|
| <h:outputText binding="#{bindingtest.testText()}" />
|
| <h:form id="bindingtest">
|
| <h:commandButton id="valid"
| value="OK"
| action="#{bindingtest.valid}"/>
|
| </h:form>
| </body>
| </html>
|
| package org.popsuite.binding2;
|
| import static org.jboss.seam.ScopeType.APPLICATION;
| import static org.jboss.seam.annotations.Install.BUILT_IN;
|
| import javax.faces.component.UIComponent;
| import javax.faces.component.html.HtmlOutputText;
|
| import org.jboss.seam.annotations.Install;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.annotations.intercept.BypassInterceptors;
|
| @Scope(APPLICATION)
| @BypassInterceptors
| @Name("bindingtest")
| @Install(precedence = BUILT_IN)
| public class BindingTest
| {
| private String name;
| private String city;
|
| public UIComponent testText()
| {
| HtmlOutputText text = new HtmlOutputText();
| text.setValue("Very simple binding test");
| return text;
| }
|
| public String valid()
| {
| return null;
| }
|
| public String getName(){
| return this.name;
| }
|
| public void setName(String name){
| this.name = name;
| }
|
| public String getCity(){
| return this.city;
| }
|
| public void setCity(String city){
| this.city = city;
| }
|
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075451#4075451
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075451
More information about the jboss-user
mailing list