aspose file tools*
The moose likes Struts and the fly likes combo value not select after submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "combo value not select after submit " Watch "combo value not select after submit " New topic
Author

combo value not select after submit

Saman Perera
Ranch Hand

Joined: Jul 15, 2003
Posts: 61
hi all

when i submit a page after select a combo box value , when it return then select one i not select at that time , i load all the combo box value from struts action when i submit all then values are load again to that combo also , otherwise there are not any value
this is the combo code in struts jsp page



thanks
saman
Saman Perera
Ranch Hand

Joined: Jul 15, 2003
Posts: 61
select box value not select after submit and render tha page
Saman Perera
Ranch Hand

Joined: Jul 15, 2003
Posts: 61
hi all

pls ans my problem

thans
Saman
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You need to use Struts tags in order for the selected value to be captured in the ActionForm and redisplayed. Example:



The above assumes you have a property named logisticService in your ActionForm with a getter and setter, and that "logicServiceList" is a collection of beans in some scope.
[ November 23, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
Saman Perera
Ranch Hand

Joined: Jul 15, 2003
Posts: 61
Hi Higginson and all

thanks you very much for the answer

i used some ajax call for set of combos , it is not working because if i used struts html tag , that why i used simple html tag , then i this proble occure , please help how to solve this prob.


thanks
Saman
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
There is no reason an Ajax call can't work on an HTML control that was created using a Struts tag. All you need to realize is that the styleid attribute in the Struts tag translates to an id attribute in the rendered html tag. Just use your browser's view source option to see the rendered HTML code and you will know how to write your AJAX code to fit the control.
Saman Perera
Ranch Hand

Joined: Jul 15, 2003
Posts: 61
Thansk, it is correct,

your solution is work properly
Saman Perera
Ranch Hand

Joined: Jul 15, 2003
Posts: 61
Thansk, it is correct,

your solution is work properly
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: combo value not select after submit
 
Similar Threads
JSP Taglib - default namespace is not specified
JSTL tags
Dynamic population of second list box based on selection of first
Null value in ActionForm after javascript submit()
JSP 2.0 EL and html:options issue