In order to make Alert settings available to community leaders through the PAF Administration utilities, you must create a form for these settings. This form is then incorporated into the instance configuration page for the gear. In doing this, you should use the handleAlertConfig
tag and the atg.portal.admin.AlertConfigBean
, which captures the form input, as shown in the following code sample.
<!--TAG LIBRARY DECLARATIONS GO HERE --> <dsp:page> <paf:InitializeGearEnvironment id="gearEnv"> ... <jsp:useBean id="alertFormInput" scope="request" class="atg.portal.admin.AlertConfigBean"> <jsp:setProperty name="alertFormInput" property="*"/> </jsp:useBean> <!-- Handle the form if it was filled in --> <core:If value="<%= alertFormInput.getHandleForm() %>" > <paf:handleAlertConfig id="alertConfResult" formData="<%= alertFormInput %>" gearEnv="<%= pafEnv %>"> <core:ExclusiveIf> <core:If value="<%= alertConfResult.getSuccess() %>" > <!-- REDIRECT TO SUCCESS PAGE --> </core:If> <%-- if not, display errors --%> <core:DefaultCase> <%=alertConfResult.getErrorMessage()%> </core:DefaultCase> </core:ExclusiveIf> </paf:handleAlertConfig> </core:If> <form ACTION="<%= origURI %>" METHOD="POST"> <input type="hidden" name="handleForm" value="true"> <input type="hidden" name="paf_gear_id" value="<%= gearID %>"> <input type="hidden" name="paf_dm" value="full"> <input type="hidden" name="paf_gm" value="instanceConfig"> <input type="hidden" name="config_page" value="<%= thisConfigPage%>"> <input type="hidden" name="paf_page_id" value="<%= pageID %>"/> <input type="hidden" name="paf_page_url" value="<%= pageURL %>"/> <input type="hidden" name="paf_community_id" value="<%= communityID %>"/> ... <input type="radio" name="gearAlertPref" value="no" checked><font size="2" color="#000000"> <%=alertNoOptionDesc%></font> ... <input type="radio" name="gearAlertPref" value="yes_locked"><font size="2" color="#000000"> <%=alertLockedOptionDesc%></font> <%! -- ADDITIONAL SETTINGS GO HERE --%> <%! -– CANCEL AND SUBMIT BUTTONS GO HERE --%> ... </form> </paf:InitializeGearEnvironment> </dsp:page>