Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-19384

Implement formTabRendered Javascript event in addition to formTabActivated

    Details

    • ACT Numbers:

      00771427, 00957956

      Description

      Summary
      In the Javascript tab of form field editor, there is not an option to execute Javascript against the tab that is changed to. The only available event in regards to form tabs is the event 'formTabActivated'. This event only executes Javascript in the scope of the current form tab. It executes the instant that a tab is clicked.

      Steps to reproduce
      1. Setup Activiti 1.5.2
      2. Login as admin@app.activiti.com to activiti-app
      3. Via kickstart import and publish the attached app READ-ONLY-change-tab.zip
      a) This app contains a simple process: start event -> user task (assigned to initator) -> end event
      b) The user task is having a form
      c) The used form has four tabs.
      d) The form has configured the following code for the formTabActivated event

      alert("The formTabActivated event triggers when clicking a new tab, not after the new tab was rendered");
      
      if (document.getElementById("activiti-label7")!==null){
          alert("Label7 was found in this tab. Event formTabActivated executes the Javascript against the current tab.")
      }
      
      else if (document.getElementById("activiti-label7")===null){
          alert(" Label7 does NOT exist in this tab. Event formTabActivated executes the Javascript against the current tab.")
      }
      

      e) Tab Two contains the field with "Label7"
      4. Start a process from the published app from your landing page
      5. Open the created user task "Task1"
      6. Click on the second tab

      Current behaviour
      You are seeing two alerts:
      "The formTabActivated event triggers when clicking a new tab, not after the new tab was rendered"
      "Label7 does NOT exist in this tab. Event formTabActivated executes the Javascript against the current tab."
      The second alert indicates, that script is triggered in the scope of current tab and not in the scope of the tab that is activated.

      Desired behaviour
      Having an event formTabRendered would allow execution of Javascript within the scope of the tab changed into and during it is rendered.

      Supporting evidence
      Reproduced current behaviour in latest Activiti 1.5.2. There is no event option to trigger something for a rendered tab.

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  sliaw Seng Liaw
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Structure Helper Panel