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 252417 - Support HashMap in FXML
Summary: Support HashMap in FXML
Status: NEW
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-15 11:04 UTC by tiainen
Modified: 2017-03-01 20:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tiainen 2015-05-15 11:04:04 UTC
According to the FXML documentation (https://docs.oracle.com/javase/8/javafx/api/javafx/fxml/doc-files/introduction_to_fxml.html#instance_declaration_elements), in the Maps section of instance Declarations:

"If an element represents a type that already implements Map (such as java.util.HashMap), it is not wrapped and its get() and put() methods are invoked directly."

<HashMap foo="123" bar="456"/>

The editor now complains with the following error:

Class 'java.util.HashMap' does not support property 'foo'
Comment 1 flipm1967 2017-03-01 20:35:38 UTC
Test Case 

<Slider fx:id="sl_filtfreq" GridPane.columnIndex="1" GridPane.rowIndex="0" min="0" max="127"><userData><HashMap command="32"/></userData></Slider> 

This actually compiles and runs successfully but the netbeans interface shows the red circle exclaimation mark.

Error is "Class 'java.util.HashMap' does not support property 'command'"

You can see the dilemma - most other types have fixed properties but of course a hash map does not, the values look like properties which is probably what is confusing the editor.