wood burning stoves 2.0*
The moose likes Struts and the fly likes Combo Box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Combo Box" Watch "Combo Box" New topic
Author

Combo Box

John Lark
Ranch Hand

Joined: Feb 08, 2010
Posts: 72
Hey All,

I am having some trouble with struts. I am trying to create a drop down box with a list of suggested choices. However I want the user to also be able to edit the text at the top of the list if he/she wants to make a selection other then the povided suggestions. In NSIS I would just switch out for a combo box. However, it dosent seem to be that simple in the JSP any suggetions?

Thanks,
J
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

HtmlHasNoComboBox

I'd just try to find one that's already implemented. Not really a Struts question, though.
John Lark
Ranch Hand

Joined: Feb 08, 2010
Posts: 72
Hey,

Thanks for the reply and sorry for the late response. The Problem comes down to the fact that Struts 1 doesn't support combo boxes while struts 2 does! I think its a struts question I just asked it wrong, struts does play a large role on some of the functions you can use in your jsp. Kind of like ASP works with C#, so you can C# your HTML .(which is what I am still using... yes I know its old will upgrade as soon as time provides.)
Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213

The Problem comes down to the fact that Struts 1 doesn't support combo boxes while struts 2 does!


But if you look at how it works in Struts 2 you can do your own in Struts 1.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

John Lark wrote:[...] struts does play a large role on some of the functions you can use in your jsp. [...]

Not really--it's just that S2 has some custom tags that build the exact same HTML you could just as easily (and with a better eye towards what your particular app needs) do on your own. I'm not a fan of the S2 custom HTML controls, even the non-old-Dojo ones: they're kind of ugly, and usually have to be customized anyway.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Combo Box
 
Similar Threads
Problem with updating look and feel colors of swing components dynamically
Swings
problem with extracting values from a combo box.....
Handling Chinese characters while retriving fromDB using JDBC
Displaying record from combo box