Moving message bundle (i18n) to another package within NetBeans...

Hi,
I'm using the NetBeans GUI builder (matisse) to create an internationalized (i18n) swing application.
My bundle properties file (which contains all the internationalized labels and so on) is located in a package on the classpath. Now I want to move the bundle to another package - can this be done in an easy (automatic) fashion throughout the IDE because a lot of java classes (forms) use the bundle.
BTW, find and replace within the editor does not work because all the gui building stuff is marked as protected and cannot be edited and editing each label separately with the internationalization wizard would take me hours...
Any help would be greatly appreciated
- Stephan

Of course... but my java files would need some refactoring because there is a lot of code like that...
setTitle(java.util.ResourceBundle.getBundle("
    com/foo/bar/bundle/Messages").getString("frame1.title"));.. which refers to a message bundle in the specified package - when I move the message bundle to another package all the references in the java files (like the example above) have to be updated.
Unfortunately 'Find and Replace' in the editor doesn't work because it is generated gui code and marked as protected.
So is there a possibility to automatically update all the references in the java files?
Thanks a lot
- Stephan

Similar Messages

  • Argh! Message bundle file names are not allowed to have dots???

    It took me several hours to find the reason for this exception:
    java.util.MissingResourceException: Can't find bundle for base name properties\com.domain.prj.huj.MainApp.Messages, locale de_DE
         at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
         at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
         at java.util.ResourceBundle.getBundle(ResourceBundle.java:538)If the message bundle name contains dots (package separators), this exception is thrown! When I remove the dots, it works. But even the javadoc for ResourceBundle.getBundle() says that the baseName parameter is " the base name of the resource bundle, a fully qualified class name ".
    Is it not possible to have the message bundle file names containing dots (i.e. package declarations with class names)?

    Nope. Periods are used to delimit packages in the basename. So given:
    "com.domain.prj.huj.MainApp.Messages",
    ResourceBundle will look for "com/domain/prj/hui/MainApp/Message[_local][.class|.properties]" on the class path (ie, in jars etc).
    I've just had to implement an alternate RB factory to deal with legacy property files which contain periods. If you are starting from scratch, don't put in periods.

  • After enabling iCloud, the calendar on my MacBook shows a window stating "moving calendar to server account. Then a box appears saying "server responded with an error message 403. Then another box shows "couldn't move calendar to iCloud, an error occurrre

    After enabling iCloud, the calendar on my MacBook shows a window stating "moving calendar to server account. Then a box appears saying "server responded with an error message 403. Then another box shows "couldn't move calendar to iCloud, an error occurrre

    iCloud's Calendar is full of errors and problems for me.  The "Couldn't move your calendars to iCloud because an error occurred" is now gone (by itself) but nothing syncs between my Mac's Calendar to iCloud or my iPhone to iCloud.
    I tried creating a new event directly on iCloud.com to see whether it pushes to any of my device and  got this "This event couldn't be created because of a server error; please try again." error.
    Apple, please fix this!!

  • Every time I move emails from the inbox to another mailbox, then click on any mailbox, and then go back to the inbox, the moved messages have returned to the inbox

    Every time I move emails from the inbox to another mailbox, then click on any mailbox (the emails are there fine), and then go back to the inbox, the moved messages have returned to the inbox. I have moved them out of the inbox to other mailboxes again and again, but then they keep showing up in the inbox again as soon as I click on any mailbox other than the inbox. Very frustrating.
    This has only happened since I installed Mavericks on both my Macbook Pro and my iMac. It happens on both of them.
    Any ideas how to fix it?
    peter

    This may be one of the known issues with Gmail and it's IMAP settings working with Maverick's Mail.
    It all comes down to if you have the ALL MAIL folder visible or not via IMAP.
    If you do not, then you get the behavior you are describing.
    If you do have ALL MAIL visible, then there isn't a problem.
    Odd, I know.
    Anyway, check out this article on Wired which describes the problem and work around. You may have to click on the NEXT button at the top of the window to advance to the proper gallery image that describes this issue:
    http://www.wired.com/gadgetlab/2013/10/mavericks-issues-and-fixes/#slideid-23460 1

  • Can we call an ODI package from another ODI package within same Project?

    hi All,
    Can we call an ODI package from another ODI package within same Project?

    What you can do is get all the interfaces on the old package that you want to be included in the new package. This way, the new package will have the exact code from the old package.Or generate a scenario out of your ("old") package and drag&drop the scenario in the "new" package.
    That seems easier to me, because you can re-use the scenario as often as you want.
    But you have to take care: If you change your original ("old") package, you have to regenerate the scenario, otherwise the changes do not affect the scenario.
    Edited by: h_elmu_t on 02.07.2009 08:50

  • How to access Message bundle from beans??

    Greetings i am new to JSF.
    I want to access my message bundle from beans, anyone could tell me how to do it?
    Also, i need my beans to obtain the url address of my servlet automatically, how can i do that?
    Thanks for any help!

    Another alternative if using the <f:loadBundle> tag within your JSP is to do something like the following in your bean logic:
    In a JSP:
    <f:loadBundle basename="Resources" var="messages"/>
    In Bean:
    ExternalContext extContext = FacesContext.getCurrentInstance().getExternalContext();
    // Obtains the Map containing the key/value pairs loaded by the loadBundle tag
    Map messages = (Map) extContext.getRequestMap().get("messages");
    As to the second question, I'm assuming you want the URL that invoked the current request? If so, look at ExternalContext.getRequestPathInfo() and ExternalContext.getRequestServletPath().

  • Bundle phone , BB, TV package or not to bundle

    Hi All Newbie here
    I am looking to cut costs on my packages with BT (where I can)
    I currently have Unlimited weekend plan + BB Option 2 (40GB) which is 22.50 + line rental monthly currently 14.60 
    advanced changes brings this to 111:30 
    I also have BT vision which by the way suits me fine and I pay 12.50a month (different account)
    I called BT today as I am not in contract with the phone and Broadband to see what they can do
    the agent said that he would need to see if they could bundle vision in the package and give me a better deal
    I'm still waiting for him to get back to me with an offer.
    My question is for those in the know is it better to bundle it all together or keep it the way it is and get a better deal on the broadband and phone plan. and is Talk Talk any better?

    Certainly shop around if you'd be happy moving suppliers for a few quid. With the bundling it doesn't really matter, if you went to another supplier for broadband your vision would stop working (ONLY) works with BT broadband.
    if your happy with the price let them do what they need to with your account. You'd be recontrating both the tv and broadband for 12 months

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

  • Can I call a function in another package?

    Dear all,
    Can I call a function in another package?
    Say I have package A, and package B.
    Is it possible for me to call a function in inside package A, within a function inside package B?
    If yes, what's the syntax.
    Thanks in advance!

    The variable in the calling package that will receive the value of the function in the other package needs to be defined based on that type in the other package directly:
    sql>create or replace package pkg_a
      2  is
      3    type testTable is table of varchar2(10) index by binary_integer;
      4 
      5    function f_a return testTable;
      6  end;
      7  /
    Package created.
    sql>create or replace package body pkg_a
      2  is
      3    function f_a
      4      return testTable
      5    is
      6      v_table testTable;
      7    begin
      8      v_table(1) := 'One';
      9      v_table(2) := 'Two';
    10      return v_table;
    11    end; 
    12  end;
    13  /
    Package body created.
    sql>create or replace package pkg_b
      2  is
      3    procedure p_b;
      4  end; 
      5  /
    Package created.
    sql>create or replace package body pkg_b
      2  is
      3    procedure p_b
      4    is
      5      v_table pkg_a.testTable;  -- this variable has to be based on the type in pkg_a
      6    begin
      7      v_table := pkg_a.f_a;
      8      for i in 1..v_table.count loop
      9        dbms_output.put_line( v_table(i) );
    10      end loop;
    11    end;
    12  end; 
    13  /
    Package body created.
    sql>exec pkg_b.p_b
    One
    Two
    PL/SQL procedure successfully completed.

  • HT1349 Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.

    Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.
    Would appreciate help...its driving me up the wall!!

    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • When I try to install icloud on my laptop running windows 7 home premieum I get message saying the windows installer package wont complete as a program run as part of setup did not finish as expected   the install then rolls back   I have tried  rein

    when I try to install icloud on my laptop running windows 7 home premieum I get message saying the windows installer package wont complete as a program run as part of setup did not finish as expected   the install then rolls back   I have tried  reinstall   deleting files signing on with another account etc  nothing works   I have read this is an apple programing problem  if so is there a fix  I need iclouds  thanks

    This other discussion may help: Re: how do I install icloud

  • Message bundles accessed from JSF and JSP pages

    Hello, everybody!
    I'm developing a localized JSF application. It is working pretty well until now.
    These are my message files:
    mensagens.properties
    mensagens_en_US.propertiesThis is how they're configured in faces-config.xml:
    <application>
        <resource-bundle>
            <base-name>br.urca.www.biblioteca.web.mensagens</base-name>
            <var>msg</var>
        </resource-bundle>
    </application>And this is how I access the messages in a page:
    <h:outputText value="#{msg.titulo}" />Nothing new until now. But now there was a need for me to have a raw jsp page in
    my web application. This page is displaying ok but I also need to access the
    message bundles as I'm able to access in the normal jsp with the JSF components.
    As you should know I can't use something like the above code with an +<h:outputText>+
    to access the messages because this is a JSF component and I'll not be able to use
    JSF components with this raw jsp page.
    So, my question is: how do I access my localized messages from a raw jsp page? I
    suppose there should be a way to do this, but unfortunately I started programming
    to the web world in Java with JSF, not JSP, so I don't know how to do this with
    JSP.
    Thank you very much.
    Marcos

    BalusC wrote:
    Just include [jstl-1.2.jar|https://maven-repository.dev.java.net/repository/jstl/jars/] in your classpath and define the fmt taglib in your JSP. Nothing more is needed.
    Hello, BalusC. Thank you for your help. We're almost there. After I have included the jstl-1.2.jar you provided me I can use the fmt tag and access message bundles from my raw jsp page (even though I had to provide other message bundles instead of the ones that I use in the other jsf pages, but it's better than nothing).
    Now there just on problem to be fixed. The jsp page is not aware when I change the locale of my application. I change this locale in a jsf page.
    I have this component:
    <h:selectOneMenu value="#{pesquisaAcervo.idiomaAplicacao}"
        valueChangeListener="# {pesquisaAcervo.idiomaAplicacaoMudado}" onchange="submit();">
        <f:selectItems value="#{pesquisaAcervo.idiomasAplicacao}" />
    </h:selectOneMenu>that calls this event in my backing bean class:
    public void idiomaAplicacaoMudado(ValueChangeEvent e)
        fIdiomaAplicacao.liberarItens();
        Idioma idioma = Idioma.deString(e.getNewValue().toString());
        // This line is for JSF
        FacesContext.getCurrentInstance().getViewRoot().setLocale(idioma.localidade());
        // This line is for Tiles
        FacesContext.getCurrentInstance().getExternalContext().getSessionMap().
            put(org.apache.tiles.locale.impl.DefaultLocaleResolver.LOCALE_KEY, idioma.localidade());
    }So, do I have to include another line in the idiomaAplicacaoMudado event above in order for the jsp page load the correct resource bundle? Or what else do I have to do?
    Thank you.
    Marcos

  • Instantiating a class from another package

    Hi,
    I have two packages, say "framework" and "impl" -
    framework package (framework.jar)
    - contains base classes
    - contains factories to instantiate concrete classes
    - bundled in <product>.ear
    impl package (impl.jar)
    - contains implementation(concrete) classes
    - compile time dependency on framework.jar
    - bundled in <product>.ear
    I could successfully compiled and build <product>.ear which contains both the jars. The ear gets deployed successfully.
    PROBLEM
    Now, whenever a factory class (part of framework package) tries to instantitate an impl class (part of impl package) using -
    Class.forName(impl.ConcreteClassName OR fully_qualified_concrete_class_name).newInstance();
    It throws "classNotFoundException". It is not able to locate the concrete class.
    So, my question is how can i instantiate a class using its fully qualified name(package.classname) from another package ?
    Thanks.

    909219 wrote:
    PROBLEM
    Now, whenever a factory class (part of framework package) tries to instantitate an impl class (part of impl package) using -
    Class.forName(impl.ConcreteClassName OR fully_qualified_concrete_class_name).newInstance();
    It throws "classNotFoundException". It is not able to locate the concrete class.This sound like a classpath problem. Check your ear's manifest.
    BTW:
    Shouldn't the framework better use ServiceRegistry to load implementations?
    bye
    TPD

  • Message bundle Please help !

    Hey Im trying to make the message bundle
      <application>
            <message-bundle>webadmin.MyErrors</message-bundle>
        </application>I would like to make another file "MyErrors2 and have it switch based on a variable in the controller.. is that possible?

    You might be able to do it using the fact that ResourceBundles may be actual classes; i.e. they do not have to be properties files.
    But, I am inclined to ask what is the problem you are trying to solve? I suspect you may be down the wrong path. Be broad in your description of the problem.

  • Error starting Acrobat X Pro: ...You need to deactivate another computer within 32767 days to use

    The serial number xxxxxxx...  is already in use by the maximum allowed computers. You need to deactivate another computer within 32767 days to use this product.
    Installed CS6 Design Std (which included Acro X Pro) from DVD.  All the apps work except for Acrobat, which gives the above error.  The s/n in the error is different from the s/n used for installing Design Std.  Per support, fully uninstalled Design Std and any other Acrobat related s/w, then ran a "cleaner" that they provided.  Reinstalled CS6 Design Std from DVD ... same problem.  Already wasted over 4 hours on Adobe support chat.
    Thanks.

    This suggestion from Adobe Tech Support did NOT work either...
    Thank you for contacting Adobe Technical Support.
    I understand that you are unable to activate Acrobat X Pro.
    From the error message it seems like Acrobat is taking the standalone serial number and not from the suite.
    Have you tried uninstalling only Acrobat and reinstall it from the CS6 suite? If not, then please perform uninstall Acrobat and reinstall it as trial.
    Once the reinstallation is completed, first launch a product from CS6 like Photoshop and then launch Acrobat X and check if it works.

Maybe you are looking for

  • Open directory, network homes and MS Word

    We are running OS X & Server 10.4.8, and Word 11.2. Using network home directories, with 15users and 3 of them are portable. Running Open directory wih LDAPv3, SSL, SMB and AFP for the network homes (?). When one of the portable users try to save his

  • Uninstall older versions of Flash Player?

    I just installed the latest update for Flash Player...can I now uninstall older versions?

  • How to transfer videos to iphone

    how can i transfer the videos from my laptop to my iphone

  • Currency translation using 2 infoobjects as time reference ?

    Hello , I have a simple requirement i want to use fiscyear/period as time reference in RSCUR. but in the aggregation level on which my Query is based , i only have fiscyear & posting period. & i cant add any more char to my query/agggregation level.

  • Date overlap - sequence split

    my source will be like this ID               START DT     END DT             A     B     C     D AAAA     01/01/1968     01/01/1997     Y     N     N     N AAAA     01/01/1968     01/01/1999     N     Y     N     N AAAA     01/01/1988     01/01/1997