You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Øyvind Harboe <oy...@zylin.com> on 2005/08/12 11:23:05 UTC
Why is @PageLink "incompatible" with @ActionLink?
In the example below, I get a "Stale Session error" the second time
I click "Increment".
- If I remove the @PageLink, "Increment" the error goes away.
- If I move the @PageLink after the @ActionLink the error goes away.
- If I change from @ActionLink to @LinkSubmit (and add a @Form),
the error goes away.
Why?
I relatively new to Tapestry(read TIA, written a dozen Tapestry pages),
but tought I had the session business sorted. Obviously not.
I'm using
Debian
Tapestry 3.0.3
Spindle
JettyLauncher
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE page-specification PUBLIC
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
<!-- generated by Spindle, http://spindle.sourceforge.net -->
<page-specification class="test.TestCounter">
<property-specification name="counter" type="int" persistent="yes"/>
</page-specification>
<html>
<body>
<span jwcid="@PageLink" page="TestCounter">Jump to page</span>
Counter is: <span jwcid="@Insert" value="ognl:counter"/>
<p>
<span jwcid="@ActionLink" listener="ognl:listeners.increment">
Increment</span>
</body>
</html>
package test;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.html.BasePage;
public abstract class TestCounter extends BasePage
{
public abstract int getCounter();
public abstract void setCounter(int x);
public void increment(IRequestCycle cycle)
{
setCounter(getCounter()+1);
cycle.activate("TestCounter");
}
}
--
Øyvind Harboe
http://www.zylin.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org