Unable to capture the submit button event in OAF

Hi
I am facing a problem extending the NavigationCO controller on "/oracle/apps/per/selfservice/review/webui/ReviewPG". I just want to throw some exception when the user clicks the submit button in the PFR. I have used the following code but i did not find any solution. Can anyone help me out in this issue. When i used the first method its displaying some error on submitting the page but where as in the second method its commiting the data instead of throwing an exception.
I tried the following methods:
public class XXXNavigationCO extends NavigationCO {
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
if (pageContext.getParameter("HrSubmit") != null)
super.processFormRequest(pageContext, webBean);
pageContext.forwardImmediatelyToCurrentPage(null,true, "Y");
throw new OAException("Test Message");
else{
super.processFormRequest(pageContext, webBean);
2.
public class XXXNavigationCO extends NavigationCO {
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
if ("HrSubmit".equals(pageContext.getParameter(EVENT_PARAM)))
throw new OAException("gsgfshghjgashfa");
super.processFormRequest(pageContext, webBean);
}

Hi Gaurav,
Thanks for the repsonse. I tried the same code but its not throwing the exception its directly launching me the confirmation page. Actaully the controller is redirecting to confirmation page on submit. But now i want to check some condition on submit and throw an exception if the condition is not satisfied. If the condition is satisfied i want the seeded controller action to take place.
I tried using "pageContext.forwardImmediatelyToCurrentPage" and "pageContext.forwardURLToCurrentPage" but i did not achieve success in it.
If the above mentioned "pageContext.forwardURLToCurrentPage" is right could you please give me an example to get thjis resolved.

Similar Messages

  • How to capture the PrintScreen button event in keyboard

    Hi
    The JPanel consists of all components , and finally the panel is added to the JFrame.The problem is to avoid the user by capturing the page through "PrintScreen" button in the keyboard.
    Thank u .

    Hi,
    I believe that you must use JNI to access .dll to do that... you can not use any keyListeners for that!!!
    JRG

  • How to trap Submit button event in OAF

    Hello,
    I'm doing controller extension for create account button in Customer UI.
    Issue: I'm not able to trap the table action to add extra validation logic.
    I tried to use pageContext.getParameters("CreateButton") but it didn't work i.e. debug message was not printed written inside if statement.
    Button Structure:
    TableAction
    Flowlayout
    Submit button.
    Code:
    public void processFormRequest(OAPageContext pageContext,
                                       OAWebBean webBean) {
            //super.processFormRequest(pageContext, webBean);
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            ArrayList exceptions = new ArrayList();
            OAFlowLayoutBean oaflowlaybean =
                (OAFlowLayoutBean)webBean.findChildRecursive("TableActionsRN");
            OASubmitButtonBean vbuttonBean =
                (OASubmitButtonBean)oaflowlaybean.findChildRecursive("CreateButton");
            String buttonId = vbuttonBean.getID();
            String buttonId12 = vbuttonBean.getName();
            String asd=vbuttonBean.getEvent();
            String s = pageContext.getParameter(EVENT_PARAM);
            String s1 = pageContext.getParameter(vbuttonBean.getName());
                if (s.equalsIgnoreCase("CreateAccount")) {
                OAViewObject vo =
                    (OAViewObject)am.findViewObject("HzPuiAccountTableVO");
                if (vo != null) {
                    pageContext.writeDiagnostics("Jai-1", "VO Found", 1);
                    OARow row = (OARow)vo.getCurrentRow();
                    if (row != null) {
                        pageContext.writeDiagnostics("Jai-2", "Row Found", 1);
                        String partyid =
                            (String)row.getAttribute("PartyId").toString();
                        pageContext.writeDiagnostics("Jai-3", "PartyId" + partyid,
                                                     1);
                        int PartyNum = Integer.parseInt(partyid);
                        String partyacctcnt = null;
                        try {
                            OracleConnection conn =
                                (OracleConnection)pageContext.getApplicationModule(webBean).getOADBTransaction().getJdbcConnection();
                            pageContext.writeDiagnostics("Jai-4", "Inside Try", 1);
                            String query =
                                "SELECT count(1) lcount  FROM HZ_CUST_ACCOUNTS WHERE party_id=:1";
                            PreparedStatement stmt = conn.prepareStatement(query);
                            stmt.setInt(1, PartyNum);
                            ResultSet resultset = (ResultSet)stmt.executeQuery();
                            if (resultset.next()) {
                                pageContext.writeDiagnostics("Jai-5",
                                                             "Inside Result Next",
                                                             1);
                                partyacctcnt = resultset.getString("lcount");
                            stmt.close();
                        } catch (SQLException sqlexception) {
                            throw OAException.wrapperException(sqlexception);
                        int i = Integer.parseInt(partyacctcnt);
                        /*   String HoldFlag = (String)row.getAttribute("Attribute11");
                        // Check Hold Flag: "Y" then restrict to create new account
                        if (HoldFlag == "Y") {
                            pageContext.writeDiagnostics("Jai", "Inside Hold Flag", 1);
                            exceptions.add(new OAException("XXGCO",
                                                           "XXTCO_CREDIT_LIMIT_CHECK",
                                                           null, OAException.ERROR,
                                                           null));
                        // One Party-One Account: Greater or Equal to 1 then throw error mesaage
                        if (i > 1) {
                            pageContext.writeDiagnostics("Jai-6",
                                                         "Inside Account Check",
                                                         1);
                            exceptions.add(new OAException("XXGCO",
                                                           "XXTCO_CREDIT_LIMIT_CHECK",
                                                           null, OAException.ERROR,
                                                           null));
                        if (exceptions.size() > 0) {
                            pageContext.writeDiagnostics("Jai-7",
                                                         "Inside Exceptioon calling",
                                                         10);
                            OAException.raiseBundledOAException(exceptions);
                        } else {
                            pageContext.writeDiagnostics("Jai-8",
                                                         "Inside else Exceptioon calling",
                                                         10);
                           // super.initParametersPFR(pageContext,webBean);
                            vbuttonBean.setFireActionForSubmit(null, null, null, false);
                            super.processFormRequest(pageContext, webBean);
    Please suggest the how to overcome with above mention issue.

    Hi Kiranmai,
    You can capture the event of the radio button in the following way in oninputprocessing.
    DATA: event             TYPE REF TO if_htmlb_data,
                   radioButton_event TYPE REF TO CL_HTMLB_EVENT_RADIOBUTTON.
             event = cl_htmlb_manager=>get_event( request ).
             IF event IS NOT INITIAL AND event->event_name = htmlb_events=>radiobutton.
               radioButton_event ?= event.
               ENDIF.
    you can get the attributes of clicked radio button in
    event->event_class
    event->event_id.
    event->event_name
    event->event_type
    event->event_server_name
    In layout define the radio button as
    <htmlb:radioButtonGroup   id          = "test_id">
            <htmlb:radioButton      id          = "id_red"   text = "Red"               onClick="myClick" />
            <htmlb:radioButton      id          = "id_blue"  text = "Blue"          onClientClick="alert('blue clicked')"/>
            <htmlb:radioButton      id          = "id_green" text = "Green"      onClick="myClick" onClientClick="alert('green clicked')"/>
          </htmlb:radioButtonGroup>
    Hope this will solve your problem.
    Donot forget to assign points for helpful answers.
    Regards
    Aashish Garg

  • 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

  • Is it possible to make 9.0 Pro work correctly using the "submit button?"

    At one time, I was able to use the submit button after I enabled the Reader option. Today, however, using Acrobat 9.0 Pro, I am unable to get the submit button to work using the PDF option. I keep getting the message "Acrobat unable to connect to your email program." The syntax I'm using is mailto:[email protected] Any clues out there? Thanks for your replies.

    This is an e-mail configuration issue on the client machine in most cases, not a PDF issue. In the past, you had to be set for MAPI mail service. This has changed with newer systems and versions of Acrobat, but it still seems to give folks problems. In any case, be sure you have a default e-mail package defined for Windows and check the configuration.

  • I've set up an event and published it, but it won't allow for registrations.  The SUBMIT button is grayed out.  Thoughts?

    I've set up an event and published it, but it won't allow for registrations.  The SUBMIT button is grayed out.  Thoughts?

    The submit button is greyed out in case the registration page is being viewed in preview mode.
    Please check if the following string is present in the event registration URL:
    "preview=true"
    If it is present, please try by removing this string.
    Thanks,
    -Nitin

  • Unable to capture the adf table column sort icons using open script tool

    Hi All,
    I am new to OATS and I am trying to create script for testing ADF application using open script tool. I face issues in recording two events.
    1. I am unable to record the event of clicking adf table column sort icons that exist on the column header. I tried to use the capture tool, but that couldn't help me.
    2. The second issue is I am unable to capture the panel header text. The component can be identified but I was not able to identify the supporting attribute for the header text.

    Hi keerthi,
    1. I have pasted the code for the first issue
    web
                             .button(
                                       122,
                                       "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1824fhkchs_6']/web:form[@id='pt1:_UISform1' or @name='pt1:_UISform1' or @index='0']/web:button[@id='pt1:MA:0:n1:1:pt1:qryId1::search' or @value='Search' or @index='3']")
                             .click();
                        adf
                        .table(
                                  "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1c9nk1ryzv_6']/web:ADFTable[@absoluteLocator='pt1:MA:n1:pt1:pnlcltn:resId1']")
                        .columnSort("Ascending", "Name" );
         }

  • Can't get the Submit button to work on Acrobat X

    I was having this problem on Acrobat 9 and so I bit the bullet and upgraded, hoping the problem would go away, but it did not.
    I have a simple form for an event which recipients will fill out and submit, emailing the entirePDF to others (not to me)
    I've done these forms a zillion times, no problemo, but this is the first time I've tried since upgrading from Entourage email to Outlook, and I have a sneaking suspicion the problem lies there somehow.
    Can install the button, all fine, but when I click it to test, I get this message:
    "An error occured while trying to create a mail document. Acrobat is unable to complete your request."
    Anybody know what I can do to fix this?
    signed,
    Desperate

    I gave up on the 'Submit' button long ago, as have others, I suspect.
    It fails in about half of the cases.
    Now I place a note at the top of the form instructing users how to manually attach the form to an email in case the button doesn't work – it's ridiculous. Thinking about it, it would be more clean-cut to get rid of the button alltogether.
    I also keep getting requests to provide forms as Word documents instead. Apparently people are way more comfortable with Word than willing to deal with idiosyncrasies in PDFs.

  • Unable to capture startup and shutdown event of Photoshop in automation Plugin.

    Hi,
    I am creating an automation plugin and I want to register some events. I have seen listener plugin sample to register event in startup and unregister event in shutdown. I have used same code in my plugin but I am unable to capture the startup nad shutdown event of Photoshop. On clicking the menu item of my plugin the calls come inside the AutoPluginMain but during the startup or shutdown of plugin, the calls does not come inside the AutoPluginMain.
    I am unable to detect the cause of the problem. Can someone please giude me??
    Thanks in advance.

    Hi Tom,
    Thanks for the suggestion.
    Yes, I am working on Windows. As you suggested, I compiled .rc file but the compile option for .r file was disabled. After compiling the .rc file, I again rebuild the complete project and tested my build. But still I was not able to achive the desired result.
    Any other thing that I need to do to make it work?
    Thanks

  • Unable to capture the Citrix network response time using OATS Load testing.

    Unable to capture the Citrix network response time using OATS Load testing. Here is the scenario " in our project users logs into Citrix network and select the Hyperion application and does the Transaction and the Clients wants us to simulate the same scenario for load testing. We have scripted starting from Citrix Login and then launching Hyperion application. But the time taken to launch the Hyperion Application from Citrix network has not been captured whereas Hyperion Transaction time have been recorded. Can any help to resolve this issue ASAP?

    Hi keerthi,
    1. I have pasted the code for the first issue
    web
                             .button(
                                       122,
                                       "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1824fhkchs_6']/web:form[@id='pt1:_UISform1' or @name='pt1:_UISform1' or @index='0']/web:button[@id='pt1:MA:0:n1:1:pt1:qryId1::search' or @value='Search' or @index='3']")
                             .click();
                        adf
                        .table(
                                  "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1c9nk1ryzv_6']/web:ADFTable[@absoluteLocator='pt1:MA:n1:pt1:pnlcltn:resId1']")
                        .columnSort("Ascending", "Name" );
         }

  • Hide the submit button programatically

    Hi Friends,
    i have standard page , in that, submit button is rendering programatically,i want to hide that submit button. do i need to extend standard controller to hide the submit button? here below code i have to hide the Activate button. can any one give guide to achive this solution.
    standard controller process request code....
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processRequest(oapagecontext, oawebbean);
    NegotiationCreationAM negotiationcreationam = (NegotiationCreationAM)oapagecontext.getApplicationModule(oawebbean);
    String s = getCurrentStepCode(oapagecontext, oawebbean);
    if(oapagecontext.isLoggingEnabled(1))
    oapagecontext.writeDiagnostics(getClass().getName() + ".processRequest ", " currentStepCode " + s, 1);
    mIsReviewPage = "Review".equals(s);
    mIsItemDetailPage = "ItemDetail".equals(s);
    mIsHeaderPage = "Header".equals(s);
    mIsViewNetChangesPage = "ViewNetChanges".equals(s);
    mIsUpdatePfValuesPage = "UpdatePfValues".equals(s);
    if(!negotiationcreationam.isTemplate() || negotiationcreationam.isTemplate() && !mIsReviewPage)
    OAWebBean oawebbean1 = oawebbean.findChildRecursive("SaveTemplateBtn");
    oawebbean1.setRendered(false);
    OAWebBean oawebbean8 = oawebbean.findChildRecursive("Activate");
    oawebbean8.setRendered(false);
    if(negotiationcreationam.isTemplate())
    OAWebBean oawebbean2 = oawebbean.findChildRecursive("SaveBtn");
    oawebbean2.setRendered(false);
    if(mIsReviewPage)
    OASubmitButtonBean oasubmitbuttonbean = (OASubmitButtonBean)oawebbean.findChildRecursive("Activate");
    oasubmitbuttonbean.setRendered(true);
    String s1 = null;
    if("ACTIVE".equals(negotiationcreationam.getTemplateStatus()))
    s1 = oapagecontext.getMessage("PON", "PON_TEMP_INACTIVATE", null);
    else
    s1 = oapagecontext.getMessage("PON", "PON_TEMP_ACTIVATE", null);
    oasubmitbuttonbean.setLabel(s1);
    oasubmitbuttonbean.setText(s1);
    if(!mIsHeaderPage || negotiationcreationam.isTemplate())
    OAWebBean oawebbean3 = oawebbean.findChildRecursive("ApplyTemplateBtn");
    oawebbean3.setRendered(false);
    if(!mIsUpdatePfValuesPage)
    OAWebBean oawebbean4 = oawebbean.findChildRecursive("ApplyPfValuesBtn");
    oawebbean4.setRendered(false);
    if(mIsReviewPage)
    setPageBtnsForReviewPage(oapagecontext, oawebbean);
    if(!negotiationcreationam.isTemplate())
    setEditButtons(oapagecontext, oawebbean);
    if(negotiationcreationam.isAmendment() || negotiationcreationam.isMultiRoundDocument())
    OAWebBean oawebbean5 = oawebbean.findChildRecursive("ReviewChangesBtn");
    oawebbean5.setRendered(true);
    if(mIsViewNetChangesPage)
    setPageBtnsForReviewPage(oapagecontext, oawebbean);
    OAWebBean oawebbean6 = oawebbean.findChildRecursive("EditBtn");
    oawebbean6.setRendered(mDocIsEditable);
    OAWebBean oawebbean9 = oawebbean.findChildRecursive("ViewDocumentBtn");
    oawebbean9.setRendered(true);
    OAWebBean oawebbean7 = oawebbean.findChildRecursive("OkBtn");
    oawebbean7.setRendered(mIsItemDetailPage);
    OAWebBean oawebbean10 = oawebbean.findChildRecursive("ReviewBtn");
    oawebbean10.setRendered(!mIsItemDetailPage && !mIsUpdatePfValuesPage && !mIsReviewPage && !mIsViewNetChangesPage);
    if(!mIsItemDetailPage && !mIsUpdatePfValuesPage && !mIsReviewPage && !mIsViewNetChangesPage)
    addSideBar(oapagecontext, s, negotiationcreationam.isTemplate());
    private void setEditButtons(OAPageContext oapagecontext, OAWebBean oawebbean)
    if(oapagecontext.isLoggingEnabled(1))
    oapagecontext.writeDiagnostics(getClass().getName() + ".setEditButtons ", " mDocIsEditable " + mDocIsEditable, 1);
    if(!mDocIsEditable)
    OAWebBean oawebbean1 = oapagecontext.getPageLayoutBean().findChildRecursive("HeaderEditButton");
    oawebbean1.setRendered(false);
    oawebbean1 = oapagecontext.getPageLayoutBean().findChildRecursive("ItemsEditButton");
    oawebbean1.setRendered(false);
    oawebbean1 = oapagecontext.getPageLayoutBean().findChildRecursive("ControlsEditButton");
    oawebbean1.setRendered(false);
    oawebbean1 = oapagecontext.getPageLayoutBean().findChildRecursive("ContractsEditButton");
    if(oawebbean1 != null)
    oawebbean1.setRendered(false);
    oawebbean1 = oapagecontext.getPageLayoutBean().findChildRecursive("SuppliersEditButton");
    oawebbean1.setRendered(false);
    Thanks in advance,
    vamshi

    Vamshi,
    Extending CO would anyways be required in either of the approach. Now let me brief you which approach you can use :
    1) If you need to hide the submit button while rendering of page, based on some logic, you can ahead with your approach extending the CO and in process request get refrence of submitbutton bean and use API, setRendered(false);
    2) If this button needs to be hidden on some logic on a post event on the page i.e. in process form request, its better to have a tranient attribute and a PVO approach u worked on tutorial.
    Apprach 1 can be used in case 2 also but in that case you would have do an extra looping on the page, by redirecting to same page retaining the AM. I hope this helps up to decide the approach.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Completely stumped on the Submit button

    yes, i know this has been asked 20 times, but I've combed through them and still did not find a solution...
    Using WDA & LCD 8.0 in a brand new SAP xRPM implementation - this is the first form we're developing on this landscape. The Submit button works on our other Logistics landscape.
    I have an interactive form with the following properties:
    displayType = native
    enabled = X
    onSubmit Event = ON_SUBMIT
    The Layout = ZCI. I have gone through SFP and clicked on Insert WebDynpro Script as well.
    In my Form I placed a Web Dynpro Native Submit button - its control type = Regular. SAP automatically brought in the code:
    // DO NOT MODIFY THE CODE BEYOND THIS POINT - 800.20070410093956.383622.376748 - SubmitToSAP.xfo
    ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
    // END OF DO NOT MODIFY
    When I click on the button, it seems as if it's not triggering the event in WDA - I have a breakpoint in the Method but it never gets there.
    To make sure the code behind the CLICK is triggering, I put in some javascript to color a text box & it DOES go through the code and color to box however, it seems that there's no communication back to the WDA.
    Any ideas? Could it be a service issue?
    thanks,
    RP.
    Edited by: robert phelan on May 14, 2009 3:29 PM

    From the form editor/Livecycle Designer within the SAP GUI (t-code SFP), go to the very TOP menu (not the Livecycle Designer menu)
    1. Click "Utilities"
    2. Click "Insert Webdynpro Script".
    You will see "ContainerFoundation_JS" added to your form. This allows your ZCI form to react appropriately.

  • How can you ensure all mandatory fields are filled, before pressing the submit button?

    Hi all,
    I've got a complex form with many different pages (17 so far) and I'm using visible/hidden to change the layout so only 1 page appears at a time.
    What I want to do is have a better check for what mandatory fields have not been filled out in my form. The submit buttons checks that all of the mandatory fields have been completed, but if that's 1 field on page 1, searching through my entire document would cause the users to lose the will to live!
    I am after either returning more meaningful information to the user when a submit fails, or being able to run the mandatory check field every time the page changes. I already dynamically set most of the mandatory fields according to what is/isn't visible so adapting my form wouldn't take long but I have no idea how to get it to check if all the fields have been filled in.
    Many thanks,
    Tom

    Right, I have pretty much all of my validations working now... and here's the word you're waiting for... but, I am having a problem with fields that are already visible when the rest of the layout changes.
    Basically, one of the options above the field with the problem is being changed, which makes the layout above that field change. This is triggering the validate event.
    This wouldn't stop anyone using my form, but it is an annoyance.
    Anyone able to help?
    Many thanks,
    Tom

  • Unable to capture the excise duties for intra stocktransfer

    Dear All,
    while doing goods receipt aganist outbound delivery in receiving plant for intracompany(Depo to Depo) unable to capture the excise duties.Please help on this.
    Thanks & regards,
    Bhargav

    Hi Prabhu,
    Excise duties are  are not picking automatically while doing j1ig
    Thanks & Regards,
    Vijaybhaskar

  • Unable to capture the value of vbrk-vbeln value from VF02

    Hi All,
    am printing form from VF02 ,,,once i execute the VF02 , and select Billing Document -> Issue Output to  option .., my printi program gets triggered ,......,
    but in my print program am unable to capture the value of VBRK-VBELN which i have entered in the VF02 tcode..
    any other table the value of  VBELN is stored???
    pls help me out with the alternatives...
    thanks
    john

    Hi Dhiraj
      One doubt how the value is populating in the NAST  in the Print Program . While debugging i'm getting the Values from NAST but i want to know from where NAST is loading with these data.
    Thanks
    Bintu

Maybe you are looking for

  • Exporting Web Report to Excel - SAPBW_DOWNLOAD

    When exporting a web report to excel it uses the embedded SAPBW_DOWNLOAD template. Is it possible to use and assign a seperate template like the one I'm currently using for Workbooks. --KAL

  • Is there a way to check if my music(s) can actually play?

    Hello everyone. I'm planning to buy an iPod Shuffle. This question will decide if I'll buy the iPod Shuffle or wait for iPod nano. My firend who own the iPod shuffle said there's a case when certain .mp3, which is a supported file type, just won't pl

  • Help needed in creating a Customer in SD

    Hi, I am trying to create a customer using the FM  'BAPI_CUSOTMERCREATEFROMDATA1'. Without Providing Reference Customer nbr, i am not able to create. Is there no means to create a customer without giving Reference Customer. All helpful answers will b

  • ISE Guest Portal - Error Resource not found

    Hello, When I create a guest user through the sponsor portal, then try to login with this guest user through the Guest Portal, after I press login button, the following error message occurs and do not know what to do to solve. Error: Resource not fou

  • How to handle Many-to-Many tables

    I have table_1 with a primary key, x I have table_2 with primary key y Table_3 represents the many-to-many relationship between table_1 and table_2, and has a primary key x,y. Okay - so I know how to set up master detail forms for table_1 and for tab