Which class to prepare database data to be displayed in JSF components

2005-09-02 Thread Clément Maignien
Title: Message Hi everyone, Here is the situation : I have to display in JSF components data (what ever it is) that come from a database (what ever it is).   Which class is supposed to format data so it can be displayed in JSF component ? For example in some SelectItem objects.   Accordin

Re: Which class to prepare database data to be displayed in JSF components

2005-09-02 Thread Martin Marinschek
Hold on - classic MVC allows UI Data to access the model... why should that be disallowed? regards, Martin On 9/2/05, Clément Maignien <[EMAIL PROTECTED]> wrote: > > Hi everyone, > Here is the situation : > I have to display in JSF components data (what ever it is) that come from a > databa

RE : Which class to prepare database data to be displayed in JSF components

2005-09-02 Thread Clément Maignien
PROTECTED] Envoyé : vendredi 2 septembre 2005 10:04 À : MyFaces Discussion Objet : Re: Which class to prepare database data to be displayed in JSF components Hold on - classic MVC allows UI Data to access the model... why should that be disallowed? regards, Martin On 9/2/05, Clément Maigni

Re: Which class to prepare database data to be displayed in JSF components

2005-09-02 Thread Mike Kienenberger
I find custom converters registered by class to be ideal for this purpose. It converts data between business object format and String (required on the presentation side). On 9/2/05, Clément Maignien <[EMAIL PROTECTED]> wrote: > > Hi everyone, > Here is the situation : > I have to display in JS

Re: Which class to prepare database data to be displayed in JSF components

2005-09-02 Thread Werner Punz
Mike Kienenberger wrote: I find custom converters registered by class to be ideal for this purpose. It converts data between business object format and String (required on the presentation side). Not really totally feasable if you use a drop down box or another control which needs a key,value p

Re: Which class to prepare database data to be displayed in JSF components

2005-09-02 Thread Mike Kienenberger
Really? because that's precisely how I'm using it -- populating pulldowns. My object is my value and my key/label is whatever object.getName() returns. On 9/2/05, Werner Punz <[EMAIL PROTECTED]> wrote: > Mike Kienenberger wrote: > > I find custom converters registered by class to be ideal for th

Re: Which class to prepare database data to be displayed in JSF components

2005-09-02 Thread Dennis Byrne
MAIL PROTECTED]> >Subject: Re: Which class to prepare database data to be displayed in JSF components >To: MyFaces Discussion , [EMAIL PROTECTED] > >Really? because that's precisely how I'm using it -- populating >pulldowns. My object is my value and my key/la

Re: Which class to prepare database data to be displayed in JSF components

2005-09-03 Thread Werner Punz
Mhh interesting... I am missing something here (I must admit I have not written too many custom converters yet) how do you handle the problem that a selectone menu wants a Collection of SelectItem for the menu entries...? Werner Werner Punz wrote: Mike Kienenberger wrote: I find custom

Re: Which class to prepare database data to be displayed in JSF components

2005-09-03 Thread Dennis Byrne
>how do you handle the problem that a selectone menu wants a Collection >of SelectItem >for the menu entries...? Coach.unit.team is a Team object and Coach.getTeam returns a list of Teams, wrapped w/ UIComponents of course. Dennis Byrne

Re: Which class to prepare database data to be displayed in JSF components

2005-09-06 Thread Mike Kienenberger
I have *SelectionItemProvider backing bean classes for each set of database objects which convert a list of database objects into arrays of SelectItems. Two methods for each, one of which adds a "" null-capable line if the attribute is not mandatory. I automatically generate these backing beans

Re: RE : Which class to prepare database data to be displayed in JSF components

2005-09-02 Thread Martin Marinschek
schek [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 2 septembre 2005 10:04 > À : MyFaces Discussion > Objet : Re: Which class to prepare database data to be displayed in JSF > components > > > Hold on - classic MVC allows UI Data to access the model... > > why shoul

Re: RE : Which class to prepare database data to be displayed in JSF components

2005-09-02 Thread Werner Punz
I agree a SelectItems mapper does not belong into the DAO, if you want total abstraction, which a dao should give... (I will correct that in the article tomorrow) having a selectitemdao is a bad approach for total abstraction... Werner Martin Marinschek wrote: Right - managedBeans as form

Re: RE : Which class to prepare database data to be displayed in JSF components

2005-09-02 Thread Werner Punz
Btw... thanks, I am glad that people actually are reading this small article... I definitely would love to get more feedback on what is wrong so that the article can become better over time (feel free to edit yourself as well) Werner Clément Maignien wrote: True true ... I'm only asking quest