This discussion is archived
10 Replies Latest reply: Sep 22, 2011 7:31 AM by 889247 RSS

How to control Cursor position

889247 Newbie
Currently Being Moderated
we have one panel where we will give certain criteria and search And when we click search button we a search result And this search result will show a table below the search in another panel If we take the scroll bar to the last record in the table and click on it. That row details will be displayed but the scroll is moving up.
please help me in rectifying this !!

Thanks Regards
yamini
  • 1. Re: How to control Cursor position
    Suresh Karunarathne Guru
    Currently Being Moderated
    Hi..
    Can you set fetchSize attribute 30(if not ok check this value altering for higher values) for table and try..
  • 2. Re: How to control Cursor position
    889247 Newbie
    Currently Being Moderated
    No! it is not working . is there any other way to set the cursor position.
  • 3. Re: How to control Cursor position
    889247 Newbie
    Currently Being Moderated
    No! Fetchsize is not working . please tell me another way
    This is my Fetch size declaration

    <table>

    Edited by: 886244 on Sep 20, 2011 9:46 PM

    Edited by: 886244 on Sep 21, 2011 9:37 PM
  • 4. Re: How to control Cursor position
    Suresh Karunarathne Guru
    Currently Being Moderated
    Hi..
    Can you try as follows
    1.Select table
    2.Select bindings tab in page
    3.Now you can see the iterator for table and change RangeSize to 100(or higher value) and try
  • 5. Re: How to control Cursor position
    889247 Newbie
    Currently Being Moderated
    No. sir it is not working..is there any ways to check issue.
    in fact i tried to set the fetchvalue to -1 , it didn't solving the issue

    Edited by: 886244 on Sep 20, 2011 11:46 PM
  • 6. Re: How to control Cursor position
    Abhijit Dutta Pro
    Currently Being Moderated
    Can you paste the jspx code?

    ~Abhijit
  • 7. Re: How to control Cursor position
    889247 Newbie
    Currently Being Moderated
    which part do i need to paste.

    Edited by: 886244 on Sep 21, 2011 9:41 PM
  • 8. Re: How to control Cursor position
    Abhijit Dutta Pro
    Currently Being Moderated
    Hi,

    I think you need to fix the height of the panel and table.

    by d way you paste the whole code of your jspx page.

    ~Abhijit
  • 9. Re: How to control Cursor position
    889247 Newbie
    Currently Being Moderated
    <?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:trh="http://myfaces.apache.org/trinidad/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core">
    <c:set var="viewcontrollerBundle"
    value="#{adfBundle['com.seds.view.ViewControllerBundle']}"/>
    <af:panelStretchLayout topHeight="30px" bottomHeight="30px" id="contactinfo"
    styleClass="AFStretchWidth" >
    <f:facet name="top">
    <af:panelGroupLayout layout="horizontal" id="pgl10"
    styleClass="AFStretchWidth" halign="center">
    <af:spacer width="400" id="sp1"/>
    <af:panelHeader text="#{viewcontrollerBundle.EXTERNAL_USERS_AND_CONTACTS}"
    id="ph1"></af:panelHeader>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll" id="pgl41">
    <af:panelGroupLayout styleClass="AFStretchWidth"
    id="toppanelGroupLayout">
    <trh:script id="s121">
    function saveFunc(event) {
    var buttonClicked2 = event.getSource().findComponent("::btnSavefunc").toString();
    var btnClickEvent2= buttonClicked2.substring(buttonClicked2.lastIndexOf('=')+1,buttonClicked2.length);
    document.getElementById(btnClickEvent2).click();
    }

    function saveDir(event) {
    var buttonClicked1 = event.getSource().findComponent("::btnSavedir").toString();
    var btnClickEvent1= buttonClicked1.substring(buttonClicked1.lastIndexOf('=')+1,buttonClicked1.length);
    document.getElementById(btnClickEvent1).click();
    }

    function saveinactive(event) {
    var buttonClicked3 = event.getSource().findComponent("::btnInact").toString();
    var btnClickEvent3= buttonClicked3.substring(buttonClicked3.lastIndexOf('=')+1,buttonClicked3.length);
    document.getElementById(btnClickEvent3).click();
    }

    function saveSys(event) {
    var buttonClicked4 = event.getSource().findComponent("::btnSavesys").toString();
    var btnClickEvent4= buttonClicked4.substring(buttonClicked4.lastIndexOf('=')+1,buttonClicked4.length);
    document.getElementById(btnClickEvent4).click();
    }

    function dirNote(event) {
    var value1 = event.getSource().getProperty("cage");
    var value2 = event.getSource().getProperty("noteType");
    var source = event.getSource();
    var params = {
    arg1 : value1, arg2 : value2
    };
    var type = "customEvent";
    var immediate = true;
    AdfCustomEvent.queue(source, type, params, immediate);
    //document.getElementById("contactinfo:btndirnote").click();
    }

    function supNote(event) {
    var value1 = event.getSource().getProperty("cage");
    var value2 = event.getSource().getProperty("noteType");
    var source = event.getSource();
    var params = {
    arg1 : value1, arg2 : value2
    };
    var type = "customEvent";
    var immediate = true;
    AdfCustomEvent.queue(source, type, params, immediate);
    //document.getElementById("contactinfo:btnsupnote").click();
    }

    function showPopup(event) {
    alert("hi this testmessage");
    event.cancel();
    }

    function remColCheck(event) {
    var value = event.getSource().getProperty("cageId");
    var source = event.getSource();
    var params = {
    arg : value
    };
    var type = "customEvent";
    var immediate = true;
    AdfCustomEvent.queue(source, type, params, immediate);
    }

    function clickHis(event) {
    var buttonClicked5 = event.getSource().findComponent("::btnHisdir").toString();
    var btnClickEvent5= buttonClicked5.substring(buttonClicked5.lastIndexOf('=')+1,buttonClicked5.length);
    document.getElementById(btnClickEvent5).click();
    }

    function clickFHis(event) {
    var buttonClicked6 = event.getSource().findComponent("::btnFHisdir").toString();
    var btnClickEvent6= buttonClicked6.substring(buttonClicked6.lastIndexOf('=')+1,buttonClicked6.length);
    document.getElementById(btnClickEvent6).click();
    }

    function clickSyHis(event) {
    var buttonClicked7 = event.getSource().findComponent("::btnSyHisdir").toString();
    var btnClickEvent7= buttonClicked7.substring(buttonClicked7.lastIndexOf('=')+1,buttonClicked7.length);
    document.getElementById(btnClickEvent7).click();
    }

    </trh:script>
    <trh:script id="clickSearchbtn">
    function button_click(event) {
    if (event.getKeyCode() == AdfKeyStroke.ENTER_KEY) {
    var buttonClicked = event.getSource().findComponent("searchBtn").toString();
    var btnClickEvent= buttonClicked.substring(buttonClicked.lastIndexOf('=')+1,buttonClicked.length);
    document.getElementById(btnClickEvent).click();
    }
    }
    </trh:script>
    <af:spacer height="7" id="s1"/>
    <af:panelGroupLayout layout="horizontal" styleClass="AFStretchWidth"
    valign="top" id="pgl42">
    <af:panelBox disclosed="true" styleClass="AFStretchWidth"
    id="sdlExpand">
    <af:panelGroupLayout layout="horizontal"
    styleClass="AFStretchWidth" id="pgl60">
    <af:spacer width="10" id="s117"/>
    <af:panelGroupLayout layout="vertical" inlineStyle="width:400px"
    id="pgl40">
    <af:panelGroupLayout inlineStyle="width:400px"
    id="srchpanelGroupLayout"
    layout="horizontal">
    <af:spacer height="7" id="s113"/>
    <af:outputLabel value="Name:" styleClass="AFScreenLabel"
    id="nameLbl"
    inlineStyle="font-weight:bold;"/>
    <af:spacer width="71" height="10" id="sprpName"/>
    <af:inputText value="#{bindings.pName.inputValue}"
    simple="true" autoSubmit="true" immediate="true"
    required="#{bindings.pName.hints.mandatory}"
    columns="70" maximumLength="25"
    shortDesc="#{bindings.pName.hints.tooltip}"
    binding="#{pageFlowScope.contactInfo.inputName}"
    inlineStyle="color:rgb(0,0,82); font-family:Arial; font-weight:bold;"
    id="inputName">
    <af:autoSuggestBehavior maxSuggestedItems="-1"
    suggestItems="#{pageFlowScope.contactInfo.nameSuggestItems}"/>
    <!--<af:autoSuggestBehavior maxSuggestedItems="-1"
    suggestItems="#{pageFlowScope.contactInfo.fnameSuggestItems}"/>-->
    <af:clientListener method="button_click" type="keyPress"/>
    <f:validator binding="#{bindings.pName.validator}"/>
    </af:inputText>
    </af:panelGroupLayout>
    <af:spacer height="5" id="s4"/>
    <af:panelGroupLayout inlineStyle="width:405px"
    id="srchpanelGroupLayout1"
    layout="horizontal">
    <af:outputLabel value="Company Name:"
    inlineStyle="font-weight:bold;"
    styleClass="AFScreenLabel" id="cmpNameLbl"/>
    <af:spacer width="9" id="sprpCmpName"/>
    <af:inputText value="#{bindings.pCmpName.inputValue}"
    simple="true" partialTriggers="socParent"
    required="#{bindings.pCmpName.hints.mandatory}"
    columns="50" maximumLength="25"
    shortDesc="#{bindings.pCmpName.hints.tooltip}"
    binding="#{pageFlowScope.contactInfo.cmpName}"
    inlineStyle="color:rgb(0,0,82); font-family:Arial; font-weight:bold;"
    id="cmpName">
    <af:autoSuggestBehavior maxSuggestedItems="-1"
    suggestItems="#{pageFlowScope.contactInfo.companySuggestItems}"/>
    <af:clientListener method="button_click" type="keyPress"/>
    <f:validator binding="#{bindings.pCmpName.validator}"/>
    </af:inputText>
    <af:selectOneChoice value="" contentStyle="width:291px"
    visible="false"
    partialTriggers="socParent" id="soc2"
    immediate="true"
    required="#{bindings.pCmpName1.hints.mandatory}"
    shortDesc="#{bindings.pCmpName1.hints.tooltip}"
    binding="#{pageFlowScope.contactInfo.cmpnylist}">
    <f:selectItems value="#{pageFlowScope.contactInfo.listOfItems}"
    id="si2"/>
    <af:clientListener method="button_click" type="keyPress"/>
    </af:selectOneChoice>

    </af:panelGroupLayout>
    <af:spacer height="5" id="s7"/>
    <af:panelGroupLayout id="pgl43" inlineStyle="width:400px"
    layout="horizontal">
    <af:outputLabel value="Parent Company:"
    inlineStyle="font-weight:bold;"
    styleClass="AFScreenLabel" id="parentcmp"/>
    <af:spacer width="3" id="s118"/>
    <af:selectOneChoice value="#{bindings.pParentCompany.inputValue}"
    contentStyle="width:276px"
    required="#{bindings.pParentCompany.hints.mandatory}"
    shortDesc="#{bindings.pParentCompany.hints.tooltip}"
    binding="#{pageFlowScope.contactInfo.socParent}"
    id="socParent" autoSubmit="true" valueChangeListener="#{pageFlowScope.contactInfo.companylist}">
    <!--valueChangeListener="#{pageFlowScope.contactInfo.companylist}"-->
    <f:selectItems value="#{bindings.pParentCompany.items}"
    binding="#{pageFlowScope.contactInfo.selectItems1}"
    id="selectItems1"/>
    <af:clientListener method="button_click" type="keyPress"/>
    </af:selectOneChoice>
    <af:spacer width="10" id="s138"/>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    <af:spacer width="30" id="s139"/>
    <af:panelGroupLayout layout="vertical"
    styleClass="AFStretchWidth" id="pgl61">
    <af:panelGroupLayout layout="horizontal"
    inlineStyle="width:300px" id="pgl62">
    <af:spacer width="70" height="10" id="s2"/>
    <af:outputLabel value="BEMS Id:" styleClass="AFScreenLabel"
    inlineStyle="font-weight:bold;"
    id="bemsIdLbl"/>
    <af:spacer width="10" id="s140"/>
    <af:inputText value="#{bindings.pBemsid.inputValue}"
    simple="true" autoSubmit="true" immediate="true"
    required="#{bindings.pBemsid.hints.mandatory}"
    columns="15" maximumLength="8"
    shortDesc="#{bindings.pBemsid.hints.tooltip}"
    binding="#{pageFlowScope.contactInfo.bemsId}"
    inlineStyle="color:rgb(0,0,82); font-family:Arial; font-weight:bold;"
    id="bemsId">
    <af:autoSuggestBehavior maxSuggestedItems="-1"
    suggestItems="#{pageFlowScope.contactInfo.bemsidSuggestItems}"/>
    <af:clientListener method="button_click" type="keyPress"/>
    <f:validator binding="#{bindings.pBemsid.validator}"/>
    </af:inputText>
    </af:panelGroupLayout>
    <af:spacer height="5" id="s141"/>
    <af:panelGroupLayout layout="horizontal"
    inlineStyle="width:300px" id="pgl63">
    <af:spacer width="81" height="10" id="s5"/>
    <af:outputLabel value="CAGE:" styleClass="AFScreenLabel"
    inlineStyle="font-weight:bold;"
    id="cageLbl"/>
    <af:spacer width="15" id="s142"/>
    <af:inputText value="#{bindings.pCage.inputValue}"
    simple="true"
    required="#{bindings.pCage.hints.mandatory}"
    columns="15" maximumLength="5"
    shortDesc="#{bindings.pCage.hints.tooltip}"
    binding="#{pageFlowScope.contactInfo.cage}"
    inlineStyle="color:rgb(0,0,82); font-family:Arial; font-weight:bold;"
    id="cage">
    <af:autoSuggestBehavior maxSuggestedItems="-1"
    suggestItems="#{pageFlowScope.contactInfo.cageSuggestItems}"/>
    <af:clientListener method="button_click" type="keyPress"/>
    <f:validator binding="#{bindings.pCage.validator}"/>
    </af:inputText>
    </af:panelGroupLayout>
    <af:spacer height="5" id="s143"/>
    <af:panelGroupLayout layout="horizontal"
    inlineStyle="width:200px" id="pgl64">
    <af:outputLabel value="Include Inactive Status:"
    inlineStyle="font-weight:bold;"
    styleClass="AFScreenLabel" id="status"/>
    <af:selectBooleanCheckbox value="#{bindings.pActiveind.inputValue}"
    shortDesc="#{bindings.pActiveind.hints.tooltip}"
    binding="#{pageFlowScope.contactInfo.activeStatus}"
    inlineStyle="color:rgb(0,0,82); font-family:Arial; font-weight:bold;"
    id="activeStatus" autoSubmit="true"
    immediate="true"/>
    <af:spacer width="8" id="s144"/>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    <af:spacer width="80" id="s145"/>
    <af:panelGroupLayout layout="vertical" id="pgl65">
    <af:commandButton text="Search" partialSubmit="true"
    binding="#{pageFlowScope.contactInfo.searchBtn}"
    id="searchBtn"
    action="#{pageFlowScope.contactInfo.searchAction}"
    disabled="false"
    partialTriggers="srchResultTbl"
    inlineStyle="width:120px; font-weight:bold;"/>
    <af:spacer height="5" id="s114"/>
    <af:commandButton text="Clear" id="clearBtn"
    action="#{pageFlowScope.contactInfo.clearSearchInputParams}"
    binding="#{pageFlowScope.contactInfo.clearBtn}"
    inlineStyle="width:120px; font-weight:bold;"/>
    <af:spacer height="5" id="s116"/>
    <af:outputText value="****" inlineStyle="color:Window;"
    id="ot11"/>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </af:panelBox>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    <af:panelGroupLayout id="messagePGL" layout="horizontal"
    partialTriggers="searchBtn clearBtn "
    styleClass="AFStretchWidth"
    binding="#{pageFlowScope.contactInfo.messagePGL}">
    <af:spacer width="5" id="msgId"/>
    <af:outputLabel id="disMsg"
    value="#{pageFlowScope.contactInfo.displayMsg}"
    inlineStyle="color:Red;"/>
    </af:panelGroupLayout>
    <af:panelGroupLayout binding="#{pageFlowScope.contactInfo.srchResltpanelGroupLayout}"
    visible="true" layout="scroll"
    id="srchResltpanelGroupLayout"
    partialTriggers="searchBtn clearBtn">
    <af:panelGroupLayout id="pgl39">
    <trh:script id="s8">
    showDialog = function (event) {
    var dialog = event.getSource().findComponent("customPopup");
    dialog.show();
    }
    </trh:script>
    <trh:script id="s9">
    closeDialog = function (event) {
    var dialog = event.getSource().findComponent("customPopup");
    if (dialog.isPopupVisible() == true) {
    dialog.hide();
    }
    }
    </trh:script>
    <trh:script id="s10">
    Dialog = function showSaveConformation(event) {
    var popup = event.getSource().findComponent("conform");
    alert(popup);
    popup.show();
    }
    </trh:script>
    <trh:script id="s11">
    ConformDialog = function (event) {
    var dialog = event.getSource().findComponent("conform");
    dialog.show();
    }
    </trh:script>
    <trh:script id="s12">
    AlertDialog = function showAlertConformation(event) {
    var popup = event.getSource().findComponent("Alert");
    alert(popup);
    popup.show();
    }
    </trh:script>
    <trh:script id="s13">
    showroleNote = function (event) {
    var dialog = event.getSource().findComponent("rolePopup");
    dialog.show();
    }
    </trh:script>
  • 10. Re: How to control Cursor position
    889247 Newbie
    Currently Being Moderated
    <>

    Edited by: 886244 on Sep 22, 2011 7:31 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points