[KULRICE-9614] Dialogs not correctly returning to controller method Created: 24/May/13  Updated: 16/Jan/15

Status: Open
Project: Kuali Rice Development
Component/s: Development
Affects Version/s: None
Fix Version/s: Backlog
Security Level: Public (Public: Anyone can view)

Type: Bug Fix Priority: Major
Reporter: Jerry Neal (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: Old
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relate
is related to KSENROLL-5767 Issue with displaying dialog from wit... Open
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>


Generated at Wed Sep 30 18:57:16 CDT 2020 using JIRA 7.0.11#70121-sha1:19d24976997c1d95f06f3e327e087be0b71f28d4.