HtmlSelectManyCheckbox
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   JS_Varma
Posted On:   Wednesday, October 11, 2006 06:26 AM

Hi, I am having trouble with HtmlSelectManyCheckbox. I need to create dynamic multiple selct checkboxex on a button click. But I cannt figure it our how it works. Please anybody help me. Here is my code : bean : public String addMatCodes() { HtmlSelectManyCheckbox checkbox = new HtmlSelectManyCheckbox(); checkbox.setValue(new SelectItem("chk1")); group.getChildren().add(checkbox); Logger.getLog().debug("adding ...."); return "addMat"; } jsp : When I press the command button second time it gives an error as follows : org.apache.jasper   More>>

Hi,

I am having trouble with HtmlSelectManyCheckbox. I need to create dynamic multiple selct checkboxex on a button click.
But I cannt figure it our how it works. Please anybody help me.

Here is my code :

bean :

			

public String addMatCodes() {

HtmlSelectManyCheckbox checkbox = new HtmlSelectManyCheckbox();

checkbox.setValue(new SelectItem("chk1"));

group.getChildren().add(checkbox);
Logger.getLog().debug("adding ...."); return "addMat";
}


jsp :
			




When I press the command button second time it gives an error as follows :

org.apache.jasper.JasperException: Duplicate component ID 'createNewForm:_id4' found in view.
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain
...........................

Please can someone help me.

Thanks,
~JS    <<Less
About | Sitemap | Contact