Making PropertySelection disabled works and no error occurs. But the logic of my web application require SELECT to be disabled/enabled on client side according to the value of other SELECT.
So, when SELECT is disabled on client and ProperySelection is disabled on server it is OK. But, when SELECT is enabled on the client and ProperySelection is disabled on the server it is NOT OK, because data from SELECT is ignored on the server by PropertySelection (its values is null). The solution was given by Andreas Andreou. The solution is to make SELECT enabled before actual submition. I use onclick event of SUBMIT to do this (onsubmit property of form is cleaned by tapestry, so it cannot be used). 2006/2/9, Geoff Longman <[EMAIL PROTECTED]>: > I wonder if you have the case where the SELECT is disabled on the > client but when the form rewinds, the PropertySelection's disabled > parameter is bound to true? That cause the stack trace I see. > > A workaround would be to have the javascript also update a Hidden > field which would occur in the form BEFORE the PropertySelection. That > way you could ensure that the SELECT and PropertySelection disabled > properties are in synch, thus avoiding the problem. > > Geoff > > On 2/9/06, Yuri Plakosh <[EMAIL PROTECTED]> wrote: > > I use PropertySelection component. In some cases my web application > > require to make SELECT(list box) disabled using javascript. When it is > > disabled and I submit data from form to server an error occurs. > > I investigated Tapestry error page and found that browser has not sent > > parameter for disabled SELECT element. > > > > Tapestry error message is: null > > > > Stack Trace: > > > > * java.lang.Integer.parseInt(Integer.java:415) > > * java.lang.Integer.parseInt(Integer.java:497) > > * > > org.apache.tapestry.form.StringPropertySelectionModel.translateValue(StringPropertySelectionModel.java:78) > > * > > org.apache.tapestry.form.PropertySelection.rewindFormComponent(PropertySelection.java:118) > > * > > org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:115) > > * > > org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617) > > * > > org.apache.tapestry.form.FormSupportImpl.prerenderField(FormSupportImpl.java:706) > > * org.apache.tapestry.form.Form.prerenderField(Form.java:414) > > * > > org.apache.tapestry.valid.FieldLabel.renderComponent(FieldLabel.java:52) > > * > > org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617) > > * > > org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434) > > * > > org.apache.tapestry.form.FormSupportImpl.rewind(FormSupportImpl.java:564) > > * org.apache.tapestry.form.Form.renderComponent(Form.java:226) > > * > > org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617) > > * org.apache.tapestry.form.Form.rewind(Form.java:327) > > * > > org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:439) > > * org.apache.tapestry.form.Form.trigger(Form.java:338) > > * > > org.apache.tapestry.engine.DirectService.triggerComponent(DirectService.java:146) > > * > > org.apache.tapestry.engine.DirectService.service(DirectService.java:132) > > * $IEngineService_1094ed60519.service($IEngineService_1094ed60519.java) > > * > > org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:66) > > * > > org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248) > > * > > org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60) > > * > > $WebRequestServicer_1094ed604f7.service($WebRequestServicer_1094ed604f7.java) > > * > > $WebRequestServicer_1094ed604f3.service($WebRequestServicer_1094ed604f3.java) > > * > > org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56) > > * > > $ServletRequestServicer_1094ed604d7.service($ServletRequestServicer_1094ed604d7.java) > > * > > org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55) > > * > > $ServletRequestServicerFilter_1094ed604d3.service($ServletRequestServicerFilter_1094ed604d3.java) > > * > > $ServletRequestServicer_1094ed604d9.service($ServletRequestServicer_1094ed604d9.java) > > * > > org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52) > > * > > $ServletRequestServicerFilter_1094ed604d1.service($ServletRequestServicerFilter_1094ed604d1.java) > > * > > $ServletRequestServicer_1094ed604d9.service($ServletRequestServicer_1094ed604d9.java) > > * > > org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53) > > * > > $ServletRequestServicerFilter_1094ed604d5.service($ServletRequestServicerFilter_1094ed604d5.java) > > * > > $ServletRequestServicer_1094ed604d9.service($ServletRequestServicer_1094ed604d9.java) > > * > > $ServletRequestServicer_1094ed604cb.service($ServletRequestServicer_1094ed604cb.java) > > * > > org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123) > > * > > org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:168) > > * javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > * javax.servlet.http.HttpServlet.service(HttpServlet.java:810) > > * > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) > > * > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > > * > > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) > > * > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) > > * > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > > * > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > > * > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) > > * > > org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39) > > * > > org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153) > > * > > org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59) > > * > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) > > * > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) > > * > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) > > * > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > > * > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) > > * > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) > > * > > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) > > * > > org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) > > * java.lang.Thread.run(Thread.java:595) > > > > -- > > Best Regards, > > Yuri Plakosh > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > The Spindle guy. http://spindle.sf.net > Get help with Spindle: > http://lists.sourceforge.net/mailman/listinfo/spindle-user > Blog: http://jroller.com/page/glongman > Feature Updates: http://spindle.sf.net/updates > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Best Regards, Yuri Plakosh --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
