aspose file tools*
The moose likes Struts and the fly likes A diffrent type of checkbox problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "A diffrent type of checkbox problem" Watch "A diffrent type of checkbox problem" New topic
Author

A diffrent type of checkbox problem

parsinglord jain
Greenhorn

Joined: Aug 13, 2010
Posts: 3
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

Joined: Jun 02, 2009
Posts: 182

parsinglord jain wrote:I need urgent help

You might have got more responses, if you have posted your code. Please post your code.


A.A.Anbarasu
Anbarasu Aladiyan
Ranch Hand

Joined: Jun 02, 2009
Posts: 182

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

Joined: Aug 13, 2010
Posts: 3
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

Joined: May 05, 2010
Posts: 213

.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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A diffrent type of checkbox problem