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

Similar Messages

  • 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

  • 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?

  • 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 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

  • 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

  • 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

  • Problem with popup in a page fragment

    JDev 11.1.2.1
    I'm using the code described here to launch popup from a backing bean.
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/oct2010-otn-harvest-183714.pdf
    How-to launch a popup programmatically from Java
    Starting Oracle JDeveloper 11.1.1.3, instance of af:popup can be opened using a Java method on the RichPopup object. The RichPopup class is the bean implementation of the af:popup ADF Faces tag. To launch a popup from a managed bean, you first need to get a hold on to a rich popup instance, which you can do by searching it on the UIViewRoot or by referencing a JSF component binding – which you create using the "binding" property of the af:popup component tag. To open the popup you then call
    RichPopup.PopupHints ph = new RichPopup.PopupHints(); popup.show(ph);
    It works fine except when the popup is inside a page fragment.
    In IE 7 I get the javascript error message
    "this.getDomNode().parentNode' is null or not an object"
    I have also tried the following code; that works fine except when the popup is inside a page fragment.
    FacesContext context = FacesContext.getCurrentInstance();
    String popupId = popup.getClientId(context);
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExtendedRenderKitService service =
    Service.getRenderKitService(facesContext,
    ExtendedRenderKitService.class);
    service.addScript(facesContext,
    "AdfPage.PAGE.findComponent('" + popupId + "').show();");
    Any idea how to launch a popup in a page fragment?

    Since this is working for others I'm working on a test case to send to oracle.
    I'll try to give more information.
    Main.jspx
    has a region for Child.jsff using a bounded task flow.
    <af:region value="#{bindings.Child.regionModel}" id="r1"/>
    Child.jsff has a popup bound to backing bean and a button that calls java to open the popup.
    Child.jsff has its own set of bindings. It is not inherting parent bindings.
    <?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">
    <af:resource type="javascript"/>
    <af:group id="g100">
    <af:popup childCreation="deferred" autoCancel="disabled" id="p1" binding="#{TestBacking.testPop}">
    </af:popup>
    <af:commandButton text="testPopup" id="cb1" actionListener="#{TestBacking.test}"/>
    TestBacking.java
    public void setTestPop(RichPopup testPop) {
    this.testPop = testPop;
    public RichPopup getTestPop() {
    return testPop;
         public void test(ActionEvent actionEvent) {
              RichPopup.PopupHints ph = new RichPopup.PopupHints();
              testPop.show(ph);
    Edited by: Phil on Nov 14, 2011 11:53 AM
    Edited by: Phil on Nov 14, 2011 11:58 AM

  • BUG: Popup in page fragment; with many regions and popup binded to backing.

    BUG: Popup in page fragment; with many regions and popup or parent binded to backing bean.
    JDEV11.1.2.1 Popup will not popup.(sometimes works if using RichPopup.Show() in backing bean Java code.)
    I have a bug (Popup will not popup)that only happens when I have more than one of the same region.
    And I have a popup in the page fragment is binded to backing bean.
    My SR guy is out today but we plan to enter one.
    test.jspx
    <?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">
        <jsp:directive.page contentType="text/html;charset=UTF-8"/>
        <f:view>
            <af:document title="test" id="d1">
                <af:form id="f1">
                    <af:panelGroupLayout id="pgl1" layout="horizontal">
                        <af:outputText value="BUG JDEV11.1.2.1 and IE7. Broken Popup! If I have a jsff fragment and I have many regions of this fragment."
                                       id="ot2"/>
                        <af:outputText value="Inside the fragment I have a popup. If that popup or its parent are binded to a Backing Bean the popup doesn't work."
                                       id="ot1"/>
                    </af:panelGroupLayout>
                    <!-- with a single region it also works (with bindings in place in fragment). -->
                    <af:region value="#{bindings.taskflowemp1.regionModel}" id="r1"/>
                    <af:region value="#{bindings.taskflowemp2.regionModel}" id="r2"/>    
                    <!--
                    <af:region value="#{bindings.taskflowemp3.regionModel}" id="r3"/>
                    <af:region value="#{bindings.taskflowemp4.regionModel}" id="r4"/>
                    -->
                </af:form>
            </af:document>
        </f:view>
    </jsp:root>region.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">
      <af:group id="g1">
      <!-- If I remove the binding for popop or popup group, the popup works fine. -->
    <!--Working code here
        <af:group id="g2">
          <af:popup childCreation="deferred" autoCancel="disabled" id="p1" >
        -->
           <!-- Problem code here   -->
        <af:group id="g2" binding="#{TestBean.popupGroup}">
          <af:popup childCreation="deferred" autoCancel="disabled" id="p1" binding="#{TestBean.testPopup}"> 
            <!-- End problem code -->
            <af:dialog id="d2" title="Dialog Title">
              <f:facet name="buttonBar"/>
              <af:outputText value="Dialog Contents" id="ot100"/>
            </af:dialog>
          </af:popup>
        </af:group>
        <af:panelGroupLayout id="pgl1">
          <af:panelBox text="Region" id="pb1">
            <f:facet name="toolbar"/>
            <af:commandButton text="showPopupBehavior" id="cb1" >
              <af:showPopupBehavior popupId="p1"/>
            </af:commandButton>
            <af:commandButton text="AdfPage.PAGE.findComponent JavaScript" id="cb2" actionListener="#{TestBean.popupTestJavaScript}"/>
            <af:commandButton text="RichPopup.Show() Java" id="cb3" actionListener="#{TestBean.popupTestJava}"/>
          </af:panelBox>
        </af:panelGroupLayout>
      </af:group>
    </jsp:root>TestBean.java
    package view;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import org.apache.myfaces.trinidad.component.UIXGroup;
    import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
    import org.apache.myfaces.trinidad.util.Service;
    public class TestBean {
        private RichPopup testPopup;
        private UIXGroup popupGroup;
        public TestBean() {
        public void setTestPopup(RichPopup testPopup) {
            this.testPopup = testPopup;
        public RichPopup getTestPopup() {
            return testPopup;
        public void popupTestJava(ActionEvent actionEvent) {
            if(testPopup != null){
                RichPopup.PopupHints ph = new RichPopup.PopupHints();
                testPopup.show(ph);
            }else{
                System.err.println("TestBean.testPopop IS NULL!");
        public void popupTestJavaScript(ActionEvent actionEvent) {
            showPopupTest("r1:0:p1");
        private static void showPopupTest(String popupId) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            ExtendedRenderKitService service =
                Service.getRenderKitService(facesContext,
                                            ExtendedRenderKitService.class);
            service.addScript(facesContext,
                              "AdfPage.PAGE.findComponent('" + popupId + "').show();");
        public void setPopupGroup(UIXGroup popupGroup) {
            this.popupGroup = popupGroup;
        public UIXGroup getPopupGroup() {
            return popupGroup;
    }

    Thanks that fixed the problem.
    "a user error"
    Well I followed your book! Chapter 6 of the "Oracle Fusion Developer Guide - Working with Bounded Task Flows in ADF Regions". I think this comes back to book writer error. I found almost no mention of BackingBeanScope in this chapter. Don't you think this would be an important note?
    "did you know that there is a Java API (on the RichPopup instance) to launch a popup ?"
    Yes I posted in my code! If you read the above code you would see it there.
    I don't really understand why the scope of the bean has anything to do with af:showPopupBehavior or AdfPage.PAGE.findComponent.

  • af:serverListener causing ADF page to hang while refresh

    Hi All,
    I am working on JDeveloper 11.1.1.5.0
    We have developed an ADF application wherein we are using a <af:ServerListener> for implementing table row double-click action. below is the code
    <af:clientListener method="handleTableDoubleClick"
                                         type="dblClick"/>
                      <af:serverListener type="TableDoubleClickEvent"
                                         method="#{UserBean.handleTableDoubleClick}"/>
    <af:resource type="javascript">function handleTableDoubleClick(evt) { var
                                      table = evt.getSource();
                                      AdfCustomEvent.queue(table,
                                      "TableDoubleClickEvent", { }, true);
                                      evt.cancel(); }</af:resource>there is a custom method written in UserBean to handle the event.
    Now the problem is that when user refreshes this page using 'F5'...the page gets hanged and is not responding. I tried disabling the <af:serverListener> and it works correctly.
    Please let me know any method to implement table double click listener without using <af:serverListener> component.
    thanks,
    Rajan

    Ok. I implemented the stated solution. But again there is some issue with the javascript function. I am using JDeveloper 11.1.1.5.0. Below is my implementation.
    In my ADF page:
    <af:commandButton text="overview" id="overviewButton"
                                           binding="#{UserBean.overviewButton}"
                                           actionListener="#{User.handleTableDoubleClickMethod}"/>and
    <af:clientListener method="handleTableDoubleClick"
                                         type="dblClick"/>
    <af:clientAttribute name="btnId"
                                          value="#{SuspectBean.overviewButtonId}"/>
    <af:resource type="javascript">
         function handleTableDoubleClick(event) {
             var btnId = event.getSource().getProperty("btnId");
             var button = AdfPage.PAGE.findComponent(btnId);
             alert("btn"+button);
             var actionEvent = new AdfActionEvent(button);
             event.cancel();
             actionEvent.queue(button, false);
       </af:resource>In userBean:
        public void handleTableDoubleClickMethod(ActionEvent actionEvent){
            overviewTab.setDisclosed(true);
        public void setOverviewButton(RichCommandButton overviewButton) {
            this.overviewButton = overviewButton;
        public RichCommandButton getOverviewButton() {
            return overviewButton;
        public String getOverviewButtonId() {
                return getOverviewButton().getClientId(FacesContext.getCurrentInstance());
            }When I am executing the code, i put alert statement in javascript to debug. I am getting var button value as 'undefined'. I am getting btnId correctly.
    is there some different version of javascript code required in JDev 11.1.1.5.0? Please help me with this.
    thanks,
    Rajan

  • FindComponent in pagetemplate ??

    Hi,
    I have a pagetemplate in which I would like to put some javascript functionality.
    Therefore I need the AdfPage.PAGE.findComponent function.
    The problem is that in my other pages the reference to the page template has different ids (sometimes the
    pagetemplate - which is a naming container - is called templateID, sometimes chickenID, or testID,...whatever).
    I have read that it is possible to "search" within containers using several colons, but this does not (seem to) work in my case.
    Here is some info on what I am trying to achieve :
    I wish to have a dialog box asking the user if he wishes to save changes before he exits. Not too much asked I guess.
    -----quote-----
    Hi,
    I think in the upcoming R1 release there is an automated option for this (though not customizable. I am not aware of anything in the current build of JDeveloper 11g . What about using an af:clientListener in an unload event to call a serverListener to check the state of the transaction ?
    Frank
    ----end quote----
    Re: how to popup confirm dialog trying to navigate away with unsaved change
    Now that looks like a good idea, but here's the hick-up.
    When using a custom event AdfCustomEvent.queue(...) you NEED a valid source UIComponent or the framework will never deliver the event to the serverlistener.
    Now it seems pretty clear to me that that user, and myself, did not intend to write this same code over and over in each and every page...
    Lets put the code in our template...oh..hell..the (triple) colons in AdfPage.PAGE.findComponent(":::comp1") don't work in a template!
    EDIT : Using ADF 11g

    Thanks a lot, and sorry for the crude way of putting it..but I had been looking for an answer for some time now
    and got kinda frustrated ;D
    But thanks a lot!
    No it did not work.
    Well at least what I thought you meant did not work.
    Here is what I have now :
    template
            <af:commandButton text="commandButton 1" immediate="true" partialSubmit="true" action="#{Bb_Common_Template.testbis}"/>
            <af:inputText visible="false" id="dummyInputTextForOnBeforeUnloadClientListener">
                    <af:serverListener type="saveBeforeLeaveEvent" method="#{Bb_Common_Template.test}"/>
                </af:inputText>
            <f:verbatim>           
          <script>
          var targetUIComponent = "";
          window.onbeforeunload = function(event)
                 * Todo : add dialog logic here, in case the user wants to save
                 * we do so. Else we just continue navigating.
                // if we want to save, tell the server
                var source = AdfPage.PAGE.findComponent(targetUIComponent);           
                AdfCustomEvent.queue(source,
                             "saveBeforeLeaveEvent",
                             {doSave:1},
                             true);
          </script>
          </f:verbatim>html source code in firefox
    <input id="templateID:dummyInputTextForOnBeforeUnloadClientListener::content" name="templateID:dummyInputTextForOnBeforeUnloadClientListener" class=...backing bean
        public void testbis()
            FacesContext fctx =  FacesContext.getCurrentInstance();
            UIComponent uic = fctx.getViewRoot().findComponent("dummyInputTextForOnBeforeUnloadClientListener");
            System.out.println("With 0 " + uic );
            uic = fctx.getViewRoot().findComponent(":dummyInputTextForOnBeforeUnloadClientListener");
            System.out.println("With 1 " + uic );
            uic = fctx.getViewRoot().findComponent("::dummyInputTextForOnBeforeUnloadClientListener");
            System.out.println("With 2 " + uic );
            uic = fctx.getViewRoot().findComponent(":::dummyInputTextForOnBeforeUnloadClientListener");
            System.out.println("With 3 " + uic );
            uic = fctx.getViewRoot().findComponent("::::dummyInputTextForOnBeforeUnloadClientListener");
            System.out.println("With 4 " + uic );
            uic = fctx.getViewRoot().findComponent(":::::dummyInputTextForOnBeforeUnloadClientListener");
            System.out.println("With 5 " + uic );
            uic = fctx.getViewRoot().findComponent("::::::dummyInputTextForOnBeforeUnloadClientListener");
            System.out.println("With 6 " + uic );
            if (uic != null)
                String clientid = uic.getClientId(fctx);
                ExtendedRenderKitService extendedRenderKitService = Service.getRenderKitService(fctx,ExtendedRenderKitService.class);
                extendedRenderKitService.addScript(fctx,"targetUIComponent = '"+clientid + "';");
            } else {
                System.out.println("Nope didnt work...");
        public void test(ClientEvent cl)
            System.out.println(cl);
        }console output when pressing commandButton1
    With 0 null
    With 1 null
    With 2 null
    With 3 null
    With 4 null
    With 5 null
    With 6 null
    Nope didnt work...Edited by: Charles (OBASI) on 12-aug-2009 7:11
    Edited by: Charles (OBASI) on 12-aug-2009 7:16

  • How to disable all fields of a page on button click

    Hello, I am using JDeveloper 11.1.2.3.0
    I have a page with several fields on it. I want to have all the page fields disabled when I click a certain Button. How can I achieve this?
    If what I am asking is too difficult to achieve can you help me with an idea on how to achieve something similar?
    Thank you

    This can be achieved by using JavaScript Client API get the id's all the fields while clicking the button  and disable your Components,
    Calling Backing bean method or binded component involves server side round-trip, you can easily achieve this using simple java script in
    Client Side..
    Call this method in your Client Listener ..
    function disableFields(actionEvent) {
            var field1= AdfPage.PAGE.findComponent("field1id");
            var field2 = AdfPage.PAGE.findComponent("field2id");
            field1.setDisabled(true);
            fileld2.setDisabled(true);

  • FindComponent using relative naming container

    I am unable to locate a component in an actionListener method using relative notation. The page uses templates and regions, so I'm wondering if that is part of my problem.
    Here are the absolute paths of the two components:
    :templatePage:region1:templateFragment:netIdInput
    :templatePage:region1:templateFragment:panelCollection1:createInsertButton'createInsertButton' is the actionSource and I want to find the 'netIdInput' component.
    In the handler method this works:
    UIComponent netIdComponent = event.getComponent().findComponent(":templatePage:region1:templateFragment:netIdInput");but I can't get any relative paths to work, such as:
    UIComponent netIdComponent = event.getComponent().findComponent("::netIdInput");Does anyone have a suggestion, or know if the use of templates causes findComponent() to behave differently?

    Hi,
    try
    AdfPage.PAGE.findComponent()
    to start your serach from the root
    Frank

  • AdfPage didn't work in IE 7

    I have very simple page which I list the code below.
    It works in Firefox 3 but didn't work in IE 7.0.5730.13
    any comments are welcomed.
    <?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="Keystroke search feature" id="document1">
    <f:verbatim>
    <![CDATA[
    <script language="JavaScript" type="text/javascript">
    function handleKeyUpOnSuggestField(evt){
    keystrokePopup = AdfPage.PAGE.findComponent("keystrokePopup");
    alert("testing IE");
    alert(keystrokePopup);
    alert(keystrokePopup.getClientId());
    </script>
    ]]>
    </f:verbatim>
    <af:form binding="#{backing_jacky_KeystrokeSearchPage.form3}" id="form3">
    <af:inputText label="Label 1"
    binding="#{backing_jacky_KeystrokeSearchPage.inputText1}"
    id="inputText1">
    <af:clientListener method="handleKeyUpOnSuggestField" type="keyUp"/>
    </af:inputText>
    </af:form>
    <af:popup binding="#{backing_jacky_KeystrokeSearchPage.popup1}"
    id="keystrokePopup"/>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_jacky_KeystrokeSearchPage-->
    </jsp:root>

    Unfortunately, it still fails in IE 7 and works in FF3.
    Here's all the code i'm working.
    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:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:trh="http://myfaces.apache.org/trinidad/html">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document title="Keystroke search feature"
    binding="#{backing_jacky_KeystrokeSearchPage.document1}"
    id="document1">
    <f:facet name="metaContainer">
    <trh:script source="keystrokeSearch.js"></trh:script>
    </f:facet>
    <af:form binding="#{backing_jacky_KeystrokeSearchPage.form1}" id="form1">
    <af:panelGroupLayout binding="#{backing_jacky_KeystrokeSearchPage.panelGroupLayout1}"
    id="panelGroupLayout1">
    <af:inputText label="Quick Search "
    binding="#{backing_jacky_KeystrokeSearchPage.keystrokeField}"
    id="keystrokeField">
    <af:clientListener method="handleKeyUpOnKeystrokeField"
    type="keyUp"/>
    <af:serverListener type="suggestServerListener"
    method="#{backing_jacky_KeystrokeSearchPage.doFilterList}"/>
    </af:inputText>
    <af:table var="row" summary="keystroke search feature"
    value="#{backing_jacky_KeystrokeSearchPage.alExpr}"
    binding="#{backing_jacky_KeystrokeSearchPage.table1}"
    id="table1" width="600" inlineStyle="height:300px;"
    rowSelection="multiple">
    <af:column sortable="true" headerText="col1" filterable="true">
    <af:outputText value="#{row.id}"/>
    </af:column>
    <af:column sortable="false" headerText="col2">
    <af:outputText value="#{row.date}"/>
    </af:column>
    <af:column sortable="false" headerText="col3">
    <af:outputText value="#{row.category}"/>
    </af:column>
    <af:column sortable="false" headerText="col4">
    <af:outputText value="#{row.type}"/>
    </af:column>
    <af:column sortable="false" headerText="col5">
    <af:outputText value="#{row.note}"/>
    </af:column>
    </af:table>
    </af:panelGroupLayout>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_jacky_KeystrokeSearchPage-->
    </jsp:root>
    JavaScript:
    function handleKeyUpOnKeystrokeField(evt){
    keystrokeField = evt.getSource();
    //suppress server access for the following keys
    //for better performance
    if (evt.getKeyCode() == AdfKeyStroke.ARROWLEFT_KEY ||
    evt.getKeyCode() == AdfKeyStroke.ARROWRIGHT_KEY ||
    evt.getKeyCode() == AdfKeyStroke.ARROWDOWN_KEY ||
    evt.getKeyCode() == AdfKeyStroke.SHIFT_MASK ||
    evt.getKeyCode() == AdfKeyStroke.END_KEY ||
    evt.getKeyCode() == AdfKeyStroke.ALT_KEY ||
    evt.getKeyCode() == AdfKeyStroke.HOME_KEY) {
    return false;
    if (evt.getKeyCode() == AdfKeyStroke.ESC_KEY){
    hidePopup(evt);
    return false;
    // get the user typed values
    valueStr = keystrokeField.getSubmittedValue();
    // query suggest list on the server
    AdfCustomEvent.queue(keystrokeField,"suggestServerListener",
    {filterString:valueStr},true);
    // Send single parameter
    // put focus back to the input text field
    setTimeout("keystrokeField.focus();",400);
    JAVA CODE:
    public void doFilterList(ClientEvent clientEvent) {
    // set the content for keystrokeField
    filterString = (String)clientEvent.getParameters().get("filterString");
    System.out.println("filterString=" + filterString);
    // List<String> filteredList = suggestProvider.filteredValues(srchString, true);
    // jobList = populateList(filteredList);
    this.keystrokeField.setValue(filterString);
    // set the selection and highlight
    doSelect(getIndexInList(filterString));
    AdfFacesContext.getCurrentInstance().addPartialTarget(table1);
    private int getIndexInList(String filterString) {
    int ret = -1;
    if (filterString == null || filterString.length() == 0) {
    return ret;
    try {
    for (int i = 0; i < this.getAlExpr().size(); i++) {
    JournalDTO dto = this.getAlExpr().get(i);
    int idx = dto.getId().indexOf(filterString);
    if (idx >= 0) {
    // found
    ret = i;
    System.out.println(dto.toString());
    break;
    } catch (Exception e) {
    System.err.println("getIndexInList: " + e.getMessage());
    e.printStackTrace();
    return ret;
    public String doSelect(int idx) {
    try {
    RowKeySet rs = this.getTable1().getSelectedRowKeys();
    rs.clear();
    rs.add(idx);
    this.getTable1().setSelectedRowKeys(rs);
    } catch (Exception e) {
    e.printStackTrace();
    return null;
    }

Maybe you are looking for