AnsweredAssumed Answered

Création d'une wizard erreur

Question asked by libman on Oct 29, 2008
Latest reply on Nov 4, 2008 by michaelh
Bonjour,

Je suis entraîne de créer  une wizard. J'ai l'erreur suivant:

javax.faces.FacesException: Could not retrieve value of component with path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/wizard/container.jsp][Class: javax.faces.component.html.HtmlForm,Id: wizard][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp9]}
caused by:
org.apache.jasper.JasperException: Could not retrieve value of component with path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/wizard/container.jsp][Class: javax.faces.component.html.HtmlForm,Id: wizard][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp9]}
caused by:
javax.faces.FacesException: Could not retrieve value of component with path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/wizard/container.jsp][Class: javax.faces.component.html.HtmlForm,Id: wizard][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp9]}
caused by:
javax.faces.el.EvaluationException: Cannot get value for expression '#{WizardManager.subTitle}'
caused by:
javax.faces.el.EvaluationException: Exception getting value of property subTitle of base of type : org.alfresco.web.bean.wizard.WizardManager
caused by:
javax.faces.el.EvaluationException: Bean: org.alfresco.web.bean.wizard.WizardManager, property: subTitle
caused by:
java.lang.reflect.InvocationTargetException
caused by:
java.lang.AbstractMethodError: org.alfresco.sample.CreateMyProjectWizard.getContainerSubTitle()Ljava/lang/String;
J'ai cherché aussi dans des autres forums (alfresco.com), mais pas trouver une réponse.

Mon code:

public class CreateMyProjectWizard extends AbstractWizardBean implements
      IWizardBean {
   
   private ServiceRegistry serviceRegistry;
   private ContentService contentService;
   private DictionaryService dictionaryService;

   private String outcome;

   protected String aspect;
   protected List<SelectItem> aspects;
   String title;

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

   public String getAspect() {
      return aspect;
   }

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

   public String getTitle() {
      return title;
   }

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

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

   public void setContentService(ContentService contentService) {
      this.contentService = contentService;
   }

   public ContentService getContentService() {
      return contentService;
   }

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

      return outcome;
   }

   protected String determineOutcomeForStep(int arg0) {
      if (arg0 == 1)
         return outcome = "STEP 1";
      else
         return outcome = FINISH_OUTCOME;
   }

   @Override
   public String finish() {
      return null;
   }

   public void init() {
      super.init();

      title = "";
   }

   public void populate() {
      // TODO Auto-generated method stub
      super.populate();

   }

   public String getStepDescription() {
      switch (currentStep) {
      case 1:
         return Application.getMessage(FacesContext.getCurrentInstance(),
               "create_my_project_step1_desc");
      case 2:
         return Application.getMessage(FacesContext.getCurrentInstance(),
               "summary_desc");
      default:
         break;
      }
      return null;
   }

   public String getStepInstructions() {
      switch (currentStep) {
      case 1:
         return Application.getMessage(FacesContext.getCurrentInstance(),
               "create_my_project_step1_desc");
      case 2:
         return Application.getMessage(FacesContext.getCurrentInstance(),
               "summary_desc");
      default:
         break;
      }
      return null;
   }

   public String getStepTitle() {
      switch (currentStep) {
      case 1:
         return Application.getMessage(FacesContext.getCurrentInstance(),
               "create_my_project_step1_title");
      case 2:
         return Application.getMessage(FacesContext.getCurrentInstance(),
               "summary");
      default:
         break;
      }
      return null;
   }

   public String getWizardDescription() {
      return Application.getMessage(FacesContext.getCurrentInstance(),
            "create_my_project_desc");
   }

   public String getWizardTitle() {
      return Application.getMessage(FacesContext.getCurrentInstance(),
            "create_my_project_title");
   }

   public void setDictionaryService(DictionaryService dictionaryService) {
      this.dictionaryService = dictionaryService;
   }

   public DictionaryService getDictionaryService() {
      return dictionaryService;
   }

   public String getBackButtonLabel() {
      return "back";
   }

   public boolean getNextButtonDisabled() {
      return false;
   }

   public String getNextButtonLabel() {
      return "next";
   }

   public List<DialogButtonConfig> getAdditionalButtons() {
      return null;
   }

   public String getCancelButtonLabel() {
      return "cancel";
   }

   public String getContainerDescription() {
      return "next";
   }

   public String getContainerTitle() {
      return "next";
   }

   public boolean getFinishButtonDisabled() {
      return false;
   }

   public String getFinishButtonLabel() {
      return "finish";
   }

   public void init(Map<String, String> arg0) {
   }

   public void restored() {
   }

   public String getActionsConfigId() {
      return null;
   }

   public Object getActionsContext() {
      return null;
   }

   public String getContainerSubTitle() {
      return "finish";
   }

   public String getMoreActionsConfigId() {
      return null;
   }
}
Et détail:

javax.faces.FacesException: Could not retrieve value of component with path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/wizard/container.jsp][Class: javax.faces.component.html.HtmlForm,Id: wizard][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp9]}
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.alfresco.module.vti.VtiContextFilter.doFilter(VtiContextFilter.java:94)
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: Could not retrieve value of component with path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/wizard/container.jsp][Class: javax.faces.component.html.HtmlForm,Id: wizard][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp9]}
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.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)
… 24 more
La page .jsp

<%@ 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}: " />
Title<h:inputText id="title"></h:inputText><br>           

<h:outputText value="#{msg.aspect}: " />
<h:selectOneMenu value="#{WizardManager.bean.aspect}">
   <f:selectItems value="#{WizardManager.bean.aspects}" />
</h:selectOneMenu>

Outcomes