How to redirect to another page Using JavaScript in ADF Faces?

Hi guys,.

I have a case of user UI that has an af:menu which contains mutiple af:goMenuItem. When the user clicks on the menu, the menu slides down and the af: goMenuItem presents itself. As we know, you can set page destinations in af:goMenuItem to go to another page when the user has clicked, but af:menu itself cannot be redirected to another page. Well, the case of the user wants the menu itself could be redirected if the user clicks on it.

So I think that the use of JavaScript to do this: when you click on the af: menu, redirect to another page. BUT, I've looked over the ADF Faces Javascript API and wasn't able to find this piece of code to do this. Any help?

Another work around to the user scenario is to use the brands of HTML + CSS/JavaScript instead of af: menu and af:goMenuItem, but this changes the scope of the technology although it is not hard to do

Any other idea to make the case of the user other than what I could think?


Thank you guys!

Jay

Hello

1. you can have a control hidden element to the navigation based on a case of control flow. In this case, you access the JavaScript command component create a new ActionEvent and he queued
2 - JavaScript can use an af:serverListener to call a server side managed bean method to perform the navigation

There is no JavaScript API for navigation in ADF Faces because navigation in JavaServer Faces is an event-driven framework and we do not support the developers of fight against the framework.

Frank

Tags: Java

