myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan-Kees van Andel" <jkvan...@planet.nl>
Subject RE: Qeestion about jsf
Date Mon, 04 Jun 2007 17:41:45 GMT
Step 1:

The order in which JAR files in WEB-INF/lib are encountered is unspecified,
even in JSF 1.2.

But at the moment, you can pretty much assume they are loaded in
alphabetical order, both in MyFaces and in Sun RI. I heard that was an
agreement in the expert Group.

 

Step 2:

When you define files using the context-param: javax.faces.CONFIG_FILES,
they are loaded now.

 

Step 3:

Load <<<web application>>>/WEB-INF/faces-config.xml.

 

Important to note is that if there is a conflict (i.e. duplicate component),
the last definition takes precedence, or the definitions are merged (if
that's possible for that specific element)

 

So, theoretically, it should use j2.MyViewRoot2.

 

I hope this helps you.

 

Greets,

 

Jan-Kees van Andel

 

 

 

 

Van: mario.buonopane@accenture.com [mailto:mario.buonopane@accenture.com] 
Verzonden: maandag 4 juni 2007 18:47
Aan: users@myfaces.apache.org
Onderwerp: RE: Qeestion about jsf

 

Hi Bryan, i don't have any error but the question is:

 

I have two jar in WEB-INF/lib j1.jar and j2.jar. Both have a META-INF
directory with a faces.config.xml. The faces.config.xml of j1.jar contains
the definition:

  <component>

    <component-type>javax.faces.ViewRoot</component-type>

    <component-class>j1.MyViewRoot1</component-class>

  </component>

 

And j2.jar

  <component>

    <component-type>javax.faces.ViewRoot</component-type>

    <component-class>j2.MyViewRoot2</component-class>

  </component>

 

So, witch is the javax.faces.ViewRoot component used by JSF?

 

Mario 

  _____  

From: Bryan Basham [mailto:bbasham@stillsecure.com] 
Sent: 4 giugno 2007 16.24
To: MyFaces Discussion
Subject: Re: Qeestion about jsf

 

Hello Mario,

In principle, you are doing the right thing by declaring the
component-class for an existing component type in the faces-config
file.  So, I cannot tell from your message what is going wrong.
Can you send us the error message?

Also, be warned that it is not trivial to use a custom component
for the view root.  I tried this a few weeks ago and failed to get
JSF to recognize my custom view root component *and* to have
it behave like a view root.  I only tried a few hours, but decided it
was not worth my effort.  However, if you are successful, I would
*love* to hear how you did it.

-Bryan

mario.buonopane@accenture.com wrote: 

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?

 

Thanks in advance

Mario   

This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately and delete the
original. Any other use of the email by you is prohibited.

 


Mime
View raw message