Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-2176

Select component cannot store a blank value on the client side and have it represent null.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 5.0.10
    • None
    • Core Components
    • None
    • Windows XP, Eclipse 3.3.1, Hibernate, Jetty

    Description

      When implementing a select component that is populated with values from a database column, which represents a many to one relationship with the object/entity represented by the form containing the select component, blank values can be added and validated when editing the object/entity, but not when creating a new object/entity.

      For example, on a form representing a Product entity that contains a select component with a list of Manufacturers, it is possible to:

      1. have a blank Manufacturer by default
      2. edit a Product and select the blank Manufacturer and get the validation="required" message when attempting to save

      but it is not possible to get the validation message when creating a new Product if the blank Manufacturer is selected when saving. Instead the following exception (partial) is thrown:

      • org.apache.tapestry.ioc.internal.util.Defense.notBlank(Defense.java:59)
      • org.apache.tapestry.internal.TapestryInternalUtils.encodeContext(TapestryInternalUtils.java:519)
      • org.apache.tapestry.internal.services.ComponentInvocationImpl.getPath(ComponentInvocationImpl.java:101)
      • org.apache.tapestry.internal.services.ComponentInvocationImpl.buildURI(ComponentInvocationImpl.java:60)
      • org.apache.tapestry.internal.services.LinkImpl.buildURI(LinkImpl.java:105)
      • org.apache.tapestry.internal.services.LinkImpl.toRedirectURI(LinkImpl.java:120)
      • org.apache.tapestry.internal.services.ResponseImpl.sendRedirect(ResponseImpl.java:69)
      • org.apache.tapestry.internal.services.ActionRenderResponseGeneratorImpl.generateResponse(ActionRenderResponseGeneratorImpl.java:45)
      • org.apache.tapestry.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:66)
      • 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$39.handle(TapestryModule.java:2073)
      • org.apache.tapestry.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:131)
      • org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:911)
      • com.formos.project.services.AppModule$1.service(AppModule.java:134)

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            daniel.harvey Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: