GeeCON Prague 2014*
The moose likes Struts and the fly likes Help me design this struts app , please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Help me design this struts app , please" Watch "Help me design this struts app , please" New topic
Author

Help me design this struts app , please

majid nakit
Ranch Hand

Joined: Jun 26, 2001
Posts: 164
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

Joined: Oct 08, 2009
Posts: 276
Hi majid, what do you mean by "designing this application"..? Which part are you having trouble with?


OCJP 6 (93%)
majid nakit
Ranch Hand

Joined: Jun 26, 2001
Posts: 164
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

Joined: Sep 29, 2008
Posts: 12617

The same as a form with a single combobox, but with an extra property.

What have you tried so far?
majid nakit
Ranch Hand

Joined: Jun 26, 2001
Posts: 164
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

Joined: Sep 29, 2008
Posts: 12617

Being a bit more specific would be helpful: what are you having a problem with?
majid nakit
Ranch Hand

Joined: Jun 26, 2001
Posts: 164
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

Joined: Sep 29, 2008
Posts: 12617

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.
 
GeeCON Prague 2014
 
subject: Help me design this struts app , please