users@woodstock.java.net

Re: TabSet does not store values in backing bean

From: Venkatesh Babu <Venkatesh.M_at_Sun.COM>
Date: Thu, 08 May 2008 18:25:55 +0530

I think with the present tab, whenever the user navigates to the next
tab, the requested tab's components are fetched and displayed but the
previous tab's data is not updated unless you explicitly "save" the data
for that tab. (such as using a save button).

This is because, once you submit the data of that previous tab to the
server, then your backing bean gets updated with the data. The
consequence in your case is, if the user presses the "cancel" button
instead of the "save" button and chooses not to save his data, then you
would be faced with a problem of identifying the updated fields and
restoring them to prevous state.

-Venky
Stefan Bley wrote:
> Hi woodstock users,
>
> I've got a complex page whit a lot of input fields, so I decided to split it
> user-friendly into 3 pieces. I've done this using a TabSet with 3 tabs. When
> all 3 tab pages have been completed by the user, he is presented a Submit
> button to send the data.
>
> Now the problem is: When a user fills in the values in tab 1 and swtiches to
> the next tab, the values of tab 1 are not stored in the backing bean. Thus,
> when he clicks on Submit button after completing tab 3 all data from tab 1
> and 2 are lost. Why isn't it stored in the bound properties within the
> backing bean?
>
> Regards, Stefan
>