cancel
Showing results for 
Search instead for 
Did you mean: 

problem with faces-config-custom.xml

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

friedman30
Champ in-the-making
Champ in-the-making
Hi,

Is there no way to register a backing bean outside faces-config-beans.xml ???

:shock:

Dror

ribz33
Champ on-the-rise
Champ on-the-rise
Me I configure my managed beans in faces-config.xml.
I stored this file in the META-INF folder of my jar which is added to alfresco war.

friedman30
Champ in-the-making
Champ in-the-making
Thanks Pierre,

It works for me as well.

😎