How to close a popup by backing bean?

How to close a popup by backing bean?
StringBuilder script = new StringBuilder();
        FacesContext context =  FacesContext.getCurrentInstance();
                  script.append("var popup = AdfPage.PAGE.findComponent('").append().append("'); ")
                        .append("if (popup.isPopupVisible()) { ")
                        .append("popup.hide();}");
                  ExtendedRenderKitService erks =
                    Service.getService(context.getRenderKit(), ExtendedRenderKitService.class);
                    erks.addScript(context, script.toString());

Tags: Java

Similar Questions

  • How to close a popup screen pushed as a global screen

    I want to close a popup screen but my application is in background so

    UiApplication.getUiApplication () .popScreen (getScreen ());

    or

    UiApplication.getUiApplication () .getActiveScreen () m:System.NET.Sockets.Socket.close ();

    does not work is not something

    same Ui.getUiEngine () .getActiveScreen () m:System.NET.Sockets.Socket.close () does not work...

    in the popup screen, I have a custoListView (written own filed) there is an item when you click on an event

    listner function is called by there, I have to close popup screen... my class is like that

    SerializableAttribute public class SelectSms extends PopupScreen {}

    private vector _data;

    public boolean onClose() {}
    try {}
    Close();
    Returns true;
    } catch (Exception e) {}
    Returns false;
    }
    }

    public SelectSms() {}
    Super (new VerticalFieldManager(), Field.FIELD_VCENTER);
    _data = null;
    _data = MessageStore.getMessage ();
    last post [] message = Message [_data.size (new)];
    MSGC [] CustomListField = null;
    MSGC = new CustomListField [_data.size ()];
    for (int i = 0; i)<>
    message [i] = (Message) _data.elementAt (i);
    MSGC [i] = new CustomListField (message [i] .getMSG_BODY (), message [i] .getMSG_NO (), and [i] .getMSG_STUS ());
    last post mesg = message [i];
    MSGC [i] .setChangeListener (new FieldChangeListener() {}
    ' Public Sub fieldChanged (field field, int context) {}
    onClose();
    }
    });
    Add (MSGC [i]);
    }
    can someone help me how to close the popup screen.
            
    }
    }

    Place the UiApplication.popScreen () call in an executable object and pass this object to UiApplication.invokeLater ().

  • [SOLVED] - how to invoke Web service through backing bean

    Hi all

    I'm new to the web service. I need to implement a web service in my application.

    I already posted my request in the forum

    [SOLVED] - how to invoke Web service through backing bean

    [SOLVED] New Web Services - need your help

    Please someone knows the solution means the poster.


    Thanks and greetings
    VB

    Published by: malek Balan on June 17, 2009 01:28

    Large. Yes, take the code of the main as entry point method, IE

    QuoteServiceSoapHttpPortClient myPort = new QuoteServiceSoapHttpPortClient();
    myPort.myMethod ();

    Be sure to include the customer file in your binaries.
    -olaf

    PS: Please rate the answer.

  • How to close a popup window progrmatically in backing bean

    Hello

    I use Jdeveloper 11 g, I have a requirement to close a pop-up window in backing bean after the selection of certain attributes in the pop-up window. Can someone share me the code to close the pop up window

    Thank you

    Hello

    See http://www.adftips.com/2010/10/adf-ui-popuputil-class-to-show-or-hide.html

    concerning
    Peter

  • How to call popup of backing bean

    Hello

    I have a request under jdev 11.1.1.1.0
    I use the model of Solution Explorer.
    I have my popups on a page and another page, I need to call these pop-up windows.
    I can't use the < af:showPopupBehavior > because I use the < af:setActionListener > on my command button.
    Then, in the action attribute, I called my grain of support
     public String showDelBoxPopup() {
       FacesContext context = FacesContext.getCurrentInstance();
       ExtendedRenderKitService extRenderKitSrvc = 
         Service.getRenderKitService(context,ExtendedRenderKitService.class);
       extRenderKitSrvc.addScript(context,"AdfPage.PAGE.findComponent('delBoxPopup').show()");
       return null;
    }
    But I always get an error NULL.
    How can I call a popup in a page in another page using backing bean.

    Thank you in advance.
    Emile BITAR

    Hello

    If you set triggerType = 'click' on the showPopupBehavior and contentDelivery = "lazyUncached" on the popup to ensure the popup will be triggered after setActionListener you can use with .
    I don't understand what you mean by calling the context menu from another page (this page is included as a region is?), but if you say that it works, then your other option would be to link the popup to support bean and use popup.getClientId () in your javascript.

    String script = "var popup = AdfPage.PAGE.findComponent(\"" + popup.getClientId(fc) +  "\"); popup.show();";
    

    Pedja

  • How to open the PopUp of Managed Bean?

    Hello

    Can you please let me know how can we open a managed bean pop.

    Thank you and best regards,
    Kiran kristelle

    You might find some suggestions on the strange site:

    http://forums.Oracle.com/forums/search.jspa?OBJID=F83&q=popup+backing+bean

  • How to create a table of backing bean using the map &lt; String, List &lt; String &gt; &gt;?

    Hello

    I have a structured map < String, List < String > > plan in backing bean. I have a requirement to draw a table using this hash table which means map key as columns and its value is a list and it's the column values.

    Thank you

    Faizal

    Check this Create ADF Table during execution

    ~ Abhijit

  • How to develop the Table of Backing Bean tree nodes?

    I have a requirement where I want my table to be expanded all three nodes. InitiallyExpanded = True develops alone.
    Is it possible to have all the Backing Bean nodes?

    Code snippet will be very useful.

    Thanks in advance,
    TK

    For all nodes in a treetable can be expanded, you will need to add all the rows of the disclosedRowKeySet.

    (1) create a binding for the treetable in average managed code as "treeTable.
    (2) create a CommandButton named "Expand" (under the picture of the tree) and Visible set to false and create a link to a page named expandButton & in the get accessor for the commandButton control method, call the following method:

    public RichCommandButton getExpandButton() {}
    this.expandTreeTable ();
    }

    private RowKeySet disclosedTreeRowKeySet = new RowKeySetImpl();

    private void expandTreeTable() {}
    If (this.treeTable! = null) {}
    disclosedTreeRowKeySet = new RowKeySetImpl();
    Model CollectionModel = (CollectionModel) treeTable.getValue ();
    JUCtrlHierBinding = treeBinding
    (JUCtrlHierBinding) model.getWrappedData ();
    JUCtrlHierNodeBinding RootNode = treeBinding.getRootNodeBinding ();
    disclosedTreeRowKeySet = treeTable.getDisclosedRowKeys ();
    If (disclosedTreeRowKeySet == null) {}
    disclosedTreeRowKeySet = new RowKeySetImpl();
    }
    List = firstLevelChildren
    rootNode.getChildren ();
    for (node JUCtrlHierNodeBinding: firstLevelChildren) {}
    List ArrayList = new ArrayList();
    List.Add (node.getRowKey ());
    disclosedTreeRowKeySet.add (list);
    expandTreeChildrenNode (node, treeTable, list);
    }
    treeTable.setDisclosedRowKeys (disclosedTreeRowKeySet);
    }
    }

    Private Sub expandTreeChildrenNode (RichTreeTable, rt,
    JUCtrlHierNodeBinding node,
    The list parentRowKey) {}
    ArrayList children = node.getChildren ();
    List rowKey;
    If (children! = null) {}
    for (int i = 0; i)< children.size();="" i++)="">
    rowKey = new ArrayList ();
    rowKey.addAll (parentRowKey);
    rowKey.add (((JUCtrlHierNodeBinding) children.get (i)) .getRowKey ());
    disclosedTreeRowKeySet.add (rowKey);
    If (((JUCtrlHierNodeBinding) (children.get (i))) .getChildren () is
    null)
    continue;
    expandTreeChildrenNode (rt,
    (JUCtrlHierNodeBinding) (node.getChildren () .get (i)),
    rowKey);
    }
    }
    }

    Thank you
    Nini

  • Programmatically close a popup of a bean managed

    Hello

    in the following blog [http://thepeninsulasedge.com/frank_nimphius/2008/02/14/adf-faces-rc-programmatically-closing-a-popup-from-a-managed-bean/ | http://thepeninsulasedge.com/frank_nimphius/2008/02/14/adf-faces-rc-programmatically-closing-a-popup-from-a-managed-bean/]

    the following statement made at the end...

    The JavaScript call is published as "window.exitPopup ()", because the script is called from the root of the page. You can easily see how the JavaScript code can be modified to have 'exitPopup' becomes a generic function avoiding coded hard popup ID as in my example.

    I don't understand how avoid the popup hard ID could someone please explain that to me.

    Thank you
    Brahim

    Hello

    You can modify the JavaScript function to get the popup ID passed as an argument. Then you get the ID of popup in the managed for example by JSF binding and add to the function call.

    Frank

  • How to close the popup window after executing PL/SQL?

    Hello

    To see a junior question: we use APEX 5.0.2

    On a page of the modal dialog (of an interactive report), for the button create, I created a dynamic action that runs the specific code from PL/SQL to insert a new item.  Then behind the insert clause, I have the code to close the pop-up window, so that it executes successfully the insert clause without closing the window.  Please let me know what I can do.  Thank you.

    HTP.p ("< script > '");

    HTP.p ('window.opener.Location.Reload ();) Window.Close ();') ;

    HTP.p ("< /script >" ");

    Kind regards

    Jian

    OK, thanks for all your help and ideas. Finally, I gave up running JavaScript, instead, I created another dynamic action that closes the dialog box with a later sequence (for example, it runs after the PL/SQL code).  Now, it closes the windows properly after running pl/sql clause.  Although I still wonder how to run JavaScript because it doesn't do anything, even when I create a process to run javascript directly.

  • autoCancel Popup in backing Bean behavior

    Hello Experts,

    I use jdev 11.1.1.6

    In jsff; I have

    < af:popup id = "p_24" contentDelivery = "lazyUncached" clientComponent = "true" binding = "#{pageFlowScope.SomeBean.popupBinder}" >

    < / af:popup >

    In SomeBean.java

    Private RichPopup popupBinder;

    getter and setter

    private void autoCancelEnables() {}

    String popupId = popupBinder.AUTO_CANCEL_ENABLED;        I want to activate autocancel popup, but this statement is not correct

    }

    private void autoCancelDisabled() {}

    String popupId = popupBinder.AUTO_CANCEL_DISABLED;     I want to disable autocancel popup, but this statement is not correct

    }

    Thank you vinaykumar2 .

    I thought about it.  I was looking for something below

    private void autoCancelEnables() {}

    popupBinder.setAutoCancel (popupBinder.AUTO_CANCEL_ENABLED);

    }

    private void autoCancelDisabled() {}

    popupBinder.setAutoCancel (popupBinder.AUTO_CANCEL_DISABLED);

    }

  • How to show a different side of backing bean using UIXSwitcher

    Hi all

    I have a requirement to clear the contents of the dialog box, and then to display the message of success on the same dialog box.

    < af:popup id = "Popup" contentDelivery = "lazyUncached".

    Binding = "#{Bean.managePopup}" >

    < af:dialog title is 'dialogue' type = 'none' id is "Managedialog" >

    < af:switcher id = "switcher1" facetName = binding = "#{bean.manage"formFacet"}" >

    < f: facet name = "formFacet" >

    < af:commandLink text = "SUBMIT" id = "cl4" >

    < / f: facet >

    < f: facet name = "successFacet" >

    < af:outputText value = "SUCCESS!" / > "

    < / f: facet >

    < /af:switcher> < /af:dialog> < /af:popup>

    Backing bean:

    During the click on send

    {} public void manageOnclick (ClientEvent clientEvent)

    manage.setFacetName ("successFacet");

    }

    On submit, successFacet is not posting. where I'm going wrong?

    During the click on send

    {} public void manageOnclick (ActionEvent actionEvent)

    UIXSwitcher switchFacet;

    switchFacet.setFacetName ("successFacet");

    AdfFacesContext context = AdfFacesContext.getCurrentInstance ();

    context.addPartialTarget (successFacet);

    }

    With switch the code above worked, showing the successFacet.

  • How can I close a Popup calendar of Adf in my managed bean?

    Hello.

    I use the calendar to the Adf.

    When I call the method to close the pop-up window:

    {} public static void hidePopUp (RichPopup popUp)
    FacesContext facesContext = FacesContext.getCurrentInstance ();
    ExtendedRenderKitService = service
    Service.getRenderKitService (facesContext,
    ExtendedRenderKitService.class);
    String serviceScript = "AdfPage.PAGE.findComponent (" "+ popUp.getClientId (facesContext) +)"
    "(. hide()')";
    service.addScript (facesContext, serviceScript);
    }

    and after calling the method "AdfFacesContext.getCurrentInstance ().addPartialTarget(this.calendar//my ADF Calendar);"the updating of the calendar and my popup not close. "

    If I do not call the method "AdfFacesContext.getCurrentInstance ().addPartialTarget(this.calendar//my ADF Calendar);" my popup close works normally. "

    Can someone help me?

    Thanks

    Hello..
    To hide the popup code tips use also set for popup partialTriggers

    partialTriggers = "componentIdThatCallHideThePopup" the binding = "#{SampleBean.samplePopUp}" > "

    Private RichPopup samplePopUp;
    {} public void setSamplePopUp (RichPopup samplePopUp)
    this.samplePopUp = samplePopUp;
    }
    public RichPopup getSamplePopUp() {}
    Return samplePopUp;
    }

    to close the popUp use. hide() and after that to share partialtrigger for the calendar

    getSamplePopUp () .hide ();
    AdfFacesContext.getCurrentInstance () .addPartialTarget (this.calendar//my ADF calendar); »

    hope it will be useful

  • How to transfer values to the popup while the bean in application scope?

    Hi all

    I use JDeveloper 11.1.1.4

    My scenario is that I have a < af:popup > with a component of < af:outputText >.

    I need pass values of output text dynamically according to the scenarios.

    My grain of support is application scope . So I'm not able to pass values using get and methods.

    My Design as,

    < af:popup id = "p1" contentDelivery = "lazyUncached" >

    < af:outputText value = "#{managedBean.getDynamicText}" id = "ot1" / > "

    < / af:popup >

    Now I run the application I'm not get all values in text during debugging output, I am able to set the value, but it didn't reflect on the page.

    How to transfer values to the popup while the bean in application scope?

    Thank you...

    At the bean, why don't you set the value to a variable pageflowscope and point the outputtext popup to the pageflowscope variable?

    () .getpageflowscope, set AdfFacesContext.getCurrentInstance ("nomvar", value);


    Thank you

    Alisson

  • How to refresh data in backing bean-based component SelectOneChoice

    Hello.

    I use JD Studio Edition Version 11.1.1.5.0 on Weblogic 11.1.1.5

    I have the resulting page with SelectOneCoice fragment of the backing bean (used as filter)

    < af:selectOneChoice label = "#{projectBundle ['label.toolbar.spinbox.period']}" "

    valueChangeListener = "#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.onPeriodValueChangeListener} '"

    Binding = "#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.SOC2} '"

    ID = value = "#{pageFlowScope.ContentMainView.period"soc2"} ' autoSubmit ="true">"

    < f: selectItems value = "#{pageFlowScope.YearsListBean.yearItems} '"

    Binding = "#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.SI2}" id = "si2" / > "

    < / af:selectOneChoice >

    It supports bean which reads the data from the database and creates the list + adds value null

    package sk.web.view.bean;

    import java.util.ArrayList;

    import java.util.List;

    Import javax.faces.model.SelectItem;

    Import oracle.adf.model.binding.DCIteratorBinding;

    Import oracle.adf.share.logging.ADFLogger;

    Import oracle.jbo.Row;

    Import sk.web.view.common.utils.ADFUtils;

    /**

    * Class is supposed to provide a list of the years for the af:SelectOneChoice component.

    */

    public class YearsListBean {}

    private static final String PERIOD_ITERATOR_NAME = "PeriodView1Iterator"; Auto generated id

    private list < SelectItem > yearItems;

    public YearsListBean() {}

    Super();

    yearItems = new ArrayList < SelectItem > ();

    addYearsToList();

    }

    public void addYearsToList() {}

    DCIteratorBinding iter = null;

    ITER = ADFUtils.findIterator (PERIOD_ITERATOR_NAME);

    Rank [] rows = iter.getAllRowsInRange ();

    addYearItemToList ("", "");

    for (int i = 0; i < rows.length; i ++) {}

    Line = lines [i];

    log.info ("row [" + Integer.toString (i) + "]:" + rows [i].getAttribute("Year").toString ());

    addYearItemToList (rows [i].getAttribute("Year").toString (), rows [i].getAttribute("Year").toString ());

    }

    }

    public void clearYears() {}

    log.info ("called.");

    getYearItems () .clear ();

    }

    ' private void addYearItemToList (String strInYearLabel, String strInYearValue) {}

    SelectItem tObjItem = new SelectItem();

    Configuration object

    tObjItem.setLabel (strInYearLabel);

    tObjItem.setValue (strInYearValue);

    Add list ro

    yearItems.add (tObjItem);

    }

    public list < SelectItem > getYearItems() {}

    Get an output

    Return yearItems;

    }

    }

    When I insert the new record in the DB table, I want to see the new value in the filter. How to get there?

    I tryied to get the current instance of YearsListBean

    YearsListBean yearsList = (YearsListBean) FacesUtils.getManagedBean ("pageFlowScope.YearsListBean");

    Clear and then refill

    yearsList.clearYears ();

    yearsList.addYearsToList ();

    at the end I refresh view Add partial target

    AdfFacesContext.getCurrentInstance () .addPartialTarget (getSoc1 ());

    But this procedure does not work. Please help me find the working method.

    Thanks in advance.

    I found the bug in my code. I added partial target the wrong component. Now, refresh works fine.

Maybe you are looking for