Uploaded image for project: 'KS Enrollment'
  1. KS Enrollment
  2. KSENROLL-5767

Issue with displaying dialog from within a collection line action method

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core Technical
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • KS Theme:
      Rice upgrade - Utilize new feature
    • KS ENR Product Stream:
      Not Applicable

      Description

      When we use dialog in a collection line action method, the controller method could not find the action parameters (selected index and selected collection path) when we click on the dialog option buttons. Looks like we need to pass in the selected line action's actionParameters() in lightboxButtonScript() js method (krad.utility.js). Please let me know if we have any workaround.

      Here is the Uif-TableCollectionSubSection section we defined

      <property name="lineActions">
      <list>
      <bean parent="Uif-ActionLink" p:ajaxSubmit="false" p:methodToCall="markCourseForJointOffering"
      p:performClientSideValidation="false" p:actionLabel="@

      {!#lp.selectedToJointlyOfferred ? 'Create New' : 'Deselect'}

      " p:render="@

      {!#lp.alreadyOffered}

      "/>
      </list>
      </property>

      And, here is the controller method

      @RequestMapping(params = "methodToCall=markCourseForJointOffering")
      public ModelAndView markCourseForJointOffering(@ModelAttribute("KualiForm") MaintenanceDocumentForm form, BindingResult result,
      HttpServletRequest request, HttpServletResponse response) throws Exception {

      String dialogName = "deleteConfirmDialog";

      if (!hasDialogBeenAnswered(dialogName, form))

      { return showDialog(dialogName, form, request, response); }

      boolean dialogAnswer = getBooleanDialogResponse(dialogName, form, request, response);
      form.getDialogManager().resetDialogStatus(dialogName);

      return getUIFModelAndView(form);
      }

      And, here is the dialog bean def

      <bean id="deleteConfirmDialog" parent="Uif-OK-Cancel-DialogGroup"
      p:promptText="When Set of Courses is in Locked state, Departmental users will be unable to make changes." >
      <property name="headerText" value="Warning - Formats Already Assigned"/>
      <property name="availableResponses">
      <list>
      <bean parent="Uif-KeyLabelPair" p:key="Y" p:value="Update Formats"/>
      <bean parent="Uif-KeyLabelPair" p:key="N" p:value="Cancel"/>
      </list>
      </property>
      <property name="responseInputField">
      <bean parent="Uif-MainteanceDialogResponse"/>
      </property>
      </bean>

        Attachments

          Issue Links

            Activity

            Hide
            vpremcha Venkat PremChandran (Inactive) added a comment -

            The KS workaround is to have form variables for those properties and assign it from the client before invoking the action. Something like this

            <bean parent="Uif-ActionLink" p:ajaxSubmit="false" p:methodToCall="markCourseForJointOffering"
            p:performClientSideValidation="false" p:actionLabel="@

            {!#lp.selectedToJointlyOfferred ? 'Create New' : 'Deselect'}

            " p:onClickScript="writeHiddenToForm("document.newMaintainableObject.dataObject.selectedIndex", "@

            {#index}

            ");" p:render="@

            {!#lp.alreadyOffered}

            "/>

            Show
            vpremcha Venkat PremChandran (Inactive) added a comment - The KS workaround is to have form variables for those properties and assign it from the client before invoking the action. Something like this <bean parent="Uif-ActionLink" p:ajaxSubmit="false" p:methodToCall="markCourseForJointOffering" p:performClientSideValidation="false" p:actionLabel="@ {!#lp.selectedToJointlyOfferred ? 'Create New' : 'Deselect'} " p:onClickScript="writeHiddenToForm("document.newMaintainableObject.dataObject.selectedIndex", "@ {#index} ");" p:render="@ {!#lp.alreadyOffered} "/>

              People

              • Assignee:
                lsymms Larry Symms
                Reporter:
                vpremcha Venkat PremChandran (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: