Hey all
I am trying to get the @Persist annotation to work but no dice :(
I can output the person.username in Main.html but the component in
Main.html - Placeholder.html - can't output it.
Am I doing something wrong with the @Persist annotation? As you can see
I've included it in both Home.java and
Main.java just as a safety-newbie-move, but it still won't output
anything! Main.html can output person.username because
of "nextpage.setPerson(person)" but if I remove the line "
nextpage.setPerson(person); " person will be null and Tapestry will
throw an exception.
Is there anything else that I have forgotten that is required to make
@Persist work? Thanks!
//Home.java
@Persist("client")
public abstract Person getPerson();
public abstract void setPerson(Person person);
public IPage onSubmit(IRequestCycle cycle) {
...
setPerson(person); //Doesn't work
nextpage.setPerson(person);
cycle.activate(main);
}
//Main.html
<span jwcid="@Insert" value="ognl:person.username"/> //Will output the
username
//Main.java ("this is the nextpage")
@Persist("client")
public abstract Person getPerson();
public abstract void setPerson(Person person);
//Placeholder.java ("a component in Main")
public abstract Person getPerson();
//Placeholder.html
<span jwcid="@Insert" value="ognl:person.username"/> //Doesn't work
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]