tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ernest Monklitch (JIRA)" <...@tapestry.apache.org>
Subject [jira] Created: (TAPESTRY-2276) Required validation fails when used with select and blankOption="ALWAYS"
Date Tue, 18 Mar 2008 17:55:24 GMT
Required validation fails when used with select and blankOption="ALWAYS"
------------------------------------------------------------------------

                 Key: TAPESTRY-2276
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2276
             Project: Tapestry
          Issue Type: Bug
    Affects Versions: 5.0.11
            Reporter: Ernest Monklitch


I have drop down made defined like this:

<t:select t:model="selectModel" label="message:orient.admin.entity.manufacturer.edit.country"
t:id="countrySelectDrop" t:value="manufacturer.country.id" t:validate="required" blankLabel="message:select-blanklabel"
blankOption="ALWAYS"></t:select>

I thought that this should produce the normal "You must provide value for xxxxx." notification,
but it results in type coersion error (manufacturer.counrty.id is Integer.)

It seems that the coersion happens before required validation and in select one only catches
ValidationException.

        try
        {
            _fieldValidationSupport.validate(selectedValue, _resources, _validate);

            _value = selectedValue;
        }
        catch (ValidationException ex)
        {
            _tracker.recordError(this, ex.getMessage());
        }

Is this a bug or am I missing something obvious?

StackTrace:
# java.lang.NumberFormatException
For input string: ""

Stack trace

        * java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        * java.lang.Long.parseLong(Long.java:424)
        * java.lang.Long.<init>(Long.java:671)
        * org.apache.tapestry.ioc.services.TapestryIOCModule$7.coerce(TapestryIOCModule.java:159)
        * org.apache.tapestry.ioc.services.TapestryIOCModule$7.coerce(TapestryIOCModule.java:157)
        * org.apache.tapestry.ioc.services.CoercionTuple$CoercionWrapper.coerce(CoercionTuple.java:54)
        * org.apache.tapestry.ioc.internal.services.CompoundCoercion.coerce(CompoundCoercion.java:46)
        * org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.coerce(TypeCoercerImpl.java:126)
        * org.apache.tapestry.internal.services.TypeCoercedValueEncoderFactory$1.toValue(TypeCoercedValueEncoderFactory.java:45)
        * org.apache.tapestry.corelib.components.Select.processSubmission(Select.java:146)
        * org.apache.tapestry.corelib.base.AbstractField.processSubmission(AbstractField.java:184)
        * org.apache.tapestry.corelib.base.AbstractField.access$100(AbstractField.java:33)
        * org.apache.tapestry.corelib.base.AbstractField$ProcessSubmissionAction.execute(AbstractField.java:97)
        * org.apache.tapestry.corelib.base.AbstractField$ProcessSubmissionAction.execute(AbstractField.java:91)
        * org.apache.tapestry.corelib.components.Form.executeStoredActions(Form.java:405)
        * org.apache.tapestry.corelib.components.Form.onAction(Form.java:331)
        * org.apache.tapestry.corelib.components.Form.dispatchComponentEvent(Form.java)
        * org.apache.tapestry.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:851)
        * org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1004)
        * org.apache.tapestry.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
        * org.apache.tapestry.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
        * org.apache.tapestry.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
        * org.apache.tapestry.services.TapestryModule$40.handle(TapestryModule.java:2110)
        * org.apache.tapestry.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
        * org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:944)
        * com.orient.webshop.services.AppModule$1.service(AppModule.java:76)
        * com.orient.webshop.services.AppModule$3.service(AppModule.java:128)
        * org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
        * org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:553)
        * org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:520)
        * org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
        * org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
        * org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
        * org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
        * org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
        * org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:924)
        * org.apache.tapestry.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:43)
        * org.apache.tapestry.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
        * org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:168)
        * org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        * org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
        * org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
        * org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
        * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        * org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
        * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        * org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
        * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        * org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
        * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        * org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
        * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        * org.acegisecurity.securechannel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:138)
        * org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        * org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
        * org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183)
        * org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
        * org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        * org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        * org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
        * org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
        * org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        * org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        * org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        * org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        * org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        * org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        * org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        * org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        * org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        * org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        * org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        * java.lang.Thread.run(Thread.java:619)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message