Netbeans 6.5: Porting Woodstock To IceFaces. Small Bug, Big Impact, Easy Solution
After smooth installation and setup, I'm in the process of porting an application from Woodstock to Icefaces. During dragging a SelectOneMenu from pallette to the designer a Component Error (red bar) occurred and the designer was closed. Unfortunately the stack trace wasn't really helpful - actually misleading:
java.util.MissingResourceException: Can't find bundle for base name javax.faces.Messages, locale de_DE
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)
at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1350)
at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.getFacesRenderTree(FacesPageUnit.java:1107)
at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderHtml(FacesPageUnit.java:1675)
at org.netbeans.modules.visualweb.designer.jsf.JsfForm.renderMarkupDesignBean(JsfForm.java:2919)
at org.netbeans.modules.visualweb.designer.jsf.JsfForm.renderMarkupDesignBean(JsfForm.java:2915)
at org.netbeans.modules.visualweb.designer.jsf.DomSynchronizer.processInsert(DomSynchronizer.java:1287)
at org.netbeans.modules.visualweb.designer.jsf.DomSynchronizer.processUpdates(DomSynchronizer.java:798)
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)
The problem are wrong expressions (component and value binding), which were generated by the designer. You can easily fix the error changing to the "JSP" view, and replace "/" with "$" in the expressions. Sample:
Wrong: #{usermgmt/CreateAccount.selectOneMenu1DefaultItems}
Correct #{usermgmt$CreateAccount.selectOneMenu1DefaultItems}
This is a general problem in visual components with nested beans. It seems only to happen, if you change the default package for the generated pages (e.g. in the WAR-project wizard). If you don't change it - everything works perfectly.
Hi Adam
I'm getting that error from the very beginning and I don't have any slash in my links. The problem is related to panelGrid1.
<ice:panelGrid id="panelGrid1" style="height: 88px; left: 61px; top: 145px; position: absolute; width: 88px">
<ice:panelGrid columns="2" id="panelGrid2" style="height: 88px; width: 88px">
<ice:outputLabel id="outputLabel1" value="Tema"/>
<ice:panelGrid id="panelGrid3" style="height: 88px; width: 88px">
<ice:panelGrid columns="3" id="panelGrid41">
<ice:selectOneMenu id="listaTemas" partialSubmit="true" value="#{GestoriBean.idtem}" valueChangeListener="#{Gestori.listaTemas1_processValueChange}">
<f:selectItems id="selectOneMenu1selectItems1" value="#{Gestori.listaTemas}"/>
</ice:selectOneMenu>
<ice:commandButton actionListener="#{Gestori.prevTema_processAction}" id="prevTema" partialSubmit="true" value="^"/>
<ice:commandButton actionListener="#{Gestori.nextTema_processAction}" id="nextTema" partialSubmit="true" value="v"/>
</ice:panelGrid>
<ice:panelGrid columns="3" id="panelGrid4">
<ice:commandButton actionListener="#{Gestori.btnNewTema_processAction}" id="btnNewTema1" partialSubmit="true"
rendered="#{GestoriBean.idtem==null or GestoriBean.idtem == 0}" value="Añadir Tema"/>
<ice:commandButton actionListener="#{Gestori.btnRenameTema_processAction}" id="btnRenameTema1" partialSubmit="true"
rendered="#{GestoriBean.idtem!=null and GestoriBean.idtem!=0}" value="Renombrar Tema"/>
<ice:commandButton actionListener="#{Gestori.btnDelTema_processAction}" id="btnDelTema1" partialSubmit="true"
rendered="#{GestoriBean.idtem!=null and GestoriBean.idtem!=0}" value="Eliminar Tema"/>
</ice:panelGrid>
</ice:panelGrid>
</ice:panelGrid>
<ice:panelGrid columns="2" id="panelGrid5" rendered="#{GestoriBean.idtem!=null and GestoriBean.idtem!=0}" style="height: 88px; width: 88px">
<ice:outputLabel id="lblSubtema1" value="Subtema"/>
<ice:panelGrid id="panelGrid6" style="height: 88px; width: 88px">
<ice:panelGrid columns="3" id="panelGrid42">
<ice:selectOneMenu id="listaSubtemas1" partialSubmit="true" value="#{GestoriBean.idgsubtema}" valueChangeListener="#{Gestori.listaSubtemas1_processValueChange}">
<f:selectItems id="sist1" value="#{Gestori.listaSubTemas}"/>
</ice:selectOneMenu>
<ice:commandButton actionListener="#{Gestori.prevSubtema_processAction}" id="prevSubtema" partialSubmit="true" value="^"/>
<ice:commandButton actionListener="#{Gestori.nextSubtema_processAction}" id="nextSubtema" partialSubmit="true" value="v"/>
</ice:panelGrid>
<ice:panelGrid columns="3" id="panelGrid7">
<ice:commandButton actionListener="#{Gestori.btnNewSubtema_processAction}" id="btnNewSubtema1" partialSubmit="true"
rendered="#{GestoriBean.idtem!=null and GestoriBean.idtem!=0 and (GestoriBean.idgsubtema==null or GestoriBean.idgsubtema==0)}" value="Añadir Subtema"/>
<ice:commandButton actionListener="#{Gestori.btnRenameSubtema_processAction}" id="btnRenameSubtema1" partialSubmit="true"
rendered="#{GestoriBean.idtem!=null and GestoriBean.idtem!=0 and GestoriBean.idgsubtema!=null and GestoriBean.idgsubtema!=0}" value="Renombrar Subtema"/>
<ice:commandButton actionListener="#{Gestori.btnDelSubtema_processAction}" id="btnDelSubtema1" partialSubmit="true"
rendered="#{GestoriBean.idtem!=null and GestoriBean.idtem!=0 and GestoriBean.idgsubtema!=null and GestoriBean.idgsubtema!=0}" value="Eliminar Subtema"/>
</ice:panelGrid>
</ice:panelGrid>
</ice:panelGrid>
<ice:panelGrid columns="3" id="panelPorTema1"
rendered="#{GestoriBean.idtem!=null and GestoriBean.idtem!=0 and GestoriBean.idgsubtema!=null and GestoriBean.idgsubtema!=0}" style="height: 88px">
<ice:outputLabel id="outputLabel2" value="Artículos Incorporados"/>
<ice:outputText id="outputText1" value=""/>
<ice:outputLabel id="outputLabel3" value="Articulos Disponibles"/>
<ice:selectOneListbox id="artInc" immediate="true" partialSubmit="true" size="12" value="#{GestoriBean.idincluido}" valueChangeListener="#{Gestori.artInc_processValueChange}">
<f:selectItems id="selectOneListbox1selectItems1" value="#{Gestori.refsSubtema}"/>
</ice:selectOneListbox>
<ice:panelGrid id="panelGrid8">
<ice:commandButton actionListener="#{Gestori.agregar_processAction}"
disabled="#{GestoriBean.idnoincluido==null or GestoriBean.idnoincluido==0}" id="agregar1" value="<="/>
<ice:commandButton actionListener="#{Gestori.quitar_processAction}"
disabled="#{GestoriBean.idincluido==null or GestoriBean.idincluido==0}" id="quitar1" value="=>"/>
</ice:panelGrid>
<ice:selectOneListbox id="artDisp" immediate="true" partialSubmit="true" size="12" value="#{GestoriBean.idnoincluido}" valueChangeListener="#{Gestori.artDisp_processValueChange}">
<f:selectItems id="selectOneListbox2selectItems1" value="#{Gestori.refsNoSubtema}"/>
</ice:selectOneListbox>
</ice:panelGrid>
</ice:panelGrid>
Posted by Aniceto Perez on January 26, 2009 at 02:23 PM CET #
thanks for this help, it's save me: i simple don't see error char, and lose 2 hours.... THANKS YOU !
Posted by yousss on April 23, 2009 at 04:35 PM CEST #