Some bidirectional binding not works

Hello!
Maybe I do something wrong, but bidirectional binding in thic simple code not works properly.
package simple;
import javafx.application.Application;
import javafx.scene.GroupBuilder;
import javafx.scene.Scene;
import javafx.scene.SceneBuilder;
import javafx.scene.control.CheckBox;
import javafx.scene.control.CheckBoxBuilder;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class BiDiBug extends Application {
  CheckBox checkBoxResizable;
  public static void main(String[] args) {
    Application.launch(args);
  @Override
  public void start(Stage stage) {
     stage.setResizable(true);
    Scene scene  = SceneBuilder.create()
      .width(200)
      .height(100)
      .fill(Color.TRANSPARENT)
      .root(
        GroupBuilder.create()
             .children(
                checkBoxResizable = CheckBoxBuilder.create()
                  .selected(stage.isResizable())
                  .text("Is Stage resizable")
                  .build()
              .build()
       .build();
    checkBoxResizable.selectedProperty()
            .bindBidirectional(stage.resizableProperty());
    // This code not works too:
    //stage.resizableProperty()
    //          .bindBidirectional(checkBoxResizable.selectedProperty());
    stage.setScene(scene);
    stage.show();
}Is it bug or feature?

The binding seems to work, in the sense that stage.resizable gets updated accordingly. Try adding the following:
    stage.resizableProperty().addListener(new ChangeListener<Boolean>() {
      @Override
      public void changed(ObservableValue<? extends Boolean> observable,
          Boolean oldValue, Boolean newValue) {
        System.out.printf("stage.resizable changed from %s to %s%n", oldValue, newValue);
    });and you'll see that the resizable property does indeed change when you check/uncheck the checkbox.
On my setup (Mac OSX 10.7.5), under JavaFX 2.2.7, JDK 1.7.0_17, I observe the same behavior as you: the resize behavior of the stage does not correspond to the value of its property. The [url http://docs.oracle.com/javafx/2/api/javafx/stage/Stage.html#resizableProperty]Javadocs for stage.resizable do say "This is a hint which allows the implementation to optionally make the Stage resizable by the user." So in fairness, there is no guarantee given that changing this value will have the desired effect.
Interestingly, under JavaFX 8, JDK 1.8.0 (early access, b80), your code works. However, the Javadocs for the stage.resizableProperty() in JavaFX 8 additionally state
>
Warning: Since 8.0 the property cannot be bound and will throw RuntimeException on an attempt to do so. This is because the setting of resizable is asynchronous on some systems or generally might be set by the system / window manager.
so while bindBidirectional(...) seems to work, bind(...) does indeed throw a RuntimeException.
Given all that, I would not try to bind to the resizable property at all. If you only need unidirectional binding, Shakir's solution above will work. If you genuinely need bidirectional binding (for example, if the stage's resizable property might be changed elsewhere in the application, and you need the checkbox to update accordingly), you can "do it by hand":
    checkBoxResizable.selectedProperty().addListener(new ChangeListener<Boolean>() {
      @Override
      public void changed(ObservableValue<? extends Boolean> obs,
          Boolean oldValue, Boolean newValue) {
        if (stage.isResizable() != newValue.booleanValue()) {
          stage.setResizable(newValue);
    stage.resizableProperty().addListener(new ChangeListener<Boolean>() {
      @Override
      public void changed(ObservableValue<? extends Boolean> obs,
          Boolean oldValue, Boolean newValue) {
        if (checkBoxResizable.isSelected() != newValue.booleanValue()) {
          checkBoxResizable.setSelected(newValue);
    }); which seems to work in all versions (again, on my system).

Similar Messages

  • I want to reset my ipod touch 4th gen but i have forgotten the restrictions passcode and for some reason its not working on my laptop on itunes and the restore thing wont work! any help?

    I want to reset my ipod touch 4th gen but i have forgotten the restrictions passcode and for some reason its not working on my laptop on itunes and the restore thing wont work! any help?

    Make sure you have the Current Version of iTunes Installed on your computer
    iTunes free download from www.itunes.com/download
    Then See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    After you have Recovered your Device...Re-Sync your Content
    Note:
    To remove a forgotten Restrictions passcode you will need to  Restore the Device as New...
    OR... From a Backup created Before the Restrictions Code was set....

  • Some Widget does not work after latest upgrade

    Today is July 23rd, 2011. By recent latest upgrade, mainly for supporting Lion, where I am still using Snow Leopard 10.6.8, some widget does not work, including Battery Meter, Digital Clock Alarm, Victoria Digital Clock, etc.
    By the way, my company use Chatter and I installed Chatter Desktop. Again, after recent upgrade, it no longer work anymore.
    Do you experience the same problem?
    For those who has upgraded to Lion, do you also find some widget does not work?

    I have read a couple of complaints like that, but not sure it's widespread.
    At this point I think you should get Applejack...
    http://www.macupdate.com/info.php/id/15667/applejack
    After installing, reboot holding down CMD+s, (+s), then when the DOS like prompt shows, type in...
    applejack AUTO
    Then let it do all 6 of it's things.
    At least it'll eliminate some questions if it doesn't fix it.
    The 6 things it does are...
    Correct any Disk problems.
    Repair Permissions.
    Clear out Cache Files.
    Repair/check several plist files.
    Dump the VM files for a fresh start.
    Trash old Log files.
    First reboot will be slower, sometimes 2 or 3 restarts will be required for full benefit... my guess is files relying upon other files relying upon other files! :-)
    Disconnect the USB cable from any Uninterruptible Power Supply so the system doesn't shut down in the middle of the process.
    If that does NOT help, Safe Boot , (holding Shift key down at bootup), use Disk Utility from there to Repair Permissions, test if things work OK in Safe Mode.
    Then move these files to the Desktop...
    /Users/YourUserName/Library/Preferences/com.apple.finder.plist
    /Users/YourUserName/Library/Preferences/com.apple.systempreferences.plist
    /Users/YourUserName/Library/Preferences/com.apple.desktop.plist
    /Users/YourUserName/Library/Preferences/com.apple.recentitems.plist
    Reboot & test.
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.
    If that does NOT help then I suspect the optical drive or media itself, or possibly just needs a cleaning CD run on it.

  • Some Keys are not working on Lenovo G570

    Hello all
    I am new here, looking for some help regarding my Lenovo G570.
    Yesterday, it was working perfectly, I properly shut is down. I have set a BIOS pasword.
    Today, when I switch it on, I was unable to type the pasword becasu some keys were not working. However, I managed to loged in with the help of On Screen Keyboard. After analysing it, I came to know that some keys on numpad includeing 0,2 and on the 2nd line(vertical numerical keys) 1,2,3,4,7,8,9,0 are not working. I tried to re-install the OS but I set a BIOS paswoed containing one of the missing keys.
    Please let me know whether it is a software problem or should i take my laptop to some repairing shop?
    Thanks  
    Solved!
    Go to Solution.

    Hi Asadkhan92,
    Welcome to Lenovo Community!
    As per the query we understood that you are facing an issue with the keyboard in your Lenovo G570 laptop.
    As you have mentioned that the some keys are not working in your laptop, as you have also mentioned that the onscreen keyboard is working, please connect the external keyboard and check  for the issue, this is to confirm if the issue with the hardware or software.
    If the external keyboard works fine and if the keypad is not working then it’s a issue with the keypad of the laptop.  
    Please visit the nearest service centre for further details.
    Click here to open a link where you can select the country and get the exact contact support number. I’m sure they will be a great help.
    Hope this helps! 
    Best regards,
    Ashwin.S
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Some keys are not working

    I have HP pavilion notebook PC with product number F6C53PA#ACJ serial number [Personal Information Removed] BIOS F.34-10/31/2013 keyboard revision 29.34.
    Some keys in my keyboard are not working properly. I couldn't type < and > in microsoft office, on the websites etc.
     

    Hi there
    Welcome to the HP Support Forums! It is a great place to find the help you need, both from other users, HP experts and other support personnel. I understand that some keys are not working on your keyboard. I am happy to help with this. Are those keys working consistently in some applications? For now I would suggest you look at it as a cleaning issue. Perhaps some dust or debris is affecting the key presses.
    Notebook Keyboard Troubleshooting (Windows 8)
    Cleaning your Notebook PC
    Tips for Using, Carrying and Protecting your HP Notebook PC Let me know if that makes any difference.

  • Some commands are not working nor in illustrator nor photoshop, any advice better than Adobe?

    Illustrator is not fuctioning at 100%, some commands do not work ( eg - command open, nor place etc ) and same with photoshop....
    Any advice

    pcmyhre,
    You may try the list, possibly starting with item 7) in 5), which is a list of the usual suspects, which may disturb and confuse Illy so she fails to do even simple things.
    The following is a general list of things you may try when the issue is not in a specific file, and when it is not caused by issues with opening a file from external media, see below. You may have tried/done some of them already; 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html
    External media: It is always recommended here to open/save from/to own hard disk, and to copy from/to networks and removable media. You may be lucky (for a while), but the chances of file corruption and other unpleasantnesses are immensely greater when you use anything but the harddisk, and it is better to be safe than sorry.
    In addition to the (far greater) risk of file corruption, some issues are mentioned here:
    http://helpx.adobe.com/illustrator/kb/illustrator-support-networks-removable-media.html

  • Some Calculations are not working in Discoverer 10g after upgrade from 4.1

    Hi Gurus,
    We are recently upgraded Oracle Discovere 10g from 4.1, some calculations are not working in Discoverer 10g. I appreciate if you could fix below calculation(s) in 10g.
    CASE WHEN TRUNC("Expenditure Item Month") = '31-JAN2007' THEN SUM(Wtd Qty A) WHEN TRUNC("Expenditure Item Month") = '28-FEB-2007' THEN SUM(Wtd Qty A) WHEN TRUNC("Expenditure Item Month") = '31-MAR-2007' THEN SUM(Wtd Qty A) END
    Thanks & Regards
    Vikram

    Sabra,
    Not sure exactly what this might be... there could be an issue there.
    Please make sure that you review the upgrade.log. Are there any errors / warnings?
    Also, you might wanna peek the Metalink Note:262623.1 - Master Note for OracleAS Portal Upgrade Issues, where you'll find some nice things where to start looking at.
    Later you may wanna open a Service Request into the Oracle Support.
    I hope it helps...
    Cheers,
    Pedro.

  • Hp pavilion dv6 some keys are not working

    ,i bought my laptop 2 year earlier now some keys are not working such as less than ,greater than,question mark and all the right side keys of the keyboard 
    plz help i have to do lots of work in laptop 
    so i m very much tensed abt this plz help me as soon as possible

    Hello mahi_20. Welcome to the HP Forums. I understand certain keyboard keys are not working. The issue could be hardware or software related. Before anything else, I would attempt cleaning the keyboard. For more information on how to clean a notebook keyboard, please reference this guide: How to Clean a Laptop Keyboard
    If the issue is not resolved, after cleaning it, there is likely a software issue. To assist you thoroughly, I require the following information:
    1. The computer's model number. If you require assistance locating this information, please reference this website: Locating the Model Number of the Computer
    2. The computer's operating system. If you require assistance locating this information, please reference this website to determine your Windows operating system.
    3. Have you installed any new hardware on this computer, before the issue appeared?
    4. Have you installed any new software or drivers on this computer, before the issue appeared?
    Please respond as soon as possible. I look forward to your response.
    Mario
    I worked on behalf of HP.

  • Hp pavilion d4 : some keys are not working

     some keys  are not working  as i used it after 4 months gap. do it need hardware replacement or it is due to moisture?

    Hi,
    While this could be a hardware issue, it's always worth trying the following.
    Shut down the notebook, unplug the AC Adapter and then remove the battery.  Hold down the Power button for 30 seconds.  Re-insert the battery and plug in the AC Adapter.
    Tap away at the esc key as you start the notebook to launch the Start-up Menu and then select f10 to enter the bios menu.  Press f5 to load the defaults ( this is sometimes f9, but the menu at the bottom will show the correct key ), use the arrow keys to select 'Yes' and hit enter.  Press f10 to save the setting and again use the arrow keys to select 'Yes' and hit enter.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Installed Mavericks and latest iWorks and some fonts will not work. Strangely these fonts work in Notes and old version of Strickies. Any ideas?

    Installed Mavericks and latest updates for iWorks. Some fonts will not work on Pages or Keynote. Any ideas?

    It appears overkilling to install Bootcamp and a complete Windows environment just for running a single, old-fashioned piece of software...
    Old 32-bits Windows programs usually run fine with WINE, of which I warmly recommend the "PlayonMac" version (free).
    http://www.playonmac.com
    Just try with Playonmac...
    If it does not work, try the other free WINE port for Mac, Winebottler:
    http://winebottler.kronenberg.org/
    If even this does not work, there is a not-free WINE port named Crossover:
    http://www.codeweavers.com/products/crossover-mac/
    It has a free trial mode, so you can test if it works with your scanner program before purchasing it...

  • HT201412 my wifi button does not working / it looks grey and can not open it... and my some applications does not working too ... please help me ... I bought this I phone from Beirut/Lebanon and i live in Turkey...

    my wifi button does not working / it looks grey and can not open it... and my some applications does not working too ... please help me ... I bought this I phone from Beirut/Lebanon and i live in Turkey...

    Here you go:
    http://support.apple.com/kb/ts1559

  • My email is changed on my apple id and now some apps do not work anymore incl icloud. What to do

    My email address changed so altered it in apple id. However now some apps do not work anymore. And my email there seems not changeable
    I.e appstore, icloud, search friends etc
    Thx for yr help

    Hi frisbo1312
    I am in the UK and eventually found the problem was due to my BT Home Hub Router.  Not sure where you live, but of you are in the UK, this might work for you.
    I found this fix below on https://discussions.apple.com/thread/4604180?start=15&tstart=0
    It worked for me.  If you can't link to the URL, here is the body of the text
    There's an issue related to the BT homehub that is providing a hostname that is "syntactically incorrect" for several smtp server.
    Here's how you can fix it.
    Using your internet browser, go to the address "192.168.1.254
    - Follow instructions to reset your password if asked.
    - Then go to "Settings", then "Advanced Settings" and "home network"
    You will see there all the devices that are connected or that has been connected before. It's gonna be easyer if yout computer is the only one connected.
    Your computer should have a name like "unknown-xx:xx:xx:xx:xx ...
    Click on this name, chose another name without any special characters, like "macbook" for exemple.
    And then click on "apply"
    - restart your computer.
    That should fix the issue.
    Credit goes to vincentfromcork for providing me with the solution.
    Spread the word

  • I upgraded to 6.02 and still get this message from Gmail: "You are using an old version of Firefox which Gmail no longer supports. Some features may not work correctly. Upgrade to new version."

    When I opened Gmail in my Firefox browser, I got a message I've never seen, before: "You are using an old version of Firefox which Gmail no longer supports. Some features may not work correctly. Upgrade to new version." I clicked on upgrade to a new version and was taken to the Mozilla site, where I downloaded the latest version of Firefox... then, when I restarted my computer, Gmail still gives me the same message!! What's going on?

    Firefox 4 and later require at least OS X 10.5 and a Mac with an Intel processor.
    *http://www.mozilla.org/firefox/12.0/system-requirements/
    For an unofficial Firefox ESR 10.0.4 compatible version (TenFourFox) that runs on PowerPC Macs with OS X 10.4.11 or OS X 10.5.8 you can look at:
    *http://www.floodgap.com/software/tenfourfox/
    *http://www.macupdate.com/app/mac/37761/tenfourfox
    Be aware that TenFourFox doesn't support plugins.
    *http://code.google.com/p/tenfourfox/wiki/ReleaseNotes1004
    *http://code.google.com/p/tenfourfox/wiki/PluginsNoLongerSupported
    *http://code.google.com/p/tenfourfox/wiki/AAATheFAQ

  • Transferred CS4 to new MacBook Pro, now some fonts will not work when PDFing documents from InDesign CS4. Help!

    I recently purchased a new MacBook Pro. I transferred my CS4 from my older MacBook Pro to my new computer, and although it seemed to be working fine now some fonts will not work when PDFing documents from InDesign CS4. These fonts are installed on my new computer, can be found in InDesign CS4, and work fine within the program but will not appear in PDFs. The letters turn into rectangles. Does anyone know why, and how to fix that?
    Help/input would be much appreciated. Thank you!
    Kristen.

    you should properly install adobe products, not move, migrate or otherwise transfer them.
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.5 (win), 5.5 (mac) | 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • Binding not working when returning to same page

    Hi, Im developing a portlet that access some data from MYSQL.
    I have a simple page with several textfields, all with bindings to a javabean object that is a property of SessionBean1 bean, so it is a Session Scope bean.
    In that page I put some buttons like next, prior, etc. to navigate between all registers of my DB. I added some code to event button like this:
    public String bnext_action() {
    // get sessionbean
    SessionBean1 SBean1 = (SessionBean1)getBean("SessionBean1");
    // navigate to next register in database
    // ProdBean is my property bean that get values from database
    // bindings are like this : text="#{SessionBean1.prodBean.codigo}
    SBean1.getProdBean().GetNextReg(SBean1.getModuloIdx());
    // set current register index
    SBean1.setModuloIdx(SBean1.getProdBean().getIndex());
    return null;
    The problem is that when I get next register of database, bindings are not reflecting new values, always holding first values. I tried to force things by setting values in pre-rendering face manually with setText method of textfields but nothing happens.
    As Im a newbie in Java yet I really don't undestand this, I have readed all JSF life cycle documention and portlet life cycle docs but couldn't find an answer. Why binding is not working?

    Thanks for this.  Unfortunately now I have tried with Standard actions the links do not work at all.  The links provided were created with spaces so contained within the links are lots of '%20'. e.g. :
    PCI%20DSS/UWE%20PCI-DSS%20Quick%20Reference%20guide.pdf
    for some reason when creating the links with standard actions, when the project is published the links have changed to contain 25s  e.g.
    PCI%2520DSS/UWE%2520PCI-DSS%2520Quick%2520Reference%2520guide.pdf
    no idea why this is happening.

Maybe you are looking for

  • Report Painter GRR1, no returning values

    Hello, I'm creating a report using report painter (GRR1). I need to do a Balance report, so i've been creating set's for GL account ranges. For example: Set 1: from: 2781174000     until: 2781176999 Set2:  from: 4300000000     until: 4399999999 I'm b

  • MBA doesn't connect to wifi network after waking from sleep

    I just bought a new MBA 13". More often than not, it fails to connect to my wireless network when it wakes up from sleep. This is annoying to say the least. Any ideas?

  • Hiding Infotype Start Date in the header

    Hi I need to hide the infotype start date begda for a particular infotype 8. I tried all these tables but could not find an option to hide bedga T588m V_582A_B V_T588I T588J Looking forward for some inputs Thanks

  • How to Schedule OWB Process Flows through OEM

    Hi, I have successfully created mappings and process flows for my project. But now I want to schedule the process flows through OEM. Following are my DB configurations.. OWB Version : 10g R1 (Oracle SID LVDSGDEV ) on windows Runtime Owner: ATS_RUN_OW

  • WF restarting after error

    Hi, Currently WF version is say 0004 in test system If we restart the WF  work item which is in version 0000 after error, then in this case whether the version 0000 of this WF definition is activated? i.e. after restarting the WF, version of this sta