Create a UI Action that Displays a Modal Popup Window

Community Alums
Not applicable

I want to create a UI Action that opens a Modal Popup Window; this Modal window would display a number of Check boxes or Selection Boxes.  Then based on the Options that the user selected, the UI Action would then call a number of different functions in a Script Include.

 

What is the best way to do this?

 

  1. Ideally I wanted to get the UI Action to Open a Widget as a Popup.   I tried to configure my UI Action as a Client Script (by ticking the checkbox that ensure the UI Actions runs on the Client) but when I run the code, spModal is undefined.    spModal appears to work in Client Scripts but not UI Actions (or maybe I am making a basic error?)

  2. I then thought about Using GlideModal.  Apparently, you can uses this to render a UI Page.  UI Pages use Jelly and are apparently depreciated.  I have used them before - but not often.

  3. Maybe I could just use the UI Action to open a URL.  This URL would then open a full blown Portal Page with my Widget included.  Seams a bit overkill.  Also not sure - if I can display a Portal page as a small popup Window.  Can I?

So what is best practice for this scanerio?

1 ACCEPTED SOLUTION

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Community Alums ,

 

The usual method people would use or specifically I would use is to call UI page using glide modal window. It's not deprecated. We still use it.

 

Else 3rs option is also good where it redirects u to a different url where that page sits.

 

Thanks,

Danish

 

View solution in original post

2 REPLIES 2

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Community Alums ,

 

The usual method people would use or specifically I would use is to call UI page using glide modal window. It's not deprecated. We still use it.

 

Else 3rs option is also good where it redirects u to a different url where that page sits.

 

Thanks,

Danish

 

Community Alums
Not applicable

Yup.  I think you are right.

I did try option 3 and got it working.  But I had to create a portal, portal page and Widget.  My UI Action had htis code (see below).  Seams like overkill.

var openCopyUpdateSetPopup = function() {
    var url = "copy_update_set?id=copy_update_set";
    g_navigation.openPopup(url,'Copy Update Set', 'resizable,scrollbars,status', true);
};
 
But I guess one advantage to the this method, is that my Server code can all go in the Widget.  I don't have to fiddle about with GlideAjax.  so it is Swings and Roundabouts.  I guess.