Re: [s2] how to make s:iterator work

2007-01-16 Thread walidito
Now i understand better what struts 2 was doin, thanks ! Laurie Harper wrote: > > Making the getListOfBooks() method public is the way to go; then you can > remove the setAttribute() stuff from your execute() method. Struts will > make any public getter on your action available directly. > >

Re: [s2] how to make s:iterator work

2007-01-16 Thread Laurie Harper
Making the getListOfBooks() method public is the way to go; then you can remove the setAttribute() stuff from your execute() method. Struts will make any public getter on your action available directly. L. walidito wrote: Hi thanks a lot, what you said about the private method is right. I don

RE: [s2] how to make s:iterator work

2007-01-16 Thread Dave Newton
From: cilquirm [mailto:[EMAIL PROTECTED] > the problem for you is that since listOfBooks is not in the valuestack > directly, you would have to reference it via the request object, like > so If your Action has a publicly-visible getListOfBooks method: <%-- etc. --%> Setting listOfBooks v

Re: [s2] how to make s:iterator work

2007-01-16 Thread walidito
Hi thanks a lot, what you said about the private method is right. I don't know if it is the best solution, but it works well when I changed the method to public, so thanks. However, I' gonna try your last solution to see. regards, cilquirm wrote: > > > scratch my original comment ( though the

Re: [s2] how to make s:iterator work

2007-01-16 Thread cilquirm
scratch my original comment ( though the part regarding using the jstl is still valid. ) the problem for you is that since listOfBooks is not in the valuestack directly, you would have to reference it via the request object, like so ... walidito wrote: > > Hi everybody. > I have a problem

Re: [s2] how to make s:iterator work

2007-01-16 Thread cilquirm
I don't know particularly about the s:iterator, but since you said you're using JSP, you can access the model via the jstl tags just as easily : ${book.author} though, looking at your code again, I suspect it's because your getter is class private. It would have to be public. -a walid

[s2] how to make s:iterator work

2007-01-16 Thread walidito
Hi everybody. I have a problem with displaying a list of objects that I extract from a hibernate database. I' searching for the simpler and the better way to do it please. I have two issues : I am not sure about how to send it to the jsp. For the moment I am trying this one from my action : priv