How to redirect the URL in block expection Apex 4.2

Hi team,

In our application, we wrote this logic as shown below

Before the point of the process of the header: On Load before header.

BEGIN
   IF (:p1_display_eid) IS NOT NULL
   THEN
      SELECT modified_date
        INTO :p1_modified_date
        FROM test
       WHERE id = :p1_display_eid;
   END IF;
exception 
when no_data_found then
--Here i need to redirect URL to other screen 

end;

Kind regards

Sruthitamiri

Sruthi Tamiri wrote:

In our application, we wrote this logic as shown below

Before the point of the process of the header: On Load before header.

  1. BEGIN
  2. IF (: p1_display_eid) IS NOT NULL
  3. THEN
  4. SELECT modified_date
  5. IN: p1_modified_date
  6. OF the test
  7. WHERE ID =: p1_display_eid;
  8. END IF;
  9. exception
  10. When no_data_found then
  11. -Here, I need to redirect the URL to the other screen
  12. end;

You can do it programmatically by using the owa_util.redirect_url method:

BEGIN

  IF (:p1_display_eid) IS NOT NULL
  THEN
      SELECT modified_date
        INTO :p1_modified_date
        FROM test
      WHERE id = :p1_display_eid;
  END IF;

exception

  when no_data_found
  then
      owa_util.redirect('');
      apex_application.stop_apex_engine();

end;

However I don't like the various side effects inherent in this code. It is not obvious to a developer looking at the page that executes a process will result in changing session state or the redirect to a different URL. It may involve additional database access, but I think I would prefer to implement this as a conditional branch by using a condition is no SQL, and a later calculation to set the value of the page...

Tags: Database

