Ron Piterman wrote:
צי
I don't know what you mean with @Persist bindings - @Persist is a
parameter - did you use both @Parameter and @Persist on the same
property? you shouldn't.
No. I mean, in the page class:
@Persist
public abstract Client getClient();
In FormClient, your lazy initializer:
public Client getClient() {
Client c = getClientParameter();
if (c == null) {
c = createNewClient();
setClientParameter(c);
}
return c;
}
This getClient() is called during page rendering. Since page class
"getClient" is marked as Persist(), and component's getClient() would
modify this value, Tapestry throws an exception indicating that
persistent properties can only be changed before page render.
Any way, parameters in T4 are dynamic, so it should work - check this
again, you might be doing something wrong -
its just like in the For iteration - the for changes a binding, which
is given to a component as a parameter and is reevaluated for each
iteration...
And the parameter can't be persistent. For a For iterator, it makes
sense. But in this case, the 'value' parameter has a 80% probability of
being persistent.
--
Ing. Leonardo Quijano Vincenzi
Director Técnico
DTQ Software
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]