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

nested AjaxFormLoops not working correct

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.4.3
    • Fix Version/s: None
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      if we use nested ajaxformloops the addRow-event method ignored by second (nested)
      ajaxformloop.

      Page.html
      <div t:type="AjaxFormLoop" id="outterLoop">
        <div t:type="AjaxFormLoop" id="innerLoop">
          <p:addRow>
            <a href="#" t:type="AddRowLink" id="innerLoopAddRowLink">add item to inner loop</a>
          </p:addRow>
        </div>
        <p:addRow>
            <a href="#" t:type="AddRowLink" id="outterLoopAddRowLink">add item to outter loop</a>
        </p:addRow>
      </div>
      
      Page.java
      @InjectComponent
      private AjaxFormLoop outterLoop
      
      @InjectComponent
      private AjaxFormLoop innerLoop
      
      @InjectComponent
      private AddRowLink outterLoopAddRowLink
      
      @InjectComponent
      private AddRowLink innerLoopAddRowLink
      
      @OnEvent( component = "outterLoop", value = EventConstants.ADD_ROW )
      OutterObject onAddRowFromOutterLoop() {
      		return new OutterObject();
      }
      
      @OnEvent( component = "innerLoop", value = EventConstants.ADD_ROW )
      InnerObject onAddRowFromInnerLoop() {
      		return new InnerObject ();
      }
      

      in this case, whatever wich add row link is clicked,
      always the method "onAddRowFromOutterLoop" executed

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              shomburg Sven Homburg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: