Jyothi Venkatrao

Greenhorn
+ Follow
since Aug 20, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
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="#{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
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.

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

mywindow = window.open("SerialNumbersSelection.jsp","mywindow",
"location=1,status=1,scrollbars=1,width=500,height=400");
mywindow.moveTo(0,0);

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 window.open() 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.

Jyothi
13 years ago