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 249745

Summary: Code completition in EL for maps does not work
Product: javaee Reporter: muellermi <muellermi>
Component: JSF EditorAssignee: Martin Fousek <marfous>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description muellermi 2015-01-12 10:13:40 UTC
Product Version = NetBeans IDE 8.0.2 (Build 201411181905)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0_20
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.20-b23

Let's suppose we have a JSF page with a dataTable (or other repeating structure like ui: repeat, c:forEach, ...)
If the value represents a list and we use a variable content, this might be a snipped of the page:

        <h:dataTable value="#{myBean.myList}" var="content">

If we use the var "#{content. } and press ctrl-space just aufter the dot, then NetBeans inspects the content of a list element and offers some useful information for autocompletition. 

Now, if we replace the list by a map, all autocompletiion support is lost:

        <h:dataTable value="#{myBean.myList}" var="content">

NetBeans shall offer content.key and content.value. And, if the user presses ctrl-space after the last dot in {#content.value. } then NetBeans shall inspect the content of the value and offer some useful information for autocompletition.
Comment 1 muellermi 2015-01-12 10:13:45 UTC
Created attachment 151450 [details]
IDE log
Comment 2 muellermi 2015-01-12 10:23:44 UTC
Same shall be applied to key. Most commonly key is represented by an Interger or String, but if key is an object of a more complex type, than NetBeans shall offer autocompleteon after "content.key.". ("content" is the vriable name of the example)

By now, when typing "content." in an EL, NetBeans only displays "no suggestion". This seems to be poor. Thus, I guess it is a bug.
Comment 3 roti 2015-03-01 21:29:37 UTC
with version 8.0.2
Same happens, if I want to iterate over a list of Pojo-s.
No autocomplete for Pojo variable getters inside the repeating structure.
Neither the exported scoped variable recognised.