Hi,

I think this is a bit odd as I'm using the display tag (1.2) with
struts 2 (2.1.6) and I can't get it to work without using <s:set />.
Are there any special interceptors or anything one needs to have
enabled for this to work? I think I have the default stack on that
particular page so I assume the tag should be working but it doesn't.
The list is set on the action as usual and works when iterating and
when using <s:set />.

regards,
Wim

On Sat, Jul 11, 2009 at 7:26 PM, dusty<dustin_pea...@yahoo.com> wrote:
>
> That sounds like a troubling one, based on what you describe it should work.
> Especially if the struts iterator works on the same JSP page.   What version
> of Struts and DisplayTag are you using.
>
> There was a time when you had to use the <s:set /> tag and a time when you
> did not.  Have you tried without the s:set tag?
>
>
>
> Dimitrios Christodoulakis wrote:
>>
>> Hello list,
>>
>> I am exposing a collection called "entries" in my action class
>> (Set<JournalEntry> entries;), with all the appropriate getters and
>> setters. In the result jsp of this action I am using the display tag
>> to output the content of the collection:
>>
>> <s:set name="entries" value="entries" scope="request"/>
>>               <display:table name="entries" requestURI="">
>>                       <display:column property="entry"/>
>>                       <display:column property="date" sortable="true"
>> defaultorder="ascending"/>
>>               </display:table>
>>
>> But the message I get on the jsp page is: "Nothing found to display".
>> (Its not an exception, this message is printed on the regulat html
>> output page). I am certain that the rows exist on the underlying db, I
>> am using mysql query browser to check.
>>
>> So, I have followed instructions about struts2 and the display tag
>> found in different places:
>> http://www.nabble.com/Struts-2---DisplayTag-example-td17694341.html
>> http://www.manning-sandbox.com/thread.jspa?messageID=76885
>> http://appfuse.org/display/APF/Using+Struts+2
>>
>> But I can't get this simple task to work. The objective is to simply
>> display the table. In contrast, using just the struts2 tags, the
>> following works fine:
>>
>> <table border="3">
>>                       <s:iterator value="entries">
>>                               <tr />
>>                                       <td><s:property value="entry"/></td>
>>                                       <td><s:property value="date"/></td>
>>                               </tr>
>>                       </s:iterator>
>>               </table>
>>
>> However, since I wish to use the display tag for further formatting
>> and sorting, I was hoping if anyone had any thoughts as to why my code
>> above finds nothing to display. I can't tell if it finds just an empty
>> collection, or doesn't find the collection at all.
>>
>> thanks for any advice.
>>
>> Regards.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/%22Nothing-found-to-display%22-from-display-tag-with-struts-2-tp24441738p24442243.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to