cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED]Page of wizard not shown

libman
Champ in-the-making
Champ in-the-making
I have a wizard, I changed it from the example wizard project found in the SDK.

When going in the wizard, it shows there are 2 steps (correct), but there is no form shown. So no field to input text in my case. When I change the name of the file to a name that doesn't exists, it gives the same result. No warning on Alfresco console.

My configuration:
Web-client-configµwizards:
<wizard name="createMyProject" managed-bean="CreateMyProject"
   title-id="create_my_project_title" description-id="create_my_project_desc"
   icon="/images/icons/new_content_large.gif">

   <property name="serviceRegitry">
      <ref bean="ServiceRegistry" />
   </property>
   
   <step name="details" title-id="details" description-id="create_my_project_step1_desc">
      [b]<page path="/jsp/extention/create_my_project_step1.jsp"
         title-id="create_my_project_step1_title" description-id="create_my_project_step1_desc"
         instruction-id="default_instruction" />[/b]
   </step>
   <step name="summary" title-id="summary" description-id="summary_step_description">
      <page path="/jsp/extention/create_my_project_step2.jsp" title-id="summary"
         description-id="summary_desc" instruction-id="content_finish_instruction" />
   </step>
</wizard>

In web-client-config-actions:
<!– Create My Project –>
<action id="create_my_project">
<permissions>
  <permission allow="true">CreateChildren</permission>
</permissions>
<label-id>create_my_project</label-id>
<image>/images/icons/new_content.gif</image>
<action>wizard:createMyProject</action>
</action>

<!– Actions Menu for Create in Browse screen –>
<action-group id="browse_create_menu">
<action idref="create_content" />
<action idref="create_form" />
<action idref="create_website_wizard" />
<action idref="create_space" />
<action idref="create_space_wizard" />
[b]<action idref="create_my_project" />[/b]
</action-group>

.jsp file:

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
           
<h:outputText value="#{msg.title}: " />
Testing…<h:inputText id="title"></h:inputText><br>

Thanks
5 REPLIES 5

libman
Champ in-the-making
Champ in-the-making
Anyone? Maybe I need to add something in faces-*.xml files? I followed the tutorials in the wiki page, and did nothing wrong. And, here, I'm creating a totally new wizard, not an edit of some other.

Edit: I see that I inherited from CreateContentWizard. Now it's AbstractWizardBean.

When going in the wizard:
javax.faces.el.PropertyNotFoundException: Bean: org.alfresco.sample.CreateMyProjectWizard, property: contentService

Hide Details

javax.faces.el.PropertyNotFoundException: Bean: org.alfresco.sample.CreateMyProjectWizard, property: contentService
at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:445)
at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:416)
at org.apache.myfaces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:284)
at org.apache.myfaces.config.ManagedBeanBuilder.initializeProperties(ManagedBeanBuilder.java:164)
at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:55)
at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:311)
at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:110)
at org.alfresco.web.app.AlfrescoVariableResolver.resolveVariable(AlfrescoVariableResolver.java:91)
at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:569)
at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:378)
at org.alfresco.web.app.servlet.FacesHelper.getManagedBean(FacesHelper.java:132)
at org.alfresco.web.bean.wizard.WizardManager.setCurrentWizard(WizardManager.java:96)
at org.alfresco.web.app.AlfrescoNavigationHandler.handleWizardOpen(AlfrescoNavigationHandler.java:575)
at org.alfresco.web.app.AlfrescoNavigationHandler.handleNavigation(AlfrescoNavigationHandler.java:115)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:84)
at javax.faces.component.UICommand.broadcast(UICommand.java:106)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:105)
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:81)
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:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
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)

And the class:

public class CreateMyProjectWizard extends AbstractWizardBean {
   public String getAspect() {
      return aspect;
   }

   public void setAspect(String aspect) {
      this.aspect = aspect;
   }

   protected List<SelectItem> aspects;

   public List<SelectItem> getAspects() {
      List<SelectItem> lists = new ArrayList<SelectItem>();
      lists.add(new SelectItem("Test", "Test1"));
      lists.add(new SelectItem("Test", "Test2"));
      lists.add(new SelectItem("Test", "Test3"));
      return aspects;
   }

   protected String aspect;

   public String getTitle() {
      return title;
   }

   public void setTitle(String title) {
      this.title = title;
   }

   String title;

   List<SelectItem> templates;

   // ——————————————————————————
   // Wizard implementation

   private ServiceRegistry serviceRegistry;

   public void setServiceRegistry(ServiceRegistry serviceRegistry) {
      this.serviceRegistry = serviceRegistry;
   }

   protected String finishImpl(FacesContext context, String outcome)
         throws Exception {
      // super.finishImpl(context, outcome);

      return outcome;
   }

   @Override
   protected String determineOutcomeForStep(int arg0) {
      // TODO Auto-generated method stub
      return null;
   }

   @Override
   public String finish() {
      // TODO Auto-generated method stub
      return null;
   }

   @Override
   public String getStepDescription() {
      // TODO Auto-generated method stub
      return null;
   }

   @Override
   public String getStepInstructions() {
      // TODO Auto-generated method stub
      return null;
   }

   @Override
   public String getStepTitle() {
      // TODO Auto-generated method stub
      return null;
   }

   @Override
   public String getWizardDescription() {
      // TODO Auto-generated method stub
      return null;
   }

   @Override
   public String getWizardTitle() {
      // TODO Auto-generated method stub
      return null;
   }
}

libman
Champ in-the-making
Champ in-the-making
Ok, I added the necessary services and implemented the IWizardBean interface. This doesn't have anthing todo with the pages to be shown (.jsp). So I got the same empty form, the <page path="/jsp/extention/create_my_project_step1.jsp" …> file is not read.

Thanks by advance.

libman
Champ in-the-making
Champ in-the-making
I went from 2.0 to 3b. I updated the class and I get the same error.
I really need this functionallity.

Thanks

libman
Champ in-the-making
Champ in-the-making
I'm trying to replace the my codes with that of CreateContentWizard. I didn't find these codes (plus BaseContentWizard) in the HEAD SVN. I found one of prior versions. But the currentStep doesnt exists. The structure of the Wizard classes are changed in Alfresco Labs 3. Where can I get these sources?

libman
Champ in-the-making
Champ in-the-making
The codes from the SDK doesn't explain how to make a new wizard, but just how to modify. I analysed the codes from the Advanced Space Wizard and got it working.