Announcement Announcement Module
No announcement yet.
Render a partial web page via ajax Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Render a partial web page via ajax


    I have done quite a lot of searching regarding this issue and haven't found a clear way to accomplish what I want with Spring MVC.

    We have a typical Ajax scenario, user types some information in the search field and we just want to replace the grid section of the web page. Now, there are a few ways to accomplish this.

    1. Reload the whole page (not what we want here)
    2. Make a server call via ajax to get the data, say for example in json format, and render the grid via javascript.
    3. Make a server call via ajax to get the markup and data in one shot, similar to rails render partial functionality.

    I would like to get option 3 working, here are the technologies involved in our spring based stack.
    a. Tiles
    b. Jsp's
    c. Spring/Spring MVC 2.0
    d. Hibernate
    e. jQuery

    There is an option to use DWR and use a DWR based controller, but in an effort to not add something else to our stack, we were trying to get it to work with the current stack.

    Basically I would like to call a spring controller and have it render markup and data, just for the section of the page I would like to replace.


  • #2
    Use Spring Javascript... It needs tiles (you already have it), reuses your existing infrastructure and provides partial page rendering out of the box. You only need to upgrade to Spring 2.5...