You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Oliver Rossmueller <ol...@tuxerra.com> on 2005/09/05 02:13:39 UTC

What is the purpose of _dataModelMap in UIData?

Hi folks,

I just stumbled over the fact that UIData holds a map where it stores
data models with it's parent's clientId used as key - see
UIData.getDataModel(). I have no clue what this is for and why the data
model is not stored in a simple instance variable like the RI does.
Someone who can explain this?

Oliver

-- 
Oliver Rossmueller
Software Engineer and IT-Consultant
Hamburg, Germany
http://www.rossmueller.com


Re: What is the purpose of _dataModelMap in UIData?

Posted by Manfred Geiler <ma...@gmail.com>.
Mathias,
Just became aware that I never congratulated (and thanked) you for
refactoring the DataTable. Sorry, if I did scare you with my
objections in the beginning. And thanks, that you have not been
discouraged.  ;-)

-Manfred


2005/9/5, Mathias Brökelmann <mb...@googlemail.com>:
> Martin is right. During the processing of the jsf phases we don´t call
> getValue() for every time we need to access the UIData value. We cache
> them in that map. To support nested UIDatas it´s necessary to hold the
> datamodel in depend of the client id of the parent. The client id
> changes if it is nested within a UIData during the iteration.
> 
> 2005/9/5, Martin Marinschek <ma...@gmail.com>:
> > That has to do with the fact that we correctly remember the state of
> > UIData's which are children of the parent UIData - the RI won't do
> > that, at least the last time we looked at that.
> >
> > regards,
> >
> > Martin
> >
> > On 9/5/05, Oliver Rossmueller <ol...@tuxerra.com> wrote:
> > > Hi folks,
> > >
> > > I just stumbled over the fact that UIData holds a map where it stores
> > > data models with it's parent's clientId used as key - see
> > > UIData.getDataModel(). I have no clue what this is for and why the data
> > > model is not stored in a simple instance variable like the RI does.
> > > Someone who can explain this?
> > >
> > > Oliver
> > >
> > > --
> > > Oliver Rossmueller
> > > Software Engineer and IT-Consultant
> > > Hamburg, Germany
> > > http://www.rossmueller.com
> > >
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> > Your JSF powerhouse -
> > JSF Trainings in English and German
> >
> 
> 
> --
> Mathias
>

Re: What is the purpose of _dataModelMap in UIData?

Posted by Mathias Brökelmann <mb...@googlemail.com>.
Martin is right. During the processing of the jsf phases we don´t call
getValue() for every time we need to access the UIData value. We cache
them in that map. To support nested UIDatas it´s necessary to hold the
datamodel in depend of the client id of the parent. The client id
changes if it is nested within a UIData during the iteration.

2005/9/5, Martin Marinschek <ma...@gmail.com>:
> That has to do with the fact that we correctly remember the state of
> UIData's which are children of the parent UIData - the RI won't do
> that, at least the last time we looked at that.
> 
> regards,
> 
> Martin
> 
> On 9/5/05, Oliver Rossmueller <ol...@tuxerra.com> wrote:
> > Hi folks,
> >
> > I just stumbled over the fact that UIData holds a map where it stores
> > data models with it's parent's clientId used as key - see
> > UIData.getDataModel(). I have no clue what this is for and why the data
> > model is not stored in a simple instance variable like the RI does.
> > Someone who can explain this?
> >
> > Oliver
> >
> > --
> > Oliver Rossmueller
> > Software Engineer and IT-Consultant
> > Hamburg, Germany
> > http://www.rossmueller.com
> >
> >
> 
> 
> --
> 
> http://www.irian.at
> Your JSF powerhouse -
> JSF Trainings in English and German
> 


-- 
Mathias

Re: What is the purpose of _dataModelMap in UIData?

Posted by Martin Marinschek <ma...@gmail.com>.
That has to do with the fact that we correctly remember the state of
UIData's which are children of the parent UIData - the RI won't do
that, at least the last time we looked at that.

regards,

Martin

On 9/5/05, Oliver Rossmueller <ol...@tuxerra.com> wrote:
> Hi folks,
> 
> I just stumbled over the fact that UIData holds a map where it stores
> data models with it's parent's clientId used as key - see
> UIData.getDataModel(). I have no clue what this is for and why the data
> model is not stored in a simple instance variable like the RI does.
> Someone who can explain this?
> 
> Oliver
> 
> --
> Oliver Rossmueller
> Software Engineer and IT-Consultant
> Hamburg, Germany
> http://www.rossmueller.com
> 
> 


-- 

http://www.irian.at
Your JSF powerhouse - 
JSF Trainings in English and German