cancel
Showing results for 
Search instead for 
Did you mean: 

Add a new UI Action

jeyaa
Champ in-the-making
Champ in-the-making
Hi All,

I want to add a new UI Action in doc_details_actions.
I have created like this.

web-client-config-custom

   <config>
      <action id="web_enable">
         <permissions>
            <permission allow="true">Write</permission>
         </permissions>
         <label-id>Prepare Package Assembly</label-id>
         <image>/Images/ppa.gif</image>
         <action-listener>#{PreparePackageAssemblyUIAction.executeImpl}</action-listener>
         <params>
            <param name="id">#{actionContext.id}</param>
            <param name="active">false</param>
         </params>
      </action>
   </config>

<action-group id="doc_details_actions">
            <action idref="web_enable" />

Faces-config bean entry

   <managed-bean>
      <description>Prepare Package Assemblies</description>
      <managed-bean-name>PreparePackageAssemblyUIAction</managed-bean-name>
      <managed-bean-class>com.sample.web.bean.PreparePackageAssemblyUIAction</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
   </managed-bean>
   

But while clicking the details of the content it is showing the following Exception


javax.faces.FacesException: org.apache.jasper.JasperException: org.alfresco.error.AlfrescoRuntimeException: 01100001 Unable to find configured ActionDefinition Id: web_enable
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.GeneratedMethodAccessor537.invoke(Unknown Source)
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 $Proxy233.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.GeneratedMethodAccessor537.invoke(Unknown Source)
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 $Proxy233.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.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.jasper.JasperException: org.apache.jasper.JasperException: org.alfresco.error.AlfrescoRuntimeException: 01100001 Unable to find configured ActionDefinition Id: web_enable
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
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)
… 41 more
Caused by: org.apache.jasper.JasperException: org.alfresco.error.AlfrescoRuntimeException: 01100001 Unable to find configured ActionDefinition Id: web_enable
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
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.doInclude(ApplicationDispatcher.java:551)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jsp.jsp.dialog.container_jsp._jspService(container_jsp.java:647)
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)
… 51 more
Caused by: org.alfresco.error.AlfrescoRuntimeException: 01100001 Unable to find configured ActionDefinition Id: web_enable
at org.alfresco.web.ui.repo.component.UIActions.buildActionGroup(UIActions.java:303)
at org.alfresco.web.ui.repo.component.UIActions.encodeBegin(UIActions.java:183)
at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
at org.apache.jsp.jsp.content.document_002ddetails_jsp._jspx_meth_r_005factions_005f0(document_002ddetails_jsp.java:5541)
at org.apache.jsp.jsp.content.document_002ddetails_jsp._jspx_meth_a_005fpanel_005f13(document_002ddetails_jsp.java:5509)
at org.apache.jsp.jsp.content.document_002ddetails_jsp._jspService(document_002ddetails_jsp.java:611)
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)
… 64 more

What may be the problem?
2 REPLIES 2

patil
Champ on-the-rise
Champ on-the-rise
Hi,
your tags are not proper in web client-config-custom.xml.
Inside config there has to be actions tag. Sample is

<config>
      <actions>
<action id="web_enable">
         <permissions>
            <permission allow="true">Write</permission>
         </permissions>
         <label-id>Prepare Package Assembly</label-id>
         <image>/Images/ppa.gif</image>
         <action-listener>#{PreparePackageAssemblyUIAction.executeImpl}</action-listener>
         <params>
            <param name="id">#{actionContext.id}</param>
            <param name="active">false</param>
         </params>
      </action>
       <action-group id="doc_details_actions">
            <action idref="web_enable" />

    </actions>
</config>


Thanks,
Patil
Cignex Technologies
Bangalore

jeyaa
Champ in-the-making
Champ in-the-making
Thanks patil… I did not looked into that. Thanks for pointing out the mistake.


Regards,
Jeya