• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Suggest a Solution

 
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
i had a requirement and since i am new to Struts i doubt whether it is possible using Struts Framework.

I had a simple java bean which has a student information. there can be 'n' of instances for n number of students. i am displaying these information to the user in front end by having a array containing all the student objects. User had a option to choose any students he wish and submit it for some other process (done in another target action servlet).

The problem here is how can i determine which students did the user selects in the target action servlet..

Currently i acheived this by having a hidden html variable that holds the list of students the user seleceted. set that varible in request attribute.
Refer this variable in the action servlet and process only the chosen students.

But i felt there might be some better way to do this type of requirement using struts (ActionForm bean) .

Any idea how to acheive thiss???

Hope u understand my requirement.....
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Struts you would accomplish this in essentially the same manner as you are doing now, except that you would define the variable with the list of students in your ActionForm and refer to it rather than getting it from the request object.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic