cancel
Showing results for 
Search instead for 
Did you mean: 

Création d'une wizard erreur

libman
Champ in-the-making
Champ in-the-making
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>
7 REPLIES 7

libman
Champ in-the-making
Champ in-the-making
Ok, j'avais un problème avec le workspace. Maintenant je n'ai pas d'erreur (Exception). Mais, le wizard est vide, donc:
Input required values (etape1)
Input required values.(etape1.desc)

(ici rien??)

To continue click Next.

Merci

libman
Champ in-the-making
Champ in-the-making
J'ai vraiment besion cette fonctionalité, est-ce que quelqu'un peut m'aider??

Merci.

rivarola
Champ on-the-rise
Champ on-the-rise
Il faut être assez rigoureux avec les tags JSF dans les JSP utilisés dans Alfresco. Par exemple ne pas mettre de texte en dehors d'une balise verbatim (comme ton Title) ou encore définir un id explicite et unique pour chaque tag. Ce n'est pas sûr que ça t'aide mais ça ne peut que faire du mieux.

libman
Champ in-the-making
Champ in-the-making
Aussi, sans cela, ça ne marche pas.

Est-ce que quelqu'un peut me donner un example?
C'est à dire:
*/jsp/extention/…
*WEB_INF/faces-config-app.xml
*WEB_INF/classes/alfresco/web-client-config-wizards.xml
*WEB_INF/classes/alfresco/web-client-config-actions.xml
*WEB_INF/classes/alfresco/messages/webclient.properties
et le fichier .jar (avec source).

Merci.

libman
Champ in-the-making
Champ in-the-making
Bon, je suis entraîne de replacer les codes de CreateContentWizard à CreateMyProject.

Ce que j'ai constaté c'est que les codes d'Alfresco 3 ne sont pas les mêmes que celles que j'ai trouvé ici: http://kickjava.com/src/org/alfresco/web/bean/wizard/CreateContentWizard.java.htm (je n'a pas trouvé cette fichier dans HEAD).
Il y a des nouvelles fonctions, et currentStep n'existe pas. Est-ce que quelqu'un peut me dire ou je peux trouver les sources de CreateContentWizard et BaseContentWizard?

Merci

michaelh
Champ on-the-rise
Champ on-the-rise
Bonjour,

Oui, oubliez définitivement les sources de kickjava.com et autres sites qui récupèrent le code de temps en temps. Parce que là, le code de kickjava.com date de 2005, et de la version 1.x. De plus ce code est soumis à une licence qui n'est pas la GPL.

En bref, la référence est bien http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/ .
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.