Announcement Announcement Module

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions ( project, this forum has been decommissioned in favour of Spring Extensions one at:

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Costin Leau
SpringSource - Spring Training, Consulting, and Support - "From the Source"
See more
See less
Spring XT Ajax with hibernate and simpleformcontrollers Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring XT Ajax with hibernate and simpleformcontrollers


    I'm new to using spring modules and the xt ajax framework. I've been looking at the samples available on the spring modules site but none seem to do roughly what I need to.

    Our app is going to be spring / hibernate based with the OSIV interceptor. We've got lots of forms for editing and viewing info (SimpleFormControllers). What I'd like to be able to do is:

    1. show a simpleformcontroller page with a form to edit some of the details of the domain model object.
    2. provide buttons /links to expand details of certain parts of the object if it is required to drill down.

    For this example, I'm using a ReplaceContentAction to try to insert a populated <select> into the html and I'm struggling with the applicationContext.xml spring config to get the mappings and interceptors firing correctly. The main problems I see are:
    • The ajax request is fired from the same page that is mapped to a controller so the controller is being fired as well as the Ajax and OSIV interceptors
    • The page isn't updating with the Ajax content, maybe due to the mapping problem?

    	<!-- Extends AbstractAjaxHandler -->
    	<bean id="ajaxLoadLegsHandler" class="">
    		<property name="legDao">
    			<ref bean="legDao" />
    	<bean id="ajaxInterceptor" class="org.springmodules.xt.ajax.AjaxInterceptor">
    	    <property name="handlerMappings">
    	            <prop key="/routeEdit.html">ajaxLoadLegsHandler</prop>
    	<bean id="urlMapping"
    		<property name="interceptors">
    				<ref bean="ajaxInterceptor" />
    				<ref local="openSessionInViewInterceptor" />
    		<property name="mappings">
    				<prop key="/townList.html">townListController</prop>
    				<prop key="/townEdit.html">townEditController</prop>
    				<prop key="/routeList.html">routeListController</prop>
    				<prop key="/routeEdit.html">routeEditController</prop>
    Any help would be appreciated!