Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-12441

Wrong cursor position after using code assist for EL with '[]'

XMLWordPrintable

      1. Create JSF 2 KickStart project
      2. Modify User.java:

      package demo;
      
      import java.util.HashMap;
      import java.util.Map;
      
      import javax.faces.bean.ManagedBean;
      import javax.faces.bean.SessionScoped;
      
      /**
       * Created by JBoss Tools
       */
      @ManagedBean(name="user")
      @SessionScoped
      public class User {
      	private Map<String, User> users = new HashMap<String, User>();
      
      	private String name;
      
      	public User() {
      	}
      
      	public String getName() {
      		return name;
      	}
      
      	public void setName(String name) {
      		this.name = name;
      	}
      
      	public String sayHello() {
      		return "greeting";
      	}
      
      	public Map<String, User> getUsers() {
      		return users;
      	}
      
      	public void setUsers(Map<String, User> users) {
      		this.users = users;
      	}
      }
      

      3. Open inputname.xhtml
      4. Add <h:outputText value="#

      {user.users[''].}

      " />
      5. Ctrl+Space on #

      {user.users[''].|}

      6. Select "name"
      7. So now we have #

      {user.users[''].name}

      . That's good. But the cursor is on the wrong place: #

      {user.users[''].|name}

      . It should be here: #

      {user.users[''].name|}

            vrubezhny Victor Rubezhny (Inactive)
            alexeykazakov Alexey Kazakov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: