Problem while invoking popup from backing bean

I am invoking a popup from backing bean method.
The same backing bean method has the business logic which depends on the data collected from popup(user enters some data on popup).
So I need the business logic to be executed after popup comes up.
The popup is coming after the execution of return statement in backing bean method . How do i make popup trigger at earlier point in the method.
<af:commandToolbarButton text="#{corePostupgradeuiBundle.SIGN_OFF_MIG}"
id="socb52"
partialSubmit="true"
actionListener="#{viewScope.signoffBean.signOffAgents}"
partialTriggers="t3"/>
public void signOffAgents(ActionEvent event) throws SQLException {
DCBindingContainer bc =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding summaryIter =
bc.findIteratorBinding("Signoff1Iterator");
showPopup("credentials"); //will get credential details from user and store in credential Bean
//Following logic uses the data collected from popup
EMCredentialReference credRef= credentialBean.getCredReference();
submitJOb(credRef);
public static void showPopup(String popupId) {
FacesContext context = FacesContext.getCurrentInstance();
StringBuilder script = new StringBuilder();
script.append("AdfPage.PAGE.findComponent(\"").append(popupId).append("\").show();");
ExtendedRenderKitService erks =
Service.getService(context.getRenderKit(),
ExtendedRenderKitService.class);
erks.addScript(context, script.toString());
UIComponent component = context.getViewRoot().findComponent(popupId);
RequestContext.getCurrentInstance().addPartialTarget(component);
}

Well, your work flow is wrong.
What you try to accomplish should work out of the box as
1) user hit toolbar button
2) this opens a popup "credentials" which have listeners for ok and cancel
3) use fills in data in popup and hit ok or cancel
4) one of the listeners gets fired
5a) if OK listener you do your business logic
5b) if cancel you do something else
So all you have to do is the use a af:af:showPopupBehavioron the toolbar button, add a popup canel listener (if you need to act on canel) dependign on your popup design (dialog or simple button) add the appropriate listeners and in the listener method so your business logic.
Timo

