As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
protected void addParameterDefinitions(List<ParameterDefinition> paramList) { paramList.add(new ParameterDefinitionImpl(PARAM_CUSTOM_URL, DataTypeDefinition.TEXT, true, getParamDisplayLabel(PARAM_CUSTOM_URL))); }
<r:page titleId="title_custom_url_action_executer"> <f:view> <%– load a bundle of properties with I18N strings –%> <r:loadBundle var="msg"/> <h:form acceptcharset="UTF-8" id="custom_url_action"> …… <tr> <td valign="top"><h:outputText value="#{msg.custom_url}"/>:</td> <td width="90%"> <h:inputText id="custom_url" value="#{WizardManager.bean.actionProperties.custom_url}" size="50" maxlength="1024" /> </td> </tr> …… </h:form> </f:view> </r:page>
public class UrlActionHandler extends BaseActionHandler{ protected static final Logger LOG = LoggerFactory.getLogger(UrlActionHandler.class); /** * */ private static final long serialVersionUID = 1L; public final static String PROP_CUSTOM_URL = "custom-url"; public String getJSPPath() { return "/jsp/actions/custom-url-action-executer.jsp"; } public void prepareForSave(Map<String, Serializable> actionProps, Map<String, Serializable> repoProps) { repoProps.put(UrlActionExecuter.PARAM_CUSTOM_URL, (String)actionProps.get(PROP_CUSTOM_URL)); } public void prepareForEdit(Map<String, Serializable> actionProps, Map<String, Serializable> repoProps) { actionProps.put(PROP_CUSTOM_URL, (String)repoProps.get(UrlActionExecuter.PARAM_CUSTOM_URL)); } public String generateSummary(FacesContext context, IWizardBean wizard, Map<String, Serializable> actionProps) { String url = (String)actionProps.get(PROP_CUSTOM_URL); if (url == null) { url = ""; } return MessageFormat.format(Application.getMessage(context, "custom-url-action-executer"), new Object[] {url}); } }
<alfresco-config> <config evaluator="string-compare" condition="Action Wizards"> <action-handlers> <handler name="custom-url-action-executer" class="executer.UrlActionHandler" /> </action-handlers> </config> </alfresco-config>