2 Replies Latest reply: Nov 22, 2012 4:21 AM by Suresh Karunarathne RSS

    ADF redirect to page with the post method

    KT
      Hi All,
      my jdev version is 11.1.1.6
      Scenario:We have 2 jspx pages, each one has taskflow and each task flow has jsff fragments.

      When I give submit on one jsff , it will redirect to another jsff in another jspx . And I need to pass parameters here to that page.
      I could be able to achieve this by redirect logic, reditcted URL has parameters in URL query.

      My Requirement:
      redirect to another jspx page with post request

      basically I would like to redirect to another page in the same application with URL parameters but request should be post ,so that url parameters cant be visble in URL.

      please provide your inputs.
      appreciate your help
      Thanks
      KT
        • 1. Re: ADF redirect to page with the post method
          Frank Nimphius-Oracle
          Hi,

          why don't you use a parent activity to trigger a navigation case on the JSPX level. If you use a redirect you actually bypass all controller state management. Don't know about the use case, but it sounds strange to use a redirect from a page fragment for page navigation

          Frank
          • 2. Re: ADF redirect to page with the post method
            Suresh Karunarathne
            Hi,
            I will give sample use case
            Create sample page as follows and it will call jsff onload or your action with params to add session or pageFlowScope
            SamplePage1.jsp
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/html4/loose.dtd">
            <%@ page contentType="text/html;charset=UTF-8"%>
            <html>
              <head>
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
                <title>SamplePage</title>
              </head>
              <body onload="document.f1.submit();">
               <form name="f1" action="http://sampleapplication/testpage?parameter1=${sessionParameter1}" method="post">
              </form>  
              </body>
            </html>
            
            Call above samplePage1.jsp as follows in InlineFrame,then user couldn't see parameters  
            
            <?xml version='1.0' encoding='UTF-8'?>
            <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
                      xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
              <af:panelGroupLayout id="pgl1">
              </af:panelGroupLayout>
                <af:panelGroupLayout id="pgl2" layout="scroll"
                                   inlineStyle="border-width:medium; border-style:double; border-color:Blue;">
                <af:inlineFrame id="id1"
                                source="/packagepath/SamplePage1.jsp"
                                styleClass="AFStretchWidth" inlineStyle="height:800.0px;"/>
              </af:panelGroupLayout>
            </jsp:root>