Hi all,
I'm writing to see if anyone can help me.
I am working through implementing Spring JS and partial rendering.
In the example below I have a dialog that simply lists users in a table. If the user clicks edit I wanted an edit form to be displayed (in the same dialog) next to the list of users and thought I could use partial rendering to achieve this.
So far I have the following tiles defintions:
When the dialog is initially displayed my Spring controllers return the usersDialog.view.Code:<definition name="usersDialog.view" template="/pages/usersDialog.jsp"> <put-attribute name="users" value="/pages/users.jsp" /> <put-attribute name="userEditFormArea" value="/pages/blank.jsp" /> </definition> <definition name="usersDialogWithEdit.view" extends="usersDialog.view"> <put-attribute name="userEditFormArea" value="/pages/userEditForm.jsp" /> </definition>
If the user clicks Edit another controller returns the usersDialogWithEdit.view.
I have tried to implement the desired behaviour with the following Javascript.
However the edit form never seems to get appended to my view.Code:<script type="text/javascript"> Spring.addDecoration(new Spring.AjaxEventDecoration({ elementId : "editUserLink", event : "onclick", params: {fragments: "userEditFormArea"} })); </script>
Also to note if I add the popup : true param to the JS (to show the results in a new dialog) I simply see the edit form and not the list as well as the edit form?
Can anyone highlight what I am missing??
Many thanks to all who read,


Reply With Quote
Good luck
