• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reset the collection content in bean:define

 
Ravi Petchimuthu
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using ajax, bean efine for html:select and html ptions.

Here I need to reset the listcontent available for bean efine with the new list.

For Ex: Country list and State list are there, based on the country selection I need to update the state list using ajax.

Now I can able to get the StateList generated in my action as well as form but its not reflecting in jsp(bean efine shows the old value).

Regards,
Ravi.P
 
Marimuthu Madasamy
Ranch Hand
Posts: 72
Java Monad Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ravi Petchimuthu:
Now I can able to get the StateList generated in my action as well as form but its not reflecting in jsp(bean efine shows the old value).


All the struts tags (including ) will be executed when the entire JSP page is loaded. In case of AJAX, i hope you are not reloading the entire page. So has got nothing to do here in AJAX requests.

So my suggestion is,

in your action class,
Populate the list from db and make it available in request scope.



in struts-config.xml,



in StatesXMLView.jsp,




In JavaScript file,



Hope this helps.

- Marimuthu M
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic