AnsweredAssumed Answered

problem with faces-config-custom.xml

Question asked by friedman30 on Oct 15, 2007
Latest reply on Oct 22, 2007 by friedman30
Hi,

I created a project that has a dependency on Alfrescos "web-client" project.
In this project i stored a bean that is the managed bean for some new buttons (that are defined in the web-client-config-custom.xml file and are relevant for this project only). Each button has its action listener defined.

<action id="verizon_reject_action"> 
            <permissions>
               <permission allow="true">AddChildren</permission>
            </permissions>
            <label-id>verizon_reject</label-id>
            <evaluator>com.mobival.alfresco.web.action.evaluator.verizon.VerizonRejectEvaluator</evaluator>
            <image>/images/icons/verizon_reject.gif</image>
            <action-listener>#{VerizonWorkflowHandler.reject}</action-listener>
            <params>
               <param name="ref">#{actionContext.nodeRef}</param>
            </params>
         </action>

the new project is running from a jar that is stored in the Alfresco war file.

now, if i register my backing bean (of the buttons) in faces-config-beans.xml file - everything works fine.
when i tried to register the managed bean at faces-config-custom.xml the server could not find the managed bean at all…..

this is what i tried:

<?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>

   <!– *************************************************************** –>
   <!– Empty JSF config file to prevent errors being thrown during JSF –>
   <!– initialisation. Overwrite this file with your custom version.   –>
   <!– *************************************************************** –>
  
  
   <managed-bean>
      <description>
         Bean that hadles all of 'Verizon' specific actions and logic
      </description>
      <managed-bean-name>VerizonWorkflowHandler</managed-bean-name>
      <managed-bean-class>com.mobival.alfresco.web.bean.verizon.VerizonWorkflowHandler</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
   </managed-bean>
  
</faces-config>

i assume that i do something wrong here….

I need to find a way for adding action buttons (using the xml files) and registering their backing bean somewhere else - not inside the web-client….

what should i do?

thanks.

Dror

Outcomes