Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JSP
Use JSTL var In an indexOf Function
Steve Dyke
Ranch Hand
Posts: 2206
2
posted 6 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
In the following javascript the faiqueueparamsObj.faiinspectionsource = 13,15 and the itemName.recseq returns 13,14,15,16,17 sequentially so the indexOf should return > -1.
<li><A href="#">Inspection Source</A> <c:out value="${faiqueueparamsObj.faiinspectionsource}"></c:out> <ul> <c:forEach var="itemName" varStatus="status" items="${defaultpramsObj.subSource}"> <c:choose> <c:when test="${itemName.group == 1}"> <c:out value="${itemName.recseq}"></c:out> <li> <c:choose> <c:when test="${faiqueueparamsObj.faiinspectionsource.indexOf(itemName.recseq) > -1}"> <input type="checkbox" class="faiinpectionsource" data-isvalue="${itemName.recseq}" checked><SPAN>${itemName.description}</SPAN><br> </c:when> <c:otherwise> <input type="checkbox" class="faiinpectionsource" data-isvalue="${itemName.recseq}"><SPAN>${itemName.description}</SPAN><br> </c:otherwise> </c:choose> </li> </c:when> </c:choose> </c:forEach> </ul> </li>
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 6 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
There is no JavaScript in this code. Those are
JSP
EL expressions. As such, this has been moved to the JSP forum.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Pressing the enter key receive extra invalid data
How to Exclude An Event on an Embeded Container
JSTL - total count for loop within a loop
Best choice for pagination?
Coloring Table Rows
More...