You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Leonardo Quijano Vincenzi <le...@dtqsoftware.com> on 2005/11/02 00:38:32 UTC

Re: [jira] Created: (TAPESTRY-733) Tapestry should call listeners (such as PageBeginRenderListener) in some predefined order

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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org