Toggle Modal Dialog from Another Portlet

Problem in Detail :

I have two Portlets in my Project (Let’s say Portlet A and Portlet B). Portlet A has a button(Name: LoadFile) which when clicked sends some data and calls an Action defined in PortletB using Portlet URL Script.
Portlet B displays table data based on information received from PortletA.The table data defined in Portlet B can be edited by User.

Expected Condition :

If user clicks on ‘Load File’ button(PortletA) without saving changes done to table in (PortletB) a modal Dialog should appear that asks user to either save changes or Discard changes before loading another file.

Outcome : I cannot have any button on PortletB.

Request : Suggest me a solution to toggle Modal Dialog in PortletB from button in PortletA Considering that Load file Button is also binded to Inter portlet URL Script.

Have you reviewed the “Control ID Reference” section of the CAF_Development_Help documentation where it describes the external portlet references?

Hi Anand,

Have you tried javaScript to achieve this ?

You can have a javaScript method defined in portlet B which when invoked will give you the state of unsaved data.
By calling this method from portlet A you can toggle the Modal Dialog.

Thanks
Abdul Bari Khan

Hi,

Actually we are not expected to use Java Scripts.
And also this issue has been resolved now using Extended Portlet.

Thanks,
Anand