I'm having a terrible time getting h:selectOneRadio to work and am in desprate need of help.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Daniel_Prene
Posted On:   Sunday, March 5, 2006 03:40 PM

First off I apologize if the answer is obvious. I have googled and troubleshooted for hours and I just can't get it to work! I'm trying to use a h:selectOneRadio, but every time I hit "submit" on the form I get... Exception: java.lang.IllegalArgumentException: "{2}" Conversion Error setting value '' { 0 } '' for '' { 1 } '' . com.sun.faces.util.Util.getSelectItems(Util.java:642) com.sun.faces.renderkit.html_basic.SelectManyCheckboxListRenderer.encodeEnd(SelectManyCheckboxListRenderer.java:115) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712) com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(   More>>

First off I apologize if the answer is obvious. I have googled and troubleshooted for hours and I just can't get it to work!
I'm trying to use a h:selectOneRadio, but every time I hit "submit" on the form I get...

Exception:

			java.lang.IllegalArgumentException:
			"{2}"
			Conversion Error setting value
			''
			{
			0
			}
			''
			for
			''
			{
			1
			}
			''
			.
			
com.sun.faces.util.Util.getSelectItems(Util.java:642)
com.sun.faces.renderkit.html_basic.SelectManyCheckboxListRenderer.encodeEnd(SelectManyCheckboxListRenderer.java:115)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443)
com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:435)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:440)
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:444)
org.apache.myfaces.custom.tabbedpane.HtmlTabbedPaneRenderer.writeTabsContents(HtmlTabbedPaneRenderer.java:535)
org.apache.myfaces.custom.tabbedpane.HtmlTabbedPaneRenderer.encodeEnd(HtmlTabbedPaneRenderer.java:227)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:616)
javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:539)
org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
org.apache.jsp.keytool_jsp._jspx_meth_t_panelTabbedPane_0(keytool_jsp.java:212)
org.apache.jsp.keytool_jsp._jspx_meth_f_view_0(keytool_jsp.java:144)
org.apache.jsp.keytool_jsp._jspService(keytool_jsp.java:109)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.computecycles.filter.SecurityFilter.doFilter(SecurityFilter.java:35)
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)



JSF code:
			"#{keytool.algorithm}"
			>
			
"#{keytool.algorithmItems}" />



java code:
			package
			org.computecycles.beans.backing;
			
 
import java.util.LinkedList;

import java.util.List;
import java.util.Properties;
import java.util.logging.Logger;
 
import javax.faces.model.SelectItem;
import javax.servlet.ServletContext;
 

import org.computecycles.ant.AntExecBean;
 
public class KeyToolBackingBean extends BackingBean {
private List algorithmItems;
private String algorithm;


 
@SuppressWarnings( "unchecked" )
public List getAlgorithmItems() {

if ( null == algorithmItems) {

algorithmItems = new LinkedList ();
 
algorithmItems.add( new SelectItem( "Default" ));
algorithmItems.add( new SelectItem( "RSA" ));
}

 
return algorithmItems;
}

public void setAlgorithmItems(List algorithmItems) {

this.algorithmItems = algorithmItems;
}
 
public String getAlgorithm() {
if ( null == algorithm) setAlgorithm( "Default" );

return algorithm;
}

 
public void setAlgorithm(String algorithm) {
this.algorithm = algorithm;
}
}


faces-config.xml code:
			

keytool
org.computecycles.beans.backing.KeyToolBackingBean
request




Any feedback would be endlessly apreciated.
Thank you for atleast reading this,
- Daniel    <<Less

Re: I'm having a terrible time getting h:selectOneRadio to work and am in desprate need of help.

Posted By:   Anonymous  
Posted On:   Sunday, March 5, 2006 05:58 PM

Are you positive that error is happening due to radio buttons. Because the error messages are complaining about "selectManyCheckBox" .....
About | Sitemap | Contact