Hi Clément,
no sadly that was not the way to do it for me. I had a list where objects were 
saved in, so I couldn't just reference them the way you can do it normally. 
I had to do it like this:
        <h:column>
                                <f:facet name="header">
                                        <h:outputText 
value="#{bundle.listrequestsRID}" />
                                </f:facet>
                                <h:outputText value="#{result[0]['rid']}" />
                        </h:column>
@ Martin
after killing your and the others nerves again, I would like to contribute some 
documentation for that in the wiki. Would that be possible, how should I call 
the article?
("How get the mailing list to the border of a mental breakdown - just with one 
question") for example :)

Thanks a lot for all help, provided today! 

Regards Johannes

"MyFaces Discussion" <[email protected]> schrieb am 11.08.05 17:19:14:
> 
> Sorry but I didn't understand everything to what it have been said in here.
> All I know, this is the way I did it in fact, is :
> Query your database, get the results in a List or [] of rows (example : Datas 
> = List<databaseRow>) which must be one of your backing bean attribute (with a 
> getter) , then bind it to your t:dataTable and specify the "var" property 
> (for example "data"), last, in your t:column you can output the values by 
> doing data.attr.
> 
> Hopes this helps.
> Clément
> 
> -----Message d'origine-----
> De : Johannes Hiemer [mailto:[EMAIL PROTECTED] 
> Envoyé : jeudi 11 août 2005 17:05
> À : MyFaces Discussion
> Objet : Re: Datatable and Hibernate query
> 
> 
> 
> Hey guys,
> don't leave me alone, does nobody have an idea?
> 
> Please!! :)
> 
> Regards Johannes
> 
> "MyFaces Discussion" <[email protected]> schrieb am 11.08.05 12:59:32:
> > 
> > 
> > Hi Martin,
> > hell yeah, finally we got the problem :)
> > Do I have to convert them to normal arrays, or what would you 
> > recommend to do? Sorry for this question, I never worked with xobject 
> > arrays, and I didn't find any docs either.
> > 
> > Regards Johannes
> > 
> > 
> > "MyFaces Discussion" <[email protected]> schrieb am 11.08.05 
> > 12:45:53:
> > > Now everything is clear ;)
> > >  
> > >  those are object arrays, no beans - you can't use the point 
> > > notation here.
> > >  
> > >  regards,
> > >  
> > >  Martin
> > > 
> > > On 8/11/05, Johannes Hiemer <[EMAIL PROTECTED]> wrote:
> > > Hi Werner,
> > > you can finde the picture here: 
> > > https://fotoalbum.web.de/gast/jhiemer/programming
> > > As you can see, the values got all the values you I need. 
> > > 
> > > Regards Johannes
> > > 
> > > "MyFaces Discussion" <[email protected]> schrieb am 11.08.05 
> > > 11:23:39:
> > > >
> > > > Just a wild guess since I cannot see the attached picture (gmane 
> > > > did not
> > > > store it)
> > > >
> > > > do you have lazy references, and do you open and close the session 
> > > > before the rendering of the table.
> > > >
> > > > This is basically the cause of most access problems.
> > > > The main problem is, that if you access data which is lazyly bound
> > > > outside of a closed session you will get errors, most errors of feeding
> > > > data from a data source into the table happen that way, and the users
> > > > usually are left wondering why that happened, because the data objects 
> > > > are there.
> > > > So either keep your session open until the last milisecond, or prefetch
> > > > the data you want to display in the session.
> > > >
> > > >
> > > > The best way to do the keep the session open as long as you need 
> > > > is by
> > > > using a session per request filter
> > > > which opens the sessions before anything else is done
> > > > and closes it once everything else has finished.
> > > > Then you can mix and match lazy and non lazy references 
> > > > left and right and do not have to care about the access code anymore.
> > > >
> > > >
> > > > See following references regarding this:
> > > >
> > > > http://http//hibernate.org/43.html
> > > >
> > > > and also
> > > >
> > > > http://wiki.apache.org/myfaces/HibernateAndMyFaces
> > > >
> > > >
> > > > this article mentions a one session per session filter,
> > > > but I cannot recommend that one unless you only have a handful of users:
> > > >
> > > > http://blog.exadel.com/?p=8
> > > >
> > > >
> > > >
> > > > Johannes Hiemer wrote:
> > > > > Hi,
> > > > > I am getting into trouble with a bit adavanced hibernate query 
> > > > > that I want to show up in a datatable. That is my hibernate query:
> > > > >     public List getRequests() {
> > >  > >             return getHibernateTemplate()
> > > > >                             .find("from Request request, Customer 
> > > > > customer, Employee employee, System system,"
> > > > >                      + " Systemerror systemerror, Customee customee 
> > > > > WHERE request.Rcustomer = customer.Cid"
> > > > >                      + " AND request.Rscheduler = employee.Eid AND 
> > > > > request.Rfieldengineer = employee.Eid "
> > > > >                      + " AND request.Rtag = system.Sid AND 
> > > > > request.Rerror = systemerror.Seid AND"
> > > > >                      + " request.Rcustomee = customee.Cid");
> > > > >     }
> > > > >
> > > > > And it returns the following structure
> > > > > @see attached picture.
> > > > >
> > > > > So I am loading the query just the normal way I always to into a 
> > > > > list
> > > > > @SuppressWarnings("unchecked")
> > > > >     private void populateRequestBean() {
> > > > >             request = getRequestManager().getRequests();
> > > > >     }
> > > > >
> > > > > Now I try to get the values of the list in my datatable as an 
> > > > > output. I tried many ways, but I did not get it till yet.
> > > > >
> > > > > <x:dataTable id="data"
> > > > >                     var="request" 
> > > > > value="#{listrequestsSpringBean.request}">
> > > > >                     <h:column>
> > > > >                             <f:facet name="header">
> > > > >                                     <h:outputText 
> > > > > value="#{bundle.listrequestsRID}" />
> > > > >                             </f:facet>
> > > > >                             <h:outputText 
> > > > > value="#{request.object.request.rid}" />
> > > > >                     </h:column>
> > > > >
> > > > > Is the way I am doing right or wrong?
> > > > > Did anyone solve a similiar problem?
> > > > >
> > > > > I hope anyone can help me.
> > > > >
> > > > > Thanks a lot
> > > > >
> > > > > Regards Johannes 
> > > > > ______________________________________________________________
> > > > > Verschicken Sie romantische, coole und witzige Bilder per SMS! 
> > > > > Jetzt bei  WEB.DE FreeMail: http://f.web.de/?mc=021193
> > > > >
> > > > >
> > > >
> > > 
> > > 
> > > ____________________________________________________________________
> > > _____
> > > Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle
> > > Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179
> > > 
> > > 
> > > 
> > >  
> > >  
> > 
> > 
> > ______________________________________________________________
> > Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt 
> > bei WEB.DE FreeMail: http://f.web.de/?mc=021193
> > 
> 
> 
> _________________________________________________________________________
> Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle 
> Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179
> 
> 
> 


_________________________________________________________________________
Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle 
Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179



Reply via email to