Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

combo value not select after submit

 
Saman Perera
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
select box value not select after submit and render tha page
 
Saman Perera
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all

pls ans my problem

thans
Saman
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Saman Perera
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thansk, it is correct,

your solution is work properly
 
Saman Perera
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thansk, it is correct,

your solution is work properly
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic