AnsweredAssumed Answered

SOLVED: Another Create Content Wizard error

Question asked by shmoula on May 14, 2008
Latest reply on Mar 1, 2012 by marco.altieri
Hi!
  I'm trying to follow SDK sample about Creating a custom wizard, but there are still some exceptions in my version.

So, parts of my web-client-config-custom.xml are:

<config>
      <wizards>
         <wizard name="createSessionContent" managed-bean="CreateSessionContentWizard"
                 title-id="create_content_title" description-id="create_content_desc"
                 icon="/images/icons/new_content_large.gif">
            <step name="details" title-id="details" description-id="create_content_step1_desc">
               <page path="/jsp/content/create-content-wizard/details.jsp"
                     title-id="create_content_step1_title"
                     description-id="create_content_step1_desc"
                     instruction-id="default_instruction" />
            </step>
.
.
.
<action id="add_session_file">
                <label>Pridat do archivu</label>
                <image>/images/icons/add.gif</image>
                <action>wizard:createSessionContent</action>
                <evaluator>cz.shmoula.AddSessionFileEvaluator</evaluator>
</action>

I defined a managed bean like this (original version of sample doesn't work, there were missing some properties, so i add 'em):

<managed-bean>
      <managed-bean-name>CreateSessionContentWizard</managed-bean-name>
      <managed-bean-class>cz.shmoula.CreateSessionContentWizard</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>fileFolderService</property-name>
         <value>#{FileFolderService}</value>
      </managed-property>
      <managed-property>
         <property-name>searchService</property-name>
         <value>#{SearchService}</value>
      </managed-property>
      <managed-property>
         <property-name>navigator</property-name>
         <value>#{NavigationBean}</value>
      </managed-property>
      <managed-property>
         <property-name>browseBean</property-name>
         <value>#{BrowseBean}</value>
      </managed-property>
      <managed-property>
         <property-name>contentService</property-name>
         <value>#{ContentService}</value>
      </managed-property>
      <managed-property>
         <property-name>dictionaryService</property-name>
         <value>#{DictionaryService}</value>
      </managed-property>
      <managed-property>
         <property-name>formsService</property-name>
         <value>#{FormsService}</value>
      </managed-property>
   </managed-bean>

My code is just so simple like this:

package cz.shmoula;

import javax.faces.context.FacesContext;
import org.alfresco.web.bean.content.CreateContentWizard;

public class CreateSessionContentWizard extends CreateContentWizard{
   @Override
   protected String finishImpl(FacesContext context, String outcome) throws Exception{
         super.finishImpl(context, outcome);
         System.out.println("holla!!"); 
         return outcome;
      }
}

But when i open that wizard, it ends with following exception:

javax.faces.FacesException: Cannot get value for expression '#{WizardManager.bean.form}'
caused by:
org.apache.jasper.JasperException: Cannot get value for expression '#{WizardManager.bean.form}'
caused by:
javax.faces.el.EvaluationException: Cannot get value for expression '#{WizardManager.bean.form}'
caused by:
javax.faces.el.EvaluationException: Exception getting value of property form of base of type : cz.shmoula.CreateSessionContentWizard
caused by:
javax.faces.el.EvaluationException: Bean: cz.shmoula.CreateSessionContentWizard, property: form
caused by:
java.lang.reflect.InvocationTargetException
caused by:
org.alfresco.web.forms.FormNotFoundException: Unable to find form .

DETAILS:
javax.faces.FacesException: Cannot get value for expression '#{WizardManager.bean.form}'
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:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.jasper.JasperException: Cannot get value for expression '#{WizardManager.bean.form}'
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:594)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965)
at org.apache.jsp.jsp.wizard.container_jsp._jspService(container_jsp.java:532)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
… 21 more

Where can be problem? I'm really confused of that, im really not using any of WizardManager.bean.* in my part, my custom .jsp is just a plain "hello there!" text :-(. Many thanks in advance!

Outcomes