myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Kovalenko <bo...@tagnet.ru>
Subject Someting has changed with SelectOneMenu?
Date Sun, 04 Sep 2005 10:25:35 GMT
Hello!

	Have a working peace of code:
             <t:selectOneMenu id="cid" value="#{currencyrate.cid}" 
styleClass="select" required="true">
                 <f:convertNumber integerOnly="true" />
                 <f:selectItems value="#{currency.currenciesAbbr}"/>
             </t:selectOneMenu>

Where currencyrate.cid defined as int and currency.currenciesAbbr 
defined as:

     public Collection getCurrenciesAbbr() throws Exception {
         Connection		connection = null;
         ResultSet		rs;

         if(abbrList == null)
             abbrList = new ArrayList();

         try {
             connection = UbsConfiguration.getInstance().getConnection();
             Statement	st = connection.createStatement();
             rs = st.executeQuery("SELECT ID,ABBR FROM CURRENCY ORDER BY 
2");
             while(rs.next())
                 abbrList.add(new SelectItem(rs.getObject(1), 
rs.getString(2)));
             rs.close();
             st.close();
         } catch(Exception e) {
             Utils.getExceptionDecoder().setException(e);
             throw e;
         } finally {
             if(connection != null)
                 connection.close();
         }
         return abbrList;
     }

There were no problems with this code and with todays (20050903) nightly 
build I get exception (below). Am I doing something wrong? Or this is 
bug of this build and should I try another one?

500 Servlet Exception

java.util.NoSuchElementException
	at java.util.AbstractList$Itr.next(AbstractList.java:426)
	at 
org.apache.myfaces.util.SelectItemsIterator.next(SelectItemsIterator.java:82)
	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:277)
	at 
org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:251)
	at 
org.apache.myfaces.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:54)
	at 
org.apache.myfaces.renderkit.html.ext.HtmlMenuRenderer.encodeEnd(HtmlMenuRenderer.java:57)
	at 
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
	at 
org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
	at 
org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:203)
	at 
org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:85)
	at 
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
	at 
org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
	at 
org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:203)
	at 
org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:85)
	at 
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
	at 
org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
	at 
org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:427)
	at 
org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:448)
	at 
org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:427)
	at 
org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:448)
	at 
org.apache.myfaces.custom.layout.HtmlLayoutRenderer.renderTableCell(HtmlLayoutRenderer.java:259)
	at 
org.apache.myfaces.custom.layout.HtmlLayoutRenderer.renderClassic(HtmlLayoutRenderer.java:118)
	at 
org.apache.myfaces.custom.layout.HtmlLayoutRenderer.encodeEnd(HtmlLayoutRenderer.java:66)
	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.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
	at _jsp._layouts._mainlayout__jsp._jspService(layouts/mainlayout.jsp:59)
	at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
	at com.caucho.jsp.Page.pageservice(Page.java:579)
	at 
com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:159)
	at 
com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:115)
	at 
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:208)
	at 
com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:268)
	at 
com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:106)
	at 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
	at 
org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:233)
	at 
org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219)
	at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
	at 
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:99)
	at 
ru.tagnet.misc.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:168)
	at 
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
	at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
	at 
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
	at 
com.caucho.server.security.SecurityFilterChain.doFilter(SecurityFilterChain.java:135)
	at 
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:163)
	at 
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:208)
	at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:259)
	at com.caucho.server.port.TcpConnection.run(TcpConnection.java:363)
	at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490)
	at com.caucho.util.ThreadPool.run(ThreadPool.java:423)
	at java.lang.Thread.run(Thread.java:534)


With respect,
	Boris

Mime
View raw message