How faces-config with two resource bundle???

Hi all,
In my application,
I want to put several message bundle in faces-config.xml.
How can I do that?
I defined two message bundle like
<application>
<default-render-kit-id>oracle.adf.core</default-render-kit-id>
<message-bundle>com.resource1</message-bundle>
<message-bundle>com.resource2</message-bundle>
<locale-config>
<supported-locale>en</supported-locale>
</locale-config>
</application>
but the application cannot get messages in resource1 file.

Hi,
you need to load the bundles on the page
<f:loadBundle basename="Bundle" var="msg"/>
<f:loadBundle basename="Bundle2" var="msg2"/>
<af:outputText value="#{msg[\'message.key\']}"/>
<af:outputText value="#{msg2[\'message.key\']}"/>
Then you can use strings in both properties files. If you only need the strings of one file, delete the other reference
Frank

Similar Messages

  • How to merge two resource bundle values ?

    Hi All,
    JDev ver : 11.1.1.7
    I want to merge two resource bundle values.. How to do it ?
    like this #{expr ? str1 : str1 + str2}
    I tried like the one below and used some jstl fuctions... but no use not worked.. got some parse exception, compilation exception,etc..
      <af:outputText value="#{ row.accountName eq 'AccountName9' ? resource['LBL_WELC'] : resource['LBL_WELC'] + resource['LBL_HOME'] }"/>
    Let me know how to do this ?
    Regards,
    Gopi

    The above outputtext is an example, I may use diff bundle keys like below,
    <af:outputText value="#{ row.accountName eq 'AccountName9' ? resource['LBL_TEST'] : resource['LBL_KEY1'] + resource['LBL_KEY2'] }"/>
    The principle is the same
    <af:outputText value="#{ row.accountName eq 'AccountName9' ? resource['LBL_TEST'] : '' }#{ row.accountName eq 'AccountName9' ? '' : resource['LBL_KEY1'] }#{ row.accountName eq 'AccountName9' ? '' : resource['LBL_KEY2'] }"/>
    Dario

  • How to compare and edit Resource bundle file using java programe

    Hi All
    I have two resource bundle with key, value and some comments. I need to write a java code to compare both of the values of the keys and if the values are different then i want to replace the second value with the first value.
    Its a programe which will udpate the second file with the first file values.
    I tried using Properties class but it didnt worked because when i am saving the file using store method it removes all the comments and the order of text also got disturbed.
    How I need to do this any help appriciated.
    Please elt me know if someone needs more info.
    Thanks in advance.

    Let's assume the ini file is a mapping type storage (key=value) so lets use Properties object. (works with java 1.4 & up)
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Properties;
    public class Test {
         private static Properties props;
         public static void main(String[] args) throws IOException {
              File file = new File("test.ini");//This is out ini file
              props = new Properties();//Create the properties object
              read(file);//Read the ini file
              //Once we've populated the Properties object. set/add a property using the setProperty() method.
              props.setProperty("testing", "value");
              write(file);//Write to ini file
         public static void read(File file) throws IOException {
              FileInputStream fis = new FileInputStream(file);//Create a FileInputStream
              props.load(fis);//load the ini to the Properties file
              fis.close();//close
         public static void write(File file) throws IOException {
              FileOutputStream fos = new FileOutputStream(file);//Create a FileOutputStream
              props.store(fos, "");//write the Properties object values to our ini file
              fos.close();//close
    }

  • How to sync with two computers not at the same time, I'm registerd with one computer

    How to sync with two computers (not at the same time), I'm registered with one computer and am trying to connect with second computer with same iPhone. To sync the first time with the second PC "Firefox Sync Option tells me Create New account or Connect, when I connect it gives me a Passcode and on iPhone it also gives me a Passcode, than how do I connect? Both the iPhone and PC gives me a Passcode and have now idea what to do with them.
    Where do I find my Sync Key ? so I can install manually if it works ?

    Use the Sync Key ''(Recovery Key)'' from the PC that you used to initially setup your Firefox Sync service, when setting up that 2nd PC with Sync. You need to use '''Add a device''' to setup the 2nd and subsequent devices on a Sync account. <br />
    https://support.mozilla.com/en-US/kb/add-a-device-to-firefox-sync

  • Faces-config as file resource?

    Is it possible to use a faces configuration file stored on the server, instead of in the WEB-INF directory? I'd like to store some server specific settings in our dev and QA environments and have my JSF app look them up something like this:
    Web.xml
    <context-param>
            <param-name>javax.faces.CONFIG_FILES</param-name>
            <param-value>/WEB-INF/business-config.xml,
                /WEB-INF/correspondence-config.xml,
                /WEB-INF/insurance-config.xml,
                /WEB-INF/website-config.xml,
                file:C:\tomcat-5.5.17\conf\test-config.xml
            </param-value>
    </context-param>I've tried the above example and I received an error (ERROR - Faces config resource C:\tomcat-5.5.17\conf\test-config.xml not found).
    I'm sure that others have this requirement and I'm wondering how you managed it.
    Thanks

    You could store the faces-config file in the META-INF directory of a JAR file that is installed in the servers of the Dev/QA environments.

  • Two resource bundles: branding andlanguage

    I was asked to brand our Flex product. I already am using
    resource modules for language. That I got working. But I would also
    like a separate resource file for each product branding to specify
    items like a logo for instance where the logo is specified in the
    branding resource properties or a background image or a color and
    so on.
    Language startup is set with a passed in locale variable and
    changes as needed dynamically via user interaction and that I got.
    But branding would be something done once on launch but
    dynamically via some passed in variable which would select the
    resource bundle. Basically one build and not one for each branding.
    Does this make sense and how would I do it.

    Sorry about the duplicate post, but I got a reset message on
    posting and complied with it.

  • How to enumerate keys in Resource Bundle?

    Is there any way to enumerate all the keys (but not the values) of resource bundle?

    If rb is a ResourceBundle, you can enumerate the keys and values in its 'content' property with the following code:
    for (var key:String in rb.content)
        var value:* = rb.content[key];
    Gordon Smith
    Adobe Flex SDK Team

  • How to synchronise with two monitors

    Dear NI,
                      I have an application, for that i want to show the two different screens with different mesurement values. i am using CRT and LCD screens. in CRT screens i am running main vi in this screens i have configuration, testsettings, trendmill,and operator name etc. are displayed, i need  the seperate screens for to show measurement values to another screen. how , is it possible to do this?  can able to two diferent exe with diferent monitors? and how to synchronise two monitors for my application.
    Balaji DP
    Application Engineer,
    Gantner Instruments.
    Labview 8.5 Version
    Regards,
    Balaji DP

    Hi Balaji,
    So if you have an extended desktop across two monitors then I would say you had two options.
    1. Within one VI you could simple design the front panel in such a way that it extends across both screens with the relevant information in the right screen.  The fact that there are two monitors present is transparent to the applications.
    2. With two VIs there is a property for front panels to choose which monitor they are displayed on.  This is available by wiring a VI reference to a property node and selecting front panel window >> monitor.  You then enter an id for the monitor you want it to be displayed on, this is a numeric e.g. your primary monitor will be zero. You can see the property node help page here. 
    I hope this is the information you are after.
    Regards,
    James Mc
    ========
    CLA and cRIO Fanatic
    wiresmithtech.com/blog

  • How to use xliff as resource bundle ?

    I used to do Java i18n as following base on resource bundle in properties file format:
    Locale myLocale = new Locale("es", "ES");
    ResourceBundle bundle = ResourceBundle.getBundle("HelloResourceBundle", myLocale);
    System.out.println(bundle.getString("Hello"));I realized that there is new bundle called xliff like:
    <trans-unit id="Hello">
    <source>Hello how are you</source>
    <note>This is message to say hello</note>
    </trans-unit>Does java resource bundle support xliff file similar to properties file? if not, could anybody give an example how to handle xliff file?
    Thanks

    Following code worked for me:
    import oracle.javatools.resourcebundle.BundleFactory;
    import java.util.ResourceBundle;
    * This method retrieves localized strings from a given XLIF resource bundle.
    * @param bundleName The XLIF bundle from which the localized string is to be retrieved.
    * @param key The key of the localized string.
    * @return The localized string retrieved from the given XLIF bundle.
    public static String getXlifLocalizedString(String bundleName, String key) {
    if (StringUtils.isEmpty(key)) {
    return key;
    if (StringUtils.isEmpty(bundleName)) {
    return "[" + key + "]";
    String localizedString = null;
    ResourceBundle resourceBundle = null;
    try {
    resourceBundle = BundleFactory.getBundle(bundleName);
    localizedString = resourceBundle.getString(key);
    } catch (Exception e) {
    LOG.log(Level.SEVERE, "Problem in loading XLIF resource bundle: " + bundleName, e);
    return "[" + key + "]";
    return localizedString;
    }

  • Problem with refresh resource bundle...

    Hi Iam refreshing the resource bundle. Iam using the following code:
    hsModelServiceProvider.getInstance().setFallbackBindingContainerEL("");
    JhsModelService jhsService = JhsModelServiceProvider.getInstance().getJhsModelService();
    System.out.print("UserId is :"+userId);
    jhsService.getTransaction().executeCommand("begin APP_USER_CTXT_mgr.set_user('"+userId+"');end;");
    System.out.print("after execute command");;
    // refresh resource bundle
    MethodBinding refreshBundles = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{nls.refreshBundles}",new Class[] { ActionEvent.class});
    refreshBundles.invoke(FacesContext.getCurrentInstance(),new Object[] {null});
    Iam gettin the following error Upon executing
    ERROR (MessageFactory) -Failed to refresh bundle oracle.jheadstart.exception.JhsUserMessages due to null
    Please help me..
    Thanx in Advance!

    Hi Steven,
    I want to personalise the ADF Application depending the userpreference. I got a tutorial which uses JHeadstart(through refreshing the resource bundle) for the same, but I did not understand that clearly as I said Iam new to this. Can you please give me any sources which speak about the personalisation functionality in detail?
    Thanq

  • Problem with property resource bundles

    I use struts message resource to localize my jsp pages.
    struts message resources itself uses property resource bundles to
    accompolish its task.the problem arises when I try to
    print a message from resource bundle using:
    <bean:message bundle="messages_ir" key="label.username" />
    statement and my resource bundle file has a line like:
    label.username=\u0644\u0646 ,
    but it doesnot show the specified unicode characters. as i have understood it
    only uses the low order bytes in specifed unicdes (e.g \u0644=\u0044).
    plz help me!

    first did you try putting this at the top of the jsp page?
    <%
    page
    language="java"
    pageEncoding="utf-8"
    contentType="text/html;charset=utf-8"
    %>
    then, when using struts, you should also specify the locale:
    <html:html locale="true">
    </html:html>
    hope this helps

  • ChaRM config with two dev clients

    Hi Experts,
    Has anyone tried ChaRM with two dev clients, one for customizing and one for workbench, is it like adding two QA/prod systems?
    Please help.
    Thanks and Regards,
    Jamuna Nithyanandam

    Hi Jamuna,
    Like already mentioned, maintain 2 logical components in SMSY with the correct systems, and add these logical components to your Project.
    When in a Change Document (U.rgent or Normal Correction), the action 'Create Transport Request' is executed, a pop-up will be shown and people can select where they want to have the Transport created.
    Of course, SolMan will always show the two options - Workbench or Customizing Transport - when creating the Transport Request. So people need to pay attention that there are only creating WRKB in the WRKB-client and CUSTO in the CUSTO-client. As far as I know, this cannot be limited technically in SolMan.
    Good luck!
    Best regards,
    Roel

  • Help With Dynamic Resource Bundles

    Hi Guys,
    I have a task on hand for which i need help from experts like you.
    I need to create a Dynamic Resource Bundle and i know no head or tail about this.I have a very fair idea about the Dynamic Resource Bundles
    See I request you experts to give me a short brief on the same
    and also a sample application/Link/notes containing the same
    Your help on this is very much appreciated
    Thanks and Regards
    Mani

    Do you mean something like... ?
    public class MyDynamicResourceBundle extends ListResourceBundle {
        static Object[][] contents;
        static {
            contents = loadFromDatabase();
        private static Object[][] loadFromDatabase() {
             // ...load the table into an Object[][]...
        protected Object[][] getContents() {
            return contents;
    }..or you could really go to town by also making it a listener of the controller that updates the values in the database...
    public class MyDynamicResourceBundle extends ListResourceBundle implements MyDatabaseResourceListener {
        static Object[][] contents;
        static {
            contents = loadFromDatabase();
        private static Object[][] loadFromDatabase() {
             // ...load the table into an Object[][]...
        protected Object[][] getContents() {
            return contents;
       // implement the notional listener interface
       public onResourceChangeInDatabase() {
           contents = loadFromDatabase();
    }...erm, judiciously synchronized, of course...
    /k1

  • How to work with two schema

    Hi All,
    Now i am working In Like Schema Name ABC ,it's an live working schema.Now i want to create an Schema for test Application.if i insert data for test it should not reflect Schema ABC untill Value should insert into rtest Schema.How can i do this,.
    i want firstly i test my aplication with test data then my user run with his schema.
    How can i do this.
    Thanks

    This is a bad idea on so many levels - for one, if you are working from the same applications, any changes you make are potentially going to affect your user(s), which is not going to do your robustness or user acceptance any favours.
    Ideally, you would have at least two separate database instances - development and production, which would be set up the same. I appreciate that resources may not stretch to that.
    At worst, you should copy your application into another development schema on the same instance and make your changes in that - thereafter you can propagate changes to the application by copying over the old live instance with your state-of-the-art 'dev' version. NEVER NEVER NEVER make changes directly into the live version - you're only storing up more pain in the future.

  • How create page with two frame (google geocoding BSP)

    Hi all,
    can someone suggest me how create an BSP application with the main page composed by two frae?
    I've create a page with tags <htmlb> gridLayout for ape the frame structure and the result is fine.
    here the screenshot of what i've done:  http://img17.imageshack.us/img17/3558/bspgeolocalization.jpg
    But now i've to call the right page frame ( obviously in his frame) from the left page controller after pressing the 'search button'
    and passing to it a table.
    someone has an idea?
    Thanks in advance,
    Davide

    checkt his thread
    Web template keep loading/refreshing in BSP
    though the question is for different purpose, you can find the code for framed pages there

Maybe you are looking for