Skip to main content
  1. Posts/

3 Ways to Popup an Applet

·3 mins

Popup applets are not commonly seen in implementations. The objective is simple - how will you popup an applet from an underlying applet.

Though pick applets and MVG applets also are popups, we are not talking about those here. Siebel has standard ways of handling pick and MVG applets. You just specify a the Pick/MVG, and Siebel is going to popup that when the user clicks the icon. The behavior is driven by the class of the applet and everyone is happy.

Popup applets are slightly different. Driven by underlying class, these applets can popup anywhere without rhyme or reason. Of course they are driven by buttons as is the case with any legacy application (oops!).

Use cases for popups are plenty -

  • Show detail of the record showed in the list without navigating to the detail view (popup a form applet for the current record)
  • Show a list of related records in the context of record being viewed
  • Show the records from an external system without requiring the user to navigate to that system

So, how do you popup? It turns out there is more than one way - as is typical to Siebel.

1. ShowPopup #

The more popular of the options - this is a simple configuration that needs to be carried out on the base applet.

  1. Create a button (say ‘Related Articles’)
  2. Specify the method as ‘ShowPopup’ against the button
  3. Specify the following user properties in the Control user property ``` Name = Popup Value = Article List Applet Mode = Base / Edit / Edit List Popup Dimension = 300 X 500


Need I say 'compile'? You will then see a nice button with a nice popup.

### 2. Server Script

What is Siebel if there is no scripting? Scripting can be used to invoke a popup applet - but it is not a direct approach. You invoke an OOB service to get this done.

1. Create a button called "Related Articles"
2. Specify a custom method - say 'ShowRelatedArticles'
3. Now, write the following script in PreInvokeMethod of the underlying applet ```
   if (MethodName == "ShowRelatedArticles") {
   var bsSLM = TheApplication().GetService("SLM Save List Service");
   var psIn = TheApplication().NewPropertySet();
   var psOut = TheApplication().NewPropertySet();
   psIn.SetProperty("Applet Height", "400");
   psIn.SetProperty("Applet Mode", "2");  //Edit
   psIn.SetProperty("Applet Name", 'Article List Applet');
   psIn.SetProperty("Applet Width", "800");
   bsSLM.InvokeMethod("LoadPopupApplet", psIn , psOut);
   }
   return (CancelOperation);

By using this method you can have more than one popup applets on the same applet and have your own custom logic.

3. Browser Script #

How can we forget the javascript like browser script that is so simple but yet can cause so many complicated issues.

The configuration here is straight forward as well -

  1. Create a button ‘Show Related  Articles’ (as you can see from the above examples, I really like this button )
  2. Edit browser script for the underlying applet and write this beautiful piece of code ``` function Applet_InvokeMethod (name, inputPropSet) { if(name == “ButtonClick”) { inputPropSet.SetProperty(“SWEMethod”, “ShowPopup”); inputPropSet.SetProperty(“SWETA”, “Article List Applet”); inputPropSet.SetProperty(“SWEW”, “400”); inputPropSet.SetProperty(“SWEH”, “200”); inputPropSet.SetProperty(“SWESP”, “true”); inputPropSet.SetProperty(“SWEM”, “2”); // Base, Edit, Edit List this.InvokeMethod(“ShowPopup”, inputPropSet); } //if }


### Conclusion

In closing comments - use the third method if you are crazy or you want to drive the support team nuts.