Is it possible/appropriate to use 
<t:saveState value=#{SubscrierMB.dataModel}> 

to solve the problem?

Regards,
Yee

-----Original Message-----
From: Mathias Brökelmann [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 12 November 2005 9:38 PM
To: MyFaces Discussion
Subject: Re: Some notes of my loadtest results

You have a component binding. I mean the valuebinding through the
attribute value. I expect something like this:

        <h:selectBooleanCheckbox
             ...
             value="#{SubscriberMB.checkedRow}"
             ... >
        </h:selectBooleanCheckbox>

The problem is still the same. Datatable maintains internal rowstates
which contains the setted values for each component and each row but
they are discared before render phase. The invoke application phase in
which you set the boolean value is before the render phase. Any value
you have set in the application phase through the component binding
will be lost since updateModel phase (which could set the value
through the value binding) is before invoke application.


2005/11/12, Vesa Lindfors <[EMAIL PROTECTED]>:
> Sorry, I wasn't clear enough in problem description -  sure I have
> valuebinding in each  row:
>        <h:selectBooleanCheckbox
>             ...
>             binding="#{SubscriberMB.checkedRow}"
>             ... >
>        </h:selectBooleanCheckbox>
> and that is working like earlier. I can select (one by one) and have
actions
> for selected users (selected by clicking checkboxes).
>
>  On the other words, I failed to set checkboxes in table by programming
>
>           dataModel.setRowIndex(index);
>           checkedRow.setSelected(true);
>
>  And I think that should work also?
>  -- vLi --
>
>
>
> On 11/12/05, Mathias Brökelmann <[EMAIL PROTECTED]> wrote:
> > I wonder that this is working in 1.1.1.
> >
> > Normally the state for each row in a datatable is discarded before the
> > table is rendered if the page data contains no error. Any input
> > component without a valuebinding loses its value. I suggest you to use
> > a valuebinding for the UISelectBoolean field. This will work better in
> > datatables. If the selectall button is executed set the flags for the
> > managed bean field for each row which was bound to the select boolean
> > component.
> >
> > 2005/11/11, Vesa Lindfors <[EMAIL PROTECTED]>:
> > > I have just one more issue before I can test NB again with
> > > STATE_SAVING_METHOD=server && SERIALIZE_STATE_IN_SESSION=true
> > >
> > >  I had earlier (1.1.1) working "Select all" function for checkboxs in
my
> > > datatable, now in NB it's not (neither in cleint or server side). Is
> there
> > > any thing I should make differently?
> > >
> > >  private UISelectBoolean checkedRow = null;
> > >
> > >  public UISelectBoolean getCheckedRow() { return checkedRow; }
> > >
> > >  public void setCheckedRow(UISelectBoolean checked) { this.checkedRow
=
> > > checked; }
> > >
> > >  public void selectAllListener(ActionEvent event) {
> > >  ...
> > >      for (int index = first; index < rows; index++) {
> > >          dataModel.setRowIndex(index);
> > >           checkedRow.setSelected(true);
> > >        }
> > >      }
> > >  ...
> > >    }
> > >
> > >  x:dataTable has preserveDataModel="false" and the data list stored by
> > > x:saveState.
> > >
> > >  I can see that method is called properly and no exception is shown,
but
> the
> > > checkboxes are not marked as earlier...
> > >
> > >  -- VLi ---
> > >
> > >
> > >
> > >
> > > On 11/9/05, Mathias Brökelmann <[EMAIL PROTECTED] > wrote:
> > > > You are right latest commit breaks that. I have committed a fix for
> > > > that so it is working now.
> > > >
> > > > 2005/11/9, Vesa Lindfors < [EMAIL PROTECTED]>:
> > > > > Mathias,
> > > > >  I tested successfully the rest of platforms with
> > > > > javax.faces.STATE_SAVING_METHOD=server &&
> > > > > SERIALIZE_STATE_IN_SESSION=false &&
> myfaces-20051030 .
> > > > >
> > > > >  Now I should have time to continue testing your suggestion:
> > > > > STATE_SAVING_METHOD=server && SERIALIZE_STATE_IN_SESSION=true &&
> > > > > myfaces-20051103.
> > > > >  But now my testing fails at the very begin: the application
didn't
> > > worked
> > > > > at all with state saving "server" - my ActionEvents weren't fired
at
> all
> > > ( I
> > > > > mean very basic form buttons didn't work anymore). Turning state
> saving
> > > to
> > > > > the "client" it start to work again. I tried also with
> myfaces-20051107
> > > and
> > > > > same results. Do you have any idea what could be changed in NB
> during
> > > > > 20051030- 20051103 so that it can have such effect?
> > > > >
> > > > >  --- VLi ---
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > > >One more thing. I have removed the gzipping of the serialized
> stream
> > > > > > >if server side state is used. This might have caused some
> additional
> > > > > > >performance problems. Would it be possible to take the next
> nightly
> > > > > > >(20051103) and test it again with
> > > > > >
> >org.apache.myfaces.SERIALIZE_STATE_IN_SESSION=true
> > > to
> > > > > check this?
> > > > > >
> > > > > > >Mathias
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Mathias
> > > >
> > >
> > >
> >
> >
> > --
> > Mathias
> >
>
>


--
Mathias

Reply via email to