[JBoss Seam] - Re: @SelectItems and @SelectItemsSelection annotations?
by jarkko@jab.fi
Hi,
I just had a few hours of nice debugging time with the @SelectItems stuff.
This first one works ok:
anonymous wrote :
| <h:selectOneListbox value="#{selector.selectedRegion}">
| <f:selectItems value="#{regions}"/>
| </h:selectOneListbox>
but this doesn't
anonymous wrote : <h:selectOneListbox value="#{region}">
| <f:selectItems value="#{selector.regions}"/>
| </h:selectOneListbox>
"selector" is SFSB with get/setRegions, get/setSelectedRegion in local interface and
@SelectItems
| public List getRegions() {
| List<Region> regions = (List<Region>) em
| .createQuery("from Region").getResultList();
| return regions;
| }
|
Instead the second one gives the following exception:
| 2006-09-19 15:14:57,367 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/tc3Web].[jsp]] Servlet.service() for servlet jsp threw exception
| java.lang.IllegalArgumentException: Collection referenced by UISelectItems with binding '#{selector.regions}' and Component-Path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /kohteen_valinta.jsp][Class: javax.faces.component.html.HtmlForm,Id: _tc3Portlet_kohteen_valinta_WAR_TrueConcept__id0][Class: javax.faces.component.html.HtmlSelectOneListbox,Id: _tc3Portlet_kohteen_valinta_WAR_TrueConcept__id1][Class: javax.faces.component.UISelectItems,Id: _tc3Portlet_kohteen_valinta_WAR_TrueConcept__id2]} does not contain Objects of type SelectItem
| at org.apache.myfaces.util.SelectItemsIterator.next(SelectItemsIterator.java:182)
| at org.apache.myfaces.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:487)
| at org.apache.myfaces.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:461)
| at org.apache.myfaces.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:272)
| at org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderListbox(HtmlRendererUtils.java:235)
| at org.apache.myfaces.renderkit.html.HtmlListboxRendererBase.encodeEnd(HtmlListboxRendererBase.java:73)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
| at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
| at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
| at org.apache.jsp.kohteen_005fvalinta_jsp._jspx_meth_h_selectOneListbox_0(kohteen_005fvalinta_jsp.java:254)
| at org.apache.jsp.kohteen_005fvalinta_jsp._jspx_meth_h_form_0(kohteen_005fvalinta_jsp.java:143)
| at org.apache.jsp.kohteen_005fvalinta_jsp._jspx_meth_f_view_0(kohteen_005fvalinta_jsp.java:102)
| at org.apache.jsp.kohteen_005fvalinta_jsp._jspService(kohteen_005fvalinta_jsp.java:64)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
|
So instead of the wrapped result the original List (of Regions) is passed to f:selectItems.
Is this expected behaviour?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972564#3972564
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972564
19 years, 7 months
[EJB 3.0] - Re: quartz-ra.rar bug?
by kvbisme
Just now getting back to this, but Bill your suggestion I think would work best for me with one minor issue. It tries to deploy the jar file before JMS comes up. I get a javax.naming.NameNotFoundException: DefaultJmsProvider not bound.
My other solution isn't much better. I had to move the quartz-ra.rar into the deploy.last directory to ensure the JDBC datasources got loaded first, but when the system restarts for what ever reason the ear deploying the bean in question can't find the deploy.last#quartz-ra.rar which makes sense since its deploying last.
Is there anyway to set up dependancies for these so I can deply them when/where ever? Or does anyone have any other solutions for my "chicken or the egg" problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972557#3972557
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972557
19 years, 7 months