Similar Questions

  • How to access the url of the page referred by using script Idoc?

    How to access the url of the page mentioned by using Idoc script...

    For example

    If the following url (http://myhost/mysite) is called by the end-user, it redirects to the UCM login page.

    The page of connection, so I want to get their hands on the referring here (http://myhost/mysite). To do this, I followed the following documentation.

    I put IdcAuthExtraRequestParams = referer in

    /base_domain/UCM/CS/bin/intradoc.cfg and

    /base_domain/UCM/CS/config/config.cfg

    UCM server restarted and Http server.

    Used < $HTTP_REFERER$ > in my htm file. It does not display anything.

    Can I know what went wrong? Is there an alternative way to get this?

    @Jon, I saw some variables such as ssOrignialUrl have the information in the console, but they are lost when its consultation: in page.

    I pulled out the tracedump to the page itself, which gave me a new variable<$AUTH_TARGET_URL$> that contains this value.

    Thanks Jon at made me think so

  • How to change the url of sites in the new firefox tab page

    If we open newtab in firefox 9 tabs are visible. How to change the url address of the previously pinned tab.

    I found the solution for this problem.

    1. type Subject: config in firefox url and click Enter.

    2. an alert will be displayed when clicking on the button "I'll be careful, I promise!

    3. type browser.newtabpage.pinned in the text box and click on enter.

    4. right click and select the Edit option to change the URL.

    I want to change this URL
    [{"url": "http://localhost: 8080/Admin/login", "title": null},]

    After changing the URL in firefox
    [{"url": "http://localhost: 8080/Admin", "title": "Admin"},]

  • How to change the URL target in JDeveloper

    Hi all

    I am facing a problem when running the OAF in JDeveloper Page.

    I connect to applications using VPNS.


    When I run the Page-ÖAF, JDeveloper takes Url target as my office url instead of the url of the application server.

    can someone help how to change the url target in the form url apps.

    Thank you in advance.

    Best regards,

    Ravi.

    https://community.Oracle.com/community/Oracle-applications/e-business_suite/e-Business-Suite-technology/oa_framework

  • How to find the url of adf application that has been deployed to the glassfish Server? I try but? It is the image of the page.

    Mr President

    This is the page of the glassfish Server

    gfurl.png

    How to find the url of adf application that has been deployed to the glassfish Server? I try but? It is the image of the page.

    webapplink.png

    In the jdev web module are

    [11: 09:38] wrote the Web for F:\backup of AshCMS\AshCMS\ViewController\deploy\AshCMS_ViewController_webapp.war application Module

    [11: 10:33] wrote the Module Enterprise Application to F:\backup of AshCMS\AshCMS\deploy\AshCMS_Project1_AshCMS.ear

    [11: 10:33] Application deployment...

    [11: 14:24] Application deployed successfully.

    [11: 14:24] time to deployment: 8 minutes, 11 seconds

    [11: 14:24]-deployment is complete.  ----

    what url in the browser.

    Concerning

    Mr President.

    I run my application on built-in web logic server and get the url from there

    http://localhost:7101 / ViewController/faces/MainPage

    then simply change the localhost of 7101 to 8081 as below

    http://localhost: 8081, ViewController, faces, MainPage

    and it works

    Concerning

  • How to freeze the layers and block them so that they do not appear when you open the file?

    How to freeze the layers and block them so that they do not appear when you open the file?

    You can set the Initial State of the layers as hidden.

    The game, 18:09, kathya97643775, [email protected], 8 October 2015 >

  • How to connect the URL of Web site companies existing on the new site I've built?

    How to connect the URL of Web site companies existing on the new site I've built?

    Hello

    If you want to use the current domain with your new business catalyst site, please follow this link

    User manual

    Let me know if you have any question.

  • How to get the url of the window?

    I need sitelock my game and I need to check what site it is entrenched in. I can't use the _url property, because who checks just the host.

    So I need to know how to check the url of the window, similar to javascript's window.location.href.

    If you create a (say urlF()) javascript function in the HTML embed referring window.location.href, you can use:

    flash.external import. *;

    var urlS:String = String (ExternalInterface.call("saveglobalscore",score) ("urlF"));

  • How to redirect the page using af: Poll?

    Hi people,

    How to redirect the jsf page to another page, after af:poll run a method?

    For example:

    The user is connected to A page, after 5 minutes of af: poll of the object, an execute method. This method must redirect page A to page B...
    Is this possible?

    Thank you

    Hi William

    Create a pollListenerMethod in backing bean code using a code like this:

    public void poll1_pollListener (PollEvent pollEvent) {}
    ExternalContext ectx is FacesContext.getCurrentInstance () .getExternalContext ();.
    HttpServletResponse response = (HttpServletResponse) ectx.getResponse ();
    response.sendRedirect ("http://domain.com/app/faces/index.jspx");
    }

    Good luck

  • How to change the URL of the OEM

    Hi, I created my installation of Oracle 10 g on a laptop at home. I use XP and I wanted to know how to change the URL of the Manager of the company? I'm on a new network that is why want to do. I want the new URL to reflect the new network.

    Kind regards
    John

    John,

    If your host name or IP address changes, you will need to EMCA allows you to reconfigure EM.

    EMCA - deconfig dbcontrol db-rest drop
    EMCA - config dbcontrol db-rest create

    or

    EMCA - deconfig dbcontrol db
    EMCA - config dbcontrol db-rest recreate

    more info here

    EMCA using when the name of the database host or IP address changes
    http://download.Oracle.com/docs/CD/B19306_01/EM.102/b40002/structure.htm#sthref92

  • How to import the .sql file in oracle apex?

    I am new to oracle apex...

    How to import the .sql file in oracle apex?

    I have to import a table in apex...

    This script I have to write in the .sql file...

    pls help...

    Published by: 794244 on January 31, 2011 21:31

    Hi Manu

    You can import and browse workshop SQL, SQL Scripts .sql files. If you have multiple SQL statements in your script, make sure that they are separated by the / character

    Andy

  • How to change the url of the page to redirect to ADF

    Hi Experts ADF,
    I have a requirement like the exit command link, I need to redirect my google page for which I use code below.

    ExternalContext ectx is FacesContext.getCurrentInstance () .getExternalContext ();.
    HttpServletResponse response = (HttpServletResponse) ectx.getResponse ();
    String url = "www.google.com";
    try {}
    response.sendRedirect (url);
    } catch (Exception ex) {}
    ex.printStackTrace ();

    }

    but after the execution of the function of the url in the browser address bar does not change to "www.google.com".


    Help, please

    My fault. Simply redirect http://www.google.com to avoid related redirects

    Frank

  • OSX Apache Server: how to redirect the http request?

    Hi all

    I have a Mini Mac OSX Server El Capitan running. It already serves some sites. Normal Server Web sites:

    -site1.example.com

    -site2.example.com

    Now, I have installed an application that has its own built-in web server. This application would be normally accessible via http on port 80. However, http on port 80 connections are automatically considered trapped by integrated apache of the OSX Server. Therefore, I now put the web application to run in a different port to apache. I also setup a subdomain, so that users can access this application directly, but they also have to type in the port in the URL - for example, the new web app site is reachable at the:

    -myapp.example.com:7117

    What I would do, is for users to simply access the application using:

    -monappli.exemple.com

    I know that there is a way for us to have apache to "Reroute" all requests for a specific to an internal port subdomain automatically, but I don't even know where to start. What are the files we need to configure on OSX Server? How configure us them?

    Any guidance would be greatly appreciated.

    I had the same requirement and has resolved the way you want to as described below.

    1. Define the additional app to run on another port
    2. Create a site in.app using port 80 and the same host name you want to use for the additional application
    3. Set up a redirection for this site in.app as follows
    4. Source = /, Destination = http://hostname.domain.com:1234 /, Status = Permanent (301)

    Of course, use the correct host name, the domain and port for your situation.

    PS. the same approach I have described above also can be used to redirect the corresponding https port 80 or 443 site.

  • How to get the URL of the server?

    I am running WLS server on my machine to host a web application in the ADF. How can I get the name of the server in my bean manged. I don't want to hardcode. The URL is something like that

    http:// < machine-My-name >: < port > /epmos/faces/MyApp/MyPage.JSPX

    How can I get the part

    http:// < machine-My-name > <: port & gt;

    In JSFUtils, there is a getPageURL method. It will give the full URL of your page. You can play with the URL string to get the part you're looking for.

    
     /**
       * Method to create a redirect URL. The assumption is that the JSF servlet mapping is
       * "faces", which is the default
       *
       * @param view the JSP or JSPX page to redirect to
       * @return a URL to redirect to
       */
      public static String getPageURL(String view)
      {
        FacesContext facesContext = getFacesContext();
        ExternalContext externalContext = facesContext.getExternalContext();
        String url =
          ((HttpServletRequest) externalContext.getRequest()).getRequestURL().toString();
        StringBuffer newUrlBuffer = new StringBuffer();
        newUrlBuffer.append(url.substring(0, url.lastIndexOf("faces/")));
        newUrlBuffer.append("faces");
        String targetPageUrl = view.startsWith("/")? view: "/" + view;
        newUrlBuffer.append(targetPageUrl);
        return newUrlBuffer.toString();
      }
    
  • How to change the URL path?

    How to change the default URL [http://localhost/] need to change like this http://server Address/analytics/saw.dll IP? Dashboard... we're using IIS, where I need to change... They is any code that I need to mention?

    I find this code, but this one for OC4J

    < html >
    < head > < title > My OBIEE Application < / title > < / head >
    < frameset lines = "0%, 100%" >
    < frame src = "" noresize = "noresize" > "
    < frame src = "move.html" >
    < / frameset >
    < / html >
    Move.html
    < html >
    < Head >
    < meta http-equiv = "refresh" content = "0; URL = http://localhost/analytics/saw.dll?Dashboard">
    < / head >
    < / html >


    in

    Published by: chir0n on January 27, 2010 12:30

    Published by: chir0n on January 27, 2010 12:43

    Hi ChirOn,

    I have no configuration of IIS for me to test this, but this gives a shot:

    To redirect requests to another Web site or directory

    1. in the services manager IIS, expand the local computer, right-click on the Web site or directory you want to redirect, and click Properties.
    2. click on the home directory, virtual directory, or Directory tab.
    3. under content from this source should come from, click a redirection to a URL.
    4. in redirecting to the zone, type the URL of the directory of destination or of the Web site. For example, to redirect all requests for files in the directory of the catalogue to the NewCatalog directory, type/NewCatalog.

    Good luck!

    Best regards

    -Joe

Maybe you are looking for