Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Iterate ArrayList and call javascript menthod according to it's value on JSP  RSS feed

 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi....

My task it to get an ArrayList object which contains some UUID values like...

0-822
1-833
2-844

and so on...

When these values matched with the values I am getting from another ArrayList....According to that
I need to call javascipt methods


Like if it is not matched then



selected otherwise



selected


it is a loop within a loop ...

When first iteration goes on....second loop starts and check with each value if it is matched it selects 1st image otherwise the 2nd one..


My Aim is to first set the arraylist object into the request (which I've done already)...Then put a loop to check whether the values matched with the current value or not and set the image according to that....

It is like SQL statement values in(x,y,z)....
or objArrayList.contains(Obj);
IS there any such option available on JSP....? Or I have to set these arraylist in some property and so checking from it..?

Not able to figure out..? please help me out


Code is shown below...
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP Code:->





Action Class Code....

 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well finally I got solution for my task but I did it on java side i mean on action class i made the settings ...Still want to know the solution of it from JSP end ....

Thanks
Kaustubh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!