Message bundle, replace default "Required" message in ADF faces

Hello,
I hope i can ask some ADF faces questions here,
I am trying to replace the default msg that adf faces give for different components
I successfully created a resource properties file which includes 2 msgs, one is to replace the default value given to required msg, and other is just a msg i will use for one of my buttons.
oracle.adf.view.faces.UIXEditableValue.REQUIRED=Enter number please
button_name=Submit
I specify this bundle in my application node in my faces config file.
I also load it with loadbudle component in the page that i want to use it.
now i can call my second msg "button_name" fine from with in the page, so I know that I have my file set up correctly,
but the first msg, which is the key for the required msg, does not work
em i missing something??
is there a different setup when trying to override msgs.
Thank you

I found a solution,
I hope there is a better one,
What i did is a got the source for ADF faces found the XML file where all the msgs are located (MessageBundle.xrts). Then using a tool that comes with the source files XRTSMakeBundle, I compiled the XML file, and it created java files with all the msgs. So I compiled them and replaced the classes in the ADF faces api jar.
this seems like a long work around, in JSF RI, all you have to do is extend the key in the resource bundle and poof it works, I couldn't get that working here.
This works, seems like a lot of work for a simple task!!!
any other solutions out there????

Similar Messages

  • Default required message customisation

    Dear Friends,
    Is it possible to change the default required message "You must enter value" to customised one in the entity level itself.
    At the same time, Component hyperlink also should get display.
    version iam working is 11.1.1.3.0
    Kindly tell me the solution.
    Regards,
    Lakshmar.B

    Hi,
    You can do it by creating your own message bundle which extends ListResourceBundle and adding the bundle entry in trinidad-skin xml file. Sample code is given below.
    *<bundle-name>view.resources.MyMessageBundle</bundle-name>*
    Add your message for the respective message key as like the below one
    *@Override*
    *public Object[][] getContents() {*
    *return new Object[][] {*
    *{"org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED", "A value is required."},*
    *{"org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED_detail", "You must enter a value."},....*
    Refer http://technology.amis.nl/blog/7127/adf-skinning-and-resources-2*
    Regards,
    vijhaykrishnaa

  • How much memory and CPU requirement to deploy  ADF Faces application ?

    Hi All,
    Is there any formula or docs to help me to determine how much memory and CPU requirement for IAS server, to deploy ADF Faces application ?
    How much memory / CPU GHz required per 1 user ?
    We plan to develope web based ERP application using ADF Faces and ADF BC.
    Pleasssee.. give me any aclue.. I need it so badly..
    Thank you for your help,
    xtanto

    xtanto,
    there is no formular for this. Note that it is not only ADF Faces but th emodel layer in particular that adds to this requirement.
    Frank

  • Message bundle always loading default bundle???

    I have propertly created message bundle properties file. But I have problem in situation when I use example:
    <h:commandLink value="#{bundle.sLogout}" styleClass="HeaderLoginText"
    action="#{page.logout}" rendered="#{page.logged}"/>
    in this case my application always first show values from default properties file, example from messages.properties. But this was happend only then I start page for first time, then I change language, example click on button which set viewRoot on some other language, application shows correct values.
    What can be problem?
    Thanks for any sugestion!

    I found a solution,
    I hope there is a better one,
    What i did is a got the source for ADF faces found the XML file where all the msgs are located (MessageBundle.xrts). Then using a tool that comes with the source files XRTSMakeBundle, I compiled the XML file, and it created java files with all the msgs. So I compiled them and replaced the classes in the ADF faces api jar.
    this seems like a long work around, in JSF RI, all you have to do is extend the key in the resource bundle and poof it works, I couldn't get that working here.
    This works, seems like a lot of work for a simple task!!!
    any other solutions out there????
    I am considering not to use ADF faces, i think i will use my faces with jsf-comp client java script, as that was one of the reason i wanted to use ADF faces.

  • Problem with Message bundle using more than one project

    Hi:
    I'm not sure about if i'm doing something wrong or maybe could be a bug in JDeveloper 9.0.2....
    I have three projects: A Project_A with BC4J packages (controlling BC4J entitties, views and AM's. In order words, only controlling the business rules side); a Project_B with a JClient programs using the AM's defined in Project_A and; a Project_C with a JSP_UIX using the AM's defined in Project_A.
    Everything works fine....until i note Message bundle is not working in Project_B and Project_C (not show my customizing message errors), only works fine in Project_A (using the AM tester because i don't control the client side here).
    How can i solve the problem?
    Regards.
    Marco

    I have the same project structure.
    My purpose is to have a different message bundle for JClient app and Struts/ADF app.
    When I register following customized message bundle in the common model project:
    public class CustomBC4JExceptionBundle extends ListResourceBundle {
    private static final Object[][] sMessageStrings = new String[][] {
    { CSMessageBundle.EXC_VAL_ATTR_MANDATORY, "This field is required" },
    protected Object[][] getContents() {
    return sMessageStrings;
    I get the message in both JClient and Struts app.
    But when I register that bundle in the 2 "client" projects and remove this custom bundle from my model project.
    I get the original message in my Struts app and not the message above.
    Question howto set up a different customized bundle for JClient project and Web project based on same model project in same application?
    Thanks
    Fred

  • Application message bundle

    I'm setting up an application level message bundle to handle error messages as described in other threads. I have a question about validator messages and the insertion of maximum and minimum field values. I've seen these examples and I have the following assumptions:
    {0} and {1}, these are for numeric range values
    '{0}', this is for numbers
    "{0}", this is for Strings
    So, If I put these in my messages (listed below) am I safe to assume that jsf will replace them with the appropriate values?
    Thanks!
    javax.faces.component.UIInput.REQUIRED=Please enter a value
    javax.faces.validator.NOT_IN_RANGE=Please enter a value between {0} and {1}
    javax.faces.validator.DoubleRangeValidator.MAXIMUM=Please enter a value less than '{0}'
    javax.faces.validator.LongRangeValidator.MAXIMUM=Please enter a value less than '{0}'
    javax.faces.validator.DoubleRangeValidator.MINIMUM=Please enter a value greater than '{0}'
    javax.faces.validator.LongRangeValidator.MINIMUM=Please enter a value greater than '{0}'
    javax.faces.validator.LengthValidator.MAXIMUM=Please enter a value less than "{0}" characters
    javax.faces.validator.LengthValidator.MINIMUM=Please enter a value greater than "{0}" characters

    I don't know about the quotation marks and all, seems to print strings just fine for me when I leave the quotes out.
    {0}, {1}, {2}, ..., {n} represent array indexes. You'll need a message factory to properly create messages that input the appropriate array elements in the right message spots.
    If you don't use the message factory, you'll simply get the message character for character. i.e. "Please enter a value between {0} and {1}"
    To create a MessageFactory, just copy the one JSF uses internally. You can find it in the javax.faces.component package (in the jsf-api.jar file).
    To get a proper message out of the factory, call it using the getMessage() method. Something like this:
         FacesMessage msg = MessageFactory.getMessage(context,
              "javax.faces.validator.NOT_IN_RANGE", new Object[] {new Integer(1), new Integer(5)});This will return a FacesMessage that contains this message:
    "Please enter a value between 1 and 5"
    Hope this helps,
    CowKing

  • Validation messages in JSF (when not using ADF faces)

    I've spent some time with JDeveloper 11 and would like to use it on an upcoming project. I have to target IE 6, so I won't be able to take advantage of ADF Faces. Instead I'd like to use the ADF Business Components with a standard JSF interface so it can be used by people still running IE 6.
    I've created a Business Component from a database table and can bind a JSF HTML Creation Form by dragging the appropriate view from the AppModule in the Data Controls pane. However, when I attempt to submit the page without all the fields being valid I get the following validation error message:
    j_id__ctru2:j_id__ctru6: Validation Error: Value is required. j_id__ctru2:j_id__ctru6: Validation Error: Value is required.
    I've tried making this more descriptive, but editing the error message in the Validation Rules section of the Business Component has no effect. What's the best way to convey a meaningful validation message to the user when not using ADF Faces?
    Also - I'm still very new to JDeveloper. Since I won't be able to rely on my users having Internet Explorer 7, would you recommend I stay with JDeveloper 10? The examples and documentation I've seen so far for JDeveloper 11 appear heavily biased towards using ADF Faces so I'm starting to wonder how much support is there for using plain old JSF.
    Thanks for your time!

    Hi,
    if you are completely new to this then I suggest to use JDeveloper 10.1.3 and ADF Faces in there. Its good to use with IE6 as well. Currently we do have more tutorials available for this release than for 11, which for this reason is a better choice for someone new to this
    Frank

  • ADF-Faces: AdfFacesFilter has not been installed  ....but it is!?

    Hello,
    I know this sounds like already discussed but my case is a little different.
    I have got two web applications, one for testing that just contains ADF-Faces and the other one is the actual project with ADF-Faces, Spring(JSF variable resolver), SessionListener, Filter ec.
    In the actual project I get (after first call a faces url) the logging message:
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl verifyFilterIsInstalled
    WARNUNG: The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    In the test project with the same ADF-Faces configuration(but only ADF-Faces, no Spring, other Filter or Listener...) in web.xml and faces-config.xml I do not get this message and trees etc. are rendered fine.
    My questions: Could there be a conflict with Spring framework or is there any other pitfall?
    If I comment out SessionListener Counter or LoginFilter, the warning message remains.
    I like to use ADF-Faces but cannot see what's the problem here? Please help.
    Thank You,
    Florian
    Using: ADF-Faces EA19 (adf-faces-api-ea19.jar, adf-faces-impl-ea19.jar, adfshare.jar)
    ########### WEB.XML
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app 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"
    version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <display-name>Prototype</display-name>
    <description>Prototype</description>
    <!-- Context Parameter: Use client-side state saving -->
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <!-- Context Parameter: Spring's application context -->
         <context-param>
              <param-name>contextConfigLocation</param-name>
              <param-value>/WEB-INF/daoContext.xml /WEB-INF/serviceContext.xml</param-value>
         </context-param> -->
    <!-- ADF-Filter -->
    <filter>
    <filter-name>adfFaces</filter-name>
    <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>
    <!-- Filter Mapping ADF-Faces -->
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <servlet-name>faces</servlet-name>
    </filter-mapping>
    <!-- Login-Filter -->
    <filter>
    <filter-name>loginFilter</filter-name>
    <display-name>Login Filter</display-name>
    <filter-class>com.company.web.filter.LoginFilter</filter-class>
    <init-param>
    <param-name>forwardPage</param-name>
    <param-value>/index.jsp</param-value>
    </init-param>
    </filter>
    <!-- Filter Mapping Login-->
    <filter-mapping>
    <filter-name>loginFilter</filter-name>
    <url-pattern>/faces/pages/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>loginFilter</filter-name>
    <url-pattern>/pages/*</url-pattern>
    </filter-mapping>
    <!-- Servlets -->
    <!-- Servlet JSF Impl -->
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- Servlet ADF -->
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
    </servlet>
    <!-- Servlet Mapping Faces -->
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <!-- Servlet Mapping ADF-Resources -->
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <!--MIME Mapping -->
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <!-- Welcome Files -->
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <!-- Spring Context Listener -->
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <!-- Session Counter Listener -->
    <listener>
    <listener-class>com.company.web.listener.SessionCounter</listener-class>
    </listener>
    <!-- Taglibs -->
    <taglib>
    <taglib-uri>http://www.pickert.de/jrqm</taglib-uri>
    <taglib-location>/WEB-INF/tld/jRQM.tld</taglib-location>
    </taglib>
    <!-- Session timeout in minutes -->
    <session-config>
    <session-timeout>1</session-timeout>
    </session-config>
    </web-app>
    ############### FACES-CONFIG.XML
    <?xml version="1.0" encoding="windows-1252"?>
    <!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">
    <application>
    <default-render-kit-id>oracle.adf.core</default-render-kit-id>
    <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
    </application>
    </faces-config>

    Can you elaborate what you fixed? I'm running into the same message with a similar setup.
    Thanks,
    Ken

  • Change the default noscript message in ADF faces

    Hi, I'm developing an application using ADF faces, and i've noticed that all my pages have a <noscript>This page uses JavaScript and requires a JavaScript enabled browser.Your browser is not JavaScript enabled.</noscript>
    Is there a way to change this default message to something more useful? or maybe even styling the message

    i'm leaning towards that thought myself.. i was kind of hoping that maybe there was some default bundle i could add a magic property that would overwrite the default:(

  • ADF FACES: af:messages does'nt display label with resource bundles

    Hi,
    There is a problem with the af:messages component and error messages containing labels (such as Value is Required error message for required fields).
    If I have an af:inputText with it's label property refering to a resource bundle loaded using the f:loadBundle action, when the Value is Required message is displayed, I get "" for the field name.
    If I replace the label property with a constant value or with an expression refering to a managed bean property, then the label is properly displayed in the error message.
    I suspect this has to do as to when the action of getting the label is done. Maybe the bundle is not availlable at that time. Anyway, this is a bummer as it mean that we cannot use the f:loadBundle action to load resource bundles.
    This happen with AE11. I have not tested this with EA12.

    Thank's!
    I'll try EA12 when I have the time.
    I also found that in our JSPs, we've put the f:loadBundle ouside of the f:view tag. I'll fix that in our codebase.
    While researching a fix, I found out that using a managed bean (which implement Map interface) to load the bundle based on the name refered in the expression language is a lot more intuitive and allow for an easier management of the different resource bundle than the f:loadBundle tag.
    Basically, our EL expression are now #{bundles.bundleName.property} we replace any "_" in bundleName with "." and then lookup this name as a ResourceBundle with the locale of the view. We keep the managed bean in the request scope it remember each bundle it loaded.
    We could have done it with a custom VariableResolver. Maybe a future release of the JSF spec could provide a standard variable name that would implement the same behaviour. This way, one does not have to load each bundles before hand and only the bundles accessed by the JSP will be loaded.

  • Assign message bundle jdeveloper oracle adf entity

    how do you assign a message bundle in jdeveloper 10g for an oracle adf entity

    When you open the entity dialog, select a attribute, open the control hints tab and add some labels, formats, tooltips, JDev creates a messagebundle for you in the common package. Same for the viewobject dialog.
    hth, Markus

  • 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>
    .....

  • Localized Data Model Message Bundle

    When you use the Validations in the Entity Objects of a data model and you place text for the text, errors, etc...it creates a MsgBundle for that class. Then for other languages you can create additional message bundle (e.g. MsgBundle_it, for italian) files for additional languages.
    My question is how does the data model layer find the locale for the user? So when it issues a data model validation error, how does it know to use the italian version instead of the default, english one?
    Also, I should add that I don't have access to the FacesContext and my Data Model project cannot be dependant on the ViewController object. So I cannot get the locale in the same fashion that I'm doing for my applications (i.e. get translated text for adf faces messages).
    Message was edited by:
    Kerri

    Hi Heri,
    the system behavior is correct. The account in company code consists of three entity types:
    1) COA - Chart of Accounts (Type 3)
    2) ACCOUNT - Account (A-Segment, related to ECC table SKA1, Type 1)
    3) ACCCCDET - Account in Company Code (B-Segment, releated to ECC table SKB1, Type 1).
    3) includes 1) and 2) whereas 2) includes 1). If you grant authorization only for 3) but not for 1) and 2), you cannot do anything.
    Best regards
    Michael

  • Generator Locales and Entity Message Bundles

    I'm using 7 different languages within my application and have set the Internationalization entries within the JHeadstart Application Definition Editor to use a propertyFile and I have supplied all the relevant generator locales. That is all working fine. My confusion now lies with the generation of MsgBundles when creating validation rules on an entity attribute. On doing that a EntityImplMsgBundle java class is created but only for the default locale.
    1. Is there an easy way to generate the different localised entity MsgBundles
    2. better still, how can I change the entity validation to use my JHeadstart generarted property files rather than a MsgBundle java class ? I thought I may be able to copy the rule name and message over to my properties file and then delete the MsgBundle but I can't seem to delete the MsgBundle
    Many thanks for your help. Cheers,
    Brent

    Brent,
    1. No, you have to manually create those files
    2. Not possible either, even if you do not use declarative validation but do it in code and throw a JboException, the message bundle must be a java class.
    I believe that in JDev 11, you can have centralized resource bundles, like in JHeadstart.
    You might try the JDev forum for better alternatives though, since these are really ADF BC specific issues.
    Steven Davelaar,
    JHeadstart team,

  • Override Default Error Messages

    Hi,
    We are using ADF components and want to override the default error handling mechanism. The requirement to be precise, whenever we validate an input text for mandatory, we get the default error message which shows us a cross, displays "Error: A value is required" and then our message which we specified in the requiredMessageDetail. Our requirement is that on validation the system should display only our message, both on the <af:message and <af:messages level.
    Can someone please suggest a way of ovveriding the default behaviour of ADF Errors.
    Thanks and Regards,
    Lilly

    hi all,
    I got the solution for this
    please refer the link below
    Customize ADF component Skin
    thanks
    dhiraj

Maybe you are looking for

  • An editable region, how to keep text formatting?

    Hello fellas. Is there any way to keep the text formatting when I paste it into my edible region of the template? Every time I attempt it - dreamweaver gives me message " making this change would require code change which is locked by a template". Th

  • How can I use a firewire hard drive on a new Macbook with one USB-C only?

    How can I use a firewire hard drive on a new MacBook with only one USB-C?

  • JsessionID Cross Site Sccripting Bug

    Hacker Safe Found the following cross site scripting issue on our server. index.cfm?CFID=6766970&CFTOKEN=32892658&jsessionid=4c3035dcfc2d1 f43303b%3F%3E%22%3E%3Cscript%3Ealert%28123%29%3C%2Fscript%3 E%3C%22%3 D1 The Global protect is on, and the patc

  • Embarrassing Excuse for an "app"

    Does Adobe even read these boards or look at the hundreds of 1 star reviews in App World? This app is awful and gives Adobe a bad name.  What is the point of this app if it does NOTHING but reads the PDF (unless it is password protected or is fillabl

  • Formatting a External Hard Drive

    How do you format a External Hardive to use on a Mac? Any Help would be appreciated. Thanks G