Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8128637

Error generated when assigning CSS style class on a SplitMenuButton nested within another menu

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: fx2.0
    • Fix Version/s: 8
    • Component/s: javafx
    • Environment:

      XP b40

      Description

      At first glance my test app may seem a bit crazy, so allow me to explain. In my application, SplitMenuButtons are used to represent what are effectively terms in a procedural programming language. You can do different things with terms, such as swap them out, rename them, etc. Because of the "swap out" case we will sometimes visualize a disabled term (SplitMenuButton) within the menu button of another term so the user can replace the current term with the one in the drop-down menu.

      We also provide a full set of CSS stylings for our SplitMenuButtons. The class name in this example is "input-var". The bug here is that if I clear the style classes of the main SplitMenuButton and assign it the class "input-var" everything works fine. However, the SplitMenuButton that I create to be nested within the menu of the main SplitMenuButton generates an error when I assign the style class "input-var":

      SEVERE: javafx.scene.control.Control impl_processCSS The -fx-skin property has not been defined in CSS for SplitMenuButton@9980d5[styleClass=input-var]

      The input-var style class does specify an fx-skin property, and no error like that is reported when CSS is processed for the main splitmenubutton. It only happens on the nested one when you expand the menu. This error did not occur prior to build 40. Interestingly, despite the error everything appears to render/work correctly on the nested SplitMenuButton.

        Attachments

        1. Main.java
          2 kB
        2. Main.java
          2 kB
        3. test.css
          1 kB

          Issue Links

            Activity

              People

              • Assignee:
                dgrieve David Grieve (Inactive)
                Reporter:
                kmcintyrejfx Kyle McIntyre (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: