>From: [EMAIL PROTECTED] 
>
>Hi, I have a question about the JSF mechanism used to set a component:
>If I have to jars both defining:
>
><component>
>  <component-type>javax.faces.ViewRoot</component-type>
>  <component-class>xxxxxxx.myClassXXX</component-class>
></component>
>
>Witch is the component type used for ViewRoot? May be depends on the 
>classloader >order used to load jars?
>


The myfaces code that loads the config files [1] has 4 steps:
   1) Reads the standard Runtime faces config.

   2) Loads faces-configs.xml files from the META-INF of the jars using
      the classloader.  I don't think you can specify the order.

   3) Looks in the web deployment descriptor for config files declared 
      using the init parameter.


      <context-param>
          <param-name>
               javax.faces.CONFIG_FILES
          </param-name>
          <param-value>
             /WEB-INF/myfaces-config-1.xml, /WEB-INF/myfaces-config-2.xml
          </param-value>
      </context-param>

    4) Load the /WEB-INF/faces-config.xml config file.


You can not override the view root using the sun RI 1.1_x implementation.
The view handler doesn't use the application factory to instantiate the
view root component so there is not a way to plug in your own implementation. 

However, myfaces has allowed this for several 1.1 releases.


[1] 
http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?view=markup

Gary


>Thanks in advance
>
>Mario

Reply via email to