Hi Ravi,

That page is a bit outdated and does need an update.

You should not use the flash scope attributes to build your page...
Instead, when submitting your form, do a redirect-after-post to one of your
actionbeans (you can pass the record id as a querystring parameter), and
get your inserted record normally from the DB:

// Runs before binding and validation are executed
@Before(stages = LifecycleStage.BindingAndValidation)
public void doPreValidationStuff() {
    // get the inserted record here...
}

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Sat, Dec 17, 2011 at 6:14 AM, Ravi amlani <[email protected]>wrote:

> Hi all,
>
> Currently I'm facing a problem of state management. After submitting my
> form(to add record) , I forward my request to another jsp from the action
> bean. So on refresh same event (add record) is called and it re-submits my
> form.
> Then I've gone though
> http://www.stripesframework.org/display/stripes/State+Management .
>
> This link suggests me to use FlashScope. But my problem is that in my page
> I'm using session attributes and request parameters.  So if I use
> FlashScope it works fine but only first time. Once the page loads and as I
> refresh, all my attributes and parameters goes away.
>
> So how to take control of all my parameters and avoid the problem of
> re-submit on refresh?
>
>
> - Thanks,
>    Ravi Amlani
>
>
> ------------------------------------------------------------------------------
> Learn Windows Azure Live!  Tuesday, Dec 13, 2011
> Microsoft is holding a special Learn Windows Azure training event for
> developers. It will provide a great way to learn Windows Azure and what it
> provides. You can attend the event by watching it streamed LIVE online.
> Learn more at http://p.sf.net/sfu/ms-windowsazure
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to