Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help me design this struts app , please

 
majid nakit
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,



I have a small project and I am new in struts :



DB Tables :

User (userId, UserName,...,...)

Roles(userId, Rolename,.)





I want to have a jsp page :



that has a search form : textfield(userId) and a search button



when the user type a userid and press search button :



all the information from the User table appear + two comboboxes :



combobox (All roles in the database)

combobox (Assigned roles to this user)

two links :

right arrow link for revoking roles

left arrow link for granting roles



could you please help me doing this ?



thanks



your help is appreciated.

 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi majid, what do you mean by "designing this application"..? Which part are you having trouble with?
 
majid nakit
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lorand,

I am using struts 1.2

I have never used an actionForm with comboboxes, and the jsp page will have two submit buttons, one for finding all the info from the two tables and the other one for updating the database when assigning or revoking roles to the user.

How ActionForm with two comboboxes will be ?

Thanks.

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same as a form with a single combobox, but with an extra property.

What have you tried so far?
 
majid nakit
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did a bad design,

I just create beans populate them from database , call them in the Action, put them in the session, and get them in the jsp page, things are working, what I need is a help building it using DynaActionForm.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Being a bit more specific would be helpful: what are you having a problem with?
 
majid nakit
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not having any problem, as you saw my application is working, but without using ActionForm or DynaActionForm,

my question is to showm me an example on how to use ActionForm or DaynaActionForm to have one or two comboboxes.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see. Have you looked at the ActionForm/DynaActionForm documentation? I'm not sure what you believe will be different between one or two combo boxes--it's a simple matter of adding the property to the form, regardless of which one you choose.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic