Hi,
I'm trying to get a test webflow working via AJAX calls and I am stuck. I'm not sure what I'm missing. It seems like it doesn't understand the path to the template because the <tr id="attributeEdit"> gets blanked out after the webflow renders.
My view, /application/workcard.gsp, has a table with one row being generated via the template below:
/attribute/_edit.gsp
AttributeController.groovyHTML Code:<tr id="attributeEdit"> <td><label title="attributes">ATTR</label></td> <td colspan="3"> <div> <g:if test="${ msg }"> ${ msg } <g:remoteLink update="attributeEdit" controller="attribute" action="ajaxAttributeChanges" event="cancel" params="${ [ajaxSource: true, execution: params.execution] }">cancel</g:remoteLink> </g:if> <g:else> <g:remoteLink update="attributeEdit" controller="attribute" action="ajaxAttributeChanges" event="edit" params="${ [ajaxSource: true] }">edit</g:remoteLink> </g:else> </div> </td> </tr>
I tried /attribute/_edit, edit, _edit with both template and view but they all have the same behavior.Code:class AttributeController { def ajaxAttributeChangesFlow = { edit { action{ flow.msg = "We made it through the edit state" } on("success").to("display") } display { render( template: "/attribute/edit", model: [msg: flow.msg] ) on("cancel").to("cancel") } cancel() } }
I turned the debug on in my config for org.codehaus.groovy.grails.webflow but all I get is this:
I found the 'ajaxSource: true, execution: params.execution' stuff on CloudFoundry.Code:2011-10-20 20:57:17,247 [http-8080-1] DEBUG servlet.GrailsFlowHandlerMapping - Looking up Grails controller for URI [/application/workcard] 2011-10-20 20:57:28,871 [http-8080-1] DEBUG servlet.GrailsFlowHandlerMapping - Looking up Grails controller for URI [/attribute/ajaxAttributeChanges] 2011-10-20 20:57:28,971 [http-8080-1] DEBUG persistence.SessionAwareHibernateFlowExecutionListener - sessionStarting: Binding Hibernate session to flow 2011-10-20 20:57:28,972 [http-8080-1] DEBUG persistence.SessionAwareHibernateFlowExecutionListener - paused: Disconnecting Hibernate session
http://livesnippets.cloudfoundry.com...tml#2.7%20Ajax
What am I missing? It has to be something simple. Any help or advice is appreciated.


Reply With Quote
