Help coderanch get a
new server
by contributing to the fundraiser

Jyothi Venkatrao

+ Follow
since Aug 20, 2010
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jyothi Venkatrao

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="#{}" >
<display:column property="status" title="Status" href="someAction!display"/>
<display:column property="status" title="Status"/>


<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.

Yes, I agree that if the popup jsp gets generated using action class, the values would be populated. But I do not know how to make the actionforward to be a popup window.
So, this is what I tried. I am still using Javascript to open the popup window.

I am storing the values to be populated in the popup window in session and retrieving them in the C.jsp(popup window) and that seems to work.

13 years ago
No, C.jsp is not generated using an action class. The Javascript code snippet that opens the pop-up is.

mywindow ="SerialNumbersSelection.jsp","mywindow",

This javascript is called from B.jsp
13 years ago
I have a struts application. One of the JSP pages in that application (Say A.jsp) pops up another JSP page(C.jsp) using a javascript function. The same ActionForm and the Action class are associated with both these pages. But in the popup JSP page(C.jsp), I see that all the form attributes are getting nulled out when it opens up. The parent JSP(A.jsp) sends the request to the Action class which in turn runs some business logic and generates response data and sends the response back to B.jsp. B.jsp runs javascript function in its <body> tag and pops up C.jsp. A.jsp, B.jsp and C.jsp all use same actionmapping. But form attributes are empty only in C.jsp.

How do I resolve this ? Any hint would be appreciated.

13 years ago