Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF 1.1 - Multiple instance with multiple faces-config - Oracle ADF and Apache Trinidad

 
Felipe Munoz Castillo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I need use two JSF instances in single application.
We have one application that it work with ASF 10.1.3 and jsf-impl 1.1, this instance have ther faces-config.xml filtering by /faces/*
We need uses Apache Trinidad 1.0.13, filtering by /facestrinidad/* with own faces-config-trinidad.xml
How I can do it?

I have come to the following:
web.xml:


how i can registar one faces-config-adf an one faces-config-trinidad ??

Thanks!!!
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Felipe!

If I'm not mistaken, Trindidad is an open-source implementation of ADF, so it would actually make more sense to consolidate on a common implementation instead

Faces-config.xml is not "filtered". It is a static resource that's read by the FacesServlet to establish the rules for JSF resource management. It would normally operate at an application-wide level as would the FacesServlet.

I didn't realize that either Trinidad or ADF maintained their own servlets and I'm not sure exactly what the benefit of such an architecture is. JSF requests go through the FacesServlet and normally any resource resolution is accomplished by code that plugs in one way or another to the processes in the FacesServlet. Since it's not possible to send a URL request to more than one servlet, these "resource servlets" evidently provide side resources independent of the primary page request/response process. It's even less clear whether/if/why they should care what's in faces-config.xml.

As I said, faces-config is a global definition. And actually it can be multiple files read and combined into a single reference by the FacesServlet. The filepaths of these faces-config files is set via a webapp context-param directive. To alter this state of affairs on a per-servlet basis would require defining something as a servlet parameter on the affected servlet. And that's supposing that the servlet in question has a parameter option that does what you want.
 
Felipe Munoz Castillo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

Thank you for your response.

The solution to my problem might be easier.

I need use the trinidad componets for mobile applications (http://myfaces.apache.org/trinidad/devguide/mobile.html) in my Oracle-ADF application.
My problem, if i include de trinidad-*.jar in my application´s classpath, i can´t use these components.
I think that the problem is in faces-config.xml is there <default-render-kit-id>oracle.adf.core </..>. If i use oracle.adf.core the trinidad components don´t work and oracle components work, but if use org.apache.myfaces.trinidad.core render kit the trinidad components work and oracle components don´t works.

What i can do??

I need use the trinidad mobile components in my Oracle-ADF application.

Thanks!!!
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For all the hoopla about the power of plug-in renderkits, not much actually gets said. I haven't worked at that level for a while, so I don't remember a whole lot, but I can throw out a few wild ideas.

Trinidad does have a reputation for not playing well with others. However, I did find some stuff on Oracle's website about trinidad and ADF. You should seriously consider asking Oracle directly. My superficial understandings are that Trinidad doesn't really have "mobile" components as such, just mobile skinning so that the same basic view definition can be used for both desktop and mobile. I think that there is a config file for it.

Normally each component defines its own renderkits, I believe, so Trinidad shouldn't have to have a special renderkit definition. If it did, you'd probably have to assign it in faces-config.xml for each trinidad component that you wished to override, but like I said, I think that's not how it works anyway.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic