Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-1772

Xhtml Autocomplete not working with some backing beans

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 8.2, 9.0
    • None
    • ide - Code
    • None

    Description

      I came across this issue when moving from Netbeans 7.3 to 7.4+ (yes all after 7.3)
       
      xhtml code
      Value = "#{Sample.Something.blahblah{color}}"
       
      The IDE said the "blahblah" was an unknown property, but when running the project, everything worked just fine.

       
      This makes autocomplete not work. This same project worked with Netbeans 7.3, and the IDE reported no errors. Autocomplete worked in 7.3.
       
      I was able to find the issue. Actually simple but very well hidden.
       
      "Getters and Setters"
       
      Some files had the Setter above the Getter, and the IDE hit the Setter when trying to autocomplete.
       
      public void setSomething(SomethingBean someThing) {
      this.someThing = someThing;

      }
       
      public SomethingBean getSomething()

      { return someThing; }

      therefore, nothing in the SomethingBean was accessible.
       
      Simply putting the Getter above the Setter fixed the problem.
       
      This isn't an issue in 7.3 and isn't an issue for the program running. Perhaps the code needs adjustment so it isn't an issue for autocomplete.

      Attachments

        Activity

          People

            Unassigned Unassigned
            FrankMoss Frank Moss
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: