myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <>
Subject Re: How to implement a Start Again Button on a edit view
Date Tue, 04 Apr 2006 19:07:02 GMT
You could probably create a second navigation rule which includes
<redirect/> and activate it after your've updated your view.

That should start the page out as if you were going to it again for
the first time, provided you've reset everything stored in session and
application scope.

On 4/4/06, Lindholm, Greg <> wrote:
> I have an edit view that let's the user modify an object thru a number
> of steps.
> All the "steps" redisplay the same view with additional/changed
> information.
> Once all the information has been entered there is a Save button to make
> the
> changes permanent.
> I want to have a "Start Again" button that the user can press at anytime
> to
> discard all the changes and start again in the same view.
> <h:commandButton immediate="true" action="#{bb.startAgain}" value="Start
> Again" />
> In the startAgain() action I reset all the backing beans properties from
> the saved original object. The problem is the view components still have
> the last values displayed.
> (I've tried both an Action and ActionListener and get the same result.)
> The form that gets redisplayed to the user has the last values displayed
> NOT my backing bean property values.
> Is this because the "Update Model Values" phase was skipped?
> Is there a way to reset the view so it acts like this is the first time.
> I want the view components to get all there values from the bound
> backing
> bean properties like they normally would following a non immediate
> action event.
> Can anyone help?
> Using MyFaces and Tomahawk 1.1.1.

View raw message