Focus on an Item (based on button click)  in OAF page

Hi,
I am new to OAF. I face an issue in a OAF page. The page has got 'message input text fields', 'Apply' and 'cancel' button. Once the page is rendered , there is no initial focus on any item. If i click on the page or use tab to navigate to a text field , the focus moves to the 'Apply' button (by default). The real problem is, even before entering the details , if i accidentally press the *'ENTER'* key , the apply action is triggered(where the focus relies).
1. I just need to find out why the focus moves to the particular button item , when i click on text box or anywhere in the region.
2. Is there any mouse event mapped to the page or that item ?
3. I don't want that focus to be on any button (when i click in the page region or place the cursor in text box to enter values).
How to achieve this?
Is this can be done using personalization or its has to be looked up in the CO of that page.
Please help me on this.
Thanks and Regards,
Raghav

Hi Gaurav,
Thank you so much for your quick response.That page has got a custom CO which got extended from another main CO . I need to add this code in the processRequest() of the main CO for that particular PG or in this custom CO. Correct me if i am wrong.
Thanks and Regards,
Raghav

Similar Messages

  • Single form Multiple Actions based on button click

    Hi,
    I have to call two different actions based on button click from single <form > .
    How to achive this?.
    Thank you

    Hi,
    I am using struts <html:form> and my code is as follows
    <script language="javascript">
              function setAction(val){
         if(val==A){
                   window.open(document.forms[0].action="preview.do");
         }else if(val==B){
         document.forms[0].action="create.do";
              document.getElementById('fcreate').submit();
    </script>
    <html:form action="/create.do" >
    <html:text property="name">
    </html:form>
    action is mandatory for <html:form>
    Its not sending the form elements, when I click the preview button.
    Create button works fine. In struts-conig, I have taken same form name for create and preview actions
    Please give me some tips
    Thank you

  • Unable to find Submit button in iExpences OAF Page

    Hi Everyone,
    I want to know the functionality behind the submit button of iExpences OAF Page.
    Navigation is
    IExpences - Create Expence report -Review - Submit button.
    button i am unable to find the submit button in personalization.
    Could you any one help on this!!
    Thanks in Advance!!
    With Best Regards

    Check in About this Page, if the Button Name is present.
    Sometimes depending on the condition, there might be a change in the text of the button .. so donot go by the button name ...
    Just check the surrounding fields and try to zero in to a button.
    You can also download the page and CO and check where the button is more clearly.
    To download the page, usr JDR_UTILS package in an anonymous block.
    The CO class file can be downloaded from Unix box and decompiled using a Decompiler.
    Regards
    Srikanth K

  • Problem setting a hidden item value when button clicked with dynamic action or pl/sql process

    Apex 4.1
    Oracle 11g
    I have a page that consists of a main region and several sub regions.  I have a pl/sql process in After Header SET_DISPLAY(:P400_DISPLAY :='MAIN';)
    Three subregions have a contional display where P400_DISPLAY = STORE.  This works in hiding the sub regions.
    Now I want to change the P400_DISPLAY value to STORE to show the subregions when I hit a button.
    I tried creating a dynamic action for on click of the add button but get the following error:
    The selected button uses a 'Button Template' that does not contain the #BUTTON_ID# substitution string
    I went to the templates and found:
    Substitution Strings
    Substitution strings are used within sub templates to reference component values. This report details substitution string usage for this template.
    Substitution String
    Referenced
    From
    Description
    #LINK#
    Yes
    Template
    To be used in an "href" attribute
    #JAVASCRIPT#
    No
    To be used in an "onclick" attribute
    #LABEL#
    Yes
    Template
    Button Label
    #BUTTON_ATTRIBUTES#
    No
    Button Attributes
    #BUTTON_ID#
    No
    Generated button ID will be either the button's Static ID if defined, or if not will be an internally generated ID in the format 'B' || [Internal Button ID]
    I then tried creating a page process, pl/sql, :P400_DISPLAY :='STORE'; when the appropriate button is pressed.  The button action is submit page. However, it does not change the P400_DISPLAY value and the subregions stay hidden.
    Suggestions please on how to fix the template or change the P400_DISPLAY value?

    The root issue is that, although you change the value of your page item, it isn't visible to other areas of the page until it is in the session. So, any other action based on the value of your page item; the visibility of a control, a report based on the item's value, etc. will all be unaffected by changing the value of the page item until it has been changed in the session. Even after this the items are stored in the session, you must thereafter do something to cause the value to be reevaluated. To see the effect of this, observe that your page loads and evaluates the value of your page item, it sees that is "MAIN" and hides the regions. However, it doesn't reevaluate them after this.
    So; your choices to get this value set in the session are to either Submit the page, or use JavaScript to set the value in the session. If you use the latter of these, you'll have to do some further work to cause the visibility tests to be re-run, So, let's stick with with the submit method.
    What you've done above sounds correct for this but, there are a lot of decisions you could have made that might have caused things not to happen in the correct sequence.
    Firstly, let's confirm that what I describe above is your problem. From the development environment, load the page, click the button to change the value and submit. Now, click the link labelled Session. Is it still set to MAIN? If so; this is your issue.
    Let's start with the your After Header computation. Did you set it to *only* run if the current value of your page item is NULL??? If not, that's your problem.
    Load Page -> Item set to 'Main' by Computation -> Click Button -> Item set to STORE -> Submit -> Load Page -> Item set to 'Main' by Computation
    See the problem?
    Assuming this isn't the issue, you created a Branch to the same page, right? What is your process point for the Branch? Is it *After* Validation, Computation etc? Because if not, you aren't changing the value before the submit happens.
    I bet it is the first issue but, take a look at these.
    Cheers,
    -Joe

  • Hide/Show a graph based on button click .

    I have to show a graph based on the values selected in the shuttle . The graph should be drawn only when a button( "Show graph") is clicked . My question is
    1) If the set the button's action to submit, it resets and empties the selected values in the shuttle . How do I prevent that ?
    2) How do I make the graph appear and disappear based on the button click ( Like a toggle button ) ?
    3) As I can draw the graph only from the values selected in the shuttle , the query parsing fails . However , the graph displays when the shuttle get populated with selected values . Is there a way to get around that .
    Thanks for your help .

    There is nothing wrong with your code, so I'd look elsewhere for the problem. Is this a direct copy of what you have on your page?
    :P1_COMBO1 in ('Option 1', 'Option 2')
    And
    :P1_COMBO2 = 'Option Combo 2'And the page item values are exactly as you have in the quoted strings? You might run the page in debug and confirm the page item values are exact.
    Edited by: Bob37 on Dec 6, 2011 2:18 PM

  • How to capture Button Click in OAF

    Hi All,
    I have created a button "TestButton" using personalization. On the click of this button, a new page "TestPG" opens. But i have to pass a few parameters from the old page to the new page. How do i capture this button click event in the CO so that i can use the pageContext.forwardImmediately method to pass the parameters?
    Also, what is the difference between a Button and a SubmitButton?
    Regards,
    Shreyas

    I never tried this... But can suggest you something.....
    Create a Upload type of item in your region, which will allow you to browse your Image file.
    Attach a VO attribute which will be based on EO. VO attibute will be based on Databse column of BLOB type, which will store the image in DB.
    If you want to transfer this file to application server's any directory, you can do that also.
    But above is solution to your problem..

  • How to open a Filechooser on a button click from jsp page

    can anyone tell me how to open a Filechooser on a button click from a jsp page.
    Thanks

    <input type="file" name="myfile">

  • How to hide / unhide text baxes on button click in JSF page using javascrip

    Hi,,
    I want to hide/unhide text boxes on a button click.
    How to do it in .jspx page using javascript.

    Hi,
    refer this
    <?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">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" title="#{lcRes['page.title']}">
         <af:resource type="javascript">
            function hide(evt){
                evt.findComponent('itToHide').setVisible(true);
         </af:resource>
          <af:form id="f1">
            <af:commandButton partialSubmit="true" id="cb1">
                <af:clientListener method="hide" type="action"/>
            </af:commandButton>
            <af:inputText id="itToHide" value="xx" label="this will hide" clientComponent="true"/>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>

  • Error thrown when a link is clicked in OAF page

    Hi all experts,
    In OAF, based on a query, i am populating the rows in table.
    One of the columns is made as a link to a standard OAF page. The link is given below.
    Link 1: OA.jsp?OAFunc=PO_ORDER&PoHeaderId={@PoHeaderId}&PoReleaseId=&retainAM=Y&addBreadCrumb=Y
    When i click on that link its showing the following error :-
    *"You have insufficient privileges for the current operation. Please contact your System Administrator"*
    But instead of that if i give the following link (Link 2, after making a slight modification to Link 1). I am getting a page somewhat similar to the desired page. But is showing some unwanted data also.
    Link 2: OA.jsp?OAFunc=POS_VIEW_ORDER&PoHeaderId={@PoHeaderId}&PoReleaseId=&retainAM=Y&addBreadCrumb=Y
    Can someone help me to make out the problem with the first link.
    I need to use Link 1 only in my page.
    Regards,
    Joe

    Hi Joe,
    Through System Administrator :--
    Function --> Menu --> Responsibility --> User
    Attach this function to current user.
    It will work!
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                               

  • Show/ Hide region based on button click

    Hi,
    I have two report regions. When I press generate report button then, one region has to be displayed.
    I have an item "select list with submit " and if select some value from the LOV in the select list then the second region has to be displayed. Over all only one region has to be displayed at a time.
    Thanks in advance.

    See this thread for a possible answer: Hide/Show Region With Javascript
    Thank you,
    Tony Miller
    Webster, TX

  • How to auto fetch the value of item based on remaining columns in same page

    Hi,
    i have 7 items in a same form
    like employee name,employee number ,department,designation,email address and contact address
    if i entered employee number means i need to automatically display the corresponding employee details in other columns
    Please reply asap.............
    Regards,
    Kani

    Hi Scott,
    I got the solution but i assigned the default values for weight,courier charge,packing charge,other charges  and net charges to ZERO...
    and page items to be submited--weight,courier charge,packing charge,other charge..
    If i gave --page items to be submited--weight,courier charge--net charge ll be display with out assigning default values(ZERO) for any item..fr tat wat i have to do...
    Thanks,
    Kani

  • Confirm message to be displayed on the button click of the page

    Hi all
    I have a page with a button and some conditions on the button , now I want to display a pop-up message like a "Confirm message " , "Would you like to perform this action ?" , before that conditions are satisfied .. I am new to javascript and not sure of how to go about this .... can anyone has any ideas please !
    Would appreciate your response.
    thanks
    r

    Hi,
    In Apex 4 there is documented JavaScript function apex.confirm.
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm#CHDGHCBE
    Change your button action to be "Redirect to URL" and enter to URL Target
    javascript:apex.confirm('Submit data ?', 'SUBMIT');Change text and request according your needs
    Regards,
    Jari

  • Programatically Created Button Placement on OAF Page

    Hi,
    I created a submit button using the below code. But it was placed below the page. I have 3 buttons on the page. How Can I keep this new button next to these buttons. Please let me know.
    Thanks,
    HP.
    OASubmitButtonBean oasb= (OASubmitButtonBean)paramOAPageContext.getWebBeanFactory().createWebBean(paramOAPageContext,"BUTTON_SUBMIT");
         oasb.setID("custPrintPOButton");
         oasb.setUINodeName("custPrintPOButton");
         oasb.setEvent("custPrintPOButton");
         oasb.setText("Print PO");
         paramOAWebBean.addIndexedChild(oasb);
    Edited by: user1147940 on Sep 19, 2010 7:53 PM

    Is this a custom page. If yes check the page in Jdeveloper here you can find that the page has item of Type PageButtonBar in that you can find your submit button as mentioned by you.
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How Can I disable Button from Button Bar on OAF page

    Hi Everyone,
    We have a requirement like, in button bar I need to hide one button.
    I worked on personalization but there is a option to hide entire button bar, not single button.
    If I extend controller, how can I proceed , please provide steps.
    or
    please provide how can i achieve this??????
    Thanks,
    Rakesh

    Hi,
    If your issue has been resolved than please close the thread so that it can be helpful for others as people may search with answered threads.
    --Sushant                                                                                                                                                                                                                                                                                                                                   

  • Invoke Event Recievers on button click

    Hi all,
    I Have an Event Reciever which updated a column of the list whose name is specified,
    I have an Webpart with ListName(Txt Box) and a Button Control,
    On click of which the Event Reciever that I have created should be invoked on the ListName Given in the Txt Box.
    How can I do this, plz help
    Thanks in advance

    Hi,
    Now If i am correct then you just want to activate an EventReciever on click of button on a Page using Object Model code and you have your Event Reciever already deployed and register in Global Assembly Cache.
    To do this just add this code on the button click event on page.
    using (SPSite site = new SPSite(SPContext.Current.Web.Url))
    using (web = site.OpenWeb())
    SPList list = web.Lists["ListName"];
    if (list != null)
    string className = "YourClassNameSpace.YourClass";
    string asmName = "NameOftheAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken={PublicKeyToken}";
    web.AllowUnsafeUpdates = true;
    //add the added/updated/deleted events to the list.
    list.EventReceivers.Add(SPEventReceiverType.ItemAdded, asmName, className);
    list.EventReceivers.Add(SPEventReceiverType.ItemUpdated, asmName, className);
    list.EventReceivers.Add(SPEventReceiverType.ItemDeleted, asmName, className);
    list.Update();
    Mark as Answer if helped!! To be or Not to Be..The question is this only......

Maybe you are looking for

  • Swf file works but not html when preview and publish

    hi, i made a simple nav bar with a dropdown menu it works fine in flash mode and preview but when i try to embed into html it only show the nav bar but not the dropdown menu. please advice. thanks in advance!

  • How can I delete the Index and Search features in a RoboHelp 9 project?

    I have a RoboHelp 9 project in which the user does not want the Index. The only way I could delete it was to click on the Delete button for each entry until the Index was blank. So that worked. Only problem is that it created a mess of the Search fea

  • 2 different computers??

    For xmas I got a nano and set it up on my computer at home. Now that I'm back at school, can I hook it up to my computer here without losing all of the songs on it from my home computer? Any help would be much appreciated

  • FCC information for the iPhone 4

    Can someone who understands the information in the iPhone 4 user documentation about compliance with FCC regulations tell me if it says anything useful about RF interference?  My phone seems to be interfering (causing static noise) with at least some

  • Field type not showing correctly

    Hi everyone, I am using a spreadsheet to report on but for some reason the columns are showing in CR as String(255) instead of Number.  I have double checked the spreadsheet format and they seem to be in the number format.  Any ideas what's happening