Strange.

this should work.

Can you open a jira-issue on this?

regards,

Martin

On 10/25/05, Juan Medín Piñeiro <[EMAIL PROTECTED]> wrote:
> Martin,
>
>     It does work. Changing the STATE_SAVING_METHOD to client as you
> suggested solved the problem (at last ! :) The only problem is that
> the poor user will receive the state data for the whole application...
> It's a high price to pay for saveState. Does it always require to
> store the data in the client ?
>
>     BTW, thanks to you and David for the help.
>
> Regards,
>
>     - Juan
>
> On 10/25/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> > Are you using client-side state saving?
> >
> > Try to switch to it just for trying out if this works.
> >
> > regards,
> >
> > Martin
> >
> > On 10/24/05, Juan Medín Piñeiro <[EMAIL PROTECTED]> wrote:
> > > Sorry, It was a typo writing the code in the mail. It should be:
> > >
> > > <f:view>
> > >        <BODY>
> > >                <t:saveState value="#{aRequestScopedObject}"/>
> > >                <h:form styleClass="form" id="form1">
> > >
> > > Yes, ARequestScopedObject implements Serializable.
> > >
> > > The html form code generated by the code above is:
> > >
> > >         <form id="form1" method="post"
> > >                 action="/testbox/faces/app/savestate/test1.jsp"
> > >                 enctype="application/x-www-form-urlencoded">
> > >
> > >                 <input id="form1:text1" type="text"
> > >                         name="form1:text1" value=""/>
> > >                 <input id="form1:text2" type="text"
> > >                         name="form1:text2" value=""/>
> > >                 <input type="submit" value="Submit"
> > >                         name="form1:button1" id="form1:button1"/>
> > >                 <input type="hidden" name="form1" value="form1" />
> > >
> > >         </form>
> > >
> > > Where text1 and text2 are text fields I included to test it. There is
> > > no html code for the saveState() tag.
> > >
> > > Regards,
> > >
> > >     - Juan
> > >
> > >
> > > On 10/24/05, David G. Friedman <[EMAIL PROTECTED]> wrote:
> > > > Juan,
> > > >
> > > > What is "testState" and shouldn't that be "#{testState}" ? Did you make 
> > > > it
> > > > serializable so it can be saved?
> > > >
> > > > Regards,
> > > > David
> > > >
> > > > -----Original Message-----
> > > > From: Juan Medín Piñeiro [mailto:[EMAIL PROTECTED]
> > > > Sent: Monday, October 24, 2005 10:42 AM
> > > > To: MyFaces Discussion
> > > > Subject: Re: How to use t:saveState ?
> > > >
> > > >
> > > > It's inside the view and outside the form.
> > > >
> > > > From the test code:
> > > >
> > > > <f:view>
> > > >         <BODY>
> > > >                 <t:saveState value="testState"/>
> > > >                 <h:form styleClass="form" id="form1">
> > > >
> > > > .... more markup code  ....
> > > >
> > > > Regards,
> > > >
> > > >     - Juan
> > > >
> > > > On 10/24/05, David G. Friedman <[EMAIL PROTECTED]> wrote:
> > > > > Juan,
> > > > >
> > > > > Is it inside the f:view or outside the view?
> > > > >
> > > > > Regards,
> > > > > David
> > > > >
> > > > > -----Original Message-----
> > > > > From: Juan Medín Piñeiro [mailto:[EMAIL PROTECTED]
> > > > > Sent: Monday, October 24, 2005 10:28 AM
> > > > > To: [email protected]
> > > > > Subject: How to use t:saveState ?
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > >     I've been trying to use t:saveState without success. As far as I
> > > > > can read in the wiki and in the examples, you just need to include a
> > > > > <t:saveState value="xxx"/> in the JSP and the information will travel
> > > > > to the client and back in the next request.
> > > > >
> > > > >     So I created 3 pages, test1, test2 and test3, each with a
> > > > > <t:saveState value="aRequestScopedObject"/>. In the backing bean I do
> > > > > something like:
> > > > >
> > > > > aRequestScopedObject = (ARequestScopedObject) getFacesContext()
> > > > >     .getApplication()
> > > > >     .createValueBinding("#{aRequestScopedObject}")
> > > > >     .getValue(getFacesContext());
> > > > >
> > > > >     And then I set several properties on it.
> > > > >
> > > > >     Well, when I reach the test2 page _all changes_ are lost. Reading
> > > > > the generated HTML I don't see anything at all related to the
> > > > > saveState info in the form (!?)
> > > > >
> > > > >     Am I missing anything ?
> > > > >
> > > > >     Any comment would be really welcome. It seems to be very simple to
> > > > > use, the only "strange" thing is that I'm using the Sun RI + Tomahawk.
> > > > >
> > > > >     Thanks in advance,
> > > > >
> > > > >         - Juancho
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> > Your JSF powerhouse -
> > JSF Trainings in English and German
> >
>


--

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German

Reply via email to