This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 248890 - Scene Builder should add controls and event handler identifiers to controller file
Summary: Scene Builder should add controls and event handler identifiers to controller...
Status: NEW
Alias: None
Product: javafx
Classification: Unclassified
Component: Visual Tool Integration (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-25 15:26 UTC by omniprof
Modified: 2015-02-04 09:25 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description omniprof 2014-11-25 15:26:24 UTC
It is necessary to manually enter fx:id identifiers and event handler identifiers into controllers as a separate task. It would nice if there was better integration between the two.
Comment 1 Lou Dasaro 2014-12-01 12:03:00 UTC
Thank you for the report. I believe this integration already exists, provided you entered (and saved) fx:id's in Scene Builder (or by manually editing the FXML). Next, you invoke NetBeans IDE's (JavaFX) "Generate Controller" feature, which performs the injection into the controller file.

Let me know if this works for you.
Comment 2 Lou Dasaro 2014-12-04 21:02:47 UTC
Logging this in response to Omniprof's email so Maven pro's might (?) comment.

To make a non-FX "plain" Maven project into a FX version - the easy (?) approach would be to Create a new Maven JavaFX project, and copy your old source files into the new project. This approach works for me.

The more difficult (?) approach MIGHT be to edit your existing Pom and other project files. Use NB to Create a new Maven JavaFX project, and examine the contents of the generated Project Files folder to use as a guide. I was not successful with this approach, but I am fairly new to Maven... Best of luck!

Omniprof wrote:
> I found the command, it is 'Make Controller' and it is available only if a 
> project is an FX or Maven FX project. Is there a way to make an non-FX project, 
> in my case usually plain Maven projects, into a FX version so that this command appears?