Hi,
but it worked that way before, when I didn't use such a complex query.
getRequest and setRequest are the getters and setters of request, whereas
getRequests is a method running and returning a hibernate-query. So I think it
should work that way. Or better it already worked that way.
I think it is more a problem about referencing in the datatable itself, namely
here: <h:outputText value="#{request.object.request.rid}" />
Do you get what I mean?
Thanks for your fast response.
Regards Johannes
"MyFaces Discussion" <[email protected]> schrieb am 11.08.05 09:32:50:
>
> x:[EMAIL PROTECTED] is bound to the 'request' property -
> this equates to getRequest(). The name of the method you
> post is getRequests . If getRequests is a method
> listrequestsSpringBean, fix the 's'.
>
> ---- Original message ----
> >Date: Thu, 11 Aug 2005 09:18:33 +0200
> >From: Johannes Hiemer <[EMAIL PROTECTED]>
> >Subject: Datatable and Hibernate query
> >To: [email protected]
> >
> >
> >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
> >
> Dennis Byrne
_________________________________________________________________________
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