AdfPage.PAGE.findComponent method usage

I have a function.js file which has the showMap() function. I am trying to display something using the AdfPage.PAGE.findComponent method which keeps returning undefined for any component I try to find from the js file. What am I doing wrong? Is it because I am finding the component before page loading. Please advise
function.js file
function showMap() {
alert(AdfPage.PAGE.findComponent('f1'));
baseURL = "http://"+document.location.host+"/mapviewer";
var mapCenterLon = 145.07;
var mapCenterLat = -37.57;
var mapZoom = 1;
mapview = new MVMapView(AdfPage.PAGE.findComponent('map'), baseURL);
//var map = AdfPage.PAGE.findComponent("map");
//mapview = map.getMVMapView();
mapview.addMapTileLayer(new MVMapTileLayer("gis_data.AV_VICMAP"));
mapview.setCenter(MVSdoGeometry.createPoint(mapCenterLon,mapCenterLat,4283));
mapview.setZoomLevel(mapZoom);
mapview.addNavigationPanel("WEST");
showOverviewMap();
addThemeBasedFOI();
mapview.display();
JSPX file
<?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:trh="http://myfaces.apache.org/trinidad/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1" binding="#{backingBeanScope.mapsBean.d1}">
<f:facet name="metaContainer">
<af:group id="g3" binding="#{backingBeanScope.mapsBean.g3}">
<trh:script id="script1" source="/jslib/oraclemaps.js"
binding="#{backingBeanScope.mapsBean.script1}"/>
<trh:script id="script2" source="/jslib/functions.js"
binding="#{backingBeanScope.mapsBean.script2}"/>
<trh:script text='' id="script3"
binding="#{backingBeanScope.mapsBean.script3}"/>
</af:group>
</f:facet>
<af:form id="f1" binding="#{backingBeanScope.mapsBean.f1}">
<af:panelStretchLayout id="psl1" topHeight="5px" bottomHeight="115px"
endWidth="373px"
binding="#{backingBeanScope.mapsBean.psl1}">
<f:facet name="bottom">
<af:panelBox text="Watch Options" id="pb1"
binding="#{backingBeanScope.mapsBean.pb1}">
<f:facet name="toolbar"/>
<af:selectBooleanCheckbox label="Auto Refresh"
id="sbc2"
binding="#{backingBeanScope.mapsBean.sbc2}"/>
<af:selectBooleanCheckbox label="Show Vehicle Locations"
id="sbc1"
binding="#{backingBeanScope.mapsBean.sbc1}"/>
<af:commandButton text="Refresh Now"
id="cb1"
partialSubmit="true"
binding="#{backingBeanScope.mapsBean.cb1}"/>
</af:panelBox>
</f:facet>
<f:facet name="center">
<af:panelGroupLayout layout="scroll"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
id="pgl1"
binding="#{backingBeanScope.mapsBean.pgl1}">
<af:group id="g1" binding="#{backingBeanScope.mapsBean.g1}">
<dvt:mapToolbar mapId="map"
id="mt1"
binding="#{backingBeanScope.mapsBean.mt1}"/>
<dvt:map startingY="-36.88" startingX="145.26" mapZoom="1"
mapServerConfigId="mapConfig1"
baseMapName="GIS_DATA.AV_VICMAP"
inlineStyle="width:100%; height:793px;"
id="map" binding="#{backingBeanScope.mapsBean.map}">
<f:facet name="rtPopup"/>
<f:facet name="popup"/>
</dvt:map>
</af:group>
</af:panelGroupLayout>
</f:facet>
<f:facet name="end">
<af:panelBox text="List Vechicles"
id="pb2" binding="#{backingBeanScope.mapsBean.pb2}">
<f:facet name="toolbar"/>
<af:inputText label="Area Code"
id="it1"
binding="#{backingBeanScope.mapsBean.it1}"/>
<af:inputText label="Vehicle Number"
id="it2"
binding="#{backingBeanScope.mapsBean.it2}"/>
<af:commandButton text="Search"
id="cb2"
binding="#{backingBeanScope.mapsBean.cb2}"/>
</af:panelBox>
</f:facet>
</af:panelStretchLayout>
</af:form>
<af:clientListener type="load" method="showMap()" />
</af:document>
</f:view>
<!--oracle-jdev-comment:auto-binding-backing-bean-name:mapsBean-->
</jsp:root>
Edited by: user5108636 on 29/04/2010 18:22

It is now detecting the map component, but the map object retrieved in the javascript seems to a new object. I had set the srid and ceterX and centerY.
In my javascript, I do
var map = AdfPage.PAGE.findComponent('map');
mapview = map.getMVMapView();
alert("Zoom:"+ mapview.getZoomLevel());
alert("Srid:"+ mapview.getSrid());
alert("CenterX:"+ mapview.getPointX());
alert("CenterY:"+ mapview.getPointY());
where the map object parameters are already set in the ADF page, which is not reflecting. I am not getting access to the same map
object. My javascript method runs on page load. Is it because the javascript method is getting called before the ADF map object exists.
dvt:map id="map" startingX="145.26"
mapServerConfigId="mapConfig1"
baseMapName="GIS_DATA.MAP" mapZoom="1"
startingY="-36.88" unit="METERS"
inlineStyle="width:100%; height:793px;" srid="4283"
/>
Let me know if any more code needs to be posted for clarification.
Regards
Edited by: user5108636 on 9/05/2010 19:20

Similar Messages

  • AdfActionEvent and AdfPage.PAGE.findComponent not working - Sample Provided

    Ladies and Gents,
    Using JDev 11.1.2.3.0.
    I just can't get this simple example to work.  On page load, I'm calling ADF's find component by id method, which for some reason, returns null.  I can do the same thing by using javascript's getElementById and that finds the component just fine.  However, if I use the getElementById and then push that into the AdfActionQueue, I get a different error 'Error: Object doesn't support property or method 'queueEvent''
    Can anyone see off-hand what I'm doing wrong here?
    <?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:af="http://xmlns.oracle.com/adf/faces/rich">
        <jsp:directive.page contentType="text/html;charset=UTF-8"/>
        <f:view>
            <af:document title="home.jspx" id="d1">
                <af:form id="f1">
                    <af:commandButton text="commandButton 1" id="myRefreshButton" action="#{myBean.onAction}"/>
                </af:form>
                <af:resource type="javascript" source="/resources/js/jqPlot/jquery.min.js"/>
                <af:resource type="javascript" source="/resources/js/jqPlot/jquery.jqplot.min.js"/>
                <af:resource type="javascript" source="/resources/js/jqPlot/plugins/jqplot.canvasTextRenderer.min.js"/>
                <af:resource type="javascript" source="/resources/js/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js"/>
                <af:resource type="javascript" source="/resources/js/jqPlot/plugins/jqplot.dragable.min.js"/>
                <af:resource type="css" source="/resources/js/jqPlot/jquery.jqplot.min.css"/>
                <af:resource type="javascript">
                  function doClick() {
                      var clientId = 'myRefreshButton'; // id of the button in the page's HTML code
                      // This returns null
                      // var button = AdfPage.PAGE.findComponent(clientId);
                      // button is found but then receive error
                      var button = document.getElementById(clientId);
                      AdfActionEvent.queue(button, true);
                  $(document).ready(function () {
                      doClick();
                </af:resource>
            </af:document>
        </f:view>
    </jsp:root>

    Hi Frank,
    I agree manipulating the DOM directly is generally bad (I've watched those training videos!), but after doing some decent searching (with quite a bit of trial and error) I'm not sure there exists a purely ADF way of achieving a solution.
    Inside of a region, I have a master (Companies) and a child (Orders) table relationship.  Within the same region, I also have a charting tool which displays the monthly order totals of the selected company.  A customer can select a company and see the related monthly orders in the orders table along with a graph showing the visual sales.  If I were using ADF DVTs, this would be pretty straightforward, but I am not.  To get this to work then, I have a few obstacles.
    1) On jsff load, the chart must initialize with the displayed monthly order data.
    2) On new customer select, the chart must refresh with the newly displayed order data.
    The easiest way to update the chart would be to hook into the orders table component and, whenever the shown data refreshes or initializes, also refresh the chart.  However, I'm not sure where the hook is located for that so I'm back to my two obstacles.
    For the first obstacle, ADF does not (to my knowledge) have an "on jsff load" option so I'm stuck with jquery's load and corresponding id lookup functions.  In my case, that load function looks for a hidden output text component's value whose getter returns the order table row's current monthly data.  This is somewhat of a hack that, in effect, calls a managed bean method from javascript.  Now that I have that data, I can input that into my chart and refresh.
    For the second obstacle, I simply hook into the customer table's selection listener and after the current row is updated, retrieve the order table's current monthly data, refresh chart, etc.
    The question I asked is a simplified version of overcoming the two obstacles above and while my jquery $('#myRefreshButton')[0] is extremely brittle, it was only meant as a quick demonstration.  One could make it less brittle by iterating through the returned array, making sure the desired element contained any regions / naming containers and had the myRefreshButton portion at the end of the id string.
    What would be the desired ADF way of achieving this result?  Do you do something with your Data Visualization Tools that might be applicable here?  Is there a way to hook into the child table and refresh my chart any time child table refreshes or initializes?

  • Using AdfPage.PAGE.findComponent to find a popUp in a region

    Adf11g
    Hello
    I have a task flow in a region on a page - the region is named regionTrans.
    The main page in the taskflow has a popUp in the jsp:root - the popUp is named popTrans
    As I need to do a CreateInsert() before displaying the popUp I'm displaying the popUp using the following code :
        public static void showPopup(String popupId) {
           FacesContext context = getFacesContext();
           ExtendedRenderKitService extRenderKitSrvc =
                    Service.getRenderKitService(context, ExtendedRenderKitService.class);
           extRenderKitSrvc.addScript(context,
                                           "AdfPage.PAGE.findComponent('" + popupId + "').show();");
            }   In order to show the popUp in the region when the user clicks a button I have to use "regionTrans:0:popTrans" for the popupId.
    "regionTrans:0:popTrans" was found be looking at the source of the generated page.
    What I don't understand is what the "0" represents in the "regionTrans:0:popTrans"
    Can anybody explain ?
    Regards
    Paul

    Hi
    Here's where the region is defined in the main 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"
              xmlns:c="http://java.sun.com/jsp/jstl/core">
      <c:set var="viewcontrollerBundle"
             value="#{adfBundle['ch.mit.trac.view.resourceBundle.ViewControllerBundle']}"/>
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" title="TRAC v#{bindings.Version.inputValue}">
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:decorativeBox theme="light" topHeight="30px" id="db1">
              <f:facet name="center">
                <af:region value="#{bindings.transaction1.regionModel}"
                           id="regionTrans"/>
              </f:facet>
              <f:facet name="top">
                <af:panelGroupLayout layout="scroll"
                                     xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                     id="pgl1">
                  <af:menuBar id="mb1">And here's the entire jsff
    <?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"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:c="http://java.sun.com/jsp/jstl/core">
      <c:set var="viewcontrollerBundle"
             value="#{adfBundle['ch.mit.trac.view.resourceBundle.ViewControllerBundle']}"/>
      <af:panelStretchLayout id="psl1" topHeight="42px" visible="true"
                             inlineStyle="width:1367px; height:851px;">
        <f:facet name="center">
          <af:panelStretchLayout id="psl2" topHeight="29px" bottomHeight="49px">
            <f:facet name="bottom">
              <af:panelGroupLayout layout="horizontal"
                                   xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                   id="pgl5">
                <af:separator id="s3"/>
                <af:outputText value="Warnings : 5" id="ot2"/>
                <af:commandButton actionListener="#{bindings.Rollback.execute}"
                                  text="Rollback"
                                  disabled="#{!bindings.Rollback.enabled}"
                                  immediate="true" id="cb5">
                  <af:resetActionListener/>
                </af:commandButton>
                <af:commandButton actionListener="#{bindings.Commit.execute}"
                                  text="Commit"
                                  disabled="#{!bindings.Commit.enabled}" id="cb4"/>
              </af:panelGroupLayout>
            </f:facet>
            <f:facet name="center">
              <af:panelSplitter id="ps1" splitterPosition="690">
                <f:facet name="first">
                  <af:panelGroupLayout layout="scroll"
                                       xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                       id="pgl3">
                    <af:panelHeader text="#{viewcontrollerBundle.BUY}" id="ph1">
                      <f:facet name="context">
                        <af:inputComboboxListOfValues popupTitle="Search and Result Dialog"
                                                      id="inputComboboxListOfValues1"/>
                      </f:facet>
                      <f:facet name="menuBar"/>
                      <f:facet name="toolbar">
                        <af:commandToolbarButton text="#{viewcontrollerBundle.NEW}"
                                                 id="ctb1"/>
                      </f:facet>
                      <f:facet name="legend"/>
                      <f:facet name="info"/>
                    </af:panelHeader>
                  </af:panelGroupLayout>
                </f:facet>
                <f:facet name="second">
                  <af:panelHeader text="#{viewcontrollerBundle.SELL}"
                                  id="panelHeader1">
                    <f:facet name="context">
                      <af:inputComboboxListOfValues popupTitle="Search and Result Dialog"
                                                    id="inputComboboxListOfValues2"/>
                    </f:facet>
                    <f:facet name="menuBar"/>
                    <f:facet name="toolbar">
                      <af:commandToolbarButton text="#{viewcontrollerBundle.NEW}"
                                               id="commandToolbarButton1"/>
                    </f:facet>
                    <f:facet name="legend"/>
                    <f:facet name="info"/>
                  </af:panelHeader>
                </f:facet>
              </af:panelSplitter>
            </f:facet>
            <f:facet name="top">
              <af:panelGroupLayout layout="scroll"
                                   xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                   id="pgl4">
                <af:outputText value="outputText1" id="ot1"/>
                <af:separator id="s2"/>
              </af:panelGroupLayout>
            </f:facet>
          </af:panelStretchLayout>
        </f:facet>
        <f:facet name="top">
          <af:panelGroupLayout layout="horizontal"
                               xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                               id="pgl2">
            <af:selectOneChoice value="#{bindings.UserPositionView.inputValue}"
                                required="#{bindings.UserPositionView.hints.mandatory}"
                                shortDesc="#{bindings.UserPositionView.hints.tooltip}"
                                id="soc1" autoSubmit="true">
              <f:selectItems value="#{bindings.UserPositionView.items}" id="si1"/>
            </af:selectOneChoice>
            <af:spacer width="10" height="10" id="s1"/>
            <af:selectOneChoice value="#{bindings.SttTransactionViewViaPosition.inputValue}"
                                shortDesc="#{bindings.SttTransactionViewViaPosition.hints.tooltip}"
                                id="soc2" partialTriggers="soc1">
              <f:selectItems value="#{bindings.SttTransactionViewViaPosition.items}"
                             id="si2"/>
            </af:selectOneChoice>
            <af:commandToolbarButton text="#{viewcontrollerBundle.PREVIOUS}"
                                     id="cb2"
                                     actionListener="#{bindings.Previous.execute}"
                                     disabled="#{!bindings.Previous.enabled}"
                                     partialSubmit="true"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.NEXT}" id="cb1"
                                     actionListener="#{bindings.Next.execute}"
                                     disabled="#{!bindings.Next.enabled}"
                                     partialSubmit="true"/>
            <af:spacer width="10" height="10" id="s4"/>
            <af:commandToolbarButton id="commandToolbarButton2"
                                     text="#{viewcontrollerBundle.NEW}"
                                     actionListener="#{transactionBean.newTransactionOnClick}"/>
            <af:spacer width="25" height="10" id="spacer1"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.LIMIT}"
                                     id="ctb2"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.WARNINGS}"
                                     id="ctb3"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.INFORMATION}"
                                     id="ctb4"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.DOCUMENTS}"
                                     id="ctb5"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.TRANS_REP}"
                                     id="ctb6"/>
          </af:panelGroupLayout>
        </f:facet>
      </af:panelStretchLayout>
      <af:popup id="popTrans">
        <af:panelWindow id="pw1" title="#{viewcontrollerBundle.TRANSACTION}">
          <af:panelFormLayout id="pfl1" labelAlignment="top">
            <af:inputText value="#{bindings.TransactionId.inputValue}"
                          label="#{bindings.TransactionId.hints.label}"
                          required="#{bindings.TransactionId.hints.mandatory}"
                          columns="#{bindings.TransactionId.hints.displayWidth}"
                          maximumLength="#{bindings.TransactionId.hints.precision}"
                          shortDesc="#{bindings.TransactionId.hints.tooltip}"
                          id="it2">
              <f:validator binding="#{bindings.TransactionId.validator}"/>
            </af:inputText>
            <af:inputText value="#{bindings.Designation.inputValue}"
                          label="#{bindings.Designation.hints.label}"
                          required="#{bindings.Designation.hints.mandatory}"
                          columns="#{bindings.Designation.hints.displayWidth}"
                          maximumLength="#{bindings.Designation.hints.precision}"
                          shortDesc="#{bindings.Designation.hints.tooltip}"
                          id="it1">
              <f:validator binding="#{bindings.Designation.validator}"/>
            </af:inputText>
            <f:facet name="footer">
              <af:commandButton text="#{viewcontrollerBundle.OK}" id="cb3"/>
            </f:facet>
          </af:panelFormLayout>
        </af:panelWindow>
      </af:popup>
    </jsp:root>If there's too much or too little info let me know
    Regards
    Paul

  • AdfPage.PAGE.findComponent FAILED with WebCenter

    Dear all,
    I have to get in javascript a component with id="pdfBtn"
    BUT I have to set the parameter r1:0:pdfBtn => AdfPage.PAGE.findComponent('r1:0:pdfBtn')
    It works when I develop a task flow and manage by myself, but it failed when I add this into WebCenter the ID change.
    Any Idea?
    Thanks

    Have you tried
    AdfPage.PAGE.findComponentByAbsoluteId('pdfBtn')Timo

  • AdfPage.PAGE.findComponent()

    Hi all i'm using Jdev 11.1.1.0.2
    i want to focus icon into my table field
    i used the following code
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExtendedRenderKitService service = Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
    service.addScript(facesContext,"(AdfPage.PAGE.findComponent('temp1:table1:0:inputText1')).focus();");
    here not able to find the component it returns 'undefined';
    Regards
    Abhi

    Hi,
    I can see 2 possible causes:
    1. The client id is not the right one
    2. The target component does not have a client component, try setting clientComponent="true" on the inputText
    Regards,
    ~ Simon

  • What's wrong with AdfPage.PAGE.findComonent?

    Hi,
    In this page I can't find the inputtext with the AdfPage.PAGE.findComonent and I don't know why, anybody see something wrong?
    If I try to find the component with document.getElementById works ok but I don't want to put ::content to find a component.
    <?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:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document binding="#{backing_pruebaFocus.document1}"
    id="document1" initialFocusId="itFoco" title="Pruebas con el foco">
    <af:form id="frmFoco">
    <af:inputText label="Label 1 "
    id="itFoco" clientComponent="true"/>
    <script type="text/javascript" language="Javascript">
    document.body.onload = setFocus();
    function setFocus()
    var it2 = AdfPage.PAGE.findComponent("itFoco");
    alert(it2);
    </script>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_pruebaFocus-->
    </jsp:root>

    Thanks Frank!
    It works ok now.
    Another thing, I try to do this because the initialFocusId of document don't work, this proyect has been migrated between 11gTP4 to 11g and in this step one of the things that not work is this, (before of migration this works ok). I investigated a little bit and I found that in the js that controls this, the variable _initialFocusId is null. Can it is a bug of the prerender phase? I see the source code that controls this script generation and in this code the variable is assigned.
    The script:
    /adf/jsLibs/Common1_2_8.js (var _initialFocusID=null;)
    The document's property is assigned and the component that takes the focus is a clientcomponent and accessibility-mode is set to inaccessible (this last thing is set because in the documentation say this)
    Thanks at all

  • Difference between narrow() method usage and simple class cast for EJB

    Hi,
    I have a very simple question:
    what is the difference between PortableRemoteObject.narrow(fromObj,
    toClass) method usage and simple class cast for EJB.
    For example,
    1)
    EJBObject ejbObj;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)PortableRemoteObject.narrow(ejbObj,ABean.class);
    OR
    2)
    EJBObject bean;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)ejbObj;
    Which one is better?
    P.S. I'm working with WL 6.1 sp2
    Any help would be appreciated.
    Thanks in advance,
    Orly

    [email protected] (Orly) writes:
    Hi,
    I have a very simple question:
    what is the difference between PortableRemoteObject.narrow(fromObj,
    toClass) method usage and simple class cast for EJB.
    For example,
    1)
    EJBObject ejbObj;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)PortableRemoteObject.narrow(ejbObj,ABean.class);
    OR
    2)
    EJBObject bean;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)ejbObj;
    Which one is better?(1) is mandated by the spec. It is required because CORBA systems may
    not have sufficient type information available to do a simple case.
    P.S. I'm working with WL 6.1 sp2 You should always use PRO.narrow()
    andy

  • How to call AdfPage.PAGE.clearAllMessages() automatic?

    Hi:
    How can we call AdfPage.PAGE.clearAllMessages() at once, when validator failure occurs?

    Hello:
    i want to auto click ok button on dialog box when validation failure.
    The example like
    http://docs.oracle.com/cd/E25054_01/web.1111/b31973/af_message.htm#ADFUI367
    Figure 17-1

  • How does ADF build AdfPage.PAGE.__recordSessionTimeout

    We built one application, and publish it in internet through Proxy server.
    On every page ADF addes the javascript as below
    AdfPage.PAGE.__recordSessionTimeout(1800000, 60000, "http://127.0.0.1:7101/app_context/page.jspx");
    For this, when the idle time is out the page will be redirected to "http://127.0.0.1:7101/app_context/page.jspx", this link is impossible to access to internet user.
    Is there any solution to remove the first part http://127.0.0.1:7101(Hostname:port) for this?
    Any input is appreciated!!

    Hi,
    From the documentation:
    +"A.2.3.19 Session Timeout Warning+
    +When a request is sent to the server, a session timeout value is written to the page and the session timeout warning interval is defined by the context parameter oracle.adf.view.rich.sessionHandling.WARNING_BEFORE_TIMEOUT. The user is given the opportunity to extend the session in a warning dialog, and a notification is sent when the session has expired and the page is refreshed. Depending on the application security configuration, the user may be redirected to the log in page when the session expires.+
    +Use the oracle.adf.view.rich.sessionHandling.WARNING_BEFORE_TIMEOUT context parameter to set the number of seconds prior to the session time out when a warning dialog is displayed. If the value of WARNING_BEFORE_TIMEOUT is less than 120 seconds, if client state saving is used for the page, or if the session has been invalidated, the feature is disabled. The session time-out value it taken directly from the session.+
    +Example A-3 shows configuration of the warning dialog to display at 120 seconds before the time-out of the session.+
    +Example A-3 Configuration of Session Time-out Warning+
    +<context-param>+
    +<param-name>oracle.adf.view.rich.sessionHandling.WARNING_BEFORE_+
    +TIMEOUT</param-name>+
    +<param-value>120</param-value>+
    +</context-param>+
    +The default value of this parameter is 120 seconds. To prevent notification of the user too frequently when the session time-out is set too short, the actual value of WARNING_BEFORE_TIMEOUT is determined dynamically, where the session time-out must be more than 2 minutes or the feature is disabled."+
    As there is no parameter to configure the URL for the link, I suggest to disable the feature:
    Use the oracle.adf.view.rich.sessionHandling.WARNING_BEFORE_TIMEOUT context parameter to set the number of seconds prior to the session time out when a warning dialog is displayed. If the value of WARNING_BEFORE_TIMEOUT is less than 120 seconds, if client state saving is used for the page, or if the session has been invalidated, the feature is disabled. The session time-out value it taken directly from the session
    Before I can file an ER, I need to know
    1. Which Version of JDeveloper
    2. Why is the server you run configured with local host IP address. I am not sure the proxy server understands how to map this at all. Did you try a server name or real IP address
    Frank
    Edited by: Frank Nimphius on May 31, 2012 10:19 AM

  • How to send Parameters FORM to PHP WEB Page with method POST (secure)?

    Hello everyone,
    i hope someone can help me to find a solution to this problem!
    i have to send "+precious+" parameters from an oracle form to php page, like username and password, with a secure method... i tried with WEB.SHOW_DOCUMENT procedure but it uses GET Method and when the web page open up you can read those parameters in the url...no good!
    some suggestion?
    Thank a lot in advance... FMicio

    The other way you have is to make a PJC java bean ...
    which uses HTTPClient library..
    for example:
    PostMethod post = new PostMethod("http://jakarata.apache.org/");
            NameValuePair[] data = {
              new NameValuePair("user", "joe"),
              new NameValuePair("password", "bloggs")
            post.setRequestBody(data);
            // execute method and handle any error responses.
            InputStream in = post.getResponseBodyAsStream();
            // handle response.I have done a multipart form data post to upload files to my db over httpClient.. and other things...
    Or with java.net.* api-s
    try {
        // Construct data
        String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("value1", "UTF-8");
        data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("value2", "UTF-8");
        // Send data
        URL url = new URL("http://hostname:80/cgi");
        URLConnection conn = url.openConnection();
        conn.setDoOutput(true);
        OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
        wr.write(data);
        wr.flush();
        // Get the response
        BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        while ((line = rd.readLine()) != null) {
            // Process line...
        wr.close();
        rd.close();
    } catch (Exception e) {
    }Or you can call your web page (post data) from your database
    http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/
    Edited by: Peterv6i on Mar 30, 2012 3:49 PM
    Edited by: Peterv6i on Mar 30, 2012 3:55 PM

  • TcLookupOperationsIntf method usage in OIM 10g JSP

    We are trying to use the tcLookupOperationsIntf in OIM-10g to populate few lookup fields on manual selection.
    But while trying to use getLookupValues, getLookupValuesForColumn we couldn't achieve the same.
    Both the above quoted methods require different parameters; tried different combinations but none seem to work or most probably headed in a wrong direction.
    Below is a code snippet of same attempt, please advice
    <tctags:lookupfield
                             selectionColumn="Lookup Definition.Lookup Code Information.Code Key"
    className="Thor.API.Operations.tcLookupOperationsIntf"
    methodName="getLookupValues"
    columnNames="Lookup Definition.Lookup Code Information.Code Key,Lookup Definition.Lookup Code Information.Decode"
    fixedFilter="Lookup Definition.Lookup Code Information.Code Key:<Code Key Value>"
    lookupAPI="-2"
                             </tctags:lookupfield>
    the same works fine for tcOrganizationOperationsIntf/tcUserOperationsIntf.
    Below is the error captured in logs, on clicking the lookup defined by the above tctags
    DEBUG,20 Sep 2012 16:48:11,527,[XELLERATE.WEBAPP],Class/Method: tcLookupFieldAction/lookupByAPI entered.
    DEBUG,20 Sep 2012 16:48:11,527,[XELLERATE.WEBAPP],Class/Method: tcLookupFieldAction/lookupByAPI - Data: columnNames - Value: Lookup Definition.Lookup Code Information.Code Key
    DEBUG,20 Sep 2012 16:48:11,527,[XELLERATE.WEBAPP],Class/Method: tcLookupFieldAction/lookupByAPI - Data: columnNames - Value: Lookup Definition.Lookup Code Information.Decode
    ERROR,20 Sep 2012 16:48:11,527,[XELLERATE.WEBAPP],Class/Method: tcLookupFieldAction/lookupByAPI encounter some problems: {1}
    java.lang.NullPointerException
    Edited by: dash on Sep 20, 2012 4:50 PM
    Edited by: dash on Sep 20, 2012 4:52 PM

    Using OOTB API it will not be possible to achieve.
    You need to customize your JSP.
    You can use Javascript to achieve this. Approach can be as follow-
    1. Get values of both lookups at the time of page load. (It will avoid page refresh and other complexity of page reload to fetch 2nd lookup)
    2. Store both in Java Script variables.
    3. When one of the lookup field value changes, call a JavaScript function which will change value of second field.
    You may need to have plain HTML field if OOTB field is not working.

  • New Login Page/Authentication Method

    Hello Forum users,
    This weekend we have gone live with a new method of authentication in the NI Discussion Forums. This change is setting us up to successfully log users in to both Forums and Community simultaneously in the future. This change should be vitrually invisible to you, but you may notice a new look when you are redirected to log into the Forums. Also, you will notice if you select the Logout button, you will now be logged out of the NI Discussion Forums as well as all of ni.com.
    Note: If you currently log into the Forums with a saved bookmark, your bookmark should still work for now but that will be changing in the future. Please update your bookmark to use the new login link.
    Thanks,
    Jordan

    tst wrote:
    A big additional problem I saw on the PC where I tried the new link both earlier and now - after I log in using the link, going to other pages sometimes logs me out (or at least the page is displayed as if I'm not logged in). This happens when opening pages in a new tab (which I do often), but I also saw it when opening a page in the same tab.
    This is a big deal, because once I'm logged in, I expect to stay that way. I rely on being logged in to function the way I want to.
    This happened to me too when I tried it this morning (using Firefox, Windows 7 64-bit).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Factory method usage, creating the correct Image subclass

    Hi, I created a factory method
      public enum ImgType {
        SINGLE, STRIP, SPRITE_SHEET
    public static Image createImage(ImgType imgType) {
        switch (imgType) {
          case SINGLE:
            return new MyImage1(0, 0);
          case SPRITE_SHEET:
            return new MyImage2("", 0, 0);
          case STRIP:
            return new MyImage3("", 0, 0);
          default:
            throw new IllegalArgumentException("The image type " + imgType + " is not recognized.");
      }that creates different images based on the enum type provided.
    and heres is a usage of that function
      public BufferedImage loadAwtImage(ImageInputStream in, String imgName,  ImageTypeFactory.ImgType imgType) throws IOException {
        BufferedImage img = imgLoader.loadImage(in);
        BufferedImage imgsubType = ImageTypeFactory.createImage(imgType);  // Convert to real Image type
        addAwtImg(imgName, imgsubType);
        return imgsubType;
      }In a test:
    imgLib.loadAwtImage(imageStream, "cursor", ImageTypeFactory.ImgType.SPRITE_SHEET);Is it 'good' that in the test I can say(using the imgType enum) what sort of Image should be returned?
    doesn't this expose the working of the class to the outside, on the other hand I don't know howto create the correct sub image based on an image loaded.
    I use subImages to allow selection within the image, like the 3th 'tile' within an imageStrip returns just that cropped image.
    Before I had List<Image> and List<List<Image>> and now I can just return Images in 1 method instead of 2,3 by using lists.
    Edited by: stef569 on Dec 12, 2008 11:05 AM

    creates specifications... :p
    *  load the BufferedImage from the ImageInputStream
    * add it to the cache keyed by the imgName
    * @return a BufferedImage, or a custom subclass based on the imgType
    * @throws IOException when the img could not be loaded
    public BufferedImage loadAwtImage(ImageInputStream in, String imgName,  ImageTypeFactory.ImgType imgType) throws IOException I can test it, but the ImageTypeFactory.ImgType imgType parameter looks wrong to me.
    if you see this in a class method would you change it/find a better way.

  • About sendRedirect method usage

    Hello.
    I have a problem with sendRedirect method.
    So. I have page with my_auth portlet.
    When this form submits, i check the user information from db and must redirect it to special pages.
    For this purpose i use HttpPortletRendererUtil.sendRedirect() method.
    Code:
    if (request.getParameter(fSubmit) != null)
    if ( o.Auth_user(vLogin,vPassword) ) {
    session.putValue("sUser_id" , new Integer(o.getUser_id()) );
    Forward_URL fu = new Forward_URL();
    HttpPortletRendererUtil.sendRedirect(pr, fu.replace(pr.getPageURL(),"_pageid=133","_pageid=84"));
    But this not redirect me to page with _pageid=84.
    fu.replace() method works propertly. and new url is correct: http://myhost:port/page?_pageid=84&_dad=dad1&_schema=shema1
    If I make link with this and manualy click on it all works fine.
    Can anyone telll me that i do wrong?
    Best regards, brom.

    hi,
    If you make a call to do a redirect from within a JSP portlet, it WILL redirect to the specified URL - BUT the new URL's contents will be rendered inside the calling portlet. What you are doing is redirecting a specific portlet to the new URL, and NOT the page it resides in.
    In the current release, JPDK apis do not have control on the page flow, or on the page the calling portlet resides.
    For your functionality, you would need to use one of the following methods -
    1) hide and show portlets depending on the logic when you wish to render the contents
    of the new url, and correspondingly render that specific portlet and do not render the
    others. You would have the same affect of this URL taking up all of the page.
    2) call any of the showDetails or the customization page based on the results of the logic
    and submit back to the main page. Something like that -
    -Ananth

  • Method usage

    Hiee All,
    I have created one method in one view implementation.I want to use that method in another view,how can i do that?how to call that method from other view?
    Thanks in advance.

    Hi
    Yes as said by ashwani  you cann't access the method of one view to another view and also you can acces from view to comp ctroller not from comp ctrl to view
    In the view 1 define the usage of component controller
    In the component controller create a method
    //@@begin javadoc:cc_method()
      /** Declared method. */
      //@@end
      public void cc_method( )
        //@@begin cc_method()
        //@@end
    In the view 1 call the component controller method like this
    //@@begin javadoc:method1()
      /** Declared method. */
      //@@end
      public void method1( )
        //@@begin method1()
        wdThis.wdGetTest1Controller().cc_method();
        //@@end
    Regards,
    Arun

Maybe you are looking for