Properties in JSF

When initialize a property in a backing bean in the faces-config.xml archive, i have this exception when i acces de jsp page: initialize 'Can't get value from value reference expression ..."
Then, if i initialize all the properties to a default value, the page work correctly.
Is there another way to do this, or if i need to initialize one propertie, I must initialize all the properies in all backing bean????
Another question, why JSF don't take the values setting in the constructor's class ???
Thanks

You should post your code.

Similar Messages

  • Controlling page setup properties from JSF page

    Hi there :)
    How to control print properties like size,margins on left,right,top,bottom,header,footer etc in page setup through jsf page?
    Thanks in advance.
    Cheers.

    Not.

  • JSF 1.2 performance is not adequate

    Sun JSF developers...
    JSF 1.2 performance is not adequate.
    Here is a simple use case to prove:
    Render a table with ~100 columns and ~1000 rows (with facelets)
    (you could increase the numbers to stress test)
    using h:dataTable tag.
    You have to repeat h:column hundred times in XHTML (to create bigger
    UI component tree).
    Have a backing bean with 100 properties and JSF action which returns
    list of 1000 those beans.
    In this case there is no DB interaction, no back-end involved.
    Have your application set up with Ajax4Jsf (so it goes via its filter). You could
    also compare the results with and without it.
    Measure RENDER RESPONSE phase, and overall response time.
    Compare with JSP which renders same table from same bean.
    This is very simple test case to write and you will see that JSF in current state is really slow.
    This test could also be used to measure performance of new versions to see where they stand.
    It would be also interesting to see how render time grows with increase of
    number of columns (number of components in UI tree) (Is it linear or not?)
    How fast does it grow with the number of rows (Is it linear growth with increase of data size?)
    I believe this type of tests should be standardized before each release.
    Does JSF development team perform regular profiling of JSF RI java code?
    Running profiling for this use case could also reveal interesting things which
    could be improved.
    Regards,
    --MG                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    But you have done nothing here to determine if itscales linearly or not.
    See below.
    You increase number of columns (rows) and measure
    time.
    When you draw on a chart how time grows with increase
    in number of columns (rows) you will see if it linear
    or not.
    I understand how to determine the growth rate; I was merely pointing out that you have only claimed to run one test and one cannot determine the growth rate from that.
    It would be also interesting to see how render timegrows with increase of
    number of columns (number of components in UI tree)(Is it linear or not?)
    How fast does it grow with the number of rows (Isit linear growth with increase of data size?)
    Unless you are talking about spreadsheets I doubtthese apps are useful.
    They are very useful.I bet they would be more useful as native desktop apps.
    >
    But this is besides the point; my point is that thescenario of having a large number of components on a
    page does not occur often in real applications.
    Really? You are not serious?Yes I am serious. I can see we have different perspectives here.
    >
    A much more common performance scenario is highload.
    This is separate story. I'm talking about latency of
    loading one page.
    Please do not confuse latency and bandwidth.I am not talking about bandwidth but throughput.
    >
    BTW most of the web sites have small number of
    concurrent users,
    so the most common scenario is actually exactly
    opposite.
    Low load but complex pages with lots of components on
    them.Again, I can see we have different perspectives here. My experiences are the opposite.
    >
    So your results will be much more useful if youinclude a load test on a moderately sized page. I'm
    not dismissing your original test as invalid or
    useless.
    My results are more useful than what you are
    proposing, as they help to pinpoint the cause of
    latency. You could run my test with profiler and
    investigate the root cause of it.You do not need to increase the number of components on the page to numbers beyond practice in order to determine this. It is sufficient to run profilers on average pages many times and determine where the most time is spent. In fact, your approach may result in an implementation optimized for pages with a large number of components but not for pages with a lower number of components.
    >
    My point is that the user experience is not degradedby the performance but by the poor presentation of
    information. Many web browsers to not take kindly to
    such large tables as well.
    With JSF user experience is degraded by performance.I'd like to see your numbers and the code you used.
    JSF makes it easier
    to do nicer user presentation, but performance
    suffers to degree that it is not usable in number of
    cases.
    JSF inability to generate page fast on server side
    has nothing to do with browsers.Correct; but I was talking about pages with large tables in general and why they are a bad idea for web applications. A native application is more appropriate. But this is orthogonal to the purpose of this thread.
    >
    Again, you are missing the point. Perhaps JSFperformance differs between the application servers.
    A fair and useful test will determine that. I'm not
    talking about the relative performance vs JSP here.
    If JSF does things inefficiently in its code it will
    show consistently bad results
    across all app servers. Again my test is to detect
    and pinpoint JSF inefficiencies and not app servers
    ones.
    Don't you think JSF developers would want to look for
    it first rather than investigating why it perform
    badly on some particular app server because of
    its internal reasons.I'm approaching this from the perspective of a developer evaluating whether to use JSF and which application server to use. This is very useful from this point of view.
    As far as the JSF developers go, as I noted above one does not need to scale out the number of components on the page to determine performance bottlenecks in the implementation. An average case is more appropriate.
    Also, if you are going to compare JSF to other technologies you need to try a variety of platforms for both. Some application servers might do JSP better than others. If you limit yourself to one platform you run the risk that it is skewing the comparison one way or another.

  • JSF Internationalization in arabic

    Hi,
    i have to display JSF page in Arabic language
    I have stored properties file in arabic using UTF-8 character encoding
    and save properties file for eg messages_ar.properties
    But Jsf page is displaying garbage charaters in place of arabic value
    My JSF page contains:
    <%@ page contentType="text/html; charset=UTF-8" %>
    meta tag
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    and even set encoding on html as UTF-8
    but still no effect
    Please help me out its urgent
    Thanks
    akashikha

    Hi,
    Try this...
    when viewing in a browser, you could try setting the encoding (on the view menu normally) to arabic (ISO-8859-6).
    But I am not sure have you done it or not?
    Edited by: Sat@301177 on Feb 20, 2008 4:51 AM

  • Using Studio Enterprice to create JSF apps

    Hello,
    After reviewing the Sun Java studio creator it has been decided that we still wan't to use the Sun Java studio Enterprise as our IDE of choice. Now, I have created a simple jsp file with the following jsf code in it:
    -------- 8< ------
    <html>
    <f:view>
    <h:outputText value="Hello World" />
    </f:view>
    Simple enough. I have included the following libraries in project->properties->libraries:
    jsf.api.jar
    jsf-impl.jar
    And created a faces-config.xml in the WEB-INF folder that lookes like this:
    -------- 8< ----
    <?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>
    When I try to run the project using the Appl server 8.1 I get this error presented in my webbrowser:
    ---------- 8< -------
    javax.servlet.ServletException: Cannot find FacesContext
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:83)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
    Anyone that can help me figure this one out?

    Well, You are on the right track. The problem seemed to be associated with the web.xml and faces-config.xml (the later one is edited graphicaly with Borland).
    Now, Here is some example of web.xml and faces-config.xml that workes for me. Hope this helpes some newbees like me out there...
    web.xml
    ---------- 8< ---------
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <servlet>
    <servlet-name>FacesServlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>FacesServlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
    faces-config.xml
    --------------- 8< ---------------
    <?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>
    Managed beans and navigation rules goes goes between the faces-config> -tags of cource

  • How do you tell what version is running

    I have inherited a JSF project, and would like to find out what SUN RI version that I�m using. How do you tell? If I get properties on jsf-api.jar the modified date is May 17, 2006 and the Created date is Sept. 13 2006.

    Welcome to Apple community.
    Models
    1st generation
    2nd generation
    3rd generation
    3rd generation Rev A
    Release date(s)
    January 9, 2007
    September 1, 2010
    March 7, 2012
    January 28, 2013
    Discontinued
    September 1, 2010
    March 7, 2012
    March 10, 2013[69]
    In production
    Model Number - Model ID - Order Number
    A1218 - AppleTV1,1 - MA711LL/A
    A1378 - AppleTV2,1 - MC572LL/A
    A1427 - AppleTV3,1 - MD199LL/A
    A1469 - AppleTV3,2 - MD199LL/A

  • How to handle the error handling..its urgent

    hi guys...
    how to handle the Exception using jsf. for example...in java program we try to connect the server...if server not connect then the exception occur like java.net.ConnectException.. i have to handle exception using jsf and display related error page...plz give me ur valuable words..its need is very urgent..
    advance thanx and with regards
    DJ

    Hi,
    1. create a new error bundle (myErrMsg) // copy from javax/faces/Messages.properties in jsf-impl.jar
    2. declare this bundle in your faces-config
    <application>
    <message-bundle>bundle.MyErrMsg</message-bundle>
    <locale-config>
    <default-locale>en</default-locale>
    <supported-locale>de</supported-locale>
    <supported-locale>fr</supported-locale>
    </locale-config>
    </application>
    3. handle the Exception in your backing bean
    ResourceBundle bdle = ResourceBundle.getBundle("bundle.MyErrMsg",this.getLocale());
    context.addMessage(clientId, new FacesMessage(severity, bdle.getString(key), null));
    4. add the tag messages in your jsp
    <h:messages layout="table" errorClass="TextError" infoClass="Text"/>

  • What is commandButton.action, if not a method?

    Gosh, I'm learning a lot of interesting things. First, the UIComponent.getAttributes().put() method simply uses Java reflection to find the appropriate setXXX() property method of the UIComponent itself, making UIComponent.getAttributes().put(propertyName, propretyValue) equivalent to UIComponent.setProperty(propertyValue)!
    Second, UICommand.setAction only takes a method binding argument, meaning that UICommand.getAttributes().put("action", value) only accepts a method binding as well.
    So how does <commandButton action="value"> work for literal values? That is, if the action action XML attribute value isn't a method-binding reference but a literal string value, how does CommandButtonTag store this value in UICommand?
    Garret

    OK, you've got a distinction between "method-signature
    binding", which is what MethodBinding actually is,
    and your new "method-value binding", which JSF doesn't
    offer.Right, and right! (The latter is the answer to the rhetorical question, "If I can get a value from a property, why can't I get a value from a method call?")
    I don't see anything in your proposal that
    provides method-signature binding via a ValueBinding
    class, nor can I imagine how you'd elegantly provide
    that.I don't want to! The reason why it's important to make the distinction between method-signature binding and method-value binding is that they are two different animals, for two different purposes. Method-signature binding is already served quite well, as you point out, by the existing MethodBinding. The "value" we want is a pointer to the method itself, not the value it produces. As you can't use a JSF EL (or even an extended JSF EL) expression or a method call to return a method-signature binding, there's no reason for method-signature binding to be part of the ValueBinding<?> (or Expression<?> or whatever we call it) hierarchy at all.
    Take the actionListener attribute, for instance. The value of this attribute is a method---not the value a method produces. It says in essence, "here is the method I want JSF to call later when an event is produced." We don't specify method argument objects, because we don't know them. (I'd like to see the JSF EL syntax explicitly specify the parameter types, but that's a wholly separate issue that doesn't affect this discussion.)
    The UICommand.actionListener attribute is like a string or integer attribute that doesn't support property-value binding. In fact, MethodBinding is a type just like String or Integer, and if Java supported returning method bindings we could in fact have an Expression<MethodBinding> that allowed the method binding to be literally specified (as it is now) or returned as the value of a property or a method invocation. But the Java language doesn't know about method-signature bindings, so "actionListener", "valueChangeListener", "validator", and other method-signature binding attributes should remain as they are now, and allow only a single MethodBinding as the valid object (parsed from the literal string method signature value in the XML attribute).
    I'm also not sure you addressed what I meant by
    "shadowing"; in JSF, if a ValueBinding is set, and
    then a static value is set, the static value "shadows"
    the binding; if the static value is nulled out, the
    ValueBinding becomes active again.Oh, I'm sorry, I didn't understand what you meant by "shadowing." I had assumed that you meant the same thing Mann was talking about when he described using a ConstantMethodBinding adapter class to pretend to be a MethodBinding when in reality a literal value is being stored.
    Rather, you're talking about, for example, UIParameter.name, which allows both a value-binding expression to be set, or just a literal string which if set makes UIParameter ignore the value-binding expression. Frankly, I didn't know this was a benefit---I thought it was an undesired consequence of UIComponent wanting to support both literal values and property-value binding expressions, and having one of these hidden if you happened to set both. My proposal didn't have this (what I thought to be) schizophrenia, and I thought that was a good thing.
    If it turns out you want to shadow variables (can you tell me why you'd want to?), then that's easier under my proposal than it currently is in JSF. In my proposal the logic is encapsulated in the Expression<?>, not the UIComponent.
    First, just add an Expression<T>.setShadowedValue() to the base value-binding interface. Adding this to the interface I defined above gives us:
    public interface Expression<T> //the base ValueBinding I describe above
    public T getValue(final FacesContext context);
    public Class getType(FacesContext context);
    public String getExpressionString();
    public void setValue(T value);
    public void setShadowedValue(Expression<T> expression);
    }(Note that I also added Expression<T>.setValue(). A MethodValueBindingExpression<T>.setValue(), of course, will function exactly like a PropertyValueBindingExpression<T>.setValue() for a property that is read-only, as will a LiteralExpression<T>.)
    Now you can shadow property-value bindings with literal values to your heart's content. Better yet, you can also shadow method-value bindings with a literal value. Even better, you don't have to care whether it's a property-value binding or a method-value binding (or even a literal value!) that you're shadowing with your literal value. (Maybe your use case calls for literal values to disallow shadowing---in that case LiteralExpression<T>.setShadowedValue() would call LIteralExpression<T>.setValue(), or maybe just throw away the value, depending on how you want it to work.)
    But it gets better! Why only shadow with literal values---why not shadow with a property-value binding? Why not shadow a property-value binding with a method-value binding? All of this is allowed, because Expression<T>.setShadowedValue() excepts another Expression<T> as its parameter. (And if you're using generics, it's even type-safe.) The internal logic of setShadowedValue() and getValue() function exactly as the current UIComponent code does for any arbitrary attribute, except now it's more elegant, more powerful, and encapsulated in a single place. It should be identically efficient.
    This all assumes that we even want shadowing. I'm sure you have a compelling use case...
    BTW, I entirely agree about the inelegance and
    inefficiency of the standard coding pattern for
    retrieving properties in JSF UIComponent classes, and
    know that it calls out for a better underlying storage
    architecture. That's why we don't duplicate it in the
    ADF Faces code!Yeah, I'm sure there are several ways to get around this ugly mess, and I'm sure most of them use some sort of refactoring to put common code in some other place than within UIComponent. I happen to like my proposal, which uses polymorphism to remove the need for if(){}else{} when retrieving values, and makes everything self-consistent, type-safe, extensible, elegant, and efficient. I'm sure your solution is pretty good, too. ;)
    All this, built entirely on top of the existing JSF
    spec. It can be done.Oh, yes, we can do all sorts of things on top of the existing JSF spec. In fact, the entire architecture I've proposed can be adapted to plug into the existing JSF architecture. Here's what I've done:
    First, I've created the whole Expression<T> interface hierarchy, implemented by PropertyValueBindingExpression<T>, MethodValueBindingExpression<T>, and LiteralExpression<T> hierarchy I outlined above. Now I have a nice interface that allows me to access values without caring how they are represented.
    But some existing UIComponent attributes (e.g. UIParameter.value) only allow property-value bindings (ignoring shadowing for the moment). So I have an ExpressionValueBinding that wraps any expression and adapts it as a subclass of ValueBinding.
    Some existing UIComponent attributes (e.g. UICommand.action) only allow method-value bindings. (In fact, UICommand.action may be the only place where JSF uses a method-value binding---without realizing it) Similarly, I have an ExpressionMethodValueBinding that wraps any expression and adapts it as a subclass of MethodBinding.
    I can now plug any expression (whether literal, property-value binding, or method-value binding) into any relevant exiting JSF component attribute, and things work---well and elegantly. It should be obvious by now that the mere fact that I can do this cries out that property-value binding, method-value binding, and literal values might as well have the same interface to begin with.
    Cheers,
    Garret

  • How to add properties to a custom JSF component?

    Hello, everybody!
    I've just developed my first custom JSF component. It's a data pager and it is working pretty well. But now I want to be able to use some of it attributes in my backing beans at runtime. I mean, I want to bind it to component in the JSF page. It already has a binding attribute in the tld file, but I want to be able to accesss two values that the renderer of my custom component calculate inside it, which would relieve me from calculating these values manually in the backing beans. So, I would like to know how to make these values external to the component.
    By now this is my custom pager class:
    import javax.faces.component.UICommand;
    public class UIPaginadorDados extends UICommand
    }You can see that it has no logic because all the logic is in the renderer class:
    import javax.faces.render.Renderer;
    public class PaginadorDadosRenderer extends Renderer
        // logic here
    }As I said I want to be able to do the following in my backing beans:
    private UIPaginadorDados pager = new UIPaginadorDados();
    // and later...
    pager.getCurrentPage();
    pager.getPageCount();In the JSF page:
    // I already can do this, because I have a binding attribute
    <urca:paginadorDados binding="#{backingBean.pager}" />I suppose that I'll have to create the properties getCurrentPage() and getPageCount() in the component class, UIPaginadorDados, but I don't know how to get the values to the properties from the renderer class. I don't even know if this is how I should do it.
    So I would appreciate a lot your help about this subject.
    Thank you.
    Marcos

    Marcos_AntonioPS wrote:
    RaymondDeCampo wrote:
    I neglected to mention: do not forget to implement the methods in StateHolder to preserve the properties you added to your component.Hello, Raymond. Could you elaborate a little more on that? If you could give a short example, it would be helpful.
    MarcosNo problem. I have already found out how.
    Thank you very much, Raymond.
    Marcos

  • Why won't rich symbol properties show when the .jsf file exists?

    In FW CS4 I've created a rich symbol via the "create symbol script" command, then I reloaded my common library, and put the symbol from common librray on a page.  Even though I have a .jsf file in C:\Documents and Settings\<user>Application Data\Adobe\Fireworks CS4\Common Library\Custom Symbols to match my symbol, there are no symbol properties available for it on my page.
    I can use the create symbol script command again on this symbol & it comes up with the same properties I had already defined.
    What would stop symbol properties from showing up when the symbol is taken from a recently reloaded Common Library & placed on a page?
    I've discovered that I can see the properties when I use this symbol in a totally brand new Fireworks file, but I can't in an existing file that ever had that same symbol before, even when I tell FW to "Replace the existing item."
    Below is my jsf file contents.
    Thanks!
    5
    title,textChars,Title,Title;
    outline,visible,Active%20window%3F,true;
    win%5Fmin%5Fbtn,visible,Min%20btn%20visible%20%28not%20modal%29%3F,true;
    win%5Fmax%5Fbtn,visible,Max%20btn%20visible%20%28not%20Modal%29%3F,true;
    background,fillColor,fillColor,%23ffffff;
    function setDefaultValues()
        var values = new Array();
        values.push({ name:"Title", type:"text", value:"Title" });
        values.push({ name:"Active window?", type:"boolean", value:"true" });
        values.push({ name:"Min btn visible (not modal)?", type:"boolean", value:"true" });
        values.push({ name:"Max btn visible (not Modal)?", type:"boolean", value:"true" });
        values.push({ name:"fillColor", type:"color", value:"#ffffff" });
        Widget.elem.customData["currentValues"] = values;
    function applyCurrentValues()
        var values = Widget.elem.customData["currentValues"];
        Widget.GetObjectByName("title").textChars = values[0].value;
        Widget.GetObjectByName("outline").visible = values[1].value;
        Widget.GetObjectByName("win_min_btn").visible = values[2].value;
        Widget.GetObjectByName("win_max_btn").visible = values[3].value;
        Widget.GetObjectByName("background").pathAttributes.fillColor = values[4].value;
    switch (Widget.opCode)
        case 1: setDefaultValues();   break;
        case 2: applyCurrentValues(); break;
    Message was edited by: oic.now

    Solution Found:  I had to explicitly delete the existing copy in my orginal FW file even though when I used the one from the common library I told it to "Replace the existing item"  I guess the replace doesn't really work for rich symbols.  After I deleted the symbol with the same name from the document library & pulled in the one from Common Library, it showed its rich symbol properties.

  • JSF 2.0 and 'Target Unreachable' with nested bean properties

    Hi people,
    I know that JSF 1.x were not able to created objects for intermediate properties and that it was necessary to create 'y' in 'x.y.z' when 'x' was a managed bean and you wanted to create a new 'y' and set it's 'z'.
    My question is: does JSF 2.0 somehow fix this? I'm coming from the Stripes world where this is all done automagically and it's a pretty addictive thing. I'm evaluating JSF and this is so far the first major drawback I see -- in case it can't be done.
    If this isn't possible, what is the best practice for creating the object? @PostConstruct on the managed bean? if (y == null) ... in getY() ?

    You could define an instance Y in the same scope as 'x' and then inject it into 'x' as a managed property. This is probably dead simple using annotations. It wouldn't be hard with the XML either, just verbose.
    If you really want it to be magical, you could create an implementation of javax.el.ELResolver that creates intermediate properties when you need them. Perhaps one already exists; perhaps the Stripes code has one.

  • How to link the messages.properties to a jsf project?

    Hi,
    I have a messages.properties in a package mypackage under the jsf project src folder.
    In faces-config I added the messages bundle. In the jsp page I have the following line:
    <f:loadBundle basename="mypackage.messages" var="msg" />
    but eclipse complains that it cannot find the resource bundle in the classpath.
    Thanks,
    Sonia

    sun_sonia wrote:
    It was a mistake on my part. the page itself was created somewhere else. I recreated the page in the project and the error is gone. Sorry. But I learned something. You are saying that the messages bundle in faces-config is different from the one I specify in the jsp page?
    My messages bundle just has static text.Then get rid of the definition in faces-config. It is meant to override default JSF validation/conversion/etc error messages. If you don't have anything overridden in your bundle, it will only add unnecessary overhead in looking up the messages. Your bundle is to be defined in f:loadBundle. Nothing more needs to be done.

  • JSF Message.Properties

    I am trying to use a message properties file in my jsf page, to display headings ect. But it gives an error >
    org.apache.jasper.JasperException: Can't find bundle for base name bundle.Messages, locale en_US
    I put my Message.properties file in my folder \webapps\jsf\bundle,
    and in the properties file I got test=helle there.
    In my JSF page i do the following >
    <f:loadBundle basename="bundle.Messages" var="Message"/>
    <h:outputText value="#{Message.test}" />,
    what i am doing wrong.
    thanks

    Are you trying to A) customize JSF's messages, or B) create your own custom message bundle?
    To customize the JSF messages:
    1) Create your .properties file "Example.properties" and put it in WEB-INF/classes.
    2) Override JSF's default messages by putting key/value pairs in Example.properties. For example:
         javax.faces.component.UIInput.REQUIRED=Required field3) Tell your JSF app to load Example.properties by putting the following in faces-config.xml:
    <faces-config>
      <application>
        <message-bundle>GridManagerResources</message-bundle>
      </application>
    </faces-config>See this link for details. A list of keys for JSF messages is at the bottom:
    http://developers.sun.com/prodtech/javatools/jscreator/reference/themes/jsf/custommessage.html
    To create and use your own custom message bundle, see
    http://www.laliluna.de/javaserver-faces-message-resource-bundle-tutorial.html
    HTH,
    Scott

  • Externalizing the Properties file in JSF

    Hi,
    I want to access a properties file located in "C:\" drive in JSF.
    In case if i move the file to some "D:\" location, only changing its path
    should work for me. Is there anyway of externalizing the properties file
    rather than keeping it in WEB-INF?
    Thanks in advance

    It depends on how the code is written.
    I assume you're calling the files using the ResourceBundle.getResourceBundle method: if you do this during the initialization (server startup) you need just to restart the ejb module to make it re-read the files.
    I'm quite in a similar situation (WAS4, lots of .properties)and every time I make some changes to my files I need to restart the applications in order to make them read such modifications.
    In no case you should redeploy the ejb module (if this is the case, there must be something wrong somewhere else...)
    bye

  • JSF and XML propertie File instead DOTpropertie File

    Hello
    I'll would like to load resources in JSF (<f:loadBundle>)
    Coming out by a xml File instead a .propertie File.
    I've got no problem get resources stored in .properties
    I try to change the files. Al I get is a exception throw by
    org.apache.myfaces.taglib.core.LoadBundleTag resolveBundle
    Resource bundle 'com.webapp.navigation.' could not be found.
    Where did I find some information about?
    Where is it to configure?
    The Servletcontainer is Tomcat.
    Thank You
    esion
    .

    Thank You,
    it's realy a good idea to rtfm :-)
    esion

Maybe you are looking for

  • MSI GE60 2PL Cooling Question

    Hi there, I just bought a MSI GE60 Apache-629 Laptop. I Never owned a MSI Laptop but I am Very Satisfied so Far. Even though it doesn't have the NVidia GTX 860m , like the Apache Pro, I can Still Run Battlefield 4 on Medium Spec in 1920x1080. My Ques

  • 10.4.8 followed by wireless might mouse = no keyboard?

    For everyones info, I installed 10.4.8 minutes before I installed my new wireless Mighty Mouse (sw v1.3) and then by the next reboot the (PC) keyboard that I have running though a usb hub stopped working. As with many problems I've read about before,

  • Faults, lies and broken promises....

    hi not the first time you've all heard this sort of thing i'm sure, i'm going to tell you anyway... i have had an intermittent fault on my line (crackling, distortion and dropped broadband) at various times for several years. it got really bad last d

  • Siri and iOS 6 Apple Store language

    Hello, As Brazilian user, I have an Apple ID related with my own language (Portuguese). After install IOS6 on my iPad third generation when I turn Siri on, the language of Apple store is changed to English. That's a bug that need to be fix. I know Si

  • Does the new 7.1.1 Itunes update have a firmware update for the 3G?

    Hello, I downloaded the new i-tunes update, does it have a firmware update for the I-phone 3G? and if so can anyone tell what it is? and what bugs it fix's? Thanks....