2 Replies Latest reply: May 2, 2012 7:30 AM by 934287 RSS

    cellValueFactory / PropertyValueFactory within Sceen Builder

    934287
      Is it possible to set cellValueFactory from within Sceen builder? As it stands I have to go into my XML file and add it or add it in code. Thanking you in advance.

      <cellValueFactory>
      <PropertyValueFactory property="dvName" />
      </cellValueFactory>
        • 1. Re: cellValueFactory / PropertyValueFactory within Sceen Builder
          daniel
          Hi,

          No, it is not possible to set such a factory from within SceneBuilder. However - it is possible to load an FXML file in which such factories are defined. SceneBuilder will preserve them. Note however that setting a cellValueFactory will prevent the SceneBuilder from displaying fake sample data in your table if you choose "View > Show Sample Data".

          So basically it means that at the moment you have to ways of dealing with this:

          1. Edit your FXML file in a plain editor and manually add the <cellValueFactory> property.
          or 2. Use SceneBuilder's connection to code feature: add unique fx:id to your table columns and then configure the cell value factory programatically from within the controller's code.

          If you feel strongly that to add PropertyValueFactory should be possible from within SceneBuilder you could log a feature request at
          http://javafx-jira.kenai.com/browse/DTL

          Hope this helps,

          -- daniel
          • 2. Re: cellValueFactory / PropertyValueFactory within Sceen Builder
            934287
            Thank you, Daniel. I'll add a feature request.

            Barry