Invoking a popUp programmatically

Hello

I try to call a popUp, which works like a menu from a link within a hierarchy by program Viewer and I was able to do, but it appears in the upper left corner of the window and I want to show him close the link.

I have tried to do this http://docs.oracle.com/cd/E23943_01/web.1111/b31973/af_dialog.htm#CHDJBIHB way, but does not work, adding that the code or not is the same.

Can someone help me?

I use jdev 11.1.1.7.1

DLopez, here's how to access the info node in the popupFetchListener:

As first of all, here are the appropriate settings from the popup:

popupFetchListener = "#{backingBeanScope.partnersBacking.pFetchListener} '"

eventContext = 'Launcher' launcherVar = 'source '.

contentDelivery = "lazyUncached">

And now, here's the code for popupFetchListener:

{} public void pFetchListener (PopupFetchEvent popupFetchEvent)

RichPopup p = popupFetchEvent.getSource ((RichPopup));

String lvar = p.getLauncherVar ();

Object obj = JsfUtils.resolveExpression ("#{" + lvar + ".currentRowData}");

the class of obj is oracle.adfinternal.view.faces.model.binding.FacesCtrlHierNodeBinding

}

You can use it with af:showPopupBehavior

Try and tell me what's going on...

Tags: Java

Similar Questions

  • Refresh the popup programmatically

    Hello

    I use Jdev 11.1.1.6

    I have a FA: table in a popup that is to pick up a few lines... I added a link delete next to each line through links.

    When I click on the link delete for a particular line... the line is removed and the window closes automatically.

    To avoid this, I put the part delivery of property = true for the link delete...

    Now when you click on remove link line gets deleted but context does not close which is very good...

    Now the problem is... the other buttons on the pop-up window are not working as record, etc...

    I like to write code for the link delete where by program I will delete the line and I want to update the popup as well.

    Can someone let me know what is the code to update the popup programmatically?

    Thank you

    Rajesh.

    User, things to check:

    is the autoCancel property for the popup?

    If so, set it to false and try to delete a line without defining the partial submission button.

    Timo

  • Closing popup programmatically.

    Hi all

    I use Jdeveloper 12.1.2.0.0. I need to close the popup programmatically.

    The popup is inside a page fragment that is included in another fragment of page.

    I use viewscope bean, so I can't link the popup directly. So I am using the following code.

    ExtendedRenderKitService extRenderKitSrvc = Service.getRenderKitService(fc, ExtendedRenderKitService.class);
            extRenderKitSrvc.addScript(fc, "AdfPage.PAGE.findComponentByAbsoluteId('" + "p1" + "').hide();");
    

    P1 is the id of the pop-up window.

    It does not work. Why does this work?

    Thanks in advance,

    Vignesh S.

    Hello

    his does not work because the popup on the client ID is not p1, but also contains containers of naming as regions. So most likely the popup is r1:r2:p1 if it is contained in a nested page fragment. However, you can close the popup using Java

    ComponentUtils (Apache MyFaces Trinidad API 2.0.2 - SNAPSHOT API)

    The ComponentUtils class has a findRelativeComponent method that performs a search. So, if the point of invocation the popup is located in region 1 region 2--> then the 'from' is r1:r2 looking for. The p1 component, you get in return is of type RichPopup and exposes a method to hide the dialog box

    Frank

  • Problem by opening a popup programmatically

    Hello
    I am facing a problem when opening a popup programmatically. I use the following code piece to achieve: -.

    RichPopup.PopupHints ph = new RichPopup.PopupHints ();
    testPopUp.show (ph);

    Now copy the following code works fine except when I try to open the "testPopup" of the inside of an another pop-up window popup. Is there anything else I need to specify in order to open a popup inside an another popup programmatically? Another thing I noticed is that if I write this code in the DialogListener method, it works very well. But it does not work if I present a custom inside my dialog box button and write this code inside the listener to the button action. Any help is appreciated.

    Thank you
    Rahul

    Rahul,

    Without version number of your part, I'll assume JDev 11.1.2.1.

    It works for me.

    JSF page:

    
    
    
      
        
          
          
            
            
          
          
            
            
          
        
      
    
    

    Managed bean:

    package view;
    
    import javax.faces.event.ActionEvent;
    
    import oracle.adf.view.rich.component.rich.RichPopup;
    
    public class b
    {
      private RichPopup p1;
      private RichPopup p2;
    
      public b()
      {
      }
    
      public void setP1(RichPopup p1)
      {
        this.p1 = p1;
      }
    
      public RichPopup getP1()
      {
        return p1;
      }
    
      public void setP2(RichPopup p2)
      {
        this.p2 = p2;
      }
    
      public RichPopup getP2()
      {
        return p2;
      }
    
      public void a1(ActionEvent actionEvent)
      {
        RichPopup.PopupHints ph = new RichPopup.PopupHints();
        p1.show(ph);
      }
    
      public void a2(ActionEvent actionEvent)
      {
        RichPopup.PopupHints ph = new RichPopup.PopupHints();
        p2.show(ph);
      }
    }
    

    John

  • Show popup programmatically

    How can I show popup programmatically
            FacesContext facesContext = FacesContext.getCurrentInstance();
            ExtendedRenderKitService service =
                Service.getRenderKitService(facesContext,
                                            ExtendedRenderKitService.class);
            String script =
                "var hints = {}; hints[AdfDhtmlPopupWindow.HINT_CLOSE_ON_ESCAPE] = false; " +
                "AdfPage.PAGE.findComponent('" + popupId + "').show(hints);";
            service.addScript(facesContext, script);
    

    where popupId is full fo id popup.
    To be sure, the id is always correct:

    popupId  = myPopup.getClientId(FacesContext.getCurrentInstance());
    
  • How to align the dialog box in the center of a popup programmatically

    Hey,.

    I use jdeveloper 11g release 2.

    Can someone help on how to align the dialog box programmatically a popup?

    Kind regards

    Steve

    Hello

    As far as I know, if we do not have indications of the dialog then displays on the center of the screen by default.

    This will solve your problem?

    Gud luck!

    HA

  • Invoking one Popup Popup, another

    The child popup displays a taskflow in region. The taskflow has required input parameters. (the parent popup has been also called since a taskflow running)

    allows to call the popup p1 parents (with task flow tf1) and child popup p2 ( with task flow tf2). tf2 is imported from an external user interface project.

    By clicking on a commandlink on p1, p2 should appear displaying the page fragment, which is part of the task flow tf2.

    Here is the code on the page-fragment of parent page:

    < af:commandLink text = ' #{bindings. " DocumentName.inputValue}"id ="cl1111"partialSubmit ="true"clientComponent ="true">

    < name af:clientAttribute value="#{bindings.someAttribute.inputValue}"/ 'param1' = >

    < name af:clientAttribute = "param2" value = "Value1" / >

    < af:showPopupBehavior popupId = "p1" / >

    < / af:commandLink >

    < af:popup id = "p1" contentDelivery = "lazyUncached" childCreation = "deferred" eventContext 'Launcher' launcherVar = 'source' = >

    "" "" < af:setPropertyListener from = "#{source.attributes.param1}" = "{pageflowscope.param1} ' type ="popupFetch"/ >

    "" "" < af:setPropertyListener from = "#{source.attributes.param2}" = "{pageflowscope.param2} ' type ="popupFetch"/ >

    < af:dialog id = "d1" type = "ok" title = "some title" modal = "false" >

    < af:region value = "#{bindings." TaskFlow2.regionModel}"id ="r1"/ >

    < / af:dialog >

    < / af:popup >

    My problem is that I am not able to access one of the values of param1 and param2 on the p2 of popup.

    What are the mistakes I do?

    You must refresh = ifNeeded

    Or you can use conditional activation.

    https://docs.Oracle.com/CD/E16162_01/Web.1112/e16182/taskflows_regions.htm#ADFFD22584

    Dario

  • Show a popup inside a popup programmatically

    Hi team.

    I use JDeveloper 11.1.2.4.

    So, I'm going to show a popup within a popup.  The secondary popup is a Yes without dialog that requires the user to confirm what they are doing.  However, in doing so, an empty dialog appears.  To configure this, we put just a few buttons on the popup.  There's an actionListenter calling the bean support to launch the shortcut menu.  The popup is in popup of the Act, but it appears empty and is wide 11px.  Now, I thought that maybe the popup is just being found.  So, I put another button on the page and had him use a showPopupBehavior.  It works fine as long as you do not click the button for the action listener.  Once you click the button for the action listener, you get the same empty behavior with the showPopupBehaviour.

    Here's what I have for my popup page.  This is the popup page that is called by a page via a taskflow parent.

      <af:document id="d1" title="#{pageFlowScope.popupTitle}: #{patientHeader.patientDisplayContext}" styleClass="PromisMasterPopUp">
        <f:facet name="metaContainer">
          <trh:script source="/jheadstart/jhs11.js" id="script0"></trh:script>
        </f:facet>
        <af:form id="dataForm">
          <af:panelStretchLayout id="psl" dimensionsFrom="children">
            <f:facet name="center">
              <af:panelGroupLayout layout="vertical" id="pgv">
              <af:region value="#{bindings.popupRegion.regionModel}" id="r1" styleClass="ModalitySelectionPopup"/>
              <af:panelGroupLayout halign="right" id="pg1" layout="horizontal" styleClass="AFStrechWidth">
                <af:commandButton text="#{nls['PATIENT_POPUP_TXN_UNDO_ACTION']}" action="UndoLastAction" id="cb0" immediate="true"
                                  rendered="#{PatientActionContextHelperBean.undoActionApplicable}"
                                  disabled="#{!PatientActionContextHelperBean.undoActionTxnAvailable}"
       styleClass="UndoLastEnteredBtn">
                  <af:setPropertyListener from="undo" to="#{pageFlowScope.outcome}" type="action"/>
                  <!-- This will overwrite the taskflows currentRowKeyStr that was set on launch of the taskflow.  This
                       is needed for insert operations only, but doesn't hurt for the edit either. -->
                  <af:setPropertyListener from="#{viewScope.IteratorHelperBean.currentRowKeyStr}" to="#{pageFlowScope.currentRowKeyStr}" type="action"/>
                </af:commandButton>
                <af:commandButton text="#{nls['PATIENT_POPUP_TXN_SAVE']}" action="Save" id="cb1">
                  <af:setPropertyListener from="save" to="#{pageFlowScope.outcome}" type="action"/>
                  <!-- This will overwrite the taskflows currentRowKeyStr that was set on launch of the taskflow.  This
                       is needed for insert operations only, but doesn't hurt for the edit either. -->
                  <af:setPropertyListener from="#{viewScope.IteratorHelperBean.currentRowKeyStr}" to="#{pageFlowScope.currentRowKeyStr}" type="action"/>
                </af:commandButton>
                <af:commandButton text="#{nls['PATIENT_POPUP_TXN_CANCEL']}" id="cb2" immediate="false" actionListener="#{pageFlowScope.txnPendingChangesBean.handle}">
                  <f:attribute name="taskflowAction" value="Cancel"/>
                  <af:setPropertyListener from="cancel" to="#{pageFlowScope.outcome}" type="action"/>
                  <!--af:setPropertyListener from="#{viewScope.IteratorHelperBean.currentRowKeyStr}" to="#{pageFlowScope.currentRowKeyStr}" type="action"/-->
                </af:commandButton>
                <af:commandButton text="Pop" id="showPop">
                  <af:showPopupBehavior popupId="txnPendingChangesPopup" triggerType="action"/>
                </af:commandButton>
               
          <af:popup id="txnPendingChangesPopup" childCreation="deferred"
                            binding="#{pageFlowScope.txnPendingChangesBean.txnAlertPopup}">
                    <af:dialog id="txnPendingChangesDialog" type="yesNo" title="#{nls['PENDING_CHANGES_TITLE']}"
                               dialogListener="#{pageFlowScope.txnPendingChangesBean.processDialogEvent}" modal="true">
                      <af:outputText value="#{nls['PENDING_CHANGES_TEXT']}" id="pt_ot5"/>
                    </af:dialog>
              </af:popup>
               
              </af:panelGroupLayout>
            </af:panelGroupLayout>
          </f:facet>
          </af:panelStretchLayout>
    
    
        </af:form>
      </af:document>
    
    

    Just, the tnxPendingChangesBean.handle method retrieves the bound popup and called a popup.show (hints).  Very classic approach.

    I created a simple example, and it seems to work fine.  This seems to be a matter of region.  I will post more findings as I get them.  Any ideas are appreciated.

    BradW

    So, it turns out that autoCancel = 'active' is the default value.  There was something causing a refresh of the region / pop-up window.  When this occurs, the dialog is dismissed, but not really.  You can still see this popup 11px.  AutoCancel = "disabled" setting did the trick.

    It has taken far too long to find...

    BradW

  • invoking a popup on the click of an image in an adf application

    Hi all

    I'm working on an ADF application which has a page with a table of records. One of the columns has a picture in it and when you click on this image, I need to open a modal pop-up window that has the respective details of this record.

    I am not able to open the popup when clicking on the image.

    Here is the excerpt of how I try to do the same.

    < f: facet name = "imageFacet" >

    "< af:commandImageLink icon="/images/pdf.png "id ="cil1">

    < af:showPopupBehavior popupId = "popupExt" triggerType = "click on" / >

    < / af:commandImageLink >

    < af:popup id = "popupExt" host = "default" >

    < af:panelWindow id = 'pw1 '.

    modal = 'true '.

    title = "external Internet information in a modal pop-up window.

    contentHeight = "250".

    contentWidth = "450".

    resize = "on" >

    < af:inlineFrame id = "if1' shortDesc ="this is an inline frame.

    styleClass = "AFStretchWidth."

    inlineStyle = ' height: 250px; ">

    < / af:inlineFrame >

    in this code, I get an error on the jspx page that is not a valid child of < af:commandImageLink > < af:popup > and run the page, nothing happens when clicking on the image.

    Any ideas or suggestions in this regard will be helpful.

    Thank you

    It works for me:

    emptyText = "#{bindings." Departments.Viewable? "{'No data to display.': 'Access Denied.'}". rowBandingInterval = '0 '.

    selectedRowKeys = ' #{bindings. " Departments.collectionModel.selectedRow}.

    selectionListener = "#{bindings." RowSelection Departments.collectionModel.makeCurrent}' = 'single '.

    fetchSize = "#{bindings." Departments.rangeSize}"filterModel =" #{bindings. " DepartmentsQuery.queryDescriptor}.

    queryListener = ' #{bindings. " FilterVisible DepartmentsQuery.processQuery}"="true"varStatus = 'vs' id ="t1">

    ...

    headerText = "#{bindings." Departments.hints.DepartmentName.label}"id ="c5">

    required = "#{bindings." ReadOnly DepartmentId.hints.mandatory}' = 'true '.

    columns = "#{bindings." DepartmentId.hints.displayWidth}"maximumLength =" #{bindings. " DepartmentId.hints.precision}.

    shortDesc = "#{bindings." DepartmentId.hints.tooltip}"id ="it1">

    required = "#{bindings." ReadOnly DepartmentName.hints.mandatory}' = 'true '.

    columns = "#{bindings." DepartmentName.hints.displayWidth}.

    maximumLength = "#{bindings." DepartmentName.hints.precision}.

    shortDesc = "#{bindings." DepartmentName.hints.tooltip}"id ="it2">

    required = "#{bindings." ReadOnly ManagerId.hints.mandatory}' = 'true '.

    columns = "#{bindings." ManagerId.hints.displayWidth}"maximumLength =" #{bindings. " ManagerId.hints.precision}.

    shortDesc = "#{bindings." ManagerId.hints.tooltip}"id ="it3">

    required = "#{bindings." LocationId.hints.mandatory}"shortDesc =" #{bindings. " LocationId.hints.tooltip}.

    readOnly = "true" id = "sol1" >

    you have verified that the correct popupid id?

    Timo

  • ADF 11: problem by invoking the backing bean popup

    Hi all

    Using Jdeveloper 11.1.1.2.0.

    I use dynamic areas in my project. I am able to open the pop-up window of backing bean
    using following code: -.


    FacesContext facesContext = FacesContext.getCurrentInstance ();
    ExtendedRenderKitService service = Service.getRenderKitService (facesContext, ExtendedRenderKitService.class);
    service.addScript (facesContext, "AdfPage.PAGE.findComponent('pt1:ir1:1:rs_popupCreateApp').show ()");


    But the problem here is that "* 1 * ' in the ' pt1:ir1: * 1 *: rs_popupCreateApp" continues to change to * "0" or "3." So I have to change the code in backing bean giving pt1:ir1: * 0 *: rs_popupCreateApp or pt1:ir1: * 3 *: rs_popupCreateApp respectively. Problem here is that the source component of the (which invokes the popup) is a declarative resuable component of the button, and so I can't even add af:showPopupBehavior in that. Id of the source component run-time is 'pt1:ir1:1:rs_ort1:ox_tb_cb3', where the id of the target component is "pt1:ir1:1:rs_popupCreateApp".

    Please suggest code should I put in my two cents support this popup will appear each time, even the id of the target component is changed at the time of pt1:ir1: * 1 *: rs_popupCreateApp to pt1:ir1: * 0 *: rs_popupCreateApp or pt1:ir1: * 3 *: rs_popupCreateApp.

    Thank you
    Vikram

    Bind the component to your backing bean and use component.*getClientId () * instead of hard coding the component id.

    Nick

  • How can I display an error message on the listening port close popup without closing the popup.

    Hi Experts,

    JDeveloper 12.1.3.0.0

    How can I display an error message on the listening port close popup without closing the popup.

    Thank you

    Roy

    As its name suggests, close listener of popup is called when popup is closed so you can not do this.

    If you want to display the popup message, use your own buttons instead of the ok/cancel default buttons and close the popup programmatically.

    Dario

  • Best practices for handling logic conditional dialogue/popup in the ADF?

    Here's the scenario:

    I have a page that shows a popup programmatically in a method of bean support. The popup asking the user a yes / no question and subsequent logical path is determined by their response. However, if the popup is visible or not in the first place is conditional. In addition, there is an additional logic in the original method, apart from the logic of popup, that must be met.

    The problem with this is that the ADF seems to spin off the popup in another thread and prevents the execution of logic in the original method at the same time, while you wait for the response from the user. However, the desired effect is that the program stops until the user has answered the question in the context menu.

    I was not able to understand in an elegant way to make this happen. Ideally, I think that the solution is to encapsulate the logic that occurs after the popup is displayed (or not shown) in the original method and call it from the popup action listener if the popup is displayed (if not call it the original method of). However, the logic should be encapsulated requires the use of some local variables that have been put forward for the popup to appear. There is no way to get these values to the popup action listener method to pass them on to the encapsulated logic (aside from the creation of global static variables in the bean, which seems to be a bad solution).

    Another idea I had was to get the logic ' show/do not see the popup' workflow. However, it seems that for every single popup would make the really complicated workflow.

    Is there a 'best practice' recommended to handle this situation? It must be a common problem, and it seems that I will talk all wrong.

    However, the desired effect is that the program stops until the user has answered the question in the context menu.

    This will not happen in any web environment, including ADF.

    You will have different events for each life cycle:

    1 - opening popup: popupFetchListener event

    2 - Click on OK, Cancel buttons: DialogListener event

    3 - Press the Esc button: popupCancelledEvent

    You can share data between these events on pageFlowScope, or viewScope.

    But if you use the ADF BC, you might be better to use transient attributes on the objects in view.

  • How to load a popup conditionally loading of the page

    Hello

    I want to load popup on loading the page if:

    1. the user is autheniticated
    2. and popup does not appear.

    I am aware of the new feature in JDeveloper 12.1.2.0.0 release conditionally disabling af:showPopupBehavior

    ADF binary Decompilation: conditionally disabling af:showPopupBehavior

    But I use the 11.1.1.6 version.

    I'd appreciate your help/suggestions.

    Thank you

    Singh

    These are two problems:

    (1) the execution of an action on the page loading

    (2) showing a popup under certain conditions

    1 solution), https://blogs.oracle.com/adf/entry/an_epic_question_how_to

    (Solution 2) each of the 1) use a method somewhere inside this method, you can check your conditions and display the pop-up window of the method. For this 'How to launch a popup programmatically from Java' in http://www.oracle.com/technetwork/developer-tools/adf/learnmore/oct2010-otn-harvest-183714.pdf (Page 6) can be used.

    Timo

  • Conditionally show an af:popup

    When the persistence of data, I have a jsf in the form validator, Validator validates the data, if any component set empty, I need to open a popup with error messages when < af:message > taken at the level of components, other wise I do not have.

    But I couldn't find the way to open a popup on conditionally, can someone guide me this way.

    From your description, you must call popup programmatically managebean

  • Close the Popup by clicking on the OK button on the dialog box information Message

    JDev ADF BC 11.1.1.5.0

    I have a popup and a dialog box on the inside where the user enters data and click Save.
    I show an Information message when the click on save on having managed the insertion of data in the database.
    What I want to achieve, it's that I want to close the popup window with the click on the OK button located in the information message dialog box which has proved on memorizing data.
    There is already a similar thread Close popup in adf , but that was not a correct answer.

    (1) linking the main popup to a bean variable:

    
    
    public class MyBean
    {
      private RichPopup myPopup;
      ...
    }
    

    (2) add a DialogListener to the of the informational message:

    
      
        ... Info message here ...
      
    
    

    (3) use this DialogListener to close the main popup programmatically:

      public void infoPopupDialogListener(DialogEvent dialogEvent) {
        myPopup.hide();
    }
    

    Dimitar

