Something like that could work for now even if it's a hack, but the code seems to be only for T4. Is there something similar for 3.0.3? I can only find getRequestCycle().getAttribute(String name) instead of getParameter() (which might just have been a typo) but the cycle's _attributes Map is null according to the debugger.

Kent Tong escribió:
Javier Molina <numeropi <at> myrealbox.com> writes:

Is there any way to know what listener/component will be called so that I can prevent pageValidate from throwing an exception if it's not something that should be protected?

Assuming the component id of your search form is "form1", you
may try this:

public void pageValidate(PageEvent event) {
  String service = getRequestCycle().getParameter(ServiceConstants.SERVICE);
if (service.equals(Tapestry.DIRECT_SERVICE) && getRequestCycle().getParameter(ServiceConstants.COMPONENT).equals("form1")) {
      System.out.println("form1. go ahead.");
      return;
  }
}

Obviously this is a hack.

--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to