05-27-2011 07:39 AM
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Logger Action Bean –>
<bean id="categorize" class="org.alfresco.sample.categorizeDialog" parent="action-executer"/>
<!– Load the Logger Action Messages –>
<bean id="categorize-action-messages" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>org.alfresco.sample.categorize-action-messages</value>
</list>
</property>
</bean>
</beans>
le web-client-config-custom.xml <alfresco-config>
<config>
<actions>
<!– Launch Add Aspect Dialog –>
<action id="categorize">
<label>categorize</label>
<image>/images/icons/add.gif</image>
<action>dialog:categorize</action>s
</action>
<!– Add action to more actions menu for each space –>
<action-group id="space_browse_menu">
<action idref="categorize" />
</action-group>
<!– Actions Menu for a document in the Browse screen –>
<action-group id="document_browse_menu">
<action idref="categorize" />
</action-group>
<!– Actions Menu for Document Details screen –>
<action-group id="doc_details_actions">
<action idref="categorize" />
</action-group>
<!– Actions Menu for Space Details screen –>
<action-group id="space_details_actions">
<action idref="categorize" />
</action-group>
</actions>
<dialogs>
<dialog name="categorize" page="/jsp/extension/categorize.jsp" managed-bean="categorizeDialog"
icon="/images/icons/add_content_large.gif" title="categorize"
description="Adds an aspect to the selected node" />
</dialogs>
</config>
</alfresco-config>
le categorizeDialog.java <alfresco-config>
<config>
<actions>
<!– Launch Add Aspect Dialog –>
<action id="categorize">
<label>categorize</label>
<image>/images/icons/add.gif</image>
<action>dialog:categorize</action>s
</action>
<!– Add action to more actions menu for each space –>
<action-group id="space_browse_menu">
<action idref="categorize" />
</action-group>
<!– Actions Menu for a document in the Browse screen –>
<action-group id="document_browse_menu">
<action idref="categorize" />
</action-group>
<!– Actions Menu for Document Details screen –>
<action-group id="doc_details_actions">
<action idref="categorize" />
</action-group>
<!– Actions Menu for Space Details screen –>
<action-group id="space_details_actions">
<action idref="categorize" />
</action-group>
</actions>
<dialogs>
<dialog name="categorize" page="/jsp/extension/categorize.jsp" managed-bean="categorizeDialog"
icon="/images/icons/add_content_large.gif" title="categorize"
description="Adds an aspect to the selected node" />
</dialogs>
</config>
</alfresco-config>
categorize-action-message.properties##
## Logger Action I18N file
##
# Action title and description
categorize.title=categorize
categorize.description=This action adds a message to the log at the level specified.
# Action parameter display labels
categorize.param_log_message.display-label=Log Message
categorize.param_log_level.display-label=Log Level
et pour faces-config.xml<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<managed-bean>
<managed-bean-name>categorizeDialog</managed-bean-name>
<managed-bean-class>org.alfresco.sample.categorizeDialog</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>nodeService</property-name>
<value>#{NodeService}</value>
</managed-property>
<managed-property>
<property-name>browseBean</property-name>
<value>#{BrowseBean}</value>
</managed-property>
</managed-bean>
</faces-config>
05-31-2011 06:13 PM
<?xml version="1.0"?>
<project name="Custom Action Build File" default="package" basedir=".">
<property name="project.dir" value="."/>
<property name="build.dir" value="${project.dir}/build"/>
<property name="web.dir" value="${project.dir}/web" />
<property name="package.file" value="${build.dir}/actioncat.jar"/>
<property name="package.file.zip" value="${build.dir}/actioncat.zip"/>
<path id="class.path">
<dirset dir="${build.dir}" />
<fileset dir="../../lib/server" includes="**/*.jar"/>
</path>
<target name="compile">
<mkdir dir="${build.dir}" />
<javac classpathref="class.path" srcdir="${project.dir}/source" destdir="${build.dir}" />
</target>
<target name="package">
<jar destfile="${package.file}">
<fileset dir="${build.dir}"/>
</jar>
</target>
<target name="package-jar">
<delete file="${package.file.jar}" />
<jar destfile="${package.file.jar}">
<fileset dir="${build.dir}" excludes="*.zip"/>
<fileset dir="${config.dir}"/>
</jar>
</target>
<target name="package-extension" depends="package-jar">
<delete file="${package.file.zip}" />
<zip destfile="${package.file.zip}">
<zipfileset file="${package.file.jar}" prefix="WEB-INF/lib" />
<zipfileset dir="${web.dir}" />
</zip>
</target>
<target name="integrate-extension" depends="package-extension">
<available file="alfresco.war" type="file" property="alfresco.war.present" />
<fail unless="alfresco.war.present"
message="Could not find alfresco.war, please copy it to ${basedir}" />
<zip destfile="alfresco.war" update="true">
<zipfileset file="${package.file.jar}" prefix="WEB-INF/lib" />
<zipfileset dir="${web.dir}" />
</zip>
</target>
</project>
Merci
05-31-2011 06:31 PM
05-31-2011 06:38 PM
05-31-2011 06:49 PM
<?xml version="1.0"?>
<project name="Custom Action Build File" default="package" basedir=".">
<property name="project.dir" value="."/>
<property name="build.dir" value="${project.dir}/build"/>
<property name="web.dir" value="${project.dir}/web" />
<property name="package.file" value="${build.dir}/actioncat.jar"/>
<property name="package.file.zip" value="${build.dir}/actioncat.zip"/>
<path id="class.path">
<dirset dir="${build.dir}" />
<fileset dir="../../lib/server" includes="**/*.jar"/>
</path>
<target name="compile">
<mkdir dir="${build.dir}" />
<javac classpathref="class.path" srcdir="${project.dir}/source" destdir="${build.dir}" />
</target>
<target name="package-jar" depends="compile">
<delete file="${package.file}" />
<jar destfile="${package.file}">
<fileset dir="${build.dir}" excludes="*.zip"/>
<fileset dir="${config.dir}"/>
</jar>
</target>
<target name="package-extension" depends="package-jar">
<delete file="${package.file.zip}" />
<zip destfile="${package.file.zip}">
<zipfileset file="${package.file.jar}" prefix="WEB-INF/lib" />
<zipfileset dir="${web.dir}" />
</zip>
</target>
<target name="integrate-extension" depends="package-extension">
<available file="alfresco.war" type="file" property="alfresco.war.present" />
<fail unless="alfresco.war.present"
message="Could not find alfresco.war, please copy it to ${basedir}" />
<zip destfile="alfresco.war" update="true">
<zipfileset file="${package.file}" prefix="WEB-INF/lib" />
<zipfileset dir="${web.dir}" />
</zip>
</target>
</project>
05-31-2011 07:18 PM
06-01-2011 12:45 AM
<project name="Custom Action Build File" default="package-jar" basedir=".">
C'est-à-dire qu'il est préférable de spécifier la target par défaut, bien qu'il vous soit toujours possible de spécifier la target avec un clique-droit approprié.pourquoi vous avez supprimez le target packageTout simplement parce que, comme vous, je ne comprenais pas à quoi elle pouvait bien servir 😉
06-03-2011 05:04 PM
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.