I have found there is a problem when creating a component which includes a zone and that zone is after the actionlink which is used to update it. In that case, the existing zone's getClientId() cannot be used to fill in the zone id as this is initialized in the beginRender and that has not yet accured when the id is requested.

I have cloned the Zone component to use the following :

   @Parameter( name = "id", defaultPrefix = BindingConstants.LITERAL )
   private String clientId;
   private boolean clientIdInitialized;

   public String getClientId()
   {
       if ( !clientIdInitialized )
       {
           if ( !resources.isBound( "id" ) )
           {
               clientId = renderSupport.allocateClientId( resources );
           }
           else
           {
               clientId = renderSupport.allocateClientId( clientId );
           }
           clientIdInitialized = true;
       }
       return clientId;
   }

And to always use getClientId() instead of directly referring to the "clientId" variable.

This seems to make a difference. Would it be sensible to modify the Zone component to behave like this by default?

Kind regards,
Joachim

--
Joachim Van der Auwera
PROGS bvba, progs.be


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to