<actions>
<action id="export_csv">
<label>Exportar CSV</label>
<image>/images/icons/export.gif</image>
<tooltip>Crea un documento excel con los metadatos de los documentos</tooltip>
<action-listener>#{CSVExportAction.csvExport}</action-listener>
<params>
<param name="id">#{actionContext.id}</param>
<param name="name">#{actionContext.properties['cm:name']}</param>
<!– <param name="url">#{actionContext.properties['cm:url']}</param>
–>
<param name="nodeRef">#{actionContext.nodeRef}</param>
</params>
</action>
<action-group id="add_content_menu">
<style>white-space:nowrap</style>
<action idref="export_csv" />
</action-group>
</actions>
<?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>
<description>
Exporta a un fichero CSV, los metadatos de los documentos obtenidos en la búsqueda
</description>
<managed-bean-name>
CSVExportAction
</managed-bean-name>
<managed-bean-class>
ants.alfrescoexportcsv.csvexportaction.CSVExportAction
</managed-bean-class>
<managed-bean-scope>
session
</managed-bean-scope>
<managed-property>
<property-name>nodeService</property-name>
<value>#{NodeService}</value>
</managed-property>
</managed-bean>
</faces-config>
…
<%– actions for search results mode –%>
<a:panel id="search-actions" rendered="#{NavigationBean.searchContext != null}">
<td width=32>
<img src="<%=request.getContextPath()%>/images/icons/search_results_large.gif" width=32 height=32>
</td>
<td>
<%– Summary –%>
<div class="mainTitle"><h:outputText value="#{msg.search_results}" id="msg11" /></div>
<div class="mainSubText"><h:outputFormat value="#{msg.search_detail}" id="msg12"><f:param value="#{NavigationBean.searchContext.text}" id="param2" /></h:outputFormat></div>
<div class="mainSubText"><h:outputText value="#{msg.search_description}" id="msg13" /></div>
</td>
<td style="padding-right:4px" align=right>
<%– Close Search action –%>
<nobr><a:actionLink value="#{msg.close_search}" image="/images/icons/action.gif" style="white-space:nowrap" actionListener="#{BrowseBean.closeSearch}" id="link21" /></nobr>
</td>
<td style="padding-right:4px" width=80>
<%– New Search actions –%>
<nobr><a:actionLink value="#{msg.new_search}" image="/images/icons/search_icon.gif" style="white-space:nowrap" action="advSearch" id="link20" /></nobr>
</td>
[b]<td style="padding-left:4px" width=90>
<nobr><a:actionLink value="Exportar CSV" image="/images/icons/export.gif" style="white-space:nowrap" actionListener="#{CSVExportAction.csvExport}" id="link22" /></nobr>
</td>[/b]
<td style="padding-right:4px" width=80>
</a:richList>
<%– More Search actions –%>
<a:menu id="searchMenu" itemSpacing="4" label="#{msg.more_actions}" image="/images/icons/menu.gif" menuStyleClass="moreActionsMenu" style="white-space:nowrap">
<a:booleanEvaluator value="#{NavigationBean.isGuest == false}" id="eval0">
<a:actionLink value="#{msg.save_new_search}" image="/images/icons/save_search.gif" padding="4" action="#{AdvancedSearchDialog.saveNewSearch}" id="link20_1" />
<a:booleanEvaluator value="#{AdvancedSearchDialog.allowEdit == true}" id="eval0_1">
<a:actionLink value="#{msg.save_edit_search}" image="/images/icons/edit_search.gif" padding="4" action="#{AdvancedSearchDialog.saveEditSearch}" id="link20_2" />
</a:booleanEvaluator>
</a:booleanEvaluator>
</a:menu>
</td>
</a:panel>
…
…
CSVExportAction extends ActionExecuterAbstractBase{
private NodeService nodeService;
public NodeService getNodeService() {
return nodeService;
}
public void setNodeService(NodeService nodeService){
this.nodeService = nodeService;
}
public void csvExport(ActionEvent e){
try {
// obtengo los parámetros recibidos
UIActionLink link = (UIActionLink)e.getComponent();
Map params = link.getParameterMap();
//Muestro los parametros obtenidos en un log para posteriormente utilizarlos
// Cuando la llamada al action se hace desde los resultados de la búsqueda, los parámetros son vacíos
logger.info("Mapa de parámetro: "+params);
….
} catch (Exception e1) {
e1.printStackTrace();
}
}
….
protected void executeImpl(Action arg0, NodeRef arg1) {
}
protected void addParameterDefinitions(List arg0) {
}
}
<td style="padding-left:4px" width=90>
<nobr><a:actionLink value="Exportar CSV" image="/images/icons/export.gif" style="white-space:nowrap" actionListener="#{CSVExportAction.csvExport}" id="link22" /></nobr>
<f:param name="searchContext" value="#{BrowseBean.content}" />
</td>
<td style="padding-left:4px" width=90>
<nobr><a:actionLink value="Exportar CSV" image="/images/icons/export.gif" style="white-space:nowrap" actionListener="#{CSVExportAction.csvExport}" id="link22" /></nobr>
<f:param name="searchContext" value="#{NavigationBean.searchContext.text}" />
</td>
javax.faces.FacesException: java.lang.IllegalStateException: Client-id : _idJsp17 is duplicated in the faces tree. Component : browse:_idJsp17, path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/browse/browse.jsp][Class: javax.faces.component.html.HtmlForm,Id: browse][Class: org.alfresco.web.ui.common.component.UIPanel,Id: spaces-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: spacesList][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: col1][Class: org.alfresco.web.ui.common.component.UIActionLink,Id: col1-act1][Class: javax.faces.component.UIParameter,Id: _idJsp17]}
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy227.doFilter(Unknown Source)
at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy227.doFilter(Unknown Source)
at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.jasper.JasperException: java.lang.IllegalStateException: Client-id : _idJsp17 is duplicated in the faces tree. Component : browse:_idJsp17, path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/browse/browse.jsp][Class: javax.faces.component.html.HtmlForm,Id: browse][Class: org.alfresco.web.ui.common.component.UIPanel,Id: spaces-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: spacesList][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: col1][Class: org.alfresco.web.ui.common.component.UIActionLink,Id: col1-act1][Class: javax.faces.component.UIParameter,Id: _idJsp17]}
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:527)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:413)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
… 43 more
Caused by: java.lang.IllegalStateException: Client-id : _idJsp17 is duplicated in the faces tree. Component : browse:_idJsp17, path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/browse/browse.jsp][Class: javax.faces.component.html.HtmlForm,Id: browse][Class: org.alfresco.web.ui.common.component.UIPanel,Id: spaces-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: spacesList][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: col1][Class: org.alfresco.web.ui.common.component.UIActionLink,Id: col1-act1][Class: javax.faces.component.UIParameter,Id: _idJsp17]}
at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:329)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:341)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:341)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:341)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:341)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:338)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:341)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:286)
at org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:125)
at org.apache.jsp.jsp.browse.browse_jsp._jspService(browse_jsp.java:954)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
… 53 more
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.