11-11-2011 07:25 AM
protected void addParameterDefinitions(List<ParameterDefinition> paramList) {
paramList.add(new ParameterDefinitionImpl(PARAM_CUSTOM_URL, DataTypeDefinition.TEXT, true, getParamDisplayLabel(PARAM_CUSTOM_URL)));
}
11-21-2011 09:10 AM
11-21-2011 10:04 AM
11-22-2011 04:28 AM
<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>
11-24-2011 08:48 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.