How do to navigate to another page when press the 'OK' button to confirm the dialogue?

Hello
In a detail of the page, I have a "Delete" button, and when you press this button, it will appear a confirmation dialog box, if the user click on 'Cancel', the dialog box is missing stay and still on the current page, if the user presses the "OK" button, it calls a method in the class ViewImple (do remove and other business process logic) and show a different page. The extract of the JSF page as follows:

< text af:commandButton = 'Delete' action = 'delete' id = "cb3" >
< af:showPopupBehavior popupId = "p1" triggerType = 'action' / >
< / af:commandButton >
< af:popup childCreation = autoCancel "delayed" = "disabled" id = "p1" contentDelivery = "immediate" >
< af:dialog id = "d2" type = "okCancel" title = "Confirm deletion?" resize = 'off '.
dialogListener = "#{scheduleBean.deleteScheduleDialog} ' contentWidth ="200""
contentHeight = "50" >
< af:outputText value = "Are you sure you want to delete this report?" id = "ot1" / >
< af:clientListener type = "dialogue" method = "dialogAction" / >
< / af:dialog >
< / af:popup >
< af:resource type = "javascript" >
function dialogAction (evt) {}
result of the var = evt.getOutcome ();
if(Outcome == AdfDialogEvent.Outcome.Cancel) {}
evt. Cancel();
}
}
< / af:resource >

Now the question is when I click on "OK" button confirm dialogue, dialogue is missing, but he can't get into the business logic in ViewImpl class method (the "delete" action value you access method adfc-config.xml file, and then navigate to another page), also click on the button 'Cancel' to stay on the current page.

All tips will be of great help!

You can use it as

Navigate ("deletePage"); the adfc-config. XML

public static navigate (String taskFlowName) Sub {}

> FaceContext.getCurrentInstance () .getApplication () .getNavigationHandler () .handleNavigation (FaceContext.getCurrentInstance (), null, taskFlowName);

}

or for isnde action to propagate a method you have to use
> MethodExpression exp =
> (MethodExpression) ADFUtils.getMethodExpression ("deletePage");
> getRegAgentNextBtn () .setActionExpression (exp);
I hope that you ADFUtils with you

Tags: Java

