This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

A diffrent type of checkbox problem

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I am using struts-2

I want to map data from 1st action to data in my second action....
Actually the problem is

I have a page - 1 on which I when i press login..action - 'login' is generated. This action takes me to page-2 where i display list (ie which is fetch from the remote service). i iterate the list and display on page 2.while iterating i use <s:checkbox/> and <s:radio/> to display checkbox and radiobuttons alongside records(displayed on the screen from th list) .

Now I want is that when i press Continue button(another action generates which takes me to next page) the records which are displayed with checkboxes ticked or radio button selected(i need solution for both as i am somewhre usng checkboxes somewhere radio) . should be available to me in the List Object with radiobutton variable as true of false (which is in the list), and checkbox variable as true or false .


I tried doingg it but the problem is when i click continue , the data from the list dissapers from valuestack and list. and the list is not set through checkbox or radiobutton selected

how can i do it

Please help me
I need urgent help

Regards,
prashant
 
Ranch Hand
Posts: 182
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

parsinglord jain wrote:I need urgent help


You might have got more responses, if you have posted your code. Please post your code.
 
Anbarasu Aladiyan
Ranch Hand
Posts: 182
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

parsinglord jain wrote:I tried doingg it but the problem is when i click continue , the data from the list dissapers from valuestack and list. and the list is not set through checkbox or radiobutton selected


As per my understanding,

I think, in second action you are referring the list which is declared in the first action (used to populate the check boxes). This will not be available for second action.

I think you need to declare/make array of string (NOT LIST – but i have not tried with lists) in second action with the name of the check box (for selected check box values).
 
parsinglord jain
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
code is as below.......................



Now the problem is that

lines 7 to 11 are used to display values from the asnrVO.accountDetailsListBOList...and when i click on continue...I want that radio button code which is on line 13-14....sets me the value of addpayer variable as true of false depending on the choice ..in the same list (asnrVO.accountDetailsListBOList) which i am iterating to display the record.

how can i do that
 
Ranch Hand
Posts: 213
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

.I want that radio button code which is on line 13-14



I think what you want is a check box. Radio buttons are used to select 1 selection from a group of selections, check boxes are used to indicate selected or not selected.
 
What does a metric clock look like? I bet it is nothing like this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic