User's Group Membership Actions
Community Engine provides a Struts action
class
com.ndc.community.struts.actions.groupmembership.RequestGroupMembership
to perform a group membership request. Here is the Struts configuration for it:
<form-bean name="groupMemberForm" type="com.ndc.community.struts.actions.forms.GroupMembershipForm" /> <action path="/group/membership/request" name="groupMemberForm" scope="request" type="com.ndc.community.struts.actions.groupmembership.RequestGroupMembership"> <forward name="error" path="/group-request-error.jsp" /> <forward name="success" path="/group-request-success.jsp" redirect="true" /> </action>
Here is an example JSP script to use this action
in group's section page
<community:group id="group" name="section"/> <html:form styleId="groupMemberForm" action="/group/membership/request"> <html:hidden property="groupId" value="${group.id}" /> <html:hidden property="userId" value="${user.id}" /> <html:submit value="Join This Group"/> </html:form>
Form Property | Description |
---|---|
|
The ID of the group to be joined. |
|
The ID of the user who is making the request. Normally, this property refers to the ID of the user that performs an action on his group membership. |
|
Not used in this |
There are other user initiated action
s which can be used in the similar way.
-
com.ndc.community.struts.actions.groupmembership.AcceptGroupInvitation
- the user accepts an invitation to the group. -
com.ndc.community.struts.actions.groupmembership.DeclineGroupInvitation
- the user declines an invitation to the group. -
com.ndc.community.struts.actions.groupmembership.ResignGroupMembership
- the user quits the group.