cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a Custom Dialog

alessioa_
Champ in-the-making
Champ in-the-making
Hi to all the folks,
i tryied to add the example custom dialog following the steps in the documentation: http://wiki.alfresco.com/w/index.php?title=Adding_a_Custom_Dialog.
After the click on the "Add Aspect" link i receive this error:
javax.faces.FacesException: Bean: org.alfresco.web.bean.actions.RunActionWizard, property: aspects
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.jasper.JasperException: Bean: org.alfresco.web.bean.actions.RunActionWizard, property: aspects
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jsp.jsp.dialog.container_jsp._jspService(org.apache.jsp.jsp.dialog.container_jsp:530)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
… 20 more

Someone can help me explaining what i missed?

Thank you very much
Best Regards
Alessio A.
21 REPLIES 21

gavinc
Champ in-the-making
Champ in-the-making
Are you using 1.4 by any chance?

The example on the wiki is slightly out of date with the latest code, change the following in the JSP:

<f:selectItems value="#{RunActionWizard.aspects}" />

to

<f:selectItems value="#{RunActionWizard.testableAspects}" />

Thanks for reporting this, i have update the wiki page with this change.

alessioa_
Champ in-the-making
Champ in-the-making
Now it's working…. Smiley Happy
Thanks very much
Alessio A.

ribz33
Champ on-the-rise
Champ on-the-rise
Just to help…
It seems that 1.4 SDK custom dialog sample dont have the latest correct code Smiley Wink

gavinc
Champ in-the-making
Champ in-the-making
You're absolutely right.

Thanks for reporting this issue.

rcortesr
Star Contributor
Star Contributor
Hi,

when I click Add Aspect doesn't appear the JSP page.
It does not appear message of error.
My version of Alfresco is 1.3

Somebody can help me?

Thanks.

gavinc
Champ in-the-making
Champ in-the-making
It probably means that your config for the dialog is not being picked up for some reason, make sure you have followed all the steps precisely.

rcortesr
Star Contributor
Star Contributor
It probably means that your config for the dialog is not being picked up for some reason, make sure you have followed all the steps precisely.
Hi,

I have verified all the steps and I think that all is correct.
With the example of custom JSP I have done the same and I don't have problems.

I have folowed this steps:
1) I have created .jar file (jar cvf custom-dialog.jar alfresco META-INF org)
2) I have copied this file in /alfresco/web-inf/lib
3) I have copied the file add-aspect.jsp in /alfresco/jsp/extension
4) I have restarted Alfresco

Someone knows what is the problem???

Thanks.

gavinc
Champ in-the-making
Champ in-the-making
What is the structure of your JAR file? Can you post it here?

You could also try turning on debugging, particularly for:

org.alfresco.web.app.AlfrescoNavigationHandler

Please post any output you see when you select the Add Aspect action.

rcortesr
Star Contributor
Star Contributor
Hi,

* In my JAR file there are three folders (alfresco, META-INF and org). I have used the following command: jar cvf custom-dialog.jar alfresco META-INF org

* When I select the Add aspect action the dialog doesn't change. The JSP file that I have created not load.

* This is the result of debug:
INFO: Server startup in 51604 ms
11:08:52,450 DEBUG [web.app.AlfrescoNavigationHandler] handleNavigation (fromAct
ion=#{LoginBean.login}, outcome=null)
11:08:52,450 DEBUG [web.app.AlfrescoNavigationHandler] Current view id: /jsp/log
in.jsp
11:08:52,450 DEBUG [web.app.AlfrescoNavigationHandler] No dispatch context found

11:08:52,450 DEBUG [web.app.AlfrescoNavigationHandler] Passing outcome 'null' to
original navigation handler
11:08:52,450 DEBUG [web.app.AlfrescoNavigationHandler] view stack: []
11:09:14,512 DEBUG [web.app.AlfrescoNavigationHandler] handleNavigation (fromAct
ion=null, outcome=dialog:addAspect)
11:09:14,512 DEBUG [web.app.AlfrescoNavigationHandler] Current view id: /jsp/bro
wse/browse.jsp
11:09:14,512 DEBUG [web.app.AlfrescoNavigationHandler] Opening dialog 'addAspect
'
11:09:14,512 DEBUG [web.app.AlfrescoNavigationHandler] Pushed current view to st
ack: /jsp/browse/browse.jsp
11:09:14,722 DEBUG [web.app.AlfrescoNavigationHandler] Found node with type '{ht
tp://www.alfresco.org/model/content/1.0}content' in dispatch context
11:09:14,752 DEBUG [web.app.AlfrescoNavigationHandler] No navigation configurati
on found for node
11:09:14,752 DEBUG [web.app.AlfrescoNavigationHandler] Passing outcome 'addAspec
t' to original navigation handler
11:09:14,762 DEBUG [web.app.AlfrescoNavigationHandler] view stack: [/jsp/browse/
browse.jsp]
11:10:37,531 DEBUG [web.app.AlfrescoNavigationHandler] handleNavigation (fromAct
ion=null, outcome=null)
11:10:37,531 DEBUG [web.app.AlfrescoNavigationHandler] Current view id: /jsp/bro
wse/browse.jsp