Similar Questions

  • How to navigate to another page when I press the button

    Hello

    I want to know how to navigate from one page to another when I press the button.

    I want to condition function so I want to sail from bean managed for this action of button.

    can someone tell me please how to do?

    also how to throw error manually if assume that any condition in the get method of failure.

    Thanks in advance,
    SAN

    Hi user,

    as we have, you have requested a post on the connection,

    so I guess that since your post make a connection

    http://kohlivikram.blogspot.com/2008/10/how-to-create-simple-login-page-in-ADF.html

  • How to navigate to another screen when I click on BitmapField what listener I have to use?

    Hello

    My requirement is I need to add icons to image in horizontally and when I click on the icon of the image it must navigate to specific screen, so I use BitmapField to display image icons and I added to HorizontalFieldManager but how to navigate to another screen when I click on BitmapField (the image icon) who listens to I have to use?

    Please suggest useful links.  Advanced thanks.

    Concerning

    Sunil.G

    Personally, I prefer to do the treatment that you need directly on the ground rather than using a listener.

    The following code is an example:

    BitmapField bmf = new BitmapField(Bitmap.getPredefinedBitmap(Bitmap.HOURGLASS), Field.FOCUSABLE) {
        protected boolean navigationClick(int status, int time) {
            Screen myScreen = new ();
            UiApplication.getUiApplication().pushScreen(myScreen);
            return true;
        }
    };
    
  • When I use dreamweaver cs6 browser Checker to find pages, it creates another page starting with the letter T. And he added this page to my folder. How can I prevent that from happening. I use a Mac.

    When I use Dreamweaver cs6 browser Checker to find pages, it creates another page starting with the letter T. And he added this page to my folder. How can I prevent that from happening. I use a Mac.

    Are you spotted with temporary files?  In Edition > Preferences > Preview in browser.

    Nancy O.

  • creation of delay before you navigate to another page

    All,

    I am trying to create a popup with image on a page load such as if you load this page the "loading... image into small div is displayed as for 2-3 seconds then the page automatically navigates to another page and pass a parameter value.»

    Here's what I did:

    1 added a popup div in my header page and within iam referencig < img src = #WORKSPACE_IMAGES #loading.gif / > it works correct loading pages

    2 created DA to present the button "NEXT"

    the problem is that #2 off so quickly before the iamge is paid or given,

    How to make changes for #1 works for 2-3 seconds then #2 then runs to go to the target page?

    Apex 4.2.

    Thank you.

    I made this another way.

  • Add a FacesMessage and then navigate to another page

    Hello

    I have a grain of support which adds a message of faces and then returns a result as:
      FacesContext.getCurrentInstance().addMessage(null, infoMessage);     
      return "back";
    I found the message is displayed, even if the target of jspx fact include the tag of af: messages. It seems that the new page operates in a completely different context and the messages are lost. If I return null from the bean of the support in place so that no navigation will occur, the message is displayed correctly.

    Is there a way to add a message and navigate to another page? (i.e. If the message on the target page).

    I use ADF Faces 11.1.1.2.0.

    See you soon!

    Hello

    I've never tried in 11g, but it should work, especially with JSF 1.2. Is the case of the navigation using redirection?

    Kind regards

    ~ Simon

  • Back on the tree Page when click the button cancel on a Page called

    Hello

    I develop an application that uses the Application Express 4.1.1.00.23, I developed a tree similar to the APEX tree, Example of Application of database (i.e. reports > shaft of product).
    When I click on a specific node of the tree, it navigates to another page in the existing application (such as tree of the database Application example).

    Example of Application of database does not return to the called Page (so called from reports > shaft of product).

    I have an obligation to come back on the tree of the Page when I click the button cancel on a Page called.

    Please advice. Thanks in advance.

    tnvrahmd wrote:
    Hi Rohit,

    Thanks for the reply. If you look under query (query Sample Application tree), clicking on a tree node, it opens the page 3, 6 or 29 based on link_type = am ", 'C', 'P' or 'o' and the constructed url."

    In this case just a tree node gets selected and should capture the number of the called page.
    As there are 4 urls and 3 pages being called, how do I capture the page given in hidden element or application,

    Thank you.

    I understand the code of the tree. But I'm not clear on what you mean by "How can I capture page reset hidden element or application". Do you mean that you need to store the page in a hidden page element numbers? If so, you can set the value in the URL that you generate in the tree. For example,.

     case when link_type = 'M'
                 then 'f?p='||:APP_ID||':3:'||:APP_SESSION||'::NO:RIR:P1_HIDDEN_PAGE_ITEM:'||3
                 when link_type = 'C'
                 then 'f?p='||:APP_ID||':3:'||:APP_SESSION||'::NO:CIR:IR_CATEGORY,P1_HIDDEN_PAGE_ITEM:'||name||','||3
                 when link_type = 'P'
                 then 'f?p='||:APP_ID||':6:'||:APP_SESSION||'::NO::P6_PRODUCT_ID,P1_HIDDEN_PAGE_ITEM:'||sub_id||','||6
                 when link_type = 'O'
                 then 'f?p='||:APP_ID||':29:'||:APP_SESSION||'::NO::P29_ORDER_ID,P1_HIDDEN_PAGE_ITEM:'|| sub_id||','||29
                 else null
                 end as link 
    

    where P1_HIDDEN_PAGE_ITEM is your element on the page where you have the tree.

    >

    -Application of tree-
    with the data as)
    Select'm ' as link_type,.
    NULL as parent,
    "All categories" as id,.
    'All categories' as the name.
    NULL as sub_id
    of demo_product_info
    Union
    Select distinct('C') as link_type,
    'All categories' as a parent,.
    category such as id,
    category name,
    NULL as sub_id
    of demo_product_info
    Union
    Select 'P' as link_type,
    parent category,
    TO_CHAR (product_id) id,
    product_name as the name,
    product_id as sub_id
    of demo_product_info
    Union
    Select 'o' in the link_type,
    TO_CHAR (product_id) as a parent,
    NULL as id,
    (select c.cust_first_name |) ' ' || c.cust_last_name
    of demo_customers c, demo_orders o
    where c.customer_id = o.customer_id
    and o.order_id = oi.order_id). ', ordered ' | TO_CHAR (OI. Quantity) as the name.
    order_id as sub_id
    of demo_order_items oi
    )
    Select case when connect_by_isleaf = 1 then 0
    When level = 1 then 1
    of another-1
    end the status,
    level,
    name as title,
    NULL as an icon,
    ID as the value,
    'See' as ToolTip,
    -case when link_type = am'
    then ' f? p ='|| : APP_ID | » : 3 :'|| : APP_SESSION. ': NO:RIR '.
    When link_type = 'C '.
    then ' f? p ='|| : APP_ID | » : 3 :'|| : APP_SESSION |':NO:CIR:IR_CATEGORY:'
    || name
    When link_type = 'P '.
    then ' f? p ='|| : APP_ID | » : 6 :'|| : APP_SESSION |': NO::P6_PRODUCT_ID:'
    || sub_id
    When link_type = 'o'
    then ' f? p ='|| : APP_ID | » : 29 :'|| : APP_SESSION |': NO::P29_ORDER_ID:'
    || sub_id
    Another null
    end as link
    from the data
    Start with the parent is set to null
    connect by prior id = parent
    siblings arrested by name

  • How can I place a STOP button on my toolbar. I would like to stop firefox from loading a page by pressing the STOP button, but I can't find it in the toolbar options.

    How can I place a STOP button on my toolbar. I would like to stop firefox from loading a page by pressing the STOP button, but I can't find it in the toolbar options.

    First of all, if you have the menu bar show. (File-Edit-View-History-Bookmarks-Tools-Help), then you won't see the orange FireFox button because in the new version of FireFox button replaces the menu bar. You can believe that's the way you want by clicking on 'View', then place your cursor over "Toolbars" and check or uncheck menu bar. If you have the display on menu bar, click on 'View' then drag down to "Toolbars", then descend to the right and go to 'customize '; a click on it. Then, when the next screen appears, even if 'Reload' is not displayed on this topic, it appears somewhere upwards in your toolbar. (Mine was above the Google search box). Put your cursor on it and drag-and - drop to the left of your address bar. The "Stop" button should be left more than the button 'recharge' in order to get two separate buttons for these tasks. If the 'Reload' button is further to the left, then you get a single button that performs the tasks at the same time. I hope this helps.

  • How can I create an another user to access the HR schema data

    I am new to Oracle and just downloaded the: 10 x e. I have connected as human resources and was able to modify data in tables.
    I created another user, then say ABC, when connected as SYS. But then I could not access the tables and the data even in human resources.

    I learned that every user has its own schema, but how do I create an another user to access the same tables, and the data I see in the Oracle DB?

    Log in as a user of the system (or sys as sysdba) and:
    create user identified by ;
    Grant connect, create session ;

    To see objects to a different schema from the database user must then obtain the privilege:

    Grant select on hr. à ;

  • The 413 header length too large. How can I install flash player? Because when press the link 413 header length too large can help pls.  Thank you

    The 413 header length too large. How can I install flash player? Because when press the link 413 header length too large can help pls.  Thank you

    Hello

    Please clear the browser's cache and cookies or remove the *. Adobe.com items in your list of cache and cookies of browsers.  The installer will then download.

    --

    Maria

  • Iconia tab 7 A1-713. There is no 'restart' menu only "turn off" when press the button / stop

    Hello, is there no 'restart' menu on the screen when pressing the power since bought button tab. It displays only a menu of "turn off." How to solve this, please. Thanks anyway

    I can't find info on a restart in the menu stop although it would make sense.

    If she was here before, then you have EVS data and do a Factory reset.

    http://Acer--UK.custhelp.com/app/answers/detail/A_ID/29892/~/Acer-Iconia-B1-A71-and-B1-710-factory-d...

  • I'm used to be able to refresh a page by pressing the F5 key. Which doesn't seem to work. Y at - it a keyboard shortcut for editing, or I can create a?

    I'm used to be able to refresh a page by pressing the F5 key. With 4.0.1 which doesn't seem to work. Y at - it a different keyboard shortcut, or I can create a?

    Try CTRL + R

  • How to navigate to another page?

    Hello

    I want to navigate through my page to another when I click the button, here is my code:

    SerializableAttribute public class Page1 extends Sprite
    {
    public var page2age2.
    public void Page1() {}
      
    var btn:Button = new Button();
    var lab: Label = new Sun;
       
    Lab.Text = "Click";
    btn.addChild (lab);
    btn.setPosition (10.50);
    btn.addEventListener (MouseEvent.CLICK, dothis);
    addChild (btn);
    addChild (log);
    stage.nativeWindow.visible = true;
       
    }
    public void dothis(event:Event):void {}
    Page2 = new Page2();
    addChild (log);

    }
    }

    But it has not worked out. Help, please?

    OK there was some compile errors in your class page 2. but no worries, I got em. Here's the code corrected for class Page1:

    package
    {
        //Remember to import all of the classes that you
        //are using
        import flash.display.Sprite;
        import flash.events.MouseEvent;
    
        import qnx.ui.buttons.LabelButton;
    
        // The following metadata specifies the size and properties of the canvas that
        // this application should occupy on the BlackBerry PlayBook screen.
        [SWF(width="1024", height="600", backgroundColor="#FFF000", frameRate="30")]
        public class Page1 extends Sprite
        {
            private var page2:Page2;
    
            public function Page1()
            {
                //initiate new object here to use later
                page2 = new Page2();
    
                var labButton:LabelButton = new LabelButton();
    
                labButton.label = "Click";
                labButton.setPosition(10,50);
                labButton.addEventListener(MouseEvent.CLICK,dothis);
    
                addChild(labButton);
    
                //addChild(log); //dont know where you declared this so commented out
                stage.nativeWindow.visible = true;
            }
            //change the event to MouseEvent since that is what you
            //are listening for
            public function dothis(event:MouseEvent):void {
    
                addChild(page2);
                //addChild(log); //dont know where you declared this so commented out
    
            }
        }
    }
    

    and here's the code fixed to your class page 2:

    package
    {
        import flash.display.Sprite;
    
        import qnx.ui.buttons.LabelButton;
    
        public class Page2 extends Sprite
        {
            public function Page2()
            {
                var label:LabelButton = new LabelButton();
                label.label = "Welcome to Second Page";
                addChild(label);
            }
        }
    }
    

    in your first class Page1 I combined the label and the button in the class LabelButton() of QNX. This code should now work correctly (tested and it went well).

  • How to get a normal white page when open a new tab, using ' + '.

    When you open a new tab, using '+', I want Firefox to open the blank page. But it shows all my sites from the browsing history. 'White page' is with images-hyperlinks to these Web pages! How to get a normal white page without images-hyperlinks in navigation history without deleting all browsing history?

    Click on the button 'Hide new tab page' in the upper right corner of the page

  • Button to navigate to another page does not not work properly all the time.

    Hello

    I'm just starting to explore the ADF, I use Jdeveloper 12.1.3.0.0 and integrated weblogic server that comes with the IDE.

    I just created a simple application with a welcome page called Main.jsf and then 2 task bounded, streams called SearchStudentsFlow and Studenloansflow, each workflow has a jsf page. The home page has a single button that sends me to the first task flow, SearchStudentsFlow and I can see is the page in that workflow, AwardsSearch.jsf. Also in the AwardsSearch.jsf page I have a button that takes back me to the home page.

    The first problem I have is that when I run the application starting at the home page button in the works of the great homepage the first time, the button send me to the AwardsSearch.jsf , but once I decide to go back to the homepage and then click on the button to go to the first task flow the button does nothing. This happens whenever I decide to return to the home page of any page in my project.

    Also, I copied the entire previous project into a new project and I decided to use the ADF security infrastructure in this new project to create a log in page create users and give them different roles and levels of access.

    I created some users who have access to all pages and all the streams, but when I run the application starts the login page and I login successfully and go to the home page, the button on the home page does not work.


    I don't know why the button sometimes works, but not of others and also I do not know why when I use the login page, the button doesn't work. I don't know if these 2 problems are related or not.


    This is my code in the homepage:

    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html>
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
        <af:document title="Main.jsf" id="d1" binding="#{backingBeanScope.backing_Main.d1}">
            <af:form id="f1" binding="#{backingBeanScope.backing_Main.f1}">
                <af:panelGridLayout id="pgl1" binding="#{backingBeanScope.backing_Main.pgl1}">
                    <af:gridRow marginTop="5px" height="20%" id="gr1" binding="#{backingBeanScope.backing_Main.gr1}">
                        <af:gridCell marginStart="5px" width="34%" marginEnd="5px" id="gc1"
                                     binding="#{backingBeanScope.backing_Main.gc1}">
                            <af:image source="/images/NU_Logo_purple.jpg" shortDesc="Northwester University" id="i1"
                                      binding="#{backingBeanScope.backing_Main.i1}"
                                      inlineStyle="width:293px; height:197px;"/>
                        </af:gridCell>
                        <af:gridCell id="gc3" binding="#{backingBeanScope.backing_Main.gc3}" width="33%"/>
                        <af:gridCell id="gc4" binding="#{backingBeanScope.backing_Main.gc4}" width="33%"/>
                    </af:gridRow>
                    <af:gridRow id="gr3" binding="#{backingBeanScope.backing_Main.gr3}" height="10%">
                        <af:gridCell id="gc5" binding="#{backingBeanScope.backing_Main.gc5}"/>
                        <af:gridCell id="gc6" binding="#{backingBeanScope.backing_Main.gc6}">
                            <af:button text="Search Awards" id="b1" binding="#{backingBeanScope.backing_Main.b1}"
                                       action="goSearchAwards"/>
                        </af:gridCell>
                        <af:gridCell id="gc7" binding="#{backingBeanScope.backing_Main.gc7}"/>
                    </af:gridRow>
                    <af:gridRow marginTop="5px" height="70%" marginBottom="5px" id="gr2"
                                binding="#{backingBeanScope.backing_Main.gr2}">
                        <af:gridCell marginStart="5px" width="100%" marginEnd="5px" id="gc2"
                                     binding="#{backingBeanScope.backing_Main.gc2}"/>
                    </af:gridRow>
                </af:panelGridLayout>
            </af:form>
        </af:document>
        <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Main-->
    </f:view>
    

    And this is my code in the adfc-config. XML

    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <view id="Main">
        <page>/Main.jsf</page>
      </view>
      <task-flow-call id="SearchStudentsFlow">
        <task-flow-reference>
          <document>/WEB-INF/SearchStudentsFlow.xml</document>
          <id>SearchStudentsFlow</id>
        </task-flow-reference>
      </task-flow-call>
      <control-flow-rule id="__3">
        <from-activity-id>Main</from-activity-id>
        <control-flow-case id="__5">
          <from-outcome>goSearchAwards</from-outcome>
          <to-activity-id>SearchStudentsFlow</to-activity-id>
        </control-flow-case>
      </control-flow-rule>
      <managed-bean id="__4">
        <managed-bean-name>backing_AwardsSearch</managed-bean-name>
        <managed-bean-class>view.backing.AwardsSearch</managed-bean-class>
        <managed-bean-scope>backingBean</managed-bean-scope>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1AwardsSearch.jsf-->
      </managed-bean>
      <managed-bean id="__2">
        <managed-bean-name>backing_Main</managed-bean-name>
        <managed-bean-class>view.backing.Main</managed-bean-class>
        <managed-bean-scope>backingBean</managed-bean-scope>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1Main.jsf-->
      </managed-bean>
    </adfc-config>
    

    No idea why the button does not work correctly all the time?

    Thanks in advance

    Play well!

    Now, we understand the problem and can help you solve it.

    The problem is that you dropped the home page in the flow of student loan and place you thinking that you must return to the point of departure, the unlimited workflow. Actually, you don't the sheet flow loan student but simply see the homepage as part of the loan flow. The navigation rules remain those defined in the flow of student loan. Now, when you click on a button to jump to the stream of research, the target is undefined zed you simply stay on the same page, the home page.

    To make your work use case, you set a return action in the flow of student loan that return to the caller, the flow of research which, in turn, will return to his name the workflow without terminals that hold the homepage. Remove the homepage of flow of charge to students. The case of navigation allows to navigate between the button and the new return action.

    In the adf of flow research a wild-card rule that accesses the return operation sends the return flow to the home page. You must remove the sailing time pointing to research prices for the return operation because it can use the same rule of navigation of wild-card then. Then, you add a Bach student load flow navigation rule to the scholarship search page. This navigation is used for the return actionto_searchStudents.

    Timo

Maybe you are looking for