Ok,

What I did was copy your code and it works for me.. So here is the code for
you
(Although there are a number of things I won't do your way!!)


import org.apache.tapestry5.EventConstants;
import org.apache.tapestry5.annotations.InjectComponent;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.corelib.components.Zone;

public class TestComponent {
   @InjectComponent
   @Property
   private Zone myZone;

   @SuppressWarnings("unused")
   @Property
   private String message;

   @OnEvent(component = "form", value = EventConstants.VALIDATE)
   Zone validate(){
      message = "My Message";
      return myZone;
   }

   void setupRender(){
      System.out.println("setupRender Called");
   }

}


<html xmlns:t='http://tapestry.apache.org/schema/tapestry_5_1_0.xsd'>
   <body>
      <t:zone t:id="myZone" clientId="myZone">
         ${message}
         <t:form t:id='form' zone="prop:myZone.clientId">
            <input id="mySubmit" t:type="submit" />
         </t:form>
         </t:zone>
   </body>
</html>



regards
Taha


On Thu, Apr 7, 2011 at 4:01 PM, joknroll <adjudentifr...@yahoo.com> wrote:

> Thanks to answer so quickly
>
> I tried:
> t:zone='myZone' instead of t:zone='myZone.clientId'
> but it changes nothing...
>
> For the ajax, if I trust the documentation of tapestry:
> "Binding the zone parameter will cause the form submission to be handled as
> an Ajax request that updates the indicated zone. Often a Form will update
> the same zone that contains it."
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-Testify-SetupRender-launched-instead-of-update-a-zone-tp4288081p4288169.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to