You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jeff Emminger <ma...@jeffemminger.com> on 2006/01/17 17:44:05 UTC

form success and cancel both called?

it seems from my log output that when i click my Form's cancel button, 
the success listener is being called after the cancel listener.

i have a Form:
<component id="form" type="Form">
	<binding name="success" value="listener:onSuccess"/>
	<binding name="cancel" value="listener:onCancel"/>
	<binding name="delegate" value="bean:delegate"/>
</component>

and in the page template a cancel button:
  <input type="submit"
   value="Cancel"
   jwcid="@Submit"
   listener="listener:onCancel"/>

in the .java file:
public String onCancel() {
	log.debug("onCancel");
	return "Foo";
}
public String onSuccess() {
	log.debug("onSuccess");
	return "Bar";
}


is this the wrong way to do it?

thanks,
jeff


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org