File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Problems with diaplayTag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Problems with diaplayTag" Watch "Problems with diaplayTag" New topic
Author

Problems with diaplayTag

Jyothi Venkatrao
Greenhorn

Joined: Aug 20, 2010
Posts: 4
I am having problems using conditional displayTag in my jsp. I have a table being displayed using displayTag in my jsp. One of the display:column has href. I want this column to have href attibute based on a condition. I am using struts2 <s:if> to specify my condtion. Here is the code.

<div id="tabledata">
<display:table name="tablelist" id="bean">
<display:column property="fileName" title="File Name"/>
<display:column property="strAmt" title="Amount" />

<s:if test="#{bean.link}" >
<display:column property="status" title="Status" href="someAction!display"/>
</s:if>
<s:else>
<display:column property="status" title="Status"/>
</s:else>
</display:table>

</div>

<s:if> is apparently not seeing the bean. How can make the 'bean' available to it ? Or how can I make the display:column to have href based on a condition with or without struts2 ?

Any help would be appreciated.

Thanks,
Jyothi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems with diaplayTag