-
1. Re: Using non-EJB annotated POJO as backing bean
azalea Jul 5, 2007 11:26 AM (in response to bdillon)Do you define a getter method for "name" property?
-
2. Re: Using non-EJB annotated POJO as backing bean
bdillon Jul 5, 2007 11:35 AM (in response to bdillon)HI,
The getter method is;
public String getName() {
System.out.println(" FirstPageBB.getName() > "+name);
return name;
}
I can see in Tomcat the following;
Initialising FirstPageBB !
FirstPageBB.getName() > initialValue
16:06:16,142 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.faces.el.EvaluationException: Cannot get value for expression '#{FirstPage
BB.name}'
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java
:402)
at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue
(RendererUtils.java:217)
Thanks,
Brian -
3. Re: Using non-EJB annotated POJO as backing bean
monkeyden Jul 5, 2007 11:44 AM (in response to bdillon)Could you post the code for the backing bean?
-
4. Re: Using non-EJB annotated POJO as backing bean
bdillon Jul 5, 2007 11:54 AM (in response to bdillon)Hi,
Here is the code;
package com.bd.test;
import java.io.Serializable;
import org.jboss.seam.annotations.*;
import org.jboss.seam.ScopeType;
@Scope(ScopeType.SESSION)
@Name("FirstPageBB")
public class FirstPageBB implements Serializable {
@Out
private SecondPageParameters params;
private String name = "initValue";
public FirstPageBB() {
System.out.println(" Initialising FirstPageBB !");
}
public String getName() {
System.out.println(" FirstPageBB.getName() > "+name);
return name;
}
public void setName(String name) {
System.out.println(" FirstPageBB.setName("+name+")");
this.name = name;
}
//Action Button
public String submit() {
System.out.println(" FirstPageBB.submit() called ");
params = new SecondPageParameters();
params.setName(name);
return "NavigationScen1";
}
}
Thanks,
Brian -
5. Re: Using non-EJB annotated POJO as backing bean
bdillon Jul 5, 2007 11:58 AM (in response to bdillon)Hi,
I tried removing the @out parameter and I can get the page to display. Is there something specific I should have done for this ?
Thanks,
Brian