Similar Questions

  • How to redirect to another page in a dialogListener?

    Hi all

    I use JDeveloper 11 g with ADF BC.

    How to redirect to another page of a < af:dialog > dialogListener?
    I have a page with a button [delete] on this subject. When the user clicks on the button Delete, a confirmation dialog box appears asking "are you sure? [Yes/No] ». If the user answers [Yes], I will delete the current record and go to another page. Can I call a linking operation in the dialogListener, but I don't know how to go to another page.

    {} public void handleDeleteDialog (DialogEvent dialogEvent)
    OperationBinding operationBinding = bindings.getOperationBinding ("Delete");
    Object result = operationBinding.execute ();
    If (! operationBinding.getErrors () .isEmpty ()) {}
    }

    Redirect to another page?

    }

    Kind regards
    Samson Fu

    Hi Samson,.

    Check the following link corresponding to your query: -.

    Re: account page navigate to the next page when you click the button on the shortcut menu

    You can also make use of Navigation handler invoke the action of navigation in your workflow as

    FacesContext facesCtx = FacesContext.getCurrentInstance ();
    NH NavigationHandler = facesCtx.getApplication () .getNavigationHandler ();
    nh.handleNavigation (facesCtx, "", "ActionNameInTaskFlow");

    Vikram

  • I want to do a video opening and to redirect to another page after the end of the video, how do?  No matter what widget or code can do?

    I want to do a video opening and to redirect to another page after the end of the video, how do?  No matter what widget or code can do?

    Can do in muse and I tried to use dreamweaver like the code below:

    <! doctype html >

    < html >

    < head >

    < / head >

    < body >

    < style >

    {#video_background}

    position: fixed;

    Bottom: 0px;

    right: 0px;

    min-width: 100%;

    min-height: 100%;

    Width: auto;

    height: auto;

    z index:-1000;

    overflow: hidden;

    }

    < / style >

    < video id = "video_background" preload = "auto" autoplay no Cup >

    < src = "source opening.webm" type = "video/webm" > "

    < src = "source opening.mp4" type = "video/mp4" > "

    This browser does not support video

    < / video >

    < script type = "text/javascript" >

    {document.getElementById('video_background').addEventListener ('ended', function ()}

    window.location.href = ' http://www.xxxx.com';

    (}, false);

    < /script >

    < / body >

    < / html >

    adeletsang wrote:

    Thanks for your reply.

    I just need to click on "object > insert html ' muse and paste the code there?

    My video ID is video_background which is defined by the widget by default, I should change the code below:

    The site I posted has no video in there and I don't have the widget that Peter sugested however, you can replace the startup code Nacy O made (the black with bit blob going around it) and it should work... understand that a ve\ideo will have to be downloaded by your browser clients before they can see it, so it's another delay for them.

    The code you posted is the code of downtime and that seeks a DIV not called "intro" so no do not change his name...

    A mandatory opening text

    After 5 seconds, this block will disappear.

    Everything between the two div tags is startup code and replace you it with you video and then use the muse "object > insert html" tool to place on your page.

    The demo includes three bits;

    • the body or the div tag is the code shown above and goes into the tool "insert html".
    • a header code that defines styles i.e. the yellow background and text... cela goes in your location of metadata page

    • The final code is the timeout in jQuery you had but do not change the name to the background image unless you also change the name of your div to match... Nacy O put it in its footer code that is correct for DW, but Muse has no footer as such area so I used a master metadata slot to the same effect. The important point is that it descends UNDERNEATH other codes.

    Have a play with it and see how you go...

  • How can I activate Firefox prevented this page from automatically redirecting to another page? This unfortunate thing has now completely blocked me connect to a Web site.

    How can I disable this message blocking? "firefox prevented this page automatically redirecting to another page.
    It used to be boring, but now he has completely blocked me to connect to a Web site.

    Tools > options > advanced > general...
    then uncheck the...
    I myself have this option because I stand bad pages themselves help to redirect to who knows what. Why can't you just go sites where I click?

  • Redirect to another page with parameter passing using the POST method

    Hello

    I need to redirect to another page and pass parameters to it with the POST (not GET) method. How can I do?

    So far, I tried the 2 options and none of them works very well:
    1. I wrote a pl/sql procedure, but if I run it, then the page runs on my server application instead of actually going to another page in another server (I see the neame of the procedure in the web browser's address bar). Is there a way to work around a bit so that really, it goes to another page and pass the variables?

    procedure do_post)
    p_api_url in varchar2)
    is
    l_http_req utl_http.req;
    l_http_resp utl_http.resp;
    l_response varchar2 (4000);
    l_post varchar2 (4000);
    v_line varchar2 (4000);
    v_wallet varchar2 (100): = "file:/etc/ORACLE/WALLETS/oracle5";
    v_wallet_pwd varchar2 (100): = "test1234".
    Start
    l_post: = ' VK_SERVICE = 1001 & VK_VERSION = 008 & VK_SND_ID = testvpos & VK_STAMP = 88';

    Utl_http.set_Proxy (apex_application.g_proxy_server, NULL);
    Utl_http.set_persistent_conn_support (true);
    Utl_http.set_transfer_timeout (300);
    Utl_http.set_wallet (v_wallet, v_wallet_pwd);
    l_http_req: = utl_http.begin_request (p_api_url, 'POST');
    Utl_http.set_header (l_http_req, "Proxy-Connection ',' Keep-Alive'");
    Utl_http.set_header ("l_http_req, 'Content-Type', ' application/x-www-formulaires-urlencoded; charset = utf-8 ');
    Utl_http.set_header (l_http_req, "Content-Length", length (l_post) ");
    Utl_http.write_text (l_http_req, l_post);
    l_http_resp: = utl_http.get_response (l_http_req);

    LOOP
    Utl_http.read_line (l_http_resp, v_line, TRUE);
    HTP.p (v_line);
    END LOOP;
    Utl_http.end_response (l_http_resp);

    EXCEPTION
    WHEN utl_http.end_of_body THEN
    Utl_http.end_response (l_http_resp);
    end do_post;


    2. the second option, I tried is to put this script to my page of request code:

    < name of the form = 'mounted' action = 'https://www.somekindofurl.com/cgi-bin/dv.sh/un3min.r. '
    method = "POST" target = "_top" >
    < input type = "hidden" name = "VK_SERVICE" value = "1001" >
    < input type = "hidden" name = "VK_VERSION" value = "008" >
    < input type = "hidden" name = "VK_SND_ID" value = "testvpos" >
    < input type = "hidden" name = "VK_STAMP" value = "88" >
    < input type = "submit" value = "Let's's Pay" >
    < / make >

    < / make >

    But it does not work as APEX has its own system of Forms control. Is it possible to play? I tried to delete #FORM # of page templates and it works fine then. The problem is that I have other forms on the page as well (login form + search form) so I can't remove this manipulation of shape native APEX. Is it possible to play with it?


    Thank you much in advance.

    Hi Ibenarobeno,

    Your form can live at the end of the page with all the hidden items.

    You can then control with buttons and fields within the form of the Apex.
    through a bit of javascript.

    Concerning

    Michael

  • How can I make Foxfire quit gives me the message Firefox prevented this page from automatically redirecting to another page?

    When I'm on some sites Firefox gives me the message Firefox prevented this page from automatically redirecting to another page? and then I have to click on allow. This happens on every page on some sites. How can I make this stop all together?

    Tools-> options-> advanced-> general, then uncheck the warn me when websites try to redirect or reload the page

  • I have a Mac and I want to remove the feature "Firefox prevented this site automatically redirecting to another page. Show you how do to Windows, but I have not found how to for Mac

    I have a Mac and I want to remove the feature "Firefox prevented this site automatically redirecting to another page. Show you how do to Windows, but I have not found how to for Mac

    This has happened

    Each time Firefox opened

    == I try to go to page to a new page

    Thanks Cor - el.

  • How to create a process to redirect to another page?

    Hi all

    I have a selection list, and when I select a value from this list, I want to redirect to another page. This means that I need to create a process, but I don't know how to write it, please help me!

    Hello

    Selection list can also submit the page and redirect to the page.

    Page under settings attribute selection list Action when the value is modified.

    If you submit the page, you can then create for example a branch that brings you to the target page.

    Kind regards
    Jari

  • How to get around the "Firefox prevented this page auto redirection to another page?

    whenever I click on a website to get more information, I have to
    Let him. The bar to say the-Firefox prevented this page from auto
    redirecting to another page.
    If I click on it I want to go out there and not having to rely on a permit
    button. Help!

    Tools > Options > advanced > General > let me Warn course when the site try to redirect or reload the page is unchecked.

  • Error JSON trying to redirect to another page in the same application

    I'm implementing a dynamic PL/SQL action that is triggered by clicking a button.  Dynamic action sets two values in a table and then I want to redirect to another page.  The works of fine setting values.  The code is below:

    declare

    l_information VARCHAR2 (255): =: P94_FILENAME;

    BEGIN

    commit;

    UPDATE VDI_METADATA

    SET CREATEUSERLISTNAME = l_information,

    CREATEUSERLISTON = sysdate().

    commit;

    HTP.init;

    owa_util. REDIRECT_URL ('f? p = & APP_ID.:81: & APP_SESSION.:NO :::');)

    END;

    The redirection fails with the following error:

    "Error: parseerror: JSON.parse: not just a space unexpected character after JSON data.

    I tried several approaches, using the suggestions in this forum on how to redirect to a page of PL/SQL.  None of them lead to success.

    Can anyone tell me: what is the system to complain?  And is there a work around?

    Thank you.

    John,

    I recommend the addition of another true action in your dynamic action that executes javascript.  the logic would be just redirect('f?p=&APP_ID.:81:&APP_SESSION.::NO:::');

    Remove everything after the validation of your action of pl/sql.

    David

  • After printing redirection to another page

    Hi all

    I print a button with action-"Redirect URL" and

    Target of the URL: javascript:window.print (). For the moment everything looks very well and after printing

    page of that remains in the same window. But now the new requirement , it is after the printing of the page,

    He wants to redirect to another page. How can I achieve this

    in the oracle apex 4.0 environment.

    Thank you and best looks

    Seny

    Hi Para,

    Finally it worked! . Thanks for all your responses and Sunil.

    Only change I made was to remove "href" of "windows.location.href".

    function printMethod() {}

    Window.Print;

    Window.Location ='f? p = & APP_ID.: 1600: & APP_SESSION.';

    }

    now it works like a charm. Thanks for your great support.

    Thank you and best looks

    Seny

  • Firefox prevented this page from auto redirection to another page

    Firefox prevented this page from auto redirection to another page
    I get this message every time I go to the new search page. I'm if tired after you press the F - ING allow it's not funny. Cannot Fire fox remember the pages of dam that go? Every time freaking that I go to a new page that the accessories and I have to click allow. I would like to get rid of this for good so if you can help me it's cool, if not then bye. I'll explore for browser. I can't take more. In addition, when I read that page moves upward again and I have to click on authorize again.

    Try this: Firefox button > Options > Options (or tools > Options) > advanced > general, uncheck 'warn me when Web sites try to redirect or reload the page'

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    You use obsolete, and is no longer supported version of Firefox (version 3.5.5) which is likely to have many problems of security and stability. Upgrade to the current version.

    Also see-> https://support.mozilla.org/en-US/kb/common-questions-after-upgrading-firefox-36

    Not related to your question, but...

    You may need to update some plug-ins. Check your plug-ins and update if necessary:

  • I'm constantly projected this message: "Firefox prevented this page automatically redirecting to another page." Why does this happen?

    I'm constantly projected this message: "Firefox prevented this page automatically redirecting to another page." The result is that I'm often looking to a white screen with an option to click on "allow". But sometimes the message arrives and I'm on the page I want to be on anyway. I do not understand this and do not know how to change this setting, if indeed I configure Firefox this way. Help?

    There is a setting that can cause this message in the Options > Advanced Options > general

    "Warn me when websites try to redirect or reload the page.

    http://support.Mozilla.com/en-us/KB/options%20Window%20-%20Advanced%20panel

  • Redirect to another page

    Hello

    In ADF how can I redirect to another page when I press the button without map it in faces-config. XML

    Hello

    You can do this from the bean of support code, which you call via actionListener on the commandButton control

            FacesContext fc = FacesContext.getCurrentInstance();
            String newView = "otherPage.jspx";
            ViewHandler vh = fc.getApplication().getViewHandler();
            UIViewRoot x = vh.createView(fc,newView);
            fc.setViewRoot(x);
    

    Pedja

  • Make the button submit, and then redirect to another page

    Hello!
    I have a button of the region, when you press on "should" launch the Multi_row_update, then redirect to another page. I can't make it work well.

    I have the button BUTTON_1, I have the "after-submit' process that performs the MRU after this button is pressed.» I then created the conditional branch that is supposed to redirect. But it does not work. The page is not redirected. I tried to change the button to a redirect button, but then sending does not. How can I do both?

    Thank you!
    Jodie

    What is the sequence number of the one who is unconditional?
    I think that your unconditional branch on the same page may be taking over your conditional branch on page 55.

    -Chris

Maybe you are looking for