Hi!

>From the Apache MyFaces Web site about the "preserveDataModel" attribute:

"When this attribute is "true", the data behind the current DataModel is
saved after the render response phase and restored in the restore component
tree phase. "

I'm not sure if I understand the problem correctly, that caused the
"preserveDataModel" attribute invention. Is it related to the possibility,
that the data model might have been changed between the *last render
response phase* and the following *restore view* and *apply request values*
phase, when the user submits to the same view (postback)?

If so, do I only have to use the "preserveDataModel" attribute if the data
model might get changed between these phases, thus while the user views the
page with the data table?


Regards,

Matthias



> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag
> von Mathias Brökelmann
> Gesendet: Donnerstag, 22. Dezember 2005 11:04
> An: MyFaces Discussion
> Betreff: Re: preserveDataModel (attribute of dataTable) questions
>
>
> 2005/12/22, Matthias Kahlau <[EMAIL PROTECTED]>:
> > javax.faces.el.EvaluationException: Cannot set value for expression
> > '#{FragenBacking.fragenModel}' to a new value of type org.apache.myfaces
> > .component.html.ext._SerializableDataModel
>
> you have a setter method for fragenModel which does not accept a
> parameter for an instance of javax.faces.model.DataModel.
>
>
> > Another question related to the dataModel. I don't know if the
> > "preserveDataModel" approach can help, but when the user leaves the site
> > with the table because the user selected an edit link in the
> table, and then
> > returns to the site with the table, I cannot use the
> getRowData() method to
> > determine the last row selected. If I do that, I get the following error
> > message:
>
> That is not possible. You have to remember which row was selected
> between the views and call datamodel.setRowIndex(rememberedIndex)
> before calling getRowData().
>
> --
> Mathias

Reply via email to