Confluence 3.0 has reached end of life
Check out the [latest version] of the documentation
Now I've written my action class, I'll need to define a plugin module that adds my class to Confluence's XWork configuration. This is done by adding this section to my atlassian-plugin.xml file.
<xwork name="userinfoactions" key="userinfoactions">
<description>Actions for manipulating a user's personal information.</description>
<package name="userinfo" extends="default" namespace="/users/userinfo">
<default-interceptor-ref name="defaultStack" />
<action name="edituserinfo" class="com.atlassian.confluence.extra.userinfo.EditUserInfoAction" method="doDefault">
<result name="input" type="velocity">/templates/extra/userinfo/edituserinfo.vm</result>
</action>
<action name="doedituserinfo" class="com.atlassian.confluence.extra.userinfo.EditUserInfoAction">
<result name="input" type="velocity">/templates/extra/userinfo/edituserinfo.vm</result>
<result name="success" type="velocity">/templates/extra/userinfo/edituserinfo.vm</result>
</action>
</package>
</xwork>
Some notes:
- You can read more about XWork plugin modules here: XWork-WebWork Plugins
- The
<package>section is essentially passed verbatim to XWork as if it was anxwork.xmlfile, so the best place to look for more information is the XWork documentation. - I've define two actions: one for viewing the form, and the other for submitting it.
- Since I'm not doing any input validation, I'm using the
defaultStackinterceptor chain.
Overview
Content Tools
Apps
