ICEfaces
  1. ICEfaces
  2. ICE-3888

Error in NETBEANS visual developer when using a List as f:selectItems provider

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7.2 SP1a
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      RedHat 5, Netbeans 6.5
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Use an array instead of List as

      public SelectItem[] getItems(){
      ...
      }
      Show
      Use an array instead of List as public SelectItem[] getItems(){ ... }

      Description

      If you use any of these signatures

      public List getItmsList(){
      ...
      }

      or

      public List<SelectItem> getItems(){
      ...
      }

      as a source for
      <f:selectItems ... value="#{myBean.items}" />

      Visual designer throws an error
      INFO: Can't find bundle for base name javax.faces.Messages, locale en_US
      java.util.MissingResourceException: Can't find bundle for base name javax.faces.Messages, locale en_US
              at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1521)
              at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1260)
              at java.util.ResourceBundle.getBundle(ResourceBundle.java:962)
              at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:163)
              at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:122)
              at com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:277)
              at com.sun.faces.renderkit.RenderKitUtils.getSelectItems(RenderKitUtils.java:357)
              at com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:675)
              at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:793)
              at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:335)
              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
      [catch] at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1350)
              at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1549)
              at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1337)
              at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1549)
              at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1563)
              at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1563)
              at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.getFacesRenderTree(FacesPageUnit.java:1105)
              at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderHtml(FacesPageUnit.java:1675)
              at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderHtml(FacesPageUnit.java:1628)
              at org.netbeans.modules.visualweb.insync.models.FacesModel.getHtmlDomFragment(FacesModel.java:1614)
              at org.netbeans.modules.visualweb.insync.models.FacesModel.findHtmlBody(FacesModel.java:1638)
              at org.netbeans.modules.visualweb.insync.models.FacesModel.getHtmlBody(FacesModel.java:1626)
              at org.netbeans.modules.visualweb.designer.jsf.JsfForm.getHtmlBody(JsfForm.java:1755)
              at org.netbeans.modules.visualweb.designer.jsf.JsfForm.getHtmlBody(JsfForm.java:1745)
              at org.netbeans.modules.visualweb.designer.jsf.DomSynchronizer.processRefresh(DomSynchronizer.java:1484)
              at org.netbeans.modules.visualweb.designer.jsf.DomSynchronizer.processUpdates(DomSynchronizer.java:816)
              at org.netbeans.modules.visualweb.designer.jsf.DomSynchronizer.run(DomSynchronizer.java:696)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
              at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
      CONFIG [null]: Missing resource from class: javax.faces.Messages_en_US
      CONFIG [null]: Key which was not found:
      WARNING [org.netbeans.ProxyClassLoader]: Will not load class javax.faces.component.UIComponentBase arbitrarily from one of org.netbeans.StandardModule$OneModuleClassLoader@4ac866[org.netbeans.modules.web.jsf12] and org.netbeans.StandardModule$OneModuleClassLoader@cad437[org.netbeans.libs.facelets]; see http://wiki.netbeans.org/DevFaqModuleCCE

      pligins versions are: 1.7.2.2 and 3.4.0.2.1.1.1

        Activity

        Aniceto Perez created issue -
        Hide
        Frank Ye added a comment -

        My is JAVA_HOME: /usr/java/jdk1.5.0_17/bin/java

        Could you try with jdk 1.5 to see if you have the same exception? thanks,

        Show
        Frank Ye added a comment - My is JAVA_HOME: /usr/java/jdk1.5.0_17/bin/java Could you try with jdk 1.5 to see if you have the same exception? thanks,
        Hide
        Seção de Desenvolvimento de Sistemas added a comment -

        I am facing exactly the same problem.
        Do you people from ICEFaces have some clue or some workaround to this issue?

        Thanks in advance!

        Show
        Seção de Desenvolvimento de Sistemas added a comment - I am facing exactly the same problem. Do you people from ICEFaces have some clue or some workaround to this issue? Thanks in advance!
        Hide
        Aniceto Perez added a comment -

        Change the list for an array as

        public SelectItem[ ] getItems()

        { ... }

        and don't forget there is a bug in the NB design previewer: be sure that component id's are not named as the backing bean members. It is not an issue at runtime, but at design time. Example:

        MyPage.jsp
        <ice:xxxx id="listItems" ..../>
        <ice:yyyy ... value="#

        {MyPage.listItems}

        " .... />

        Obviously the id of the 1st component it not related with the bound value of the 2nd one, but you'll get another similar error in such a case.

        Regards

        Show
        Aniceto Perez added a comment - Change the list for an array as public SelectItem[ ] getItems() { ... } and don't forget there is a bug in the NB design previewer: be sure that component id's are not named as the backing bean members. It is not an issue at runtime, but at design time. Example: MyPage.jsp <ice:xxxx id="listItems" ..../> <ice:yyyy ... value="# {MyPage.listItems} " .... /> Obviously the id of the 1st component it not related with the bound value of the 2nd one, but you'll get another similar error in such a case. Regards
        Hide
        David Leoni added a comment -

        public SelectItem[ ] getItems()

        { ... }

        the workaround to use the array doesn't work for me. I have Netbeans 6.5 on Xubuntu Intrepid. I've tried using ArrayList and ArraList<SelectItem> too with no success

        Show
        David Leoni added a comment - public SelectItem[ ] getItems() { ... } the workaround to use the array doesn't work for me. I have Netbeans 6.5 on Xubuntu Intrepid. I've tried using ArrayList and ArraList<SelectItem> too with no success
        Hide
        Pablo Piran added a comment -

        I have the same problem (Can't find bundle for base name javax.faces.Messages, locale...) in the visual designer (NetBeans).
        Although (described below) it works fine, it is not shown in the developer design window.

        JSP fle:
        <ice:outputText converter="#

        {Page1.numberConverter1}

        " id="idNumber1" value="#

        {Page1.number1}

        ""/>

        Java Bean file:

        private double number1;

        public double getNumber1()

        { return number1I; }

        public void setNumber1(double number1)

        { this.number1= number1; }

        Thanks a lot for any help!!!

        Show
        Pablo Piran added a comment - I have the same problem (Can't find bundle for base name javax.faces.Messages, locale...) in the visual designer (NetBeans). Although (described below) it works fine, it is not shown in the developer design window. JSP fle: <ice:outputText converter="# {Page1.numberConverter1} " id="idNumber1" value="# {Page1.number1} ""/> Java Bean file: private double number1; public double getNumber1() { return number1I; } public void setNumber1(double number1) { this.number1= number1; } Thanks a lot for any help!!!

          People

          • Assignee:
            Unassigned
            Reporter:
            Aniceto Perez
          • Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: