You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ali Abdel-Aziz Ali <ro...@gmail.com> on 2008/04/06 11:23:43 UTC

How to Sync the SaveState variables?

Hello All,

I have some variables(properties) saved in savestate as follows

                <t:saveState value="#{procedureListBean.selectedVersionId}"
id="selectedVersionId"/>
                <t:saveState
value="#{procedureListBean..selectedProcedureId}" id="selectedProcedureId"/>
                <t:saveState value="#{procedureListBean.procedureVersions}"
id="procedureVersions"/>
                <t:saveState value="#{procedureListBean.procedures}"
id="procedures"/>

the problem is I have master detail page which contains two tables

   - the Master Table (procedures) list all procedures then by selecting
   specific record in this table it will display the details (
   procedureVersions) table associated with this record.
   - The Details Table (procedureVersions) list all procedureVersions
associated
   with the selected (procedure) record.

Now after selecting record from the master table (procedures) and trying to
scroll to another page in the Master (procedures) table it keep displaying
the details of the old selected (procedures) record.

I tried to set the details table variable (procedureVersions) to null once
it start scrolling to another (procedures) page but it keeps ignoring the
value I set and restore the old saved value of the detail table (
procedureVersions) .

So my question is How to sync the values saved in the savestate with the
latest values I feeded this variables with from my managed bean.

By the way this was working in a good way with me in the past (when I was
loading all table data in memory) but after I turned my implementation to
just fetch the required page records this problem arises, I implemented the
solution mentioned here (
http://wiki.apache.org/myfaces/WorkingWithLargeTables)

Can any body helps?

Thanks in advance.

-- 
Ali Abdel-Aziz
http://www.aliabdelaziz.com

Re: How to Sync the SaveState variables?

Posted by Hazem Saleh <ha...@gmail.com>.
Hi Aly,
Please send more details about the code (the JSPs, the faces-config and the
managed beans) to clarify the problem.
Thanks

On Sun, Apr 6, 2008 at 11:23 AM, Ali Abdel-Aziz Ali <ro...@gmail.com>
wrote:

> Hello All,
>
> I have some variables(properties) saved in savestate as follows
>
>                 <t:saveState
> value="#{procedureListBean.selectedVersionId}" id="selectedVersionId"/>
>                 <t:saveState
> value="#{procedureListBean..selectedProcedureId}" id="selectedProcedureId"/>
>                 <t:saveState
> value="#{procedureListBean.procedureVersions}" id="procedureVersions"/>
>                 <t:saveState value="#{procedureListBean.procedures}"
> id="procedures"/>
>
> the problem is I have master detail page which contains two tables
>
>    - the Master Table (procedures) list all procedures then by
>    selecting specific record in this table it will display the details (
>    procedureVersions) table associated with this record.
>    - The Details Table (procedureVersions) list all procedureVersions associated
>    with the selected (procedure) record.
>
> Now after selecting record from the master table (procedures) and trying
> to scroll to another page in the Master (procedures) table it keep
> displaying the details of the old selected (procedures) record.
>
> I tried to set the details table variable (procedureVersions) to null once
> it start scrolling to another (procedures) page but it keeps ignoring the
> value I set and restore the old saved value of the detail table (
> procedureVersions) .
>
> So my question is How to sync the values saved in the savestate with the
> latest values I feeded this variables with from my managed bean.
>
> By the way this was working in a good way with me in the past (when I was
> loading all table data in memory) but after I turned my implementation to
> just fetch the required page records this problem arises, I implemented the
> solution mentioned here (
> http://wiki.apache.org/myfaces/WorkingWithLargeTables)
>
> Can any body helps?
>
> Thanks in advance.
>
> --
> Ali Abdel-Aziz
> http://www.aliabdelaziz.com




-- 
Hazem Ahmed Saleh Ahmed
http://www.jroller.com/page/HazemBlog