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

Function mismatch with description in document: Form.jwc and tapestry.request.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0.1
    • 4.1.2
    • Framework
    • None
    • hivemind1.1.1

    Description

      1/ Form component specifiaction

      <parameter name="clientValidationEnabled">
      <description>
      If true (the default) then client-side validation will be generated upon render for any
      required or validating fields.
      </description>
      </parameter>

      Shoud declare a default value as description elment said. Or else, the value of clientValidationEnabled property in enhanced Form class will be false.

      <parameter name="clientValidationEnabled" default-value="ognl:true">

      2/CookieSource hivemind configuration:

      <service-point id="CookieSource">

      Allows access to incoming HTTP cookie values for the active (per-thread) request.

      <invoke-factory>
      <construct class="impl.CookieSourceImpl">
      <set-service property="request" service-id="tapestry.globals.HttpServletRequest"/>
      <set-service property="response" service-id="tapestry.globals.HttpServletResponse"/>
      <set property="defaultMaxAge" value="${org.apache.tapestry.default-cookie-max-age}"/>
      </construct>
      </invoke-factory>
      </service-point>

      <set property="defaultMaxAge" value="${org.apache.tapestry.default-cookie-max-age}"/>

      Here, defaultMaxAge value is injected by propertyname placeHolder, it will not prefer to search value from application specification meta elment - "org.apache.tapestry.default-cookie-max-age". (I test it twice.)

      But this document say that specialize meta in app spec will be useful. Or I misunderstand?

      http://jakarta.apache.org/tapestry/UsersGuide/configuration.html#configuration.properties

      I think "app-property:org.apache.tapestry.default-cookie-max-age" will be ok. Like this:

      <implementation service-id="tapestry.request.CookieSource">
      <invoke-factory>
      <construct class="framework.tapestry.service.CookieSourceImpl">
      <set-service property="request" service-id="tapestry.globals.HttpServletRequest"/>
      <set-service property="response" service-id="tapestry.globals.HttpServletResponse"/>
      <set-object property="defaultMaxAge" value="app-property:org.apache.tapestry.default-cookie-max-age"/>
      <set-object property="domain" value="app-property:framework.tapestry.default-cookie-domain"/>
      <set-object property="path" value="app-property:framework.tapestry.default-cookie-path"/>
      <set-object property="version" value="app-property:framework.tapestry.default-cookie-version"/>
      </construct>
      </invoke-factory>
      </implementation>

      But must define my own implements.

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            sorphi sorphi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: