Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2308

TriggerFragment mixin is not working if it is applied for a field in a beaneditor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.4
    • 5.4
    • tapestry-core
    • None

    Description

      I am trying to use FormFragment with TriggerFragment on checkbox in the way it is documented at: http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/FormFragment.html

      Here is my template snippet
      --------------------------------

      <t:beaneditor object="job" include="title,description,proposalDeadline,jobCompletionDeadline,tags,canBeDoneRemotely">
        <p:canBeDoneRemotely>
          <t:checkbox t:id="canBeDoneRemotely" value="job.canBeDoneRemotely" t:mixins="triggerfragment" fragment="jobAddress"/>
          <t:label for="canBeDoneRemotely"/>
        </p:canBeDoneRemotely>
       </t:beaneditor>
      
      <t:formfragment t:id="jobAddress" visible="!job.canBeDoneRemotely">
             <t:beaneditor object="job" include="address" />
      </t:formfragment>
      

      The error message I get
      --------------------------------
      The event is bound properly and gets triggered when clicking on the checkbox, but I get the this error message:
      Uncaught Error: Attempt to wrap a null DOM element dom.js:411
      wrapElement dom.js:411
      update form-fragment.js:36
      wrapped dom.js:49
      jQuery.event.dispatch jquery.js:4624
      jQuery.event.add.elemData.handle jquery.js:4292

      The reason:
      ------------------
      In form-fragment.js at line 36 spec.fragmentId is undefined.

      Attachments

        Issue Links

          Activity

            People

              jkemnade Jochen Kemnade
              balapal Balázs Palcsó
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: