3 Replies Latest reply on Mar 6, 2011 1:09 AM by Satya K

    How to disable Enter key on modal panel

    Satya K Newbie

      Hi All,

       

      I have a modal panel and a button to sublit a form on the modal panel.

       

      The form is submitted successfully and also works fine whenever user clicks on the button, but throws exception if Enter button is pressed.

       

      So I wanted to to disable "ENTER" key on that modal panel i.e User has to mandatorily click the button instead of hitting enter button.

       

      Could you let me how to perform that.

       

      Here is that stack of the exception if Enter button is pressed :

       

      04.03.2011 10:43:22 com.sun.facelets.FaceletViewHandler handleRenderException

      SCHWERWIEGEND: Error Rendering View[/pages/documentcharacterstics.xhtml]

      java.lang.IllegalArgumentException: Cannot convert Archiving period of type class java.lang.String to interface java.util.Set

          at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:375)

          at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188)

          at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)

          at javax.faces.component.ValueBindingValueExpressionAdapter.getValue(ValueBindingValueExpressionAdapter.java:109)

          at org.richfaces.component.UIOrderingList.getSelection(UIOrderingList.java:641)

          at org.richfaces.component.UIOrderingList.getItemState(UIOrderingList.java:628)

          at org.richfaces.renderkit.OrderingComponentRendererBase.encodeBegin(OrderingComponentRendererBase.java:568)

          at org.richfaces.renderkit.OrderingListRendererBase.encodeBegin(OrderingListRendererBase.java:80)

          at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:824)

          at javax.faces.component.UIData.encodeBegin(UIData.java:937)

          at org.ajax4jsf.component.UIDataAdaptorBase.encodeBegin(UIDataAdaptorBase.java:1225)

          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1641)

          at javax.faces.render.Renderer.encodeChildren(Renderer.java:164)

          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)

          at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:300)

          at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:181)

          at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:125)

          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)

          at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)

          at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)

          at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:200)

          at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:195)

          at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)

          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)

          at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:300)

          at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:101)

          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)

          at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)

          at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)

          at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:200)

          at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:195)

          at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)

          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)

          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1643)

          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1646)

          at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:594)

          at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)

          at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)

          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)

          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)

          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)

          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)

          at java.lang.Thread.run(Unknown Source)

       

       

      Regards,

      Satya