Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-9614

Dialogs not correctly returning to controller method

    Details

    • Type: Bug Fix Bug Fix
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Similar issues:
      KULRICE-7446Implement return from dialog
      KULRICE-8565Collection table starts not displaying after returning from a controller called dialog.
      KULRICE-7445Controller Hooks to askQuestion , showDialog Lightbox
      KULRICE-9059Issue with displaying dialog from within a collection line action method
      KULRICE-1218Question Framework not returning to correct Struts action method after processing question
      KULRICE-7032Allow controller methods to return one way regardless of whether doing a refresh or full build
      KULRICE-7618showDialog() - complete http request without returning to controller
      KULRICE-8319Expressions not being evaluated for components in a dialog group
      KULRICE-12561Add Dialogs to DocumentControllerBase methods
      KULRICE-10397Allow for callback methods for quickfinder (lookup) returns
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      UIF Component
    • Application Requirement:
      KS
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Actually, I'm wrong, sorry. It behaves very same way....
      (just refreshed the page, so I didn't notice it's still there).

      So yeah, problem is there.

      On Fri, May 24, 2013 at 9:09 AM, Valeriya Gadiyak <vgadiyak@gmail.com> wrote:

      Hi Jerry,
      I did some more digging. It's really odd, but looks like the redirect (from UifControllerBase.returnFromLightbox) doesn't do a trick. redirectURL =
      http://localhost:8081/ks-with-rice-bundled-dev/kr-krad/academicCalendar?viewId=academicCalendarFlowView&ajaxRequest=false&methodToCall=deleteTerm&formKey=a11c9229-9873-4e9f-90b6-538924c78db6
      however it doesn't care for "methodToCall".
      I override returnFromLightbox to "return getUIFModelAndView" instead of "return performRedirect" and it works perfectly fine.
      Any ideas why is that?

      Thanks!
      Val.

      So my main question (I guess ) is why it doesn't go to the controller after I click "Delete" for the dialog (like it does for other cases)?

      Thank you!
      Val.

      On Thursday, May 23, 2013 10:56:06 AM UTC-4, vgad...@gmail.com wrote:
      Hello!

      I looked here if it was asked before, and it seems to be similar to https://groups.google.com/a/kuali.org/forum/?fromgroups#!searchin/rice.usergroup.krad/dialog/rice.usergroup.krad/KXAtqKeXEgQ/rfMMDL7TOmAJ

      When I'm trying to delete draft I'm sent to dialog, but when I hit "Delete" in a dialog I return back to the original page, and draft is still there. Now if I click "Delete Draft" again I don't have dialog anymore, BUT draft gets deleted. I did debug, and looks like when I click "Delete Draft" first it goes through dialog, but doesn't go back to the controller. When I click "Delete Draft" 2nd time hasDialogBeenDisplayed(dialog, academicCalendarForm) is already satisfied, so it just proceeds to the rest of the controller.

      I tried to debug other "delete" we have for ACAL, and it worked. The only difference was in UifControllerBase,showDialog my form is Ajax Request, while other is not.

      Any ideas?

      Controller:

      public ModelAndView deleteTerm(@ModelAttribute("KualiForm") AcademicCalendarForm academicCalendarForm, BindingResult result,
      HttpServletRequest request, HttpServletResponse response) {

      String dialog = CalendarConstants.ACADEMIC_DELETE_CONFIRMATION_DIALOG;
      if (!hasDialogBeenDisplayed(dialog, academicCalendarForm))

      { //redirect back to client to display lightbox return showDialog(dialog, academicCalendarForm, request, response); }

      else{
      if(hasDialogBeenAnswered(dialog,academicCalendarForm)){
      boolean confirmDelete = getBooleanDialogResponse(dialog, academicCalendarForm, request, response);
      academicCalendarForm.getDialogManager().resetDialogStatus(dialog);
      if(!confirmDelete)

      { return getUIFModelAndView(academicCalendarForm); }

      } else

      { //redirect back to client to display lightbox return showDialog(dialog, academicCalendarForm, request, response); }

      }

      int selectedLineIndex = KSControllerHelper.getSelectedCollectionLineIndex(academicCalendarForm);
      .......

      XML

      ....

      <property name="dialogs">
      <list>
      <ref bean="KS-AcademicCalendar-ConfirmDelete-Dialog"/>
      <ref bean="KS-AcademicTerm-ConfirmDelete-Dialog"/>
      </list>
      </property>
      </bean>

      <bean id="KS-AcademicTerm-ConfirmDelete-Dialog" parent="Uif-DialogGroup" >
      <property name="renderHeader" value="false"/>
      <property name="promptText"
      value="Are you sure you want to delete the Academic Term?"/>
      <property name="availableResponses">
      <list>
      <bean parent="Uif-KeyLabelPair" p:key="yes" p:value="Delete"/>
      <bean parent="Uif-KeyLabelPair" p:key="no" p:value="Cancel"/>
      </list>
      </property>
      </bean>

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Jerry Neal (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Structure Helper Panel