AnsweredAssumed Answered

[Résolu] Custom Wizard

Question asked by lamba on Aug 31, 2010
Latest reply on Sep 20, 2010 by lamba
Bonjour,

J'ai créé une nouvelle action avec un wizard personnalisé, les étapes étant:
- définir le wizard dans web-client-config-custom.xml

<config>
      <wizards>
      <!– Definition of the create rule wizard
         <wizard name="custompublish" managed-bean="PublishActionWizard"
                 title-id="publish_action_title" description-id="publish_action_desc"
                 icon="/images/icons/new_rule_large.gif">
            <step name="conditions" title-id="conditions" description="">
               <page path="/jsp/rules/conditions.jsp"
                     title-id="create_rule_step1_title"
                     description=""
                     instruction-id="default_instruction" />
            </step>
            <step name="actions" title-id="actions" description="">
               <page path="/jsp/actions/extension/publish.jsp"
                     title-id="create_rule_step2_title"
                     description=""
                     instruction-id="default_instruction" />
            </step>
            <step name="details" title-id="details" description="">
               <page path="/jsp/rules/details.jsp"
                     title-id="create_rule_step3_title"
                     description=""
                     instruction-id="default_instruction" />
            </step>
            <step name="summary" title-id="summary" description-id="summary_step_description">
               <page path="/jsp/wizard/summary.jsp"
                     title-id="summary"
                     description-id="summary_desc"
                     instruction-id="create_rule_finish_instruction" />
            </step>
         </wizard>–>
     </wizards>
   </config>

- définir son bean dans faces-config.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                              "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>

   <managed-bean>
      <managed-bean-name>PublishActionWizard</managed-bean-name>
      <managed-bean-class>com.custom.alfresco.action.wizard.PublishActionWizard</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>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>actionService</property-name>
         <value>#{ActionService}</value>
      </managed-property>
      <managed-property>
         <property-name>dictionaryService</property-name>
         <value>#{DictionaryService}</value>
      </managed-property>
      <managed-property>
         <property-name>mimetypeService</property-name>
         <value>#{MimetypeService}</value>
      </managed-property>
      <managed-property>
         <property-name>personService</property-name>
         <value>#{PersonService}</value>
      </managed-property>
      <managed-property>
         <property-name>authorityService</property-name>
         <value>#{AuthorityService}</value>
      </managed-property>
   </managed-bean>
  
</faces-config>

- Créer la classe bean


public abstract class PublishActionWizard extends BaseActionWizard {
   protected List<SelectItem> listFilters;
   protected String filter;
     
   protected List<SelectItem> listFolders;
   protected String folder;
        
// ——————————————————————————
   // Wizard implementation
  
   @Override
   public void init(Map<String, String> parameters){
      super.init(parameters);
   }
   // ——————————————————————————
   // Bean Getters and Setters
 
   public String getFilter() {
         return filter;
   }
   
   public void setFilter(String filter) {
      this.filter = filter;
   }
   
   public String getFolder() {
      return folder;
   }
   
   public void setFolder(String folder) {
      this.folder = folder;
   }

   public List<SelectItem> getFilters(){
      …
     
      return this.listFilters;
   }
      
   public List<SelectItem> getFolders(){
      …
      
      return this.listFolders;
   }
}

- Créer l'action qui lance le wizard
   + Creer le Handler et l'Executor
   + Ajouter le Handler dans le web-client-config-custom.xml  (sous la condition "Action Wizards")
   + Créer la page jsp
   

     …
      <tr><td colspan="2" class="paddingRow"></td></tr>
                                 <tr>
                                    <td><nobr><h:outputText value="#{customMsg.filters}:"/></nobr></td>
                                    <td width="95%">
                                       <h:inputText value="#{WizardManager.bean.actionProperties.filters}" size="50" maxlength="1024" />
                              <h:selectOneMenu value="#{WizardManager.bean.actionProperties.filters}">
                                 <f:selectItems value="#{WizardManager.bean.listFilters}" />
                              </h:selectOneMenu>
                                    </td>
                                 </tr>
                                
                                 <tr>
                                    <td><nobr><h:outputText value="#{customMsg.folders}:"/></nobr></td>
                                    <td width="95%">
                                       <h:inputText value="#{WizardManager.bean.actionProperties.folders}" size="50" maxlength="1024" />
                              <h:selectOneMenu value="#{WizardManager.bean.actionProperties.folders}">
                                 <f:selectItems value="#{WizardManager.bean.listFolders}" />
                              </h:selectOneMenu>
                                    </td>
                                 </tr>
                                                   
                                 <tr><td class="paddingRow"></td></tr>
     …
   

Mais voilà ce qu'il me retourne comme erreur:

javax.faces.FacesException: javax.faces.el.PropertyNotFoundException: Bean: org.alfresco.web.bean.actions.RunActionWizard, property: listFilters
caused by:
org.apache.jasper.JasperException: javax.faces.el.PropertyNotFoundException: Bean: org.alfresco.web.bean.actions.RunActionWizard, property: listFilters
caused by:
javax.faces.el.PropertyNotFoundException: Bean: org.alfresco.web.bean.actions.RunActionWizard, property: listFilters



Que pourra être le problème?


Merci d'avance.

Outcomes