Maybe you are looking for

  • How can I disable the mechanism of blocking of a program?

    I want to disable the pop-up blocker for some of my programs, but I can't. I would like to know where he is. Sharon Prantle

  • Unrecognized works drivers and windows install on and on

    Dear Toshiba I need some advice and help on some problems with my laptop Toshiba Satellite L550D windows 7 (updated with windows 7 I have purchesed on your part). I searched on several Forums (forum of toshiba responses, Microsoft MSDN Web site), but

  • 12.3.2.35 iTunes will not import audio CDs to win 10 Pro

    Just installed iTunes 64 bit 12.3.2.35 on a PC running Windows 10 Pro.  iTunes refuses to recognize that a CD is in the drive or provide options to import said tracks CD in iTunes. Running the diagnostics of iTunes for the CD/DVD drive, I get the fol

  • Support for Perkin Elmer 16PC FT - IR

    LabVIEW support a spectrophotometer Perkin Elmer of FT - IR 16PC?  I do not have the original software and need something to communicate with the instrument and make the %T and %R basic plots.

  • Sony Vaio Duo 11 screen burn-in problem HELP!

    So I have the above mentioned material element and overall it is very good. BUT I have a problem which becomes more noticeable from day to day. When you use an application for a period of time, say 10 minutes +, whether subway or office back to the m