You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Gegenteil <ge...@fahr-zur-hoelle.org> on 2008/09/02 15:47:15 UTC

T5: page loses context after form submit ?

Hi,

Maybes some one can tell me why the following does not work ?

After you submit the form the redirect is without the page context...

Since I return a "configured page" in the onSubmit event listener 
method, I would expect tapestry to send a redirect url with the page 
context...

Cheers,
Ron

template:


<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" >
<body>
<t:form>
	<t:textfield value="ctx"/>
	<t:submit/>
</t:form>
<h1>${ctx}</h1>
</body>
</html>


class :

public class Try {
	
	@Property
	private Long ctx;
	
	public void onActivate( Long c ) {
		this.ctx = c;
	}
	
	public Long onPassicate() {
		return this.ctx;
	}
	
	@OnEvent("submit")
	public Object onSubmit() {
		return this;
	}

}


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


Re: T5: page loses context after form submit ?

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Hi,

public Long onPassicate() should probably be public Long onPassivate().

-Filip

On 2008-09-02 15:47, Gegenteil wrote:
> Hi,
> 
> Maybes some one can tell me why the following does not work ?
> 
> After you submit the form the redirect is without the page context...
> 
> Since I return a "configured page" in the onSubmit event listener 
> method, I would expect tapestry to send a redirect url with the page 
> context...
> 
> Cheers,
> Ron
> 
> template:
> 
> 
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" >
> <body>
> <t:form>
>     <t:textfield value="ctx"/>
>     <t:submit/>
> </t:form>
> <h1>${ctx}</h1>
> </body>
> </html>
> 
> 
> class :
> 
> public class Try {
>     
>     @Property
>     private Long ctx;
>     
>     public void onActivate( Long c ) {
>         this.ctx = c;
>     }
>     
>     public Long onPassicate() {
>         return this.ctx;
>     }
>     
>     @OnEvent("submit")
>     public Object onSubmit() {
>         return this;
>     }
> 
> }
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

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