• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A diffrent type of checkbox problem

 
parsinglord jain
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
 
Anbarasu Aladiyan
Ranch Hand
Posts: 182
Chrome Eclipse IDE 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
Chrome Eclipse IDE 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
 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Java Tomcat Server
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic