This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line!
See this thread for details.
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

A diffrent type of checkbox problem

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
He baked a muffin that stole my car! And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic