-
Bug
-
Resolution: Fixed
-
P2
-
7u40
-
None
SB1.1 Has two drawbacks concerning this subject.
1. When you copy Button(fx:id: myButton) and paste into a new document the fx:id is lost which is unhelpful because:
- The fx:id is lost silently so the user may not notice, causing attached logic to fail
- We cause unwanted work for the user as they need to investigate and restore every fx:id that was lost
2. When you copy and paste Button(fx:id: myButton) into the same document the fx:id is lost.
- Again, the fx:id is removed silently from the pasted node
I propose the following:
Button (fx:id: myButton) in Clipboard
User pastes into Document
Does the fx:id: myButton already exist?
- No: Button (fx:id: myButton) is pasted
- Yes: Button (fx:id: myButton-1) is pasted and Info bar shows warning: “The fx:id myButton already exists - renamed to myButton-1”
1. When you copy Button(fx:id: myButton) and paste into a new document the fx:id is lost which is unhelpful because:
- The fx:id is lost silently so the user may not notice, causing attached logic to fail
- We cause unwanted work for the user as they need to investigate and restore every fx:id that was lost
2. When you copy and paste Button(fx:id: myButton) into the same document the fx:id is lost.
- Again, the fx:id is removed silently from the pasted node
I propose the following:
Button (fx:id: myButton) in Clipboard
User pastes into Document
Does the fx:id: myButton already exist?
- No: Button (fx:id: myButton) is pasted
- Yes: Button (fx:id: myButton-1) is pasted and Info bar shows warning: “The fx:id myButton already exists - renamed to myButton-1”
- duplicates
-
JDK-8117062 When copying a node with an fx:id into another new document the fx:id is lost
-
- Closed
-
- relates to
-
JDK-8095081 Assertion when trying to DnD ImageView
-
- Resolved
-