Forums Register Login

Changing CSS value based on c:out

+Pie Number of slices to send: Send
Hi ,

I need to change the <tr name name based on c:out as follows:


[code]<tr name="rw<c:out value="${record1}"/>" >[code]

There are 2 for:each loop,
<c:forEach items="${BatchListBean}" var="batch" varStatus="record1">
---
---
<c:forEach items="${supplierInvoices}" var="mainpage" varStatus="record2">
"<tr name="rw<c:out value="${record1}"/>" >" [without outer double quotes..here i gave for proper display]
---
</c:forEach>
</c:forEach>

but its not workin ..whats the correct way to append teh c:out value dynamically?


Thanks Amarshi
+Pie Number of slices to send: Send
Please place your code inside the CODE tags. It is difficult to read this code
+Pie Number of slices to send: Send
And be sure to disable smilies in your posts. As it is, this post is unreadable.
+Pie Number of slices to send: Send
I'm not clear on what you're trying to do. I see that you have created a varStatus in each of your <c:forEach> elements, but you appear to be using it as a simple value. For example, you have: where record1 is the name of your status variable. What you you expecting to get?

Using the status variable, you can get things like ${record1.count} and ${record1.index}, etc.

Can you please make the other changes to your post as suggested, then try to explain better what you're trying to get? A sample of the expected output would be a good thing to include.

I will suppress my every urge. But not this shameless plug:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2099 times.
Similar Threads
passing a parameter to an action class
JSTL/EL Nested expression (within nested forEach) Issue
JSF TreeMap Iteration Problem Using JSTL In XHTML
struts dynavalidatorBean with HashMap & JSTL
Obtaining total items for c:forEach
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:02:28.