How to do partial page refresh using struts2-jquery plugin in struts2?
Posted
by
user1703710
on Stack Overflow
See other posts from Stack Overflow
or by user1703710
Published on 2012-12-07T15:23:54Z
Indexed on
2012/12/07
17:07 UTC
Read the original article
Hit count: 242
I want to do partial page refresh with the help of this. Take a scenario, we have a dropdown list according to select option of it, I want to refresh a div section of a page with data populated according to dropdown selection .
How to do this?
i have tried this:
JSP Code:
On this Dropdown selection i want to populate (refresh) div.
<s:form id="RoleListForm">
<s:label value="Roles"/>
<s:url id="fetchJsonRoleListUrl" action="fetchJsonRoleList" namespace="/RolesPrivilegesJson"/>
<sj:select
name="idRoleInfo"
id="idRoleInfoList"
href="%{fetchJsonRoleListUrl}"
list="roleNameList"
onChangeTopics="reloadRolePrivilegesDiv"
listKey="idRoleInfo"
listValue="roleName"
emptyOption="true"/>
</s:form>
Here is the div code that i want to populate according to DD selection:
<s:url id="roleDetailsUrl" action="roleDetailsAction" />
<sj:div href="%{roleDetailsUrl}" formIds="RoleListForm" reloadTopics="reloadRolePrivilegesDiv">
<s:textfield id="idRoleName" name="roleName" />
<s:textfield id="idRolePrivileges" name="privileges"/>
</sj:div>
© Stack Overflow or respective owner