08-31-2010 11:33 AM
<action id="download-file">
<permissions>
<permission allow="true">Read</permission>
</permissions>
<label-id>download-file</label-id>
<image>/magillem/images/icons/download.gif</image>
<action>download-file</action>
</action>
And here is the bean configuration in my \alfresco\WEB-INF\classes\alfresco\extension\download-file-action-context.xml :
<beans>
<!– Download Action Bean –>
<bean id="download-file" class="my.alfresco.customUI.actions.DownloadActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="jcrServerIP" value="localhost:8080" />
<property name="exchangeServerIP" value="192.168.20.241" />
<property name="fileServerIP" value="192.168.20.151" />
<property name="exchangeLogin" value="testUser" />
<property name="exchangePassword" value="password" />
<property name="publicAction">
<value>true</value>
</property>
</bean>
<!– Action properties –>
<bean id="extension.actionResourceBundles" parent="actionResourceBundles">
<property name="resourceBundles">
<list>
<value>alfresco.extension.download-file-action-messages</value>
</list>
</property>
</bean>
</beans>
09-01-2010 05:17 AM
UIActionLink link = (UIActionLink) actionEvent.getComponent();
Map<String, String> params = link.getParameterMap();
String ref = params.get("ref");
NodeRef nodeRef = new NodeRef(ref);
ActionService actionService = org.alfresco.web.bean.repository.Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getActionService();
org.alfresco.service.cmr.action.Action action = actionService.createAction("download-file");
actionService.executeAction(action, nodeRef);
<action id="download_file">
<label-id>actionexecute</label-id>
<image>/images/filetypes/pic.gif</image>
<action-listener>#{MyBean.executeAction}</action-listener>
<params>
<param name="ref">#{actionContext.nodeRef}
</param>
</params>
</action>
09-01-2010 07:58 AM
09-09-2010 04:07 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.