Conditionally showing a popup

I try to display a popup of a bean to conditionally support. I tried the following post,

How to show popup programmatically

In the debugger, it completes the line without error:

erks.addScript (context,
"AdfPage.PAGE.findComponent('closeBillPeriodPopup').show ();");

but the popup does not appear. I don't know how to configure the showpopupbehavior. If I associate the id of popup with showPopupBehavior of the button, the popup will be displayed automatically instead of going to the action of the backing bean button code. If I remove the id of the pop-up window, the action button on the bean code is executed, but the popup does not appear. Am I supposed to dynamically set the popup with the showPopupBehavior id?

Hello
The problem is when you are looking for the java script component can:
You must first script in the protective or managed bean
you need the popup component bean then the example:
ID of the pop-up is p1
P1.getClientId (Context)
and context the faces context it returns the Javascript id you need is :D
then
erks.addScript (context,
"AdfPage.PAGE.findComponent ('" + p1.getClientId (context) + "') .show ();");
Joaquin

Edited by: ADFboy 04 / May / 2010 11:41

Tags: Java

Similar Questions

  • Under certain conditions see the popup on page (fragment) charge

    Hi Experts,

    We have an obligation to show a popup on the page load, if a certain condition is true.

    I have two fragments (home.jsff and profile.jsff). Initially when the user login, home.jsff is indicated and that there should be no popup.

    When the user goes to profile.jsff and save the changes, it must first redirect to home.jsff and show a popup with the confirmation message.

    I can't create a fragment separated for the popup where we need to redirect to profile.jsff and then redirect to home.jsff as said the requirement that the popup should display the content of home.jsff in the background.

    Also I can't use showPopup behavior during the loading of the page because it's a jsff.

    Please suggest how to implement this.

    Thanks in advance.

    Best regards

    Saurabh

    ... There's an even simpler option

    1. Add a hidden from the fragment output text element

    2 bind the output components text 'value' property to a bean property of manage (pair of getter/setter)

    3. when the getter of the value method is called, check the indicator that you defined for if you want to display the context menu or not

    4. If the indicator is such that the popup needs to be displayed, run the Java Popup

    4.a search the component RichPopup

    4.b set flags of the popup

    4.c unset flag to display the pop-up window (for the next time you need to put it)

    4.d see the popup

    Frank

  • How to stop a query showing a popup when an error occurs?

    Hello

    Suppose that a user click on "New folder" and immediately clicks on "Show détail Popup" button prior to fill all the required fields in the records.
    What is happening is that a box of exception will be shown on the screen, asking the user to fill in the mandatory fields.
    However, it IS NOT stop the detail popup to display on the screen as well as the exception.
    Of course, I can set the property of the button to avoid the user to click on the Popup of detail, but sometimes it's not so easy, and I would have preferred a more general solution.

    Is it possible to say with some components in the .jspx Hey, "If an exception occurs here, do not display the context menu:
    <af:commandToolbarButton id="ctb2" icon=" " partialSubmit="true" text="Show Detail Popup"rendered="true">
             <af:showPopupBehavior align="endBefore" popupId="::p3" triggerType="click"/>  // this should only be triggered if there are no previous errors
    </af:commandToolbarButton>

    Hello

    I suggest that you change the launch of popup to use the tag showPopupBehavior to a solution based on Java that call you through the listener to action 'commandToolbarButton '.

    RichPopup popup = ... get handle to popup instance ...i
    
    f(my condition is met){
    
      RichPopup.PopupHints hints = new RichPopup.PopupHints();
      //set alignment hint options as explained here: http://jdevadf.oracle.com/adf-richclient-demo/docs/apidocs/oracle/adf/view/rich/component/rich/RichPopup.html
      hints.add(RichPopup.PopupHints.HINT_ALIGN_ID , ... the id ...)
      hints.add(RichPopup.PopupHints.HINT_ALIGN, RichPopup.PopupHints.AlignTypes.ALIGN_END_BEFORE);
      popup.show(hints)
    }
    

    This also fixes another bug in your implementation, which is that the popup is open when the mouse is clicked and enter a button on the toolbar button

    Frank

  • 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

  • Show the popup when the selection is made on SelectOneChoice

    Hello genius!
    I'm back with another question. = D
    With the help of Jdeveloper 11 g Release 1.

    I'm showing a popup when a value is selected on a selectOneChoice component. I tried to use showPopupBehavior, but it looks like you can use that on a selectOneChoice... it works of course if I have a button, but I want to get rid of the button and just show popup when a selection is made on the selectOneChoice.

    Suggestions, ideas?

    Hello

    (1) set autoSubmit = true for the SelectOneChoice element, then create a method of valueChangeListener for the selectOneChoice.
    (2) in the valueChangeListener method, the popup can be demonstrated using the examples
    http://www.adftips.com/2010/10/ADF-UI-popuputil-class-to-show-or-hide.html

    Thank you
    Nini

  • 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

  • button is not rendered in the parent page after setting the condition made in popup.

    Hi all

    I have a page test.jsf where I have a button called display window confirmation with condition rendered as below

    < af:button text = "show the Confirmation window" id = "b8".

    actionListener = "#{TableShuttleBean.showConfirmationWindow} '"

    rendered = "#{TableShuttleBean.popUpCheckBox.Value == true} '/ > "

    I call a popup based at the click of another button. Where I gave an option so that the user doesn't show this confirmation again window. Once the user sets this checkbox and close the pop-up window. I display a button in my test. JSF which will allow the user to restore to the original setting.

    < af:popup.

    a code

    < af:selectBooleanCheckbox shortDesc = "#{bindings." EmployeesView1.hints.Selected.tooltip}.

    ID = "sbc22" text = "don't show this window again"

    Binding ="{tableshuttlebean.popupcheckbox}" / > "

    < / af:popup >

    I put the partial trigger for the OK button of the pop-up window to the form of the page parent element, but it does not work. I'm not able to update my parent page and show the button.

    My apologies if I'm not able to explain my problem clearly.

    Thank you

    Mozakkir

    Mozakkir, please indicate your Jdev version!

    You cannot use the property made for it. Once the rendering of the property is false, the component he remembers of the tree and is not shown again without a full page refresh. However, you are only a partial new.

    The visible property of the user instead that just hides the component and allows to show later with a partial refresh.

    Timo

  • Dynamic action to show skillbuilders popup doesn't work when the page refreshes

    Hello!.
    I have a relationship with a column of link:

    "" < a href = "f?... class = show_popup '...

    I have a dynamic action defined like this:


    Event: click.
    type: jquery selector
    selector: a.show_popup
    no condition.

    Action: skillbuildersmodalpage 2.0.0
    URL: attribute of the triggering element.

    It works fine, but after that the popup is shown and closed, the link does not work until the page is completely refreshed again.

    After the closure of the pop-up window, I only update the report with $a_report (in another dynamic action on the 'auto skillbuolders close' event), I don't want to send the entire page...
    the partial update works fine too, but not the link, it works again by refreshing or submit that all page

    any idea?

    Published by: Andres Vilallave on 28-may-2013 16:22

    you define the scope of the dynamic event?

  • How to show a popup() blocking?

    Hello

    Is there a way to display by one program component popup (with an OK CANCEL dialogue inside), so that the execution flow blocks until the user presses OK or CANCEL?
    Basically, I need to do method show() block execution and display the context menu right after it is called in an action listener attached to a button.

    Public Shared Function Sub show (String popupId) {}
    FacesContext context = FacesContext.getCurrentInstance ();
    Erks = ExtendedRenderKitService
    Service.getRenderKitService (context, ExtendedRenderKitService.class);
    erks.addScript (context,
    "AdfPage.PAGE.findComponent('"+ popupId +"')". show(); ");
    }

    Hello

    + 1) set the property dialogListener programmatically, which will point to some beans passed to display (String mybean_listener) by the user. I don't know how to do it again. +

    (a) looking for the component the UIViewRoot (findComponent) popup ID by templateId:popupId
    (b) disseminate this UIComponent to RichPopup reference
    (c) you create a MethodExpression for the EL string you need to run
    (d) call Set accessor for the property of the listener, then assign the MethodExpression it. The event expression method class would be LaunchEvent (Trinidad Apache class)

    That's how it should work. I think that after the idea of Timo of manipulation of OK/Cancel dialog logic. You can write a declarative component which managed the popup and exposes the two attributes of the method - one for OK, cancel. You these up to methods in a managed bean that can now send wire then the action that you want to call. Note that instead of OK/Cancel I would use yes/no because the cancellation in a popup event is the only customer event.

    See: http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e12419/tagdoc/af_dialog.html

    Frank

  • How to show a popup (confirm) dialog box as well as exec warning a proc

    I would like to have a confirmation popup dialog box display whenever a user chooses to delete a record. I understand how to do this, but I don't know how to have a stored procedure to run after the user selects ok in the dialog box.

    How can I get a stored procedure to run after the user confirms that this is indeed what they want to do in the dialog box?

    I have this in the JavaScript page-> service and the Global Variable declaration section:
    var htmldb_delete_message = ""DELETE_CLASS_CONFIRM_MSG "";

    The button Delete is the value of action-> URL redirection
    JavaScript:apex.confirm (htmldb_delete_message, 'DELETE_CLASS_CONFIRM_MSG');

    The process of the stored procedure is set to run to submit with the button Delete.

    Right now, nothing is happening when they confirm the popup dialog box. If I get the popup dialog, removing works very well, but (of course), the user can accidentally do something they don't want.
    Thank you very much
    Reid
    Request Express 4.0.1.00.03

    Hey Reid,

    The second parameter in the call to confirm is not supposed to be the message again - this is supposed to be the value to the APPLICATION. If you would like to be, "DELETE_CLASS" and then you would make your conditional removal on request = DELETE_CLASS process.

    Hope this helps,
    John

    If you find this information useful, please do not forget to mark the 'useful' or 'correct' post so that others benefit as well.

  • Show the popup inside the list item (JDEV 12 c)

    Hi all

    I'm having a problem when I try to display the pop-up window on an image, click.

    Inside the image, there is the showPopupBehaviour that triggers the popup.

    It is not working properly if I put the popup on the outside of the list item, but the problem is that I need inside so I can view the attributes of each element.

    The list with the elements (each icon should trigger the popup with information components):

    popup issue.png

    Best regards

    Luis Cabaco

    The problem is not the popup, but how you load the data from the context menu.

    The popup will match every time, only data changes.

    Make sure that the popup contentDelivery has the value "lazyUncached".

    Timo

  • Conditionally show a field

    I would like to show a field based on the value of a variable user with just a bit of JavaScript. A copy of the field would appear on each slide of the question in a quiz. The field contains a reference to the issue. So, if my var user = 1, the field will automatically appear on each slide where it exists. If my user var is not equal to 1, the field remains hidden.

    I don't seem to be able to associate actions with a standard field object if anyone has a suggestion, describing how I could go to the realization of this behavior?

    Must I have a use for a fast action on every page? If this is the case, then each page should have its own copy personalized of the tip action to refers to each unique name field in the quiz. It is my current hypothesis because I have not found a way to make the generic actions so logical in the tip action applies to an object based on a generic reference to something like 'my' or 'this '.

    Thank you

    Pete

    I think that I have answered it for me.

    Yes, when I mentioned a text field, I was talking to a text caption in "Captivate talk." In my case, I want a unique piece of information stored with each question in a quiz. This piece of information will be the reference for the study of the issue. It will be visible only when a user variable has been set to the value of '1' by a call from javascript. This call is triggered by a "backdoor" on the title page. When a simple password request this transparent button double-click. If the correct password is supplied, the user var is set to 1.

    The answer is to place a copy of the field on every quiz page and use a shared action triggered by the event type for each slide to see the normally hidden field.

  • XML report - conditionally showing a column between other columns

    I have a XML report with columns

    A, B, C, D


    Now, I need to add a new column E between B and C when some condition is met.


    A, B, E, C, D


    for column E, I kept <? If: column = 'X '? > columnname <? endif? >.

    When the condition is satisfied, it displays the columns and values also, but when not a column empty appears worthless, I don't want this empty column when the condition is not satisfied.


    We must just see them A, B, D instead of A, B, C, C, D

    Ask you to help me with my requirement.

    It will be like

    Header:

                         OM expiry Date        

    Data record:

          

  • Balance sheet of the conditionally show by checkbox checked

    All,
    I have created 8 check boxes:
    'Source '.
    STATIC2: a 1, b; 2, c; 3, d; 4, e; 5, f; 6, g; 7, h; 8

    According to c (checked) I want to show a report.

    Status of the report:
    "Function from PL/SQL body returning a Boolean".
    Start
    If (: c = '3') then
    Returns true;
    on the other
    Returns false;
    end if;
    end;

    But it does not work.

    Any help appreciated,
    See you soon
    Lucio

    You must call the name of your box, not: c If your box has been named P1_SOURCE your code so as:

    begin
       if (:P1_SOURCE= '3') then
          return true;
       else
          return false;
       end if;
    end;
    
  • Conditionally show image report

    Hello

    I have this SQL base report
    SELECT
      POJ_CODE, -- #POJ_CODE#
      CASE poj_typ_rizika
        WHEN 2 THEN CASE
                               WHEN poj_typ_pripojisteni IS NULL THEN '<span class="ui-icon ui-icon-circle-plus"></span>'
                               ELSE NULL
                             END
        ELSE NULL
      END pripojisteni -- #PRIPOJISTENI#
    FROM
      N_POJISTENI, 
      FISPRO_USER
    WHERE
      POJ_PREDMET = :P42_PRE_CODE and
      POJ_VYTVORIL = USR_CODE
    Now, I try to use #PRIPOJISTENI # in the link column, but with problems (maybe the exhaust apex tanks in #PRIPOJISTENI #). My settins in the links in the column are:

    Display as: Standard report column
    Text link: #PRIPOJISTENI #.
    Target: URL
    URL: javascript:pridejPripojisteni(#POJ_CODE#)

    When I run this report in the column "Pripojisteni" there's nothink (#PRIPOJISTENI # value is not NULL) in the column :-/
    <table class="report-standard" cellspacing="0" cellpadding="0" border="0" summary="">
      <tbody>
        <tr>
        <tr class="highlight-row">
          <td class="data" headers="POJ_CODE"><td>
          <td class="data" headers="PRIPOJISTENI">
          <a href="javascript:pridejPripojisteni(113)"></a>
          </td>
    correct version should be
    <table class="report-standard" cellspacing="0" cellpadding="0" border="0" summary="">
      <tbody>
        <tr>
        <tr class="highlight-row">
          <td class="data" headers="POJ_CODE">
          <td class="data" headers="PRIPOJISTENI">
          <a href="javascript:pridejPripojisteni(113)"><span class="ui-icon ui-icon-circle-plus"></span></a>
    </td>
    </td>
    Anyone know what to do to the good running report? Problem look like which is somewhere in excaping when you use #PRIPOJISTENI # in link. I'm not sure.

    David

    David,

    It works for me, then try this

     .... THEN 'test' 
    

Maybe you are looking for