Similar Messages

  • 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

  • Popup from backing bean not using facesContext.addMessage()

    I am creating a popup from backing bean as:
    FacesContext facesContext = FacesContext.getCurrentInstance();
    FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "some message");
    facesContext.addMessage();
    I want the code after the popup creation to execute after the user clicks "ok" on the popup. But somehow the code after these lines gets executed first & then the popup appears after the control returns from the backing bean. Looks like the popup creation happens in a completely different thread. Is there a way to show the popup immediately where I want instead of this facesContext.addMessage() method where execution can wait for the user action?

    yeah, you can create a component declarative or popup that shows the message personalized, and call with javascript , see my others posts
    Re: Component Poppup declarative - problems with multiple instances
    this functional now with jdev 11.1.1.3.
    Regards
    joaquin

  • Problem while invoking a Stateless Session bean from another bean

    Hi,
    I have a peculiar problem while coding with Stateless Session beans. Maybe you guys can help me out over here. The scenario is as follows
    There are 3 Stateless Session beans. Let Us say Bean A, B and C. There are three methods, method1, method2, and method3 inside A, B and C respectively.
    From A.method1(), B.method2(), and C.method3() are being invoked sequentially. Each of these methods does some JDBC operation and then returns.
    The problem is this, if C.method3() throws and exception, then I am unable to rollback the changes made by B.method2(). Those changes get "Committed" to the database.
    All the 3 beans have Bean managed persistence property set. I am using WebSphere 6.1.
    Any insight on why this is happening would be greatly appreciated.
    Thanks In Advance
    Amardeep Verma

    Hi,
    This is a matter of calling all three methods in the same transaction context. Most easy way of doing this is having a 4th session bean containing a method calling the other 3. Make sure that the Transaction Attributes are REQUIRED, which is the default.
    If the calls a to different backends/databases, you need global transactions and therefor XA complient database and drivers.
    HTH Robert

  • Showing Yes/No option  popup from backing bean

    Hi,
    I have a af:query popup where i search for the results using the backing bean.
    So if this query retrieves more than say 100 rows, I want to show an Yes/No option popup from baking bean informing the user that "the result rows exceed 100, do you wish to continue"
    So on click of yes i will continue processing the result rows otherwise i will dispose the option popup.
    Please note i also need to use the Message bundle for localizing the message in the backing bean.
    Thanks
    Ajay

    What I do.
    In my jspx:
                   <af:popup binding="#{backingBeanScope.backing_site_search.msgPop}"
                             id="msgPop" contentDelivery="lazyUncached">
                     <af:dialog binding="#{backingBeanScope.backing_site_search.msgDiag}"
                                id="msgDiag" type="yesNo">
                       <af:outputText binding="#{backingBeanScope.backing_site_search.msgText}"
                                      id="msgText"/>
                     </af:dialog>
                   </af:popup>In my backing bean, when I need the popup:
    myUtils.showPopup(this.getMsgPop().getClientId(FacesContext.getCurrentInstance()));In my utility bean:
        public static void showPopup(String popupId){
          ExtendedRenderKitService service =
              Service.getRenderKitService(FacesContext.getCurrentInstance(),
                                          ExtendedRenderKitService.class);     
          service.addScript(FacesContext.getCurrentInstance(),
                            "AdfPage.PAGE.findComponent('"+popupId+"').show();");
        }And, of course, you can create a dialogListener, popupFetchListener, and popupCancelListener in your backign bean to handle any actions you need to accomplish.
    public void newDialogListener(DialogEvent dialogEvent) {
            if (dialogEvent.getOutcome().name().equals("yes")) {
        }

  • 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

  • How to call popup from backing bean

    Hi,
    I have an application under jdev 11.1.1.1.0
    I am using the explorer template.
    I have my popups in one page and from another page i need to call these popups.
    I cannot use the <af:showPopupBehavior> because i am using the <af:setActionListener> in my command button.
    So in the action attribute I called my backing bean
    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 receive a null error.
    How can i call a popup in one page from another page using backing bean.
    Thank you in advance.
    Emile BITAR

    Hi,
    You can use <af:setActionListener> with <af:showPopupBehavior>, if you set triggerType="click" on the showPopupBehavior and contentDelivery="lazyUncached" on the popup to ensure the popup will be raised after setActionListener.
    I also don't understand what you mean by calling the popup from another page (is that page included as a region?), but if you say it works then your other option could be to bind the popup to the backing bean and use popup.getClientId() in your javascript.
    String script = "var popup = AdfPage.PAGE.findComponent(\"" + popup.getClientId(fc) +  "\"); popup.show();";Pedja

  • How to call the show method of Popup from backing bean?

    Hi!
    I wanted to display the results of a search form in a dialog that is placed in popup.
    That is The content of the popup will be rendered from the backing bean, dynamically .
    And so when the form is filled and the submit button is clicked, the form fields have to be submitted to the server, and the results are to be displayed in the dialog,after the PPR response has arrived, and not at the time of calling the PPR.
    Could you explain How this can be achieved?
    Samba

    Samba,
    The fix for the popup in a template is to give the template an id say "template" and reference the popup in the JavaScript as "template:popupId", where popupId is the value of the af:popup's id attribute.
    Regarding DWR, Joe really did a nice job with this framework. I have to say he got my attention. The one issue though is that JavaScript is an absolute must when using DWR and other frameworks that have a heavy JavaScript tilt. Dealing with JS can be a bit of a hassle due to x-browser idionsyncrascies as well as slow exection of JS. That said I believe Joe has one of the best JS solutions around.
    On the flip side of this ADF Faces is trying to do something a bit different. Firstly, we want to avoid JS. The user should handle as little as JS as possible. In addition,
    ADF Faces has the benefit of a server-side component framework we want to leverage this to make sure there is a limited amount of JS execution on the client.
    So if you want to work with JS, DWR is a good solution. If you want to work with, Java, standards, and a great tooling environement ADF Faces is a better choice.
    Finally, "Reverse AJAX" is a marketing term for "Push". You probably have also heard the term Comet. There are some varations on the protocols used but all-in- all. We are talking about one thing, the ability for the server to "Push" information to the client. Luckily, we provide this ability in a feature called active data channels. You will see this feature in the next preview. By setting an attribute value in a pageDef trees, tables, and BAM components can recieve data from the server via "Push".
    Thanks,
    Ric

  • Problem while calling servlet from java bean

    I am trying to call a servlet from java bean in cep.
    My java bean:
    package com.bea.wlevs.example.algotrading;
    import com.bea.wlevs.ede.api.StreamSink;
    import com.bea.wlevs.example.algotrading.event.MarketEvent;
    import javax.xml.bind.JAXBContext;
    import javax.xml.bind.Unmarshaller;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.StringReader;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLConnection;
    public class MarketEventBean implements StreamSink {
         String s=null;
         public void onInsertEvent(Object event) {
              if (event instanceof MarketEvent) {
                   MarketEvent marketEvent = (MarketEvent) event;
                   try {
                        JAXBContext cxt = JAXBContext.newInstance(MarketEvent.class);
                        Unmarshaller unmarsh = cxt.createUnmarshaller();
                        StringReader strReader = new StringReader(marketEvent.getString_1());
                        MarketEvent obj = (MarketEvent) unmarsh.unmarshal(strReader);
                        s=obj.getSymbol();
                        System.out.println("data: " + s);
                   } catch(Exception e) {
                        e.printStackTrace();
                   try {
                        System.out.println("test1");
         URL url = new URL("http://172.18.21.94:7001/AppServletrecv-Model-context-root/ReceiveServlet");
         URLConnection conn = url.openConnection();
              System.out.println("test2");
         conn.setDoOutput(true);
              System.out.println("test3");
         BufferedWriter out =
         new BufferedWriter( new OutputStreamWriter( conn.getOutputStream() ) );
         out.write("symbol="+s);
              System.out.println("test4");
         out.flush();
         System.out.println("test5");
         out.close();
         System.out.println("test6");
         BufferedReader in =
         new BufferedReader( new InputStreamReader( conn.getInputStream() ) );
              System.out.println("test7");
         String response;
         while ( (response = in.readLine()) != null ) {
         System.out.println( response );
         in.close();
         catch ( MalformedURLException ex ) {
         // a real program would need to handle this exception
         catch ( IOException ex ) {
         // a real program would need to handle this exception
    My servlet code:
    package model;
    import javax.servlet.http.HttpServlet;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class ReceiveServlet extends HttpServlet {
    private final static String _SYMBOL = "symbol";
    public void doPost(HttpServletRequest request, HttpServletResponse response) {
    * Get the value of form parameter
    // private final static String USERNAME = "username";
    String symbol = request.getParameter( _SYMBOL );
    * Set the content type(MIME Type) of the response.
    response.setContentType("text/html");
    * Write the HTML to the response
    try {
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<head>");
    out.println("<title> A very simple servlet example</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Hello " + symbol +"</h1>");
    out.println("</body>");
    out.println("</html>");
    out.close();
    } catch (IOException e) {
    Web.xml:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
    <servlet>
    <servlet-name>ReceiveServlet</servlet-name>
    <servlet-class>model.ReceiveServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ReceiveServlet</servlet-name>
    <url-pattern>/ReceiveServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    My servlet is running in weblogic server.
    But when I am running this program in weblogic server side there is no log.
    Edited by: 856272 on Jun 23, 2011 6:43 AM

    I would run both sides in a debugger and see what code is getting invoked

  • Problem while invoking BPEL from a JSP.

    I have a very simple JSP
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
    <%@page import="java.util.Hashtable" %>
    <%@page import="javax.naming.Context" %>
    <html>
    <head>
    <title>Invoke HelloWorld</title>
    </head>
    <body>
    <%
    Hashtable jndi = null;
    String name = request.getParameter("name");
    if(name == null)
    name = "BPEL";
    String xml = "<name xmlns=\"http://samples.otn.com/helloworld\">" + name + "</name>";
    Locator locator = new Locator("default","bpel",jndi);
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload" , xml );
    deliveryService.request("HelloWorld", "process", nm);
    out.println( "BPELProcess HelloWorld initiated!" );
    %>
    Please refer to the
    BPEL Console
    to see the status of the initiated HelloWorld BPEL Process.
    </body>
    </html>
    when i am trying to run this JSP i get the following error
    java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not found     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.rmi.RMIServerContext.lookup(RMIServerContext.java:207)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:255)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.ApplicationContext.lookup(ApplicationContext.java:195)     at javax.naming.InitialContext.lookup(InitialContext.java:351)     at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)     at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)     at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)     at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)     at _Hello._jspService(_Hello.java:79)     [Hello.jsp]
    Please help.. is it any configuration problems do i need to set any classpath

    Try this first, to start the process from Java client:
    http://orasoa.blogspot.com/2007/06/calling-bpelesb-webservice-from.html
    The default demo applications should be working after a default install.

  • How to Open PopUp from Managed Bean?

    Hi,
    Can you please let me know how can we open a pop up from managed bean.
    Thanks & Regards,
    Kiran Konjeti

    Hi,
    I got the answer for this question.
    Write the following code in Managed Bean
    ==========================
    private RichOutputText errorText;
    private RichPopup PopUp;
    Generate accessors(setters & getters) for these 2 variablesAnd place this method in your managed bean.
    > private void showPopup(RichPopup popUp, UIComponent source) {
    > FacesContext context = FacesContext.getCurrentInstance();
    > String popupId = popUp.getClientId(context);
    > String alignId = source.getClientId(context);
    > StringBuilder script = new StringBuilder();
    > script.append("var popup = AdfPage.PAGE.findComponent('").append(popupId).append("'); ").append("if (!popup.isPopupVisible()) { ").append("var hints = {}; ").append("hints
    [AdfRichPopup.HINT_ALIGN_ID] = '").append(alignId).append("'; ").append("hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_START; ").append("popup.show(hints);}");> ExtendedRenderKitService erks =
    > Service.getService(context.getRenderKit(),
    > ExtendedRenderKitService.class);
    > erks.addScript(context, script.toString());
    > }
    Now, how to call this method from your managed bean ... depends upon situation.
    public void sendEmailstoBorrowers(ActionEvent actionEvent) {
    .....................some logic ...............> if(true){
    > personHistoryStatus = defaultPreventionHelper.writeBorrowerHistory(borrowersList,getFormattedAction());
    > this.errorText.setValue((borrowersList != null ? borrowersList.size() : "")+" E-mails have been sent successfully..!");
    > }else{
    > this.errorText.setValue("Unable to send emails. Please contact System Administrator..!");
    > }
    > showPopup(this.getPopUp(), actionEvent.getComponent());
    }And ... what do we need to do on the UI??
    Write the following code in UI -- Here is the button which calls sendEmail method
    ==================================================
    ><af:commandButton text="SEND" id="cb3"
    >shortDesc="Click 'Send' to send emails."
    >styleClass="defaultButton"
    >blocking="true"
    >disabled="#{pageFlowScope.DefaultPreventMB.disablePrintButton || bindings.DelinquentBorrowersList.estimatedRowCount == 0}"
    >rendered="#{pageFlowScope.DefaultPreventMB.formattedAction eq 'E-mail'}"
    >partialTriggers="t2:dlDelete"
    >actionListener="#{pageFlowScope.DefaultPreventMB.sendEmailstoBorrowers}"/>
    Once this button get clicked ... it calls sendEmailstoBorrowers, and based on the result(either true or false) the method sets the content for the pop up and opens the popup from managed bean.
    And here is the code for which we have to keep inside the jsff and this gets invoked from managed bean.
    ><af:popup id="p1" binding="#{pageFlowScope.DefaultPreventMB.popUp}">
    > <af:dialog id="d1" type="ok" title="E-mail Communication Status">
    ><af:outputText value="E-mails have been sent successfully..!"
    > id="ot11"
    >binding="#{pageFlowScope.DefaultPreventMB.errorText}"/>
    ></af:dialog>
    ></af:popup>
    Let me know if you need more information about it.
    Thanks & Regards,
    Kiran Konjeti

  • 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

  • Show Popup From Managed Bean

    Hi,
    how i show a inline popup from managed bean , triggered by a certain action in bean, like satisfying a condition or something else?
    normally, showing a popup from bean involves clicking some userinterface components on page.
    in my case, showing a popup should totally automated by a managed bean.
    i m using jdev 11.1.1.2 .
    Plz , help me in this context.
    Regards,

    Hi John,
    I used the above code but it doesnt work.Can you please look into my code.
    In Jspx page,
    <?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>
    In backing bean,
    package view.backing;
    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() {
    // Add event code here...
    FacesContext context = FacesContext.getCurrentInstance();
    ExtendedRenderKitService extRenderKitSrvc =
    Service.getRenderKitService(context, ExtendedRenderKitService.class);
    extRenderKitSrvc.addScript(context,"AdfPage.PAGE.findComponent('" + p1 + "').show();");
    return null;
    Please correct my mistake if any.
    Regards,
    Tom

  • Few basic doubts about accessing AM from backing bean class

    Hi ADF experts,
    I have just started working in ADF Faces.I made a sample search page.My page is attached to a managed backing bean. I have attached command button on my page to a custom method in backing bean class.
    So on, click of button this method is called in backing bean.Now, i have few doubts:
    1)How to get values of various UI beans in this event code?
    2)I am accesing AM , in my method with this code:
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext extContext = facesContext.getExternalContext();
    Application app = facesContext.getApplication();
    DCBindingContainer binding = (DCBindingContainer)app.getVariableResolver().resolveVariable(facesContext, "bindings");
    //Accessing AM
    ApplicationModule am = binding.getDataControl().getApplicationModule();
    iS this correct ?
    3) After getting handle of am how to call my custom method in AM Class?there was "invokeMethod" API in application module class in OAF, is there any such method here?
    Please help me.
    --ADF learner.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Thanks for ur response Frank, actually I am from OA Framework back ground.It would be great if help us a little with ur valuble thoughts.
    OA Framework also uses bc4j in model layer of framework. We have a requirement where our existing developers from OA Framework have to move to ADF to make a new application where time lines are quite strict.If this would not be possible we will switch to plain jsp and jdbc,but our tech experts say ADF Faces is the best tech.
    In OA Framework, Application Module is key class for all busiess logic and Controller is used for page navigation. So, I m just trying to find the same similarity , where we write we add all event codes in custom action methods in the backing bean class of page, which we consider equivalent to process form request method in Controller class of OAF.
    But there are two things, I still want to know:
    1)While page render, how to call specific AM methods(like setting where clause of certain VOs)
    2)In action methods, the way i described(I found that in one thread only)to access AM, what is wrong in that?Also, I went through
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    where coule of examples use similar approach to access AM from backing bean class and call custom methods of AM(Doing various, deletes etc from VOs).
    3)In these methods can we set any property of beans on the page, I am asking because in OAF, generally we use PPR for js alternatives.But all properties of beans cannot be set in post event.
    Thanks and Regards
    --ADF Learner                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Clarification on application method calls from backing bean.

    Hi Experts ,
    In our application we are using two different ways to call application module methods from backing bean.
    allication module method name : addRowValidUnitInfo
    it has 2 parameters serialNumber,modelNumber
    1.
    BindingContainer bindings1 =
    BindingContext.getCurrent().getCurrentBindingsEntry();
    OperationBinding serialModelDetails =
    bindings1.getOperationBinding("addRowValidUnitInfo");
    serialModelDetails.getParamsMap().put("serialNumber",
    serialNumber.getValue().toString());
    serialModelDetails.getParamsMap().put("modelNumber",
    modelNumber.getValue().toString());
    serialModelDetails.execute();
    String result =serialModelDetails.getResult().toString();
    2.
    EWarrantyAdminModule appModule =(EWarrantyAdminModule)
    Configuration.createRootApplicationModule(amDef,config);
    try {
    String result = appModule.addRowValidUnitInfo(serialNumber.getValue().toString(), modelNumber.getValue().toString());
    } catch (Exception e) {
    finally {
    Configuration.releaseRootApplicationModule(appModule,true);
    Can any one tell me which one gives best performance and which one should be used in which situations.
    For me both are working fine but just want to know whcih is the best practice and which gives best performance.
    Regards
    Gayaz

    The approach 1 is the right way.
    Reasons:
    1) With Approach 2 - you are creating new ApplicationModule on the fly and release it at the end of the request. If you are invoking multiple method calls, you need to the same for each & every call.
    This is not reusing the existing application module.
    2) If the use cases which does calls for maintaining state across requests from the same client - across the application flow, Approach 2 cannot be used.
    Read this blog post from Jobinesh (which indirectly distinguishes both these approaches).
    http://jobinesh.blogspot.com/2010/04/invoking-applicationmodule-from-servlet.html
    Thanks,
    Navaneeth

Maybe you are looking for

  • IPhoto does not play movies from digital camera

    When transfering photos and movies to iPhoto, the movies are not playing in iPhoto. Error message: THE MOVIE CAN'T BE OPEN. YOU MAY NEED TO INSTALL ADDITIONAL SOFTWARE TO PLAY THIS KIND OF FILE I am using iPhoto '09 v8.1.2 and QuickTime Player 10.0 o

  • Problem junk app in phone

    how to know which app on phone can be disable??

  • Nokia N8. Anna, how do you reinstall it, if you've...

    I can't use Belle very well, like I said in a previous topic with having eyesight issues. I mean come on, I'm told the date is now grey on black..A small issue I know but other things are starting to strain the eyes a bit. Someone please tell me ther

  • Deleting some duplicate cells

    Hi I am working on a data sheet. I have rows that have 2 or more columns with duplicate data that I would like to delete and allow the other columns in the "duplicate row" move up into the non duplicate row. What I have: Columns a b c d e f Row 1 x y

  • Missing role "business_explorer_showcase" in EP7 NW2004s

    I cannot find the role "business_explorer_showcase" in EP7 which is necessary for integration with BI 7.0. Per an earlier thread (Not find the 'business_explorer_showcase'  role in EP7.0), I searched for "bi_showcase" but with no luck. Based on docum