Popups in popups

I have a button that calls a calendar. It does so by having popup factory make a popup. The calendar popup has a combo box to select months, but it doesn't seem to work. I think this is an issue of a popup having problems calling another popup (since the combobox uses a popup menu).
Can anyone give me a hint on how to get this working out?

I think that typically there is only 1 actual popup window/component and that is shared. Did you write the calendar? Can you change it to not use a popup itself, but to use either a component in the frame's layered pane's dialog layer or a JWindow?

Similar Messages

  • Form validation works in a popup but popup autocancels

    I have a popup with a form inside, but when validate popup autocloses..... That's my problem, i don't want it close till all data is correct.

    set the autocancel=disabled
    chk here
    http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_popup.html
    "disabled": the popup will restore visibility after a dom replacement or document reload.

  • Popup to popup to main page?

    I don't know if this is possible or not so I thought I'd ask here.
    is it possible to create a popup lov that when you select the value you want it opens another popup lov to choose that is based on the return of the first lov. then when you choose what your looking for it returns the final selection back to the home page?
    the first lov popup would be a static list of values, when a user chooses it the new popup happens and uses the static value as the where clause in the next popup.
    its hard to explain but is it possible? and if its not clear let me know and I'll try to explain it better.

    Yes, it is possible, but probably not using the Apex LOV framework..
    If I were doing it, I would create a simple page with no or a custom page template.
    I would have two report regions on the page-
    The first report would be a basic list, your LOV as it were, and then make the column clickable (A link column).
    The second report would be driven by the first one, only displaying when one of the values in the first report is clicked on.
    Make the values on the second report clickable too, except they would execute a bit of javascript to populate the item on the calling page.

  • How do i remove popup adds. popups were disabled in preferences but entered somehow.

    OS 10.9.3
    popup blocker was enabled but must have piggybacked on something else that was downloaded.
    How do I remove this malware ?

    There is no need to download anything to solve this problem.
    You may have installed the "VSearch" trojan, perhaps under a different name. Remove it as follows.
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data before proceeding.
    Step 1
    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot," "Trovi," or "Conduit" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    Reset the home page and default search engine in all the browsers, if it was changed.
    Step 2
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "com.vsearch.agent.plist" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework
    ~/Library/Internet Plug-Ins/ConduitNPAPIPlugin.plugin
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    The problem may have started when you downloaded and ran an application called "MPlayerX." That's the name of a legitimate free movie player, but the name is also used fraudulently to distribute VSearch. If there is an item with that name in the Applications folder, delete it, and if you wish, replace it with the genuine article from mplayerx.org.
    This trojan is often found on illegal websites that traffic in pirated content such as movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the Internet criminal behind VSearch has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing has not done so, even though it's aware of the problem. This failure of oversight has compromised both Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • Lost connection using popup over popup

    In a JSP open a new JSP modal popup, in other JSP make same thing.
    Sometimes this works correctly but in others fails, the problem is "the connection is null".
    I use the connection in session and pass it between the pages. (In session I put the user, password and ULR), all its when error occurs are null.
    Thanks a lot.
    Miguel Angel Caro

    I wanted to clarify on the issue - more at code level
    In my JSP , I have the following lines to write the results back to the browser
    ByteArrayOutputStream ostr = new ByteArrayOutputStream
    PrintWriter pWriter = new PrintWriter(ostr, true);
    lFormat.formatCSV(pWriter); // the lformat object is our java class that has a list of objects that it iterates over and prints comma-separated strings to the printwriter
    out.print(ostr);
    out.flush();
    Using https:// for a request that is made from a broadband comes back with results. However using a slow dial-up connection causes incomplete data received in the browser.
    The code used to look like this till last week which we changed to fix another problem
    lformat.formatCSV(new PrintWriter(out));
    This above line has been working both for https:// and http:// requests to our server. However we recently found out that a very slow network connection causes the WLS thread to get Stuck and cause excessive GC making the entire server very slow. Changing the code makes the stuckthread problem go away but the data is not complete.
    Any help is greatly appreciated

  • Creating a Popup in ActionScript vs Creating a Popup in MXML

    Hello there
    I think I need a little help with a  couple of items. I'm using the Popup Library version 1.11 and I'm trying  to open up a Popup (with an associated presentation model) which I have  defined as follows.
    view.popup.EditSection.mxml
    view.popup.EditSectionPM.as
    the  view that opens the popup class (EditSection)  dows the following in  MXML, and it looks right, but it gives me limited access to the  reference of the popup window. With MXML it looks like this  http://grab.by/6Oaf
            <popup:PopUpFactory id="editSectionPopup" reuse="true" modal="true">
                 <fx:Component>
                     <popupWindows:EditSection/>
                 </fx:Component>
                 <popup:behaviors>
                     <spark:ZoomAndFadeBehavior duration="1000"/>
                     <behavior:KeepCenteredBehavior/>
                     <behavior:CenterBehavior/>
                     <popup:AddPopUpToParsleyContext />
                 </popup:behaviors>
             </popup:PopUpFactory>
    instead of  this, I've cobbled together the following ActionScript, but the popups  look VASTLY different when they open. Here is the ActionScript.. the  creationComplete runs the initializePopup() and the button click runs  the openPopup().. this version looks like http://grab.by/6Oaz when  opened.
    It doesnt seem to honor the height, width, etc  of the Class defining the popup, and when I click the different states,  I get errors indicating that no such states exist... though they exist  in the class
    question: Why might Cairngorm be opening up the wrong (generic?) TitleWindow? What am i doing wrong here?
        <fx:Script>
             <![CDATA[
                 import com.adobe.cairngorm.popup.PopUpFactory;
                 import com.adobe.cairngorm.popup.PopUpWrapper;
                 import com.adobe.cairngorm.popup.behavior.CenterBehavior;
                 import com.adobe.cairngorm.popup.behavior.KeepCenteredBehavior;
                 import com.adobe.cairngorm.popup.behavior.spark.ZoomAndFadeBehavior;
                 import com.company.psa.docbuilder.adhoc.view.editsection.EditSection;
                 import mx.collections.ArrayCollection;
                 import mx.controls.Alert;
                 private var wrapper:PopUpWrapper;
                 private var factory:PopUpFactory;
                 private var zoomAndFadeBehavior = new ZoomAndFadeBehavior();
                 public function initializePopup():void
                     var myEditSectionPopup:EditSection;
                     var myBehaviors:Array = new Array();
                     var myZAF = new ZoomAndFadeBehavior();
                     myBehaviors[0] = myZAF; // How do I set the duration?
                     myBehaviors[1] = new CenterBehavior()
                     myBehaviors[2] = new KeepCenteredBehavior();
                     factory = new PopUpFactory();
                     factory.popup = new ClassFactory(EditSection);
                     factory.reuse = false;
                     factory.modal = true;
                     factory.behaviors=myBehaviors;
                     // How do I reference the opened window?
                 public function openPopup () :void
                     factory.open = true;
             ]]>
         </fx:Script>
    Here is the definition of the EditSection.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:spicefactory="http://www.spicefactory.org/parsley"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    enabled="true"
                    width.EditSectionState="500"
                    height.EditSectionState="350"
                    width.YesNoCancelState="320"
                    height.YesNoCancelState="200"
                    width.YesNoState="320"
                    height.YesNoState="200"
                    title="{pm.windowTitle}"
                    currentState="{pm.viewState}"
                    creationComplete="init()">
        <fx:Metadata>
             [Event(name="close", type="mx.events.CloseEvent")]
         </fx:Metadata>
        <fx:Script>
             <![CDATA[
                 import mx.binding.utils.BindingUtils;
                 import mx.controls.Alert;
                 import mx.core.mx_internal;
                 import mx.events.CloseEvent;
                [Inject]
                 [Bindable]
                 public var pm:EditSectionPM;
                protected function closeHandler(event:CloseEvent):void
                     pm.closeHandler(event);
                     trace("EditSection is closing");
                public function init():void
             ]]>
         </fx:Script>
         <s:states>
             <s:State name="EditSectionState"/>
             <s:State name="YesNoCancelState"/>
             <s:State name="YesNoState"/>
         </s:states>
        <fx:Declarations>
             <spicefactory:Configure/>
         </fx:Declarations>
        <!-- Define the transition to animate the change of view state. -->
         <s:transitions>
             <s:Transition fromState="EditSectionState">
                 <s:Parallel>
                     <mx:Resize target="{this}"
                                duration="500"/>
                 </s:Parallel>
             </s:Transition>
             <s:Transition fromState="YesNoCancelState">
                 <s:Sequence>
                     <mx:Resize target="{this}"
                                duration="500"/>
                 </s:Sequence>
             </s:Transition>
             <s:Transition fromState="YesNoState">
                 <s:Sequence>
                     <mx:Resize target="{this}"
                                duration="500"/>
                 </s:Sequence>
             </s:Transition>
         </s:transitions>
        <s:Label text="Hello There World"
                  left="10"
                  right="10"
                  top="10"
                  verticalAlign="middle"
                  textAlign="center"
                  click="pm.labelClickHandler(event)"/>
        <mx:ControlBar width="50%"
                        left="10"
                        bottom="10"
                        height="40"
                        horizontalAlign="left"
                        verticalAlign="middle">
             <mx:Button label="Cancel"
                        width="120"
                        click="dispatchEvent( new CloseEvent( CloseEvent.CLOSE ) )"
                        includeIn="EditSectionState"/>
             <mx:Button label="Reset to Default"
                        width="140"
                        click="dispatchEvent( new CloseEvent( CloseEvent.CLOSE ) )"
                        includeIn="EditSectionState"/>
         </mx:ControlBar>
         <mx:ControlBar width="50%"
                        right="10"
                        bottom="10"
                        height="40"
                        horizontalAlign="right"
                        verticalAlign="middle">
             <mx:Button label="Save"
                        width="140"
                        click="dispatchEvent( new CloseEvent( CloseEvent.CLOSE ) )"
                        includeIn="EditSectionState"/>
             <mx:Button id="yesButton"
                        label="Yes"
                        width="60"
                        click="dispatchEvent( new CloseEvent( CloseEvent.CLOSE ) )"
                        includeIn="YesNoCancelState,YesNoState"/>
             <mx:Button id="noButton"
                        label="No"
                        width="60"
                        click="dispatchEvent( new CloseEvent( CloseEvent.CLOSE ) )"
                        includeIn="YesNoCancelState,YesNoState"/>
             <mx:Button id="cancelButton"
                        label="Cancel"
                        width="60"
                        click="dispatchEvent( new CloseEvent( CloseEvent.CLOSE ) )"
                        includeIn="YesNoCancelState"/>
         </mx:ControlBar>
         <s:RadioButton id="editSectionsCheckbox"
                        y="30"
                        label="Edit Sections"
                        selected="true"
                        click="pm.editSectionStateClickHandler(event)"
                        y.YesNoCancelState="24"
                        y.YesNoState="24"
                        width.YesNoState="99"
                        horizontalCenter.EditSectionState="-2"
                        y.EditSectionState="30"
                        width.EditSectionState="95"
                        horizontalCenter.YesNoCancelState="-7"
                        horizontalCenter.YesNoState="-3"/>
         <s:RadioButton id="yesNoCancelCheckbox"
                        y="56"
                        label="Yes/No/Cancel"
                        click="pm.yesNoCancelStateClickHandler(event)"
                        y.YesNoCancelState="50"
                        y.YesNoState="50"
                        horizontalCenter.EditSectionState="-1"
                        y.EditSectionState="56"
                        horizontalCenter.YesNoCancelState="-3"
                        horizontalCenter.YesNoState="-3"/>
         <s:RadioButton id="yesNoCheckbox"
                        y="76"
                        label="Yes/No"
                        click="pm.yesNoStateClickHandler(event)"
                        width="99"
                        y.EditSectionState="83"
                        horizontalCenter.EditSectionState="-1"
                        horizontalCenter.YesNoCancelState="-3"
                        horizontalCenter.YesNoState="-3"/>
    </s:TitleWindow>
    Here is the definition of EditSectionPM.as
    /*   Copyright 2010                                                           */
    /*   All rights reserved.                                                     */
    package com.company.psa.docbuilder.adhoc.view.editsection
         import com.company.psa.docbuilder.adhoc.business.IDocumentConfigurationReceiver;
         import com.company.psa.docbuilder.core.business.DocumentConfiguration;
         import flash.events.MouseEvent;
         import mx.controls.Alert;
         import mx.events.CloseEvent;
         public class EditSectionPM implements IDocumentConfigurationReceiver
            [Bindable]
             public var height:int=300;
            [Bindable]
             public var message:String="Spark Popup";
            [Bindable]
             public var viewState:String="EditSectionState";
            [Bindable]
             public var width:int=400;
             [Bindable]
             public var windowTitle:String="Edit: ";
             [Bindable]
             public var documentConfiguration:DocumentConfiguration;
             public var isDirty:Boolean=false;
             public var cancelVisible:Boolean=false;
             // Implementing the notifier receiver design pattern
             public function setDocumentConfiguration(argDocumentConfiguration:DocumentConfiguration):void
                 this.documentConfiguration=argDocumentConfiguration;
             public function closeHandler(event:CloseEvent):void
                 trace("Close was clicked");
             public function cancelHandler(event:CloseEvent):void
                 trace("Cancel was clicked");
             public function resetHandler(event:CloseEvent):void
                 trace("Reset was clicked");
             public function yesHandler(event:CloseEvent):void
                 trace("Yes was clicked");
             public function noHandler(event:CloseEvent):void
                 trace("No was clicked");
             public function editSectionStateClickHandler(event:MouseEvent):void
                 trace("Edit Section state selected (setting this in the PM)");
                 this.viewState="EditSectionState";   
             public function yesNoCancelStateClickHandler(event:MouseEvent):void
                 trace("Yes/No/Cancel state selected (setting this in the PM)");
                 this.viewState="YesNoCancelState";
             public function yesNoStateClickHandler(event:MouseEvent):void
                 trace("Yes/No/Cancel state selected (setting this in the PM)");
                 this.viewState="YesNoState";   
             public function labelClickHandler(event:MouseEvent):void
                 trace("Label was clicked");
                 Alert.show("The Label"+event.toString() ,"You Clicked");

    Hi John,
    If you're using Flex 4, the PopUpFactory isn't needed anymore, you can use the PopUpWrapper for everything. More info here: https://sourceforge.net/adobe/cairngorm/wiki/HowToUseCairngormPopup/
    What's the reason you need a reference to the popup window? I ask because one very common reason is that users want to open and close it from elsewhere (i.e. a Presentation Model). For that, the popup library offers bindable property open, so all your behaviour object needs to do is to bind a Boolean to it and you don't need an extra view reference of the actual popup window. However, you could also get that if you listen to one of the open/close type events; inside each event object there's a popup property that points to the actual popup window. Regarding your AS usage, I didn't see anything wrong at first sight but maybe compare it the AS sample in the PopupTest project? But first, check if you really need to do it in AS as the MXML examples in PopupTest and on the how-to wiki read simpler IMHO.But also, let us know if it does'nt satisfy your use case.
    Alex

  • Closing the browser without popup message

    Hi Experts,
    I refered the following thread and done the below steps
    1.Create a Button called Exit.
    2.Create an action for this button.
    3. In the event handler for this button, write the following code:
    String Url;
    try {
    Url = WDURLGenerator.getWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"close.html");
    wdThis.wdGetAtpEmpDetailsWinInterfaceViewController().wdFirePlugExitPlug(Url);
    } catch (Exception e) {
    wdComponentAPI.getMessageManager().reportException("Technical Exception occured in the application : " + e.toString(), true);
    4.Create a html page called u201Cclose.htmlu201D with Javascript code for closing a browser window.
    5.Place this html page in SRC -> Mimes -> Components -> Project Structure(Create this folder and place the html page in this folder)
    I have used Ie 7.0
    My questin is when i clicking the button. It show popup message like
    "Do you want to close this window " I don't want this popup.
    without popup i need to close this window? How to do that?
    Regards,
    Manivannan P

    Hi Manivannan p,
    1.Create a Button called Close.
    2.Create an action for this button.
    3. In the event handler for this button, write the following code
    You can try this
    public void onActionClose(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionClose(ServerEvent)
    WDPortalEventing.fire("urn:com.sapportals:navigation", "CloseWindow", "");
    //@@end
    This will help you closing the window with out Popup
    Here we are calling a "Portal Event" called " CloseWindow" to close the windoe
    Get back if you have any questions
    Thanks & Regards
    Swetha

  • Acrobat 8 Pro keeps giving me a "...has stopped working" popup, but....

    it's still running and working fine. And even when it's not running, nor have I used it in a while, out of nowhere I'll get a popup saying "Adobe Acrobat 8 has stopped working". Intersting. How can it stop working if it isn't running? And when it's open and I get the popup, why doesn't it shut down? Very odd and mostly annoying. I'm running Vista Home Premium and Acrobat 8 Pro is a legal paid-for version and I hadn't had this problem until maybe a couple months ago. But then with some so-called MS updates, I've had several oddities crop up in other programs.
    In a nutshell, here's what's happening:
    (1) "Adobe Acrobat 8 has stopped working" popups appear when the program isn't even open nor has been used for a while.
    (2) When the program is open and I get the popup (always and several times during a session), the program continues to run with no problem.
    (3) When I click "Close Program" in the popup, the popup disappears but Acrobat continues to run just fine.
    (4) No problem closing Acrobat 8 using the standard "X" in top right corner. Other than the very annoying popups, it seems to work fine.
    (5) I've been using Acrobat 8 Pro for about a year with absolutely no issues until this began about two months ago.
    BTW, I did a dearch and found a couple related topics but no one reporting the same issue I'm experiencing.
    DC

    Tim,
    Tried your suggestion and still getting the popups. Also did a program repair via control panel. I've tried about everything now with no change. I'm sure it has something to do with one or more Windows update(s) since it all of a sudden began after updates a couple months ago but it'd be very difficult to pinpoint which one(s). I only use this program in the work I do for a local magazine to send page proofs to our proofer. The owner purchased it, so maybe I can talk him into buying an update. Hey, it's a write-off !
    DC

  • How to invoke popup from managed bean

    Hi Can anyone give me idea for invoking a pop-up from method in the managed bean plz,
    Here my coding,
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_untitled5.d1}">
    <af:form id="f1" binding="#{backingBeanScope.backing_untitled5.f1}">
    <af:commandButton text="commandButton 2"
    binding="#{backingBeanScope.backing_untitled5.cb2}"
    id="cb2"
    action="#{backingBeanScope.backing_untitled5.cb2_action}"/>
    </af:form>
    <af:popup binding="#{backingBeanScope.backing_untitled5.p1}" id="p1">
    <af:panelWindow binding="#{backingBeanScope.backing_untitled5.pw1}"
    id="pw1"/>
    </af:popup>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_untitled5-->
    </jsp:root>
    Managed bean coding,
    import javax.faces.context.FacesContext;
    import oracle.adf.view.rich.component.rich.RichDocument;
    import oracle.adf.view.rich.component.rich.RichForm;
    import oracle.adf.view.rich.component.rich.RichPanelWindow;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import oracle.adf.view.rich.component.rich.nav.RichCommandButton;
    import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
    import org.apache.myfaces.trinidad.util.Service;
    public class Untitled5 {
    private RichForm f1;
    private RichDocument d1;
    private RichPopup p1;
    private RichPanelWindow pw1;
    private RichCommandButton cb2;
    public void setF1(RichForm f1) {
    this.f1 = f1;
    public RichForm getF1() {
    return f1;
    public void setD1(RichDocument d1) {
    this.d1 = d1;
    public RichDocument getD1() {
    return d1;
    public void setP1(RichPopup p1) {
    this.p1 = p1;
    public RichPopup getP1() {
    return p1;
    public void setPw1(RichPanelWindow pw1) {
    this.pw1 = pw1;
    public RichPanelWindow getPw1() {
    return pw1;
    public void setCb2(RichCommandButton cb2) {
    this.cb2 = cb2;
    public RichCommandButton getCb2() {
    return cb2;
    public String cb2_action() {      .
    FacesContext context = FacesContext.getCurrentInstance();
    ExtendedRenderKitService extRenderKitSrvc =
    Service.getRenderKitService(context, ExtendedRenderKitService.class);
    extRenderKitSrvc.addScript(context,"AdfPage.PAGE.findComponent('" + p1 + "').show();");
    return null;
    looking for ur reply
    Regards,
    Tom

    If you are using JDev 11.1.1.3, then in a managed bean method use the following to show or hide the popup:
    RichPopup.PopupHints hints = ...<set_the_hints>...;
    p1.show(hints);
    // or
    p1.hide();If you are using an older JDev 11g, then use the following:
       * Hides a popup.
       * @param popup Popup to be hidden.
      public static void hidePopup(RichPopup popup) {
        FacesContext context = FacesContext.getCurrentInstance();
        String popupId = popup.getClientId(context);
        StringBuilder script = new StringBuilder();
        script.append("var popup = AdfPage.PAGE.findComponent('").append(popupId).append("'); ")
              .append("if (popup.isPopupVisible()) { ")
              .append("popup.hide();}");
        ExtendedRenderKitService erks =
          Service.getService(context.getRenderKit(), ExtendedRenderKitService.class);
        erks.addScript(context, script.toString());
       * Shows a popup.
       * @param popup Popup to be shown
      public static void showPopup(RichPopup popup) {
        showPopup(popup, null);
       * Shows a popup alligned to the start of specified UI component.
       * @param popup Popup to be shown
       * @param component UI component to allign to
      public static void showPopup(RichPopup popup, UIComponent component) {
        FacesContext context = FacesContext.getCurrentInstance();
        String popupId = popup.getClientId(context);
        String alignId = (component==null) ? null : component.getClientId(context);
        StringBuilder script = new StringBuilder();
        script.append("var popup = AdfPage.PAGE.findComponent('").append(popupId).append("'); ")
              .append("if (!popup.isPopupVisible()) { ")
              .append("var hints = {}; ");
        if (alignId!=null) {
          script.append("hints[AdfRichPopup.HINT_ALIGN_ID] = '").append(alignId).append("'; ")
                .append("hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_START; ");
        script.append("popup.show(hints);}");
        ExtendedRenderKitService erks =
          Service.getService(context.getRenderKit(), ExtendedRenderKitService.class);
        erks.addScript(context, script.toString());
      }You can find these methods in the Steve Muench's utility class JSFUtils.
    Dimitar
    Edited by: Dimitar Dimitrov on Nov 15, 2010 2:59 PM

  • ADF Show popup from managed bean

    Hi, i have one popup in jspx. On click of a command button a method in managed bean should be called and that has to decide whether to show the popup or not. I have a check and using that i need to show this popup. How to show/invoke the popup from managed bean? I used script also but it was not working. Kindly help me.
    Thank you,
    Sankari Kannan

    Hi,
    Which JDeveloper Release You Use?
    In JDeveloper11g the structure View---->Document----->Form.
    Try one of these solutions:
    - Try to put it outside of your pageTemplate tage as:
    <af:view>
    <af:popup>
    </af:popup>
    <af:pageTemplate>
    <f:facet>
    <af:decorativeBox>
    <af:view>
    I don't know is it possible or not.
    - you can put the ids of your popup container as
    StringBuilder strb =
    new StringBuilder("AdfPage.PAGE.findComponent(\"container1:container2:popup5\").show();");
    Sameh Nassar

  • JDeveloper 11.1.2.1, IE8 and erratic popup behavior

    I am trying to do a simple proof of concept in JDeveloper 11.1.2.1 involving a databound table and a popup. I want to add a row to the table by filling in a form on the popup. The popup is opened via an action by clicking a button in the form. I used the Code Corner example #77 as a template for adding rows. Using IE8 (not in compatibility mode), I click on the "Add" button and the popup opens. However, error messages in the dialog also appear indicating that non-null fields require values. Here's where it gets interesting. If I create the exact same form, managed bean, entity/view objects in JDeveloper 11.1.1.6, then everything works fine while adding rows. I am guessing I am missing some sort of property setting, but I have yet to find it. I am new to JDeveloper/ADF. Form structure and managed bean code is below. Any ideas?
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="popuptest.jsf" id="d1">
    <af:messages id="m1" inline="false"/>
    <af:form id="f1">
    <af:table value="#{bindings.allDepartments.collectionModel}" var="row"
    rows="#{bindings.allDepartments.rangeSize}"
    emptyText="#{bindings.allDepartments.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.allDepartments.rangeSize}" rowBandingInterval="0"
    selectedRowKeys="#{bindings.allDepartments.collectionModel.selectedRow}"
    selectionListener="#{bindings.allDepartments.collectionModel.makeCurrent}" rowSelection="single"
    id="t1" partialTriggers="::cb1" binding="#{CreateDepartmentPageHelper.departmentsTable}">
    <af:column sortProperty="#{bindings.allDepartments.hints.DepartmentId.name}" sortable="false"
    headerText="#{bindings.allDepartments.hints.DepartmentId.label}" id="c1">
    <af:outputText value="#{row.DepartmentId}" id="ot1">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.allDepartments.hints.DepartmentId.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="#{bindings.allDepartments.hints.DepartmentName.name}" sortable="false"
    headerText="#{bindings.allDepartments.hints.DepartmentName.label}" id="c2">
    <af:outputText value="#{row.DepartmentName}" id="ot2"/>
    </af:column>
    <af:column sortProperty="#{bindings.allDepartments.hints.ManagerId.name}" sortable="false"
    headerText="#{bindings.allDepartments.hints.ManagerId.label}" id="c3">
    <af:outputText value="#{row.ManagerId}" id="ot3">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.allDepartments.hints.ManagerId.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="#{bindings.allDepartments.hints.LocationId.name}" sortable="false"
    headerText="#{bindings.allDepartments.hints.LocationId.label}" id="c4">
    <af:outputText value="#{row.LocationId}" id="ot4">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.allDepartments.hints.LocationId.format}"/>
    </af:outputText>
    </af:column>
    </af:table>
    <af:commandButton text="Add" id="cb1" partialSubmit="true"
    action="#{CreateDepartmentPageHelper.cb1_action}"/>
    <af:popup autoCancel="enabled" id="p1"
    binding="#{CreateDepartmentPageHelper.popup}"
    contentDelivery="lazyUncached" eventContext="self">
    <af:dialog id="d2">
    <f:facet name="buttonBar"/>
    <af:panelFormLayout id="pfl1">
    <af:inputText value="#{bindings.DepartmentId.inputValue}"
    label="#{bindings.DepartmentId.hints.label}"
    required="#{bindings.DepartmentId.hints.mandatory}"
    columns="#{bindings.DepartmentId.hints.displayWidth}"
    maximumLength="#{bindings.DepartmentId.hints.precision}"
    shortDesc="#{bindings.DepartmentId.hints.tooltip}" id="it1">
    <f:validator binding="#{bindings.DepartmentId.validator}"/>
    <af:convertNumber groupingUsed="false" pattern="#{bindings.DepartmentId.format}"/>
    </af:inputText>
    <af:inputText value="#{bindings.DepartmentName.inputValue}"
    label="#{bindings.DepartmentName.hints.label}"
    required="#{bindings.DepartmentName.hints.mandatory}"
    columns="#{bindings.DepartmentName.hints.displayWidth}"
    maximumLength="#{bindings.DepartmentName.hints.precision}"
    shortDesc="#{bindings.DepartmentName.hints.tooltip}" id="it2">
    <f:validator binding="#{bindings.DepartmentName.validator}"/>
    </af:inputText>
    <af:inputText value="#{bindings.ManagerId.inputValue}" label="#{bindings.ManagerId.hints.label}"
    required="#{bindings.ManagerId.hints.mandatory}"
    columns="#{bindings.ManagerId.hints.displayWidth}"
    maximumLength="#{bindings.ManagerId.hints.precision}"
    shortDesc="#{bindings.ManagerId.hints.tooltip}" id="it3">
    <f:validator binding="#{bindings.ManagerId.validator}"/>
    <af:convertNumber groupingUsed="false" pattern="#{bindings.ManagerId.format}"/>
    </af:inputText>
    <af:inputText value="#{bindings.LocationId.inputValue}"
    label="#{bindings.LocationId.hints.label}"
    required="#{bindings.LocationId.hints.mandatory}"
    columns="#{bindings.LocationId.hints.displayWidth}"
    maximumLength="#{bindings.LocationId.hints.precision}"
    shortDesc="#{bindings.LocationId.hints.tooltip}" id="it4">
    <f:validator binding="#{bindings.LocationId.validator}"/>
    <af:convertNumber groupingUsed="false" pattern="#{bindings.LocationId.format}"/>
    </af:inputText>
    </af:panelFormLayout>
    </af:dialog>
    </af:popup>
    </af:form>
    </af:document>
    <!--oracle-jdev-comment:preferred-managed-bean-name:CreateDepartmentPageHelper-->
    </f:view>
    BACKING BEAN CODE:
    package view;
    import javax.faces.context.FacesContext;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.share.ADFContext;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import oracle.adf.view.rich.component.rich.data.RichTable;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import oracle.adf.view.rich.event.DialogEvent;
    import oracle.adf.view.rich.event.DialogEvent.Outcome;
    import oracle.adf.view.rich.render.ClientEvent;
    import oracle.binding.BindingContainer;
    import oracle.binding.OperationBinding;
    import oracle.adf.view.rich.util.ResetUtils;
    import oracle.jbo.Row;
    import oracle.jbo.server.ViewRowImpl;
    public class CreateDepartmentPageHelper {
    //old "current row" value is saved in view scope in case the rw creation is
    //cancelled, in which case this row needs to become current again
    final String OLD_CURR_KEY_VIEWSCOPE_ATTR = "__oldCurrentRowKey__";
    private RichPopup popup;
    private RichTable departmentsTable;
    public CreateDepartmentPageHelper() {
    public void setPopup(RichPopup popup) {
    this.popup = popup;
    public RichPopup getPopup() {
    return popup;
    //system generated method when you create a managed bean method for
    //a component that has an ADF binding referenced in its action listener
    public BindingContainer getBindings() {
    return BindingContext.getCurrent().getCurrentBindingsEntry();
    //command action that create a new row in teh departments table and then
    //opens an edit dialog for commit/cancel
    public String cb1_action() {
    BindingContainer bindings = getBindings();
    //get current row and save its rowKey in view scope for later use
    DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("allDepartmentsIterator");
    Row oldCcurrentRow = dciter.getCurrentRow();
    //ADFContext is a convenient way to access all kinds of memory scopes.
    //If you like to be persistent in yur ADF coding then this is what you
    //want to use
    ADFContext adfCtx = ADFContext.getCurrent();
    adfCtx.getViewScope().put(OLD_CURR_KEY_VIEWSCOPE_ATTR,
    oldCcurrentRow.getKey().toStringFormat(true));
    //perform row create
    OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    //access the popup dialog and bring it up. The reference is through a
    //JSF component binding reference using the popup "binding" property
    RichPopup popup = this.getPopup();
    RichPopup.PopupHints hints = new RichPopup.PopupHints();
    //empty hints renders dialog in center of screen
    popup.show(hints);
    return null;
    public void onDialogAction(DialogEvent dialogEvent) {
    Outcome outcome = dialogEvent.getOutcome();
    //the dialog event only propagates yes, no, ok actions to the
    //server. The cancel outcome is only available on the browser
    //client. If there is a need to handle the cancel even then you
    //need to use a clientListener and JavaScript as we do on this
    //example
    if(outcome == Outcome.ok){
    //commit
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Commit");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    //handle errors if any
    return;
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.getDepartmentsTable());
    public void setDepartmentsTable(RichTable departmentsTable) {
    this.departmentsTable = departmentsTable;
    public RichTable getDepartmentsTable() {
    return departmentsTable;
    //method that is called from the serverListener on the client. The server
    //listener is used to queue a custom event and pass information from the
    //client to the server using JavaScript. Its actually doing this Ajax thing
    //that everyone wants to do using the XmlHTTPRequest object
    public void onDialogCancel(ClientEvent clientEvent) {
    BindingContainer bindings = getBindings();
    RichPopup popup = this.getPopup();
    popup.hide();
    ResetUtils.reset(clientEvent.getComponent());
    //the cancel operation is executed with immediate=true to bypass the
    //model update. Therefore we manually deletethe new row from the iterator
    DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("allDepartmentsIterator");
    dciter.removeCurrentRow();
    //set current row back to original row
    ADFContext adfCtx = ADFContext.getCurrent();
    String oldCurrentRowKey = (String) adfCtx.getViewScope().get(OLD_CURR_KEY_VIEWSCOPE_ATTR);
    dciter.setCurrentRowWithKey(oldCurrentRowKey);
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.getDepartmentsTable());
    FacesContext fctx = FacesContext.getCurrentInstance();
    //we don't want to continue with the remainder of the lifecycle and
    //thus skip the rest
    fctx.renderResponse();
    }

    Hi Frank,
    Thanks for the reply. I retested with a .jspx file just to confirm my results. I've tried Facelets as well without success. Results for .jspx are as follows:
    1. If the add button PartialSubmit property is set to true, and the popup's ContentDelivery=lazyUncached, ChildCreation=deferred, and AutoCancel=disabled, then:
    the popup appears with error messages outlining the required fields
    2. If the add button PartialSubmit Property is set to false and popup properties are the same as above then the popup opens as expected. However, if an attempt is made to insert a duplicate record - using departments table as an example, trying to create a row with an existing department - then a red box appears around the DepartmentId cell in the popup without any error message. If I press OK again, then the duplicate key error message appears as expected.

  • What is the Popup class used for

    I always thought that a Popup should have some basic functionality, such as the pupup should close when:
    a) the escape key is pressed
    b) the popup loses focus
    The popup class provides none of the above functionality and in     fact seems to require some obscure code to
    even get the keyboard focus to work properly.
    Using a JWindow seems to provide the same functionality as a Popup.
    JPopupMenu seems to support both of the above requirements.
    Run the following program:
    a) click on each of the buttons
    b) click on an empty part of the frame
    It appears to me that whenever you need a "popup" you should use a JPopupMenu.
    Is the Popup class good for anything? Does it provide any functionality that I am not aware of?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    public class PopupTest extends JFrame
         String[] numbers = { "one", "two", "three", "four", "five" };
         public PopupTest()
              getContentPane().setLayout( new FlowLayout() );
              JButton popup = new JButton("Popup as Popup");
              popup.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        popupPopup(e);
              getContentPane().add(popup);
              JButton window = new JButton("Window as Popup");
              window.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        windowPopup(e);
              getContentPane().add(window);
              JButton menu = new JButton("PopupMenu as Popup");
              menu.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        menuPopup(e);
              getContentPane().add(menu);
         private void popupPopup(ActionEvent e)
              JList list = new JList(numbers);
              list.setSelectedIndex(0);
              PopupFactory factory = PopupFactory.getSharedInstance();
              Popup popup = factory.getPopup(this, list, getLocation().x, getLocation().y);
              popup.show();
              Window window = SwingUtilities.windowForComponent(list);
              if (window != null)
                   window.setFocusableWindowState(true);
              KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent(list);
         private void windowPopup(ActionEvent e)
              JList list = new JList(numbers);
              list.setSelectedIndex(0);
              JWindow window = new JWindow(this);
              window.getContentPane().add(list);
              window.pack();
              window.setVisible(true);
              window.setLocation(getLocation().x + 200, getLocation().y);
         private void menuPopup(ActionEvent e)
              JList list = new JList(numbers);
              list.setSelectedIndex(0);
              Component c = (Component)e.getSource();
              JPopupMenu menu = new JPopupMenu();
              menu.add(list);
              menu.show(c, 0, 0);
              list.requestFocusInWindow();
         public static void main(String[] args)
              PopupTest frame = new PopupTest();
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              frame.setSize(500, 200);
              frame.setLocationRelativeTo( null );
              frame.show();
    }

    you'd use Popup like JPopupMenu does, via a PopupFactoryYes you can get the Popu from the PopupFactory, but I think you are missing the point of my question. Popup has two methods, hide/show. It provides no other funtionality. I must write code to handle the escapce key and close the popup when it loses focus.
    When I use a JPopupMenu and add a component to the menu, it appears to add some listeners to the component to handle the escape key and loss of focus.
    I think it's safe to say that you're right when you say that it's preferable to use
    JPopupMenu (my experience as well).That was my conclusion, but I was just wondering it I was missing anything.
    It turns out that there are used in tooltips which, by essence, don't need any
    input from the user (whether keyboard or mouse) I guess thats what I was missing, only use a Popup in tooltip type situations.

  • Commandbutton inside popup does not fire action/actionlistener methods

    Hi,
    I am using 11.1.1.4.0
    I have a page and on click of a button on that page, I launch a popup (using showpopupbehaviour, triggertype="click") which has a region (taskflow) inside it. The region is within a af:panelWindow inside the popup. I have also added 2 commandbuttons in the popup. Everything works fine, but the when the popup is visible, and I click the 2 command buttons on the popup, it does not execute the action method (or actionListener) method that I defined for those buttons. Any idea why this must be happening?
    Code for the popup:
    <af:popup id="popup1" contentDelivery="lazyUncached" binding="#{BackingBean.popup}">
    <af:panelWindow modal="true"
    title="#{pageFlowScope.tabContext.outcomeForPopup}"
    id="paWin12"
    helpTopicId="TOPICID_ALL"
    resize="on">
    <af:panelTabbed id="pt123" position="above"
    inlineStyle="width:650px; height:650.0px;">
    <af:showDetailItem id="sdi0"
    text="#{pageFlowScope.tabContext.outcomeForPopup}"
    stretchChildren="first"
    accessKey="0"
    immediate="true">
    <af:region value="#{bindings.r0.regionModel}"
    id="r1"/>
    </af:showDetailItem>
    </af:panelTabbed>
    <af:commandButton text="First"
    action="#{BackingBean.firstClick}"
    actionListener="#{BackingBean.firstClick}"
    id="cb3">
    </af:commandButton>
    <af:commandButton text="Second"
    action="#{BackingBean.secondClick}"
    actionListener="#{BackingBean.secondClick}"
    id="cb4">
    </af:commandButton>
    </af:panelWindow>
    </af:popup>
    In the page definition of the main screen, I have this taskflow added
    <taskFlow id="r0" Refresh="ifNeeded" activation="deferred"
    xmlns="http://xmlns.oracle.com/adf/controller/binding"
    taskFlowId="#{pageFlowScope.tabContext.taskFlowIdForPopup}">
    <parameters>
    <parameter id="outcome"
    value="#{pageFlowScope.tabContext.outcomeForPopup}"
    xmlns="http://xmlns.oracle.com/adfm/uimodel"/>
    <parameter id="tabContext" value="#{pageFlowScope.tabContext}"
    xmlns="http://xmlns.oracle.com/adfm/uimodel"/>
    </parameters>
    </taskFlow>
    Thanks
    Vishal

    Hi friend ,
    1,Inside the pop up u give two command buttons and double click the one button and it asking for create one bean.
    2.U create the bean and inside u give coding like
    public class popvisible
    public popvisible()
    public String page1naviagetion()
    // Add event code here...
    return "popTouser";(This is is Control flow case name it will go to another JSPX page.)
    public String page2navigation()
    // Add event code here...
    return null;
    }

  • Input File on a Popup doesn't render after adding Javascript

    Hi,
    I have a very tricky problem.
    I have added a javascript function on component initialization to validate a "ADF Input file on a Popup". Popup is opened on clicking a link. Unfortunately Popup doesn't seem to render but the javascript function is getting invoked.
    What could be wrong?
    This is my JSPX code:
    <af:popup childCreation="deferred" autoCancel="disabled" id="p1">
    <af:panelWindow id="pw1">
    <af:inputFile label="My File4" id="myFile" binding="#{fileBean.myFile}"/>
    </af:panelWindow>
    </af:popup>
    This is my javascript:
    function ootbValidateFileScript(maxSize) {
    alert("ootbValidateFileScript script invoked maxSize: " + maxSize);
    return true;
    If I avoid the popup and directly put the Input file on the page, everything works fine.
    I strongly feel my Javascript is interfering with normal execution of the Popup. What am I doing wrong?
    Regards,
    PS
    Edited by: user13722524 on Aug 23, 2012 11:16 PM

    Hi,
    As mentioned before javascript is added at component initialization (setter in the bean). something like this:
    public void setMyFile(RichInputFile myFile) {
    this.myFile = myFile;
    myFile.setClientComponent(true);
    ClientListenerSet clientListenerSet = myFile.getClientListeners();
    if (clientListenerSet == null) {
    clientListenerSet = new ClientListenerSet();
    clientListenerSet.addBehavior("new ootbValidateFileScript(99)");
    myFile.setClientListeners(clientListenerSet);
    myFile.setVisible(true);
    Jdeveloper version: 12.1.2.0.0
    Regards,
    PS

  • How to show popup from backing bean code immediately?

    Hi,
    I'm using JDeveloper 11.1.2.1.0 and have problems with showing popups. I have a button with an action on my page and a method in backing bean.
    I want to rise up few popups from this method in backing bean (for example just an anouncement that something will happen) or a dialog
    (for example a question if you want to continue).
    I understand how to get a dialog response to deal with it in code, but the problem is that the popup doesn't show up immediately, but only when
    this method called on button finishes. I'd like to handle dialog responses in the middle of the action and then the code to continue with the execution.
    Here is my backing bean code:
    private RichPopup popup;
    public String test() {
    //Some code...
    RichPopup.PopupHints hints = new RichPopup.PopupHints();
    popup.show(hints);
    //Here is the place for code which I want to be executed after popup closes,
    //but is executed before the popup shows...
    return null;
    And here is part of my jssf:
    <af:commandButton text="Test" id="cb1"
    action="#{popupBean.test}"/>
    <af:popup id="popup" binding="#{popupBean.popup}">
    <af:dialog id="dialog" type="yesNo"
    title="Dialog"
    dialogListener="#{popupBean.onDialogAction}"
    binding="#{popupBean.dialog}" clientComponent="true">
    <af:outputText value="Do you want to continue?" id="ot1"/>
    <af:clientListener method="onDialogCancel" type="dialog"/>
    <af:serverListener type="DialogCancelHandlerEvent" method="#{popupBean.onDialogCancel}"/>
    </af:dialog>
    </af:popup>
    Can someone give me some answer how to show the popup from backing bean code immediately?
    Thanks in advance,
    Tina

    If you want to execute code after popup closes, then put this code in PopupCanceledListener or in DialogListener(you can't block method execution).
    Dario

Maybe you are looking for

  • Problem calling a method in a servlet witch returns remote ejb

    Hi, I have a problem combining servlets ands ejbs, I expose my problem : What I have : 1 . I have a User table into a SGBD with two attributes login and pass. 2 . I have a UserBean linked to User table with a remote interface 3 . I have a stateless U

  • How do I find past projects in Premiere Pro?

    Hey Everyone, I was wanting to make an alteration to a project I finalized last month but since then it has gone off my 'recent project' list once I open premiere. I can't find it in my auto save folder on my PC also. I can only find the rendered fil

  • Character Encoding in XML

    Hello All, I am not clear about solving the problem. We have a Java application on NT that is supposed to communicate with the same application on MVS mainframe through XML. We have a character encoding for these XML commands we send for communicatio

  • How do you monitor backup progress

    How can you monitor the progress of a backup? I use timemachine and an external drive  to do my backups on my 09 Macbook pro. I want to be able to see the amount of files transferred and time remaining or any other pertinent info. Not just a spinning

  • Making iWork the default apps for opening Microsoft Office documents

    Is there a way to make Pages, Numbers and Keynote the default apps for opening Microsoft Office documents, such that if I double-click a Word document it launches Pages and opens, etc.? I know I can do it by double-clicking the Office document and dr