Text not updated when changing the ResourceBundle

this is an abstraction of what i have on my code:
controller
public class controller extends VBox{
     @FXML protected Label ex2;
     public CtrlMainMenu() throws Exception{
          FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/view/View.fxml"));
          fxmlLoader.setController(this);
          fxmlLoader.setRoot(this);
          fxmlLoader.setResources(CtrlLanguage.resource);
          fxmlLoader.load();
     @Override public void initialize(URL arg0, ResourceBundle arg1) {
          ex2.setText(arg1.getString("ex2"));
}View
<fx:root type="VBox" xmlns:fx="http://javafx.com/fxml">
     <children>
          <Label text="%ex1"/>
          <Label fx:id="ex2"/>
     <children>
</fx:root>Language controller
public class CtrlLanguage{
     private static String PATH =
          new File(
               CtrlImageLoader.class.getProtectionDomain().getCodeSource().getLocation().getPath()
          ).getParentFile().getPath() + "/language/";
     public static ResourceBundle resource;
     public static void setLanguage(String file) throws Exception{
          try {
               if(new File(PATH + file).exists())
                    resource = new PropertyResourceBundle(new FileInputStream(PATH + file));
               else
                    resource = new PropertyResourceBundle(CtrlLanguage.class.getResourceAsStream("/language/"+file));
          } catch (Exception e) {
               resource = new PropertyResourceBundle(CtrlLanguage.class.getResourceAsStream("/language/EN"));
     public static String get(String key){
          try {
               return resource.getString(key);
          } catch (Exception e) {
               return key;
}problem comes when I try to change the language without changing the current root
the elements of the view are not updated when the bundle is changed (CtrlLanguage.setLanguage("file");) until the root is changed/loaded again
is there any way so i can make the content change without having to reload again the root?

A method which returns an instance of the following class:
* A localizable read only property for internationalization of string properties.
* @author Christian Schudt
public final class LocalizableStringProperty extends ReadOnlyStringProperty {
    private String resourceKey;
    private StringProperty text;
    private String baseName;
    private ClassLoader classLoader;
    // Keep the listener as hard reference in the class, so that it won't get GCed, until this class has no references any more.
    private ChangeListener<Locale> changeListener;
    public LocalizableStringProperty(LocaleManager localeManager, String baseName, String resourceKey) {
        this(localeManager, baseName, resourceKey, null);
    public LocalizableStringProperty(LocaleManager localeManager, String baseName, String resourceKey, ClassLoader classLoader) {
        changeListener = new ChangeListener<Locale>() {
            @Override
            public void changed(ObservableValue<? extends Locale> observableValue, Locale locale, Locale locale1) {
                localeChanged(locale1);
        localeManager.localeProperty().addListener(new WeakChangeListener<Locale>(changeListener));
        this.baseName = baseName;
        this.classLoader = classLoader;
        this.resourceKey = resourceKey;
        text = new SimpleStringProperty();
        localeChanged(localeManager.getLocale());
    private void localeChanged(Locale locale) {
        ResourceBundle resourceBundle;
        Locale.setDefault(locale);
        if (classLoader == null) {
            resourceBundle = ResourceBundle.getBundle(baseName, locale);
        } else {
            resourceBundle = ResourceBundle.getBundle(baseName, locale, classLoader);
        text.set(resourceBundle.getString(resourceKey));
    @Override
    public String get() {
        return text.get();
    @Override
    public Object getBean() {
        return text.getBean();
    @Override
    public String getName() {
        return text.getName();
    @Override
    public void addListener(ChangeListener<? super String> changeListener) {
        text.addListener(changeListener);
    @Override
    public void removeListener(ChangeListener<? super String> changeListener) {
        text.removeListener(changeListener);
    @Override
    public void addListener(InvalidationListener invalidationListener) {
        text.addListener(invalidationListener);
    @Override
    public void removeListener(InvalidationListener invalidationListener) {
        text.removeListener(invalidationListener);
}

Similar Messages

  • Lighroom 5.4 Develop View does not update when changing sliders

    Just updated to Lightroom 5.4 (using Adobe CC) on Win8. After going to "develop view" on any photo and changing the exposure or any other slider does not update the main view of the photo. It does however update the thumbnail in the film strip and the second monitor window correctly. I've tried everything I can think of:
    (1) downgrading to LR 5.3 (which used to work)
    (2) forcing 1:1 and standard preview regeneration
    (3) uninstalling the re-installing Lightroom (both 5.3 and 5.4)
    (4) Optimizing catalogue
    (5) Removing the Adobe AppData folder
    (6) Creating a brand new catalogue with zero photos, importing a single photo and trying to change exposure/contrast on that
    None of these result in the develop view of the picture changing when I change the sliders.
    Do you guys have any experience with this?

    The chances of me suspecting monitor color profile causing bugs in LR was very slim. =)
    So were mine, especially when only the view itself doesn't work, but all other stuff works fine. Well, I probably have really not good colour profile, luckly you can change it after the lr is launched - it won't cause the problem untill next restart (at least works for me). And hopefully once my calibrator arrives lr will work ok with its colour profiles..

  • Materialo slip no not updating when creating the transfer posting(MB1B 313)

    Hi all
    I have a problem in  updating material slip no when creating the transfer posting(MB1B 313).
    when creating the MB1B if i put the mat slip no manually then system updating in the material doc.
    But when system creating the transfer posting(through auto Jobs) the material slip no not updating in the material doc.
    this is started to happen only after i deleted the condition records(ZDRL) for printing the doc for a relavent storage location.Kidly let me know is there any relation between ZDRL and the material slip updating.
    Thanks
    Manju

    hi krishan,
    Pl ensure that there is any release strategy, or in the transfer posting enter the plant and m.type also storage location in the application tool bar click with reference to PO, and enter the po number and try to proceed. it will work.
    Regards,
    nagarajan

  • Portal error -- page not found or not available when changed the datasource

    experts ...
    I am facing issue while changing the UME to LDAP.....
    With Java_ABAP_LDAP.xml the EP is running fine ..but when I am changing this config file to ...LDAP ..
    i.e. dataSourceConfiguration_iplanet_deep_readonly_db.xml I am getting the error ....when I logged with administrator user
    as page not found or not available.....
    I checked oss notes 939412 and 1140519 but no help..............
    Kindly suggest ASAP ..
    Thanks !!

    Hi Yogesh,
    While changing the xml to ldap, you need to change ldap server details also in the ldap server tab under ume configuration. And, also do the connection test using test connection button in the configuration screen.
    Regards,
    Sen

  • Showing Not Updated when reinstall the Same versio...

    Hi,
    After reinstall the Same version of N96's firmware using Nokia Software Updater, press *#0000#, and then Device Manager is opened, but I found the Latest Update in Device Manager shows Not Updated.
    Is this normal? whether the NSU updating normal or not?
    Thanks.
    ============
    RM-247 12.043
    Nokia N96
    Main in Thinland

    Even though the iPod shows as been connected, it might not have actually received a valid IP address via DHCP from your Wi-Fi access point or router.  Head to Settings -> Wi-Fi and tap the > next to the network you are connected. If 169.xxx.xxx.xxx is listed for an IP Address, then your iPod did not receive a valid IP address.  To correct this you can reboot your router by unplugging it from power for about 30 seconds.
    It wouldn't hurt to also reset your iPod.  To do this, press and hold both the Sleep/Wake and Home buttons together long enough for the Apple logo to appear.
    See here for more troubleshooting assistance.
    iOS: Troubleshooting Wi-Fi networks and connections
    B-rock

  • The Creator of an Assigned Tasks is not Updated when Changed from Mobile Device

    We have a Shared Mailbox where we create Tasks and assign them to the appropriate engineer. In Outlook, if they open and modify the assigned task, after they have accepted it of course, and then save it, a message is received in the Shared Mailbox with the
    update. When that is opened and closed, the task on the Shared Mailbox is updated.
    However, if that Task is updated on a mobile device, WP8.1 in this case, the creator does not get a new message with the changes.  If the assigned user looks at it in Outlook, he/she will see the changes.  But the originator never receives a message
    with the changes.
    Am I missing something or is this by design?  Thank you in advance for any assistance.

    Anyone?

  • JLabel text not updating when accessed by an Accessibility reader

    I'm using JAWS a Screen Reader package that takes advantage of the Accessibility within Java. The JAWS software reads the screen fine except after calling the setText() method of a JLabel. The new text is shown on the screen, but the JAWS software still reads the old text. When, I press the tab key in the JPanel the new text label is spoken correctly using JAWS.
    What would cause the screen to display the dynamic text, but a Screen Reader will still read an old value?
    Any help would be much appreciated.
    I am using JDK 1.4.02_03, AccessBridge 1.2, and JAWS 5.0

    I never found a solution to this. This was mainly due to the fact that the project has been put on hold temporarily. I will be returning to this project in the coming months and if I get anywhere I'll post my findings here.

  • Basic settings not sticky when changing the process version

    Yes, I understand that process 2010 will not use the same basic settings as 2012 as they have different adjustments but, If I make adjustments in 2012 and then try and see what 2010 would do  and then go back to 2012 the adjustments I previously made in 2012 are zeroed out?  I guess I'd like to be be able to see a compairson between the two processes so I can understand the differences between 2010 and 2012.

    Make a virtual copy....develop one using PV2010, the other using PV2012.

  • "you have rentals that have not expired" when changing the store.

    I download a free rental movie two days ago and after I watched few minutes and I delete the movie....
    It told me the rental will expire 48 hours later...
    and now, definitely 48h after that, it still told me that.
    and I just remove the rental by myself....

    Do you currently have an Apple ID with the US iTunes Store?
    If you are trying to create an Apple ID with the US iTunes Store, do you live in the U.S?

  • Why the PO action history is not updating when i perform the vacation rules

    Hi,
    Can any one explain why the action history is not updating when performed the vacation rules using the below example
    Example: A >B>C>D are in the approval hierarchy here I have defined the vacation rules by login to the user C here I selected the item type as “All” and delegated to D.
    Now the buyer “A” has sent the document for approval. The user “B” can successfully reserve funds and approved the document. Now the document is automatically delegated to D. Here D can open the document from open notifications and approved the document. Now when I checked the Action history here I cannot find the performed name D who has actually approved the document.
    Note:we are using the 11.5.10.2 version.
    The Action History in the following manner
    Seq Action Performed By
    ================================
    4 Approve C
    3 Forward B
    2 Reserved B
    1 Forward A
    0 Submit A
    From the above action history why the user D name is not showing. Can any one let me know ASAP?
    Regards,
    Keivn.
    Edited by: user10960960 on May 5, 2009 3:36 AM

    When you set up the vacation rule, if you simply delegate the ownership to D, then C retains the ownership and the approval occurs with C's limits. And hence D is treated as the approver.
    If you transfer the ownership, then C is out of the picture. The notification goes to D and when he/she approves, D's limits kick in and he will be seen as approver.
    Hope this helps,
    Sandeep Gandhi

  • Update weight and volume when changing the quantity

    Hello ALL,
    For some configurable items, those whose weight and volume depends on configuration, when changing the quantity at set level, weights and volumes are not calculated again and order item is saved with wrong data about weights and volume.
    when ever changing the quantity we will get a message - " Changing date/quantity may result in different BOM Please configure"
    if we do explicitly by clicking "Item Details Configuration' then Weight and Volume will get update automatically.
    my requirement is Weight and volume should get update automatically when changing the quantity with clicking on "Item Details Configuration'.
    could you provide any OSS notes available for this or any help to achieve this functionality.

    Dear Prathap Naidu P,
    Did you solve this issue?
    Because I have the same problem, and I was looking for hints.
    Thank you so much for any help.
    Best regards,
    J.Flanders

  • [Bug?] Defer Panel Update not working when changing scale property

    Hi,
    I found that Defer Panel Update [when True] does not work properly when changing the scale fit property of an intensity graph.
    Try the VI.
    When Defer Panel Update is True, and you change the Numeric controls, the Intensity graph is not updated (as expected).
    But now change the "Z Scale.Scale Fit" button and.... the Intensity graph is updated (only the Z-color, not the axis).
    This looks to be a bug to me!
    Nicolas
    Attachments:
    [Bug] Defer Panel Update not working when changing scale property.vi ‏27 KB

    Hi Nicolas,
    This indeed looks like a bug. I will do more research on it and file a bug report if it's not already filed.  Thank you for posting this information!
    Yi Y.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • HT4623 My daughter forgot her passcode for her 3GS, and iTunes will not let me change the passcode or even update.  Please help!!!

    My daughter forgot her passcode for her 3GS, and iTunes will not let me change the passcode or even update.  Please help!!!

    If You Are Locked Out Or Have Forgotten Your Passcode or Just Need to Restore Your Device
      1. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
      2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
      3. iOS- Understanding passcodes
         If you have forgotten your Restrictions code, then follow the instructions
         below but DO NOT restore any previous backup. If you do then you will
         simply be restoring the old Restrictions code you have forgotten. This
         same warning applies if you need to restore a clean system.
    A Complete Guide to Restore or Recover Your iDevice (if You Forget Your Passcode)
    If you need to restore your device or ff you cannot remember the passcode, then you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and re-sync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone, iPad and iPod touch software.
    Try restoring the iOS device if backing up and erasing all content and settings doesn't resolve the issue. Using iTunes to restore iOS devices is part of standard isolation troubleshooting. Restoring your device will delete all data and content, including songs, videos, contacts, photos, and calendar information, and will restore all settings to their factory condition.
    Before restoring your iOS device, Apple recommends that you either sync with iTunes to transfer any purchases you have made, or back up new data (data acquired after your last sync). If you have movie rentals on the device, see iTunes Store movie rental usage rights in the United States before restoring.
    Follow these steps to restore your device:
         1. Verify that you are using the latest version of iTunes before attempting to update.
         2. Connect your device to your computer.
         3. Select your iPhone, iPad, or iPod touch when it appears in iTunes under Devices.
         4. Select the Summary tab.
         5. Select the Restore option.
         6. When prompted to back up your settings before restoring, select the Back Up
             option (see in the image below). If you have just backed up the device, it is not
             necessary to create another.
         7. Select the Restore option when iTunes prompts you (as long as you've backed up,
             you should not have to worry about restoring your iOS device).
         8. When the restore process has completed, the device restarts and displays the Apple
             logo while starting up:
               After a restore, the iOS device displays the "Connect to iTunes" screen. For updating
              to iOS 5 or later, follow the steps in the iOS Setup Assistant. For earlier versions of
              iOS, keep your device connected until the "Connect to iTunes" screen goes away or
              you see "iPhone is activated."
         9. The final step is to restore your device from a previous backup. If you do not have a
              backup to restore, then restore as New.
    If you are restoring to fix a forgotten Restrictions Code or as a New device, then skip Step 9 and restore as New.

  • My apps are not being updated when pressing the update all button. It just says installing and no update is being done., my apps are not being updated when pressing the update all button. It just says installing and no update is being done.

    my apps are not being updated when pressing the update all button. It just says installing and no update is being done., my apps are not being updated when pressing the update all button. It just says installing and no update is being done.

    Must be serious because you have stated the problem 4 times now.
    Here are a number of things that you can try and maybe one of them will help.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    Make sure that you do not have a stalled download in iTunes - a song or podcast .... if you have a download in there that did not finish, complete that one first. Only one thing can download at a time on the iPad so that could be what is causing the problem.
    If that doesn't work - sign out of your account, restart the iPad and then sign in again.
    Settings>iTunes & App Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Go back to Settings>iTunes & App Store>Sign in and then try to update again. Tap one waiting icon only if necessary to start the download stream.
    You can also try deleting the waiting icons - tap and hold down on an icon until it wiggles - the tap the X on the icon to delete it. Then try to download again.
    You can try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your app preferences and device settings again.
    You can also try going to the App Store, find an app that needs an update, tap on the app icon to bring up the description page, then tap on install that way, rather than using the Update option from the app updates screen.
    And ... You can always install the updates in iTunes on your computer and then sync them to the iPad.

  • I deleted all Apps on iPad as they were associated with an out of date Apple ID and I could not update them, but the "App Store" logo still shows that there are 2 to be updated and when I go there I cannot delete. Please assist. Thanks.

    I deleted all Apps on iPad as they were associated with an out of date Apple ID (which I have forgotten the password) and I could not update them, but the "App Store" logo still shows that there are 2 to be updated and when I go there I cannot delete. Please assist. Thanks.

    Why don't you explain what happens when you try to delete these two apps that are showing that they need updates. You can only delete them if they are actually installEd on the iPad. Are they on the device?

Maybe you are looking for

  • IPod Updater Code problem? iTunes not connecting with iPod.

    There may be a problem with the iPod updater. I have a 15 GB iPod (JQ418QZLQQF) Updated iTunes to 5.0.1.4. Connected iPod. Got a window...told me to downloaded iPod Updater 9/23/05. Did it. Updated iPod. iTunes would start writing and then quit. Got

  • Missing Required Parameter 'from' for event 'open' -- InDesign CS3 Error

    Now that I've upgraded to OS 10.6, and I'm getting this weird error message (Missing Required Parameter 'from' for event 'open') when I open CERTAIN InDesign files by double-clicking on the icon. Other files open okay. Everything SEEMS to open okay w

  • Payment Means-General Entry

    Hi Guys, Can any one solve this issue regarding the Banking->Incoming Payments. In that i am Entering New record in Incomming payments in that Form ie Document Lines ie Document For Payments in that Matrix(Document Lines) some Data is their in that r

  • Incorrect date is being saved in excelsheet downloaded from ALV display

    Hi , When I use export to spreadsheet option in ALV display (function REUSE_ALV_DISPLAY )  then Delivery date 10.02.2011 is being saved as 402213(some number not date format) . Can you please suggest , what 's wrong in the report. Thanks in Advance.

  • Moving home folders of existing users

    Small office, 4 users so manual file moves or individual user settings updates arent a problem. My question is, how do I go about moving the home directories of our users from one hard drive to another? My thought is just copy their existing home fol