I've tried to get this to work, looking at the demo application, but so far
no luck.

When I click the back button in firefox 1.0.7, nothing happens. There are no
Javascript errors in the Javascript console.
When I click the back button in IE 6, it works normally, going back the
usual "back button way". No visible javascript error.
None of the browsers (IE, Firefox) call my listener method.

My components look like this:

<component id="form" type="tacos:AjaxForm">
    <binding name="listener" value="listener:formSubmit"/>
    <binding name="backLink" value="component:backLink"/>
  </component>

  <component id="backLink" type="tacos:AjaxDirectLink">
    <binding name="listener" value="listener:previousCategory"/>
  </component>

My listener method:

public void previousCategory(IRequestCycle cycle) {
    log.debug("Entered previousCategory method");
// Redirect for clear debugging
    throw new RedirectException("http://www.amazon.com";);
  }

Any ideas?

Inge

On 1/21/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
>
> You can achieve the behaviour you are asking for if you were willing to
> use
> the tapestry form here instead:
> http://tacos.sourceforge.net/components/AjaxForm.html .
>
> Specifically, you want to specify the forwardLink/backLink actions that
> should be performed when the user hits the forward/back buttons on their
> web
> browser client.
>
> j
>
> On 1/21/06, Stijn Christiaens < [EMAIL PROTECTED]> wrote:
> >
> >
> > Hello all,
> >
> > I have the following problem. I have a page which contains a Form and
> some
> > RadioButtons and If components. The page represents one question in a
> > multiple choice system (hence the form with the radiobuttons). On
> submit,
> > the page reloads with the next question.
> > Now if I go back and the next question has the same amount of answers
> (eg.
> > 3 RadioButtons), no problem (well, not always :-). If the next question
> has
> > a different number (eg. 2), Tapestry will come crying about with some
> > StaleStateException that ActionId #x doesn't match with some component
> in
> > the form.
> > Obviously this is because Tapestry thinks that it is at question 2,
> while
> > the back button caused the browser to be back at question 1.
> >
> > That's about it. Now to my question. How can I fix this? So if the back
> > button is pressed, Tapestry will rebuild the Form based on data it
> receives
> > from the client, rather than trying to use the Form object it thinks is
> the
> > correct one.
> > Is this already present in the framework?
> >
> > Thanks in advance.
> >
> > Ciao,
> >
> > Stijn
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>

Reply via email to