Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to change form's arraylist member's variable value in javascript

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a scenario where I need to set the value of a variable which is present in a ArrayList which is part of the struts form, in javascript. So I have a class called FeaturesVO which has a boolean called locked. Now on the struts form I have an ArrayList of FeatureVO objects. I am using logic:iterate to iterate through the list on the JSP, checking the value of locked and displaying the corresponding image for each FeatureVO. Now the image for each FeatureVO row needs to act as a toggle for its locked value. So if I click on a image which corresponds to a FeatureVO which has its locked value = false, then it should change the value of locked to true. This I need to do without refreshing the page. Can someone please help me with this?

This one time, at bandcamp, I had relations with a tiny ad.
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic