Studio creator and faces-config.xml
How can I configure Sun Studio Creator to use /WEB-INF/faces-config.xml for all configuration items. Currently navigation and managed beans are seperated into 2 files. I have a bunch of JSF application with using another tool that I would like to test editing using Studio Creator but the Sun Studio Creator ignores the faces-config.xml for the navigation editor and managed bean editor.
Hi ,
The follwing link may probably answer your query.
http://swforum.sun.com/jive/thread.jspa?threadID=50215&tstart=15
Regards.,
Similar Messages
-
Managed bean in both adfc-config.xml and faces-config.xml file
hi,
i can see that it's possible to declare managed bean in both adfc-config.xml and faces-config.xml file.
is there any difference? which one is recommended?
read here - http://www.jaypillai.com/tag/adf/
but still not clear.
thanks.Hi.
As you know ADF is a framework based on JSF.
In faces-config.xml you define general application manage beans. It offers you define manage beans for all application using JSF default scopes (application, session, request).
In adfc-config.xml you define general application manage beans using ADF Scopes. It means that you can use JSF default ones including "view, pageFlow and backing".
My recommendation is use only one point entry for your general manage beans. Use adfc-config.xml because allow you to use more scopes.
Regards. -
Component and renderer can't share the same name in face-config.xml
Hi All,
I've noticed that a component and a renderer can't share the same name in <face-config.xml>.
For instance,
<component>
<component-type>tree</component-type>
<component-class>com.xxx.tree.component.Tree</component-class>
</component>
<render-kit>
<renderer>
<renderer-type>tree</renderer-type>
<renderer-class>com.xxx.tree.renderer.Tree</renderer-class>
</renderer>
</render-kit>
generates a cryptic error message.
It's not a big deal but would be nice to support it.
The workaround of course is to use a different name for the component and renderer (tree and treeRenderer for instance)
Stephanei dont know why it doesn't work for you. It works for me alright. Can u elaborate on what error messages you are getting? It maybe some other problem.
-
What belongs in the faces-config.xml file? Just bean and navigation info?
I am looking for detailed information on the faces-config.xml file.
I've used examples up to this point and I was wondering where the documentation for this configuration file was at.
At this point, I know that bean management and navigation information is in this file, but are there other settings?
Thanks,
--ToddPringi: The tag explantion information, why isn't that easily found on Sun's web site or document site?
This has been the most frustrating part - finding pieces of information here and there... and not in one location.
Thanks,
--Todd -
Difference between standard-faces-config.xml and /WEB-INF/faces-config.xml
Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
Reading config /WEB-INF/faces-config.xml
Iam getting these in tomcat server,iam using netbeans5.5.1
Can any one tell me the difference between the standard-faces-config.xml and the /WEB-INF/faces-config.xml
because i find some repeatition
06-Oct-2007 09:25:19 org.apache.myfaces.webapp.StartupServletContextListener initFaces
06-Oct-2007 09:25:19 org.apache.myfaces.webapp.StartupServletContextListener initFaces
INFO: ServletContext 'C:\jsfprogrammes\HiTech\build\web\' initialized.
06-Oct-2007 09:25:19 org.ajax4jsf.cache.CacheManager getCacheFactory
INFO: Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
06-Oct-2007 09:25:19 org.ajax4jsf.cache.LRUMapCacheFactory createCache
INFO: Creating LRUMap cache instance using parameters: {org.apache.myfaces.CHECK_EXTENSIONS_FILTER=true, org.apache.myfaces.DETECT_JAVASCRIPT=false, org.apache.myfaces.ENABLE_CLIENT_SIDE_VALIDATION=true, org.apache.myfaces.SECRET=NzY1NDMyMTA=, org.apache.myfaces.VALIDATE=true, net.sf.jsfcomp.chartcreator.USE_CHARTLET=true, org.apache.myfaces.ALLOW_JAVASCRIPT=true, org.apache.myfaces.PRETTY_HTML=true, org.apache.myfaces.AUTO_SCROLL=true, javax.faces.STATE_SAVING_METHOD=server, org.apache.myfaces.redirectTracker.POLICY=org.apache.myfaces.custom.redirectTracker.policy.FullRedirectTrackPolicy, org.apache.myfaces.ADD_RESOURCE_CLASS=org.apache.myfaces.renderkit.html.util.DefaultAddResource}
06-Oct-2007 09:25:19 org.ajax4jsf.cache.LRUMapCacheFactory createCache
INFO: Creating LRUMap cache instance of default capacity
06-Oct-2007 09:25:19 org.ajax4jsf.cache.CacheManager getCacheFactory
INFO: Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
06-Oct-2007 09:25:19 org.ajax4jsf.cache.LRUMapCacheFactory createCache
INFO: Creating LRUMap cache instance using parameters: {org.apache.myfaces.CHECK_EXTENSIONS_FILTER=true, org.apache.myfaces.DETECT_JAVASCRIPT=false, org.apache.myfaces.ENABLE_CLIENT_SIDE_VALIDATION=true, org.apache.myfaces.SECRET=NzY1NDMyMTA=, org.apache.myfaces.VALIDATE=true, net.sf.jsfcomp.chartcreator.USE_CHARTLET=true, org.apache.myfaces.ALLOW_JAVASCRIPT=true, org.apache.myfaces.PRETTY_HTML=true, org.apache.myfaces.AUTO_SCROLL=true, javax.faces.STATE_SAVING_METHOD=server, org.apache.myfaces.redirectTracker.POLICY=org.apache.myfaces.custom.redirectTracker.policy.FullRedirectTrackPolicy, org.apache.myfaces.ADD_RESOURCE_CLASS=org.apache.myfaces.renderkit.html.util.DefaultAddResource}
06-Oct-2007 09:25:19 org.ajax4jsf.cache.LRUMapCacheFactory createCache
INFO: Creating LRUMap cache instance of default capacityI just said that it is not necessary to add something special to faces-config.xml in order to get JSF works in portlet environment. I successfully use JSF with WSP and JBoss Portal (MyFaces).
MyFaces has own implementation of bridge called MyFacesGenericPortlet while for Sun RI you have to use JSF Portlet Bridge. JSF Portlet bridge can be used with MyFaces as well.
Such a bridge invokes lifecycle.execute or lifecycle.render to execute JSF phases depending on request. So all phases or Render Response phase is invoked accordingly. -
Creating jsf faces-config.xml file
Hello.
I'm a newbee on Sun Java Studio Enterprice and have just converted from Borland Jbuilder.
In borland, if I create a new "webmodule" and include the jfs library, Borland automaticaly creates the faces-config.xml file for me. The IDE then helps me keep this file up to date.
After creating a new project in Sun Java Studio Enterprice I have gone into propereties and included the jsf-1_1_01.zip file (I googled jsf library and found this file. If I include this file I get access to the <h: -taglib etc so it seems to be working). But the IDE doesn't create the faces-config.xml file.
Do I need to create this manually or what do I do wrong?As an alternative to Creator (which mostly implies WYSIWYG editing of JSP pages) you can consider NetBeans 5.0 or NetBeans 5.5 Beta. They also support JSF.
-
Error when try to print faces-config.xml
Hello everybody.
I use Jdeveloper Studio Edition Version 10.1.3.3.0.4154 on Debian GNU/Linux 4.0 i386
with Sun JDK 1.5.0_10
I have an error when I try to print the faces-config.xml diagram.
The messages are BME-01604 and BME-99001. I have been restarted my Jdeveloper. But the error still.
Thank you,No solution, but a workaround. Try to publish the diagram. This creates a JPEG which you might be able to print.
I'd suggest that you file a Service Request on Metalink.oracle.com also.
--olaf -
Problem w.r.t. JSF 2.0 with faces-config.xml
Hi All,
I am trying to evaluate the features of JSF2.0.
For that, I have created a very simple application with "JSF 2.0.2".
There is a page that displays a composite component and some other form related components (inputtext, commandbutton).
When I deploy my application without any faces-config.xml file, everything renders perfectly fine.
When I deploy the app with faces-config.xml (even an empty one without any configuration), none of the components get rendered.
Only the html elements get displayed.
I need to define some navigation-rules in my config file. I am not sure how to go further from here.
The app server I am using for deploying my app is GlassFish(v3).
Any help or pointers towards solving my problem are highly appreciated.
You can find the xhtml file, etc of my project below.
Thank you,
With best regards,
Praveen
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>
faces-config.xml
<?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 xmlns="http://java.sun.com/JSF/Configuration">
</faces-config>
resources->acicomp->namesection.xhtml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
</composite:interface>
<composite:implementation>
<h:panelGroup>
<h:panelGrid columns="2">
<h:outputText value="Name: "/>
<h:inputText value="myName"/>
<h:outputText value="Company: "/>
<h:inputText value="myComp"/>
</h:panelGrid>
</h:panelGroup>
</composite:implementation>
</html>
index.xhtml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:aci="http://java.sun.com/jsf/composite/acicomp">
<h:head>
<title>JSF Test Program</title>
</h:head>
<h:body>
<p>My Simple Test Program</p>
<h:form id="testForm" >
<p>TEST</p>
<aci:namesection></aci:namesection>
<h:inputText id="username" value="John" />
<h:commandButton id="submit" action="response" value="Submit"/>
</h:form>
</h:body>
</html>I found the problem.
The dtd location of the faces-config.xml had to be changed. It was pointing to the schema of 1.1.
With the following faces-config.xml, my application worked perfectly fine.
<?xml version="1.0"?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
</faces-config> -
How to configure multiple jsp files with diff beans in faces-config.xml??
Hi All,
I have 2 seperate jsp pages one is a login page and the other is the main application page.Now i am handling both the pages with seperate Bean class with respective setter and getter methods.How can i state the same in faces-config.xml file???..
Is the below way correct???
<?xml version='1.0' encoding='UTF-8'?>
<!-- =========== FULL CONFIGURATION FILE ================================== -->
<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<managed-bean>
<managed-bean-name>LoginForm</managed-bean-name>
<managed-bean-class>useraccess.LoginForm</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/login.jsp</from-view-id>
<navigation-case>
<from-action>#{LoginForm.CheckValidUser}</from-action>
<from-outcome>success</from-outcome>
<to-view-id>/success.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-action>#{LoginForm.CheckValidUser}</from-action>
<from-outcome>fail</from-outcome>
<to-view-id>/fail.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>DSRApplication</managed-bean-name>
<managed-bean-class>DSRApplication.LoginForm</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/DSR.jsp</from-view-id>
<navigation-case>
<from-action>#{DSRApplication.checkValidDateInAllFields}</from-action>
<from-outcome>alldatasuccess</from-outcome>
<to-view-id>/success.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-action>#{DSRApplication.checkValidDateInAllFields}</from-action>
<from-outcome>datafail</from-outcome>
<to-view-id>/fail.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>Thanks in advance to all.
regards,
Viswanadh.Thanks ejp for the reply.
Since i am a beginner even i dont know the exact reason to answer you for why am i using JSP with Facelets.Kindly provide me the suggestion and valuable information you have so that i can learn.
Apart from this i want to know whether the way provided in that faces-config.xml is possible or do we have a way to make that possible???
regards,
Viswanadh. -
How to specify multiple message bundles in faces-config.xml
Hi
I have different properties file which I want to use as message bundle.
Message.properties
Help.properties
When I specify this in faces-config.xml
<application>
<message-bundle>/Message</message-bundle>
<message-bundle>/Help</message-bundle>
</application>
and now when I try to use that in my jsp page like this
<f:loadBundle basename="/Message" var="message"/>
<f:loadBundle basename="/Help" var="help"/>
and access any messagestring from those files I can not excess either of them. But when I use only one of them it works fine.
Am I doing something wrong or I can not do this thing at all??
Thanks in advance.I only specify one properties file in the <application> tag. That one is used for system messages. I have other properties files for labels, and another for just standard app text, so in my faces-config.xml I have something like this:
<application>
<message-bundle>message</message-bundle>
<locale-config>
<default-locale>en</default-locale>
</locale-config>
</application>
where my message.properties is used for system messages (validation, etc).
I don't list the other property files there. I have two more that I use, labels_en.properties, and standard_en.properties. Labels are words that have a : at the end or a *: for required fields. Standard are just other words that I use in my application. So on every page that I have, I start out with the following header:
<html>
<f:view locale="en_US">
<head>
<f:loadBundle basename="label" var="label"/>
<f:loadBundle basename="standard" var="standard"/>
<title>
..... -
I have many custom validators and do not need to see the default values as listed in the below screen shot:
http://i.imgur.com/xOQgxeZ.png
Is it possible to only show the custom validators I define within faces-config.xml?
Thanks,
WesDeepak,
don't understand this sentence:
"Do not specify the binding attribute value in the f:validator tag for the bindings not to display."
Wes,
The answer to the question seems to be "no" you cannot suppress the other validator entries as they too are configured in a faces config file - though not the one in the application
Frank -
Issue with faces-config.xml file
Hi,
I'm working on a project which needs more no. of JSF Pages and JSF Navigations,
But when i trying to creat pages more than 25 pages,the process becoming too slow,does this
effects the Application performance?Can any one suggest me why it happens and what are the
limitations for creating the JSF pages.
Does their any alternative to solve this Issue,I'm thing to create more faces-config.xml files as the
Jsf pages increases,does this solves?
Please suggest me.
Thank you,
Bandaru,Hi Bandaru,
Are you trying to use the visual diagram option of faces-config? Coz i encountered difficulties when using it with many pages (more than 40) and the faces-config.oxd_faces was no longer able to support the diagram. "Solution" was to use only the overview and the sources of the faces-config. I don't know exactly but my problems were caused by the faces-config.oxd_faces and i don't think it affects performances for the application.
For information, that was on a Jdev 10.1.3.0.4
Regards,
Tif -
Reference faces-config.xml file from java code.
I would like to reference the navigation rules I have set up in my faces-config.xml file from inside my source code.
For example:
Navigation Rule:
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>pricingEngine</from-outcome>
<to-view-id>/faces/template/t_pricing_engine.jsf</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
I would like do some sort of lookup by 'pricingEngine' and get '/faces/template/t_pricing_engine.jsf' back.
Any ideas?I would like to reference the navigation rules I have set up in my faces-config.xml file from inside my source code.
For example:
Navigation Rule:
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>pricingEngine</from-outcome>
<to-view-id>/faces/template/t_pricing_engine.jsf</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
I would like do some sort of lookup by 'pricingEngine' and get '/faces/template/t_pricing_engine.jsf' back.
Any ideas? -
Error message in adf-faces-config.xml file in myEclipse
hello,
i'm trying to customize appearance of my JSF/ADF Faces app (which worked fine until now), and tried to insert a adf-faces-config.xml file in my WEB-INF directory, this is it (copied from a tutorial) :
<?xml version="1.0"?>
<adf-faces-config xmlns="http://xmlns.oracle.com/adf/view/faces/config">
<!-- Enable debug output -->
<debug-output>true</debug-output>
<!-- Pick accessibility options based on a per-user managed bean -->
<accessibility-mode>#{user.accessibilityMode}</accessibility-mode>
<!-- A silly use of EL: English users get one appearance, -->
<!-- others get another -->
<skin-family>
#{view.locale.language=='en' ? 'minimal' : 'oracle'}
</skin-family>
</adf-faces-config>
after saving the file (in myEclipse) i get the following error message on the second line :
cvc-elt.1 : Cannot find the declaration of element 'adf-faces-config'
what does that mean and what should i do ?
thx...hello,
i'm trying to customize appearance of my JSF/ADF
Faces app (which worked fine until now), and tried to
insert a adf-faces-config.xml file in my WEB-INF
directory, this is it (copied from a tutorial) :
<?xml version="1.0"?>
<adf-faces-config
xmlns="http://xmlns.oracle.com/adf/view/faces/config">
<!-- Enable debug output -->
<debug-output>true</debug-output>
<!-- Pick accessibility options based on a per-user
managed bean -->
<accessibility-mode>#{user.accessibilityMode}</accessi
bility-mode>
<!-- A silly use of EL: English users get one
appearance, -->
<!-- others get another -->
<skin-family>
#{view.locale.language=='en' ? 'minimal' : 'oracle'}
</skin-family>
</adf-faces-config>
after saving the file (in myEclipse) i get the
following error message on the second line :
cvc-elt.1 : Cannot find the declaration of element
'adf-faces-config'
what does that mean and what should i do ?
thx...Hello again,
i'm still stuck with this, could somebody PLEASE give me a hint ?
thx,
dom. -
More than one faces-config.xml
hi!
i am working in a big team, and would like to create more than one faces-config.xml file.
is it possible? how?Yes!! You can create multiple faces-config.xml files.
Make changes in your deployment descriptor to include multiple faces config files:
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/config/faces-config-one.xml,
/WEB-INF/config/faces-config-two.xml,
/WEB-INF/config/faces-config-three.xml,
/WEB-INF/config/faces-config-four.xml</param-value>
</context-param>When there are too many modules, with many people working on the project simultaneously, having multiple faces config files makes it a lot more easier to manage.
Maybe you are looking for
-
Home directory is not being backed up in Time Machine
Problem: It turns out my home directory does not have any backups in Time Machine for the last year. I've never received any error message indicating it wasn't doing the full backup. Goal: I'd like to get Time Machine to back up my home folder (whic
-
How to handle Dynamic Fiscal calendar
Hi FolksWe have designed our cubes in such a way that the time dimension is actually split into 2 time dimensions "Fiscal Year" and "Fiscal Time". The "Fiscal Time" changes every four years, in that, it has an extra week. So usually the Month Februar
-
Oracle Data Guard: Physical and Logical
I have a Primary database and have created a Physical Standby on another node. The physical standby is kept in synch via REDO Aply - online redo logs. QUESTION: is it possible to create a Logical Standby off of the Physical Standby? I dont think so s
-
Strange behavior with Cisco AP and Intel 3945 wireles card
Hi, I have an interesting problem with an Intel 3945 A/G card, and my cisco APs. 1. Given: Cisco 1100 and 1200 AP running IOS 12.3.8-JEA Two laptop, one with Intel 2200 MPCI Card, the other with Intel 3945 MPCI Card Microsoft AD with IAS radius serve
-
IPhone No Service? But it says different on Coverage Map...
What's Up, So, I recently made the big switch to at&t from T-Mobile to get the exciting iPhone 3G. I made sure that before I got the at&t service that I could get service in my new area, using the coverage map on the att.com website. It showed the st