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

Similar Messages

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

  • 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

  • How can a new button Event open sales order

    CRM WEB UI issue.
    On assignment Block there is a New button , on New button Event i have to open sales order .
    Please help me.
    Thanks in advance .
    Kumar6

    Hi Kumar,
    Whenever you got any requirement then find out on Web UI how they have done it. As now you want to show sales order then first find out Component name for Sales order.
    So Go to transaction u2018CRM_UIu2019. Chose u2018SalesProu2019 as a Role.  In Navigation Bar click on u2018Sales Cycleu2019  and in Second level link there is u2018Sales Orderu2019. Click on it. Check  it is a screen you want on your button click.
    If yes then you need to find its Technical Data (details). So click inside Work Area and press u2018F2u2019 key.
    Then you will get UI component name, View name , Context name, Role key, etc. So you have to pick that UI Component name and give it in Transaction Code  u2018CMP_WD_BSPWBu2019.
    Now Go To  u2018Run Time Repositoryu2019 , In Component Interface They have created u2018Component Interfaceu2019 that you need to call in your Button click event. If you donu2019t know use of u2018Component Interfaceu2019 then first read it else its good for you.
    Well next time when you will write any Question, In Subject write it in One line so that all can see in list and answer you quickly.
    Thanks,
    Durgesh Pagar.

  • How to get submit button to work after posting form to website?

    I have created a pdf fillable form with a submit button so that the form can sent to me via email.  The submit button does not work once the form has been posted to our website.  How do I get it to work?

    Hi,
    The form was created in Adobe Acrobat Pro XI.  It was saved Protected to Restrict Editing.  The submit button was formatted with URL mailto:[email protected] and Export format PDF the complete document.  Once posted onto our website when you click on the submit button nothing happens.

  • 10.1.3 ADF -- How to prevent "submit" button submits data?

    Hi,
    In an Edit JSP page, there are several inputText fields that the users can modify data. And a "submit" button they can click when they are done with modification. I also add a validator for a inputText field to check whether the input is valid.
    When the users click "submit", I can see the error msg on top of the page if the data is invalid. Because I change the navigation string to "null" if the input is invalid, the page does not get forwarded. But here comes the problem, if I cancel this page and navigate to the next, I see the invalid data I just input.
    In another word, even with the validator and error msg, the data still gets submitted to the database.
    I haven't registered the validator in the face-config.xml. Will that help solve the problem? Any other idea? Any help is appreciated.
    Annie

    Hi Annie,
    If the input is invalid the current page is redisplayed by default.
    if you want to cancel this page and want to go to another page without
    displaying error messages, specify immediate="true" attribute
    with cancel button.
    Shakir

  • Modify User (OIM 11gR2 PS1): How to enable "submit" button for custom udf fields?

    I made some new attributes following oracle documentation for create user, modify user, and view user details forms. create user and view user details are working fine, but I'm not being able to copy/paste the following code in custom modify user attributes to enable the submit button for modify user form change: #{pageFlowScope.cartDetailStateBean.attributeValueChangedListener} . Any ideas? Thanks.

    Export the sandbox and edit userModifyForm.jsff to set value change listener property for the new attribute as below
    valueChangeListener="#{pageFlowScope.cartDetailStateBean.attributeValueChangedListener}"
    http://docs.oracle.com/cd/E27559_01/admin.1112/e27149/customattr.htm#autoId4

  • How to keep submit button script when distribute the form.

    I created a form with a submit button that generates an E-mail with a personalized subject and body message including some variables from the filled form.
    When I distribute the form, the Submit button changes with a default message and all my job is lost.
    Is ther any way to resolve my problem?

    Steps
    1. make a page with Submit Button and message Style Text item.
    2. Handle submit Button in Controller.
    3. Find current date and set for message Style Text item.
    Thanks

  • How to remove submit buttons on workspace and use submit buttons on PDF instead?

    I am working with LiveCycle ES2. I will get submit buttons automatically render on workspace according to routes i designed after User component. However, I do not want that submit buttons on Flex. I would like to use submit buttons on PDF as designing in LiveCycle Designer.
    Could you please give a suggestion on this?
    Mac

    You would also want to ensure that the Adobe LiveCycle Form Bridge is not on the form.
    Here are some scenarios, from the Workbench help, which may help:
    If your process uses Adobe XML forms (XDP files), you can render the form to PDF and then use the Inject Form Bridge operation. To render to PDF, you use the renderPDFForm operation that the Forms service provides.
    Workspace ES provides a Complete button that users click to submit their forms. However, forms can also include submit buttons. When the Inject Form Bridge operation is used on a form, Workspace ES either hides the submit button, or disables the Complete button.
    Form design
    Result
    Design: The form includes no submit button.
    Result: Workspace ES disables the Complete button and users cannot submit the form.
    Design: The form includes one submit button.
    Result? Workspace ES hides the submit button and enables the Workspace ES Complete button.
    Design: The form includes a button (indirect submit) that points to a submit button (direct submit)
            Indirect-submit buttons always take precedence over direct-submit buttons, even if multiple submit buttons exist. Workspace ES always shows the indirect submit buttons.
    Result: Workspace ES hides the submit button and enables the Workspace ES Complete button.
    Design: The form includes multiple indirect-submit buttons that point to one or more direct-submit buttons.
    Results: Workspace ES disables the Workspace ES Complete button. The user must click the appropriate button on the form to submit it.
              The user can still save a draft version of the form or take the form offline
    Design: The form includes either an indirect- or direct-submit button in a repeating subform.
    Result: Workspace ES excludes these buttons for submitting the form in Workspace ES.
    Note: When the submit button that was added to the form design with the Process Fields form object to the form design is hidden, the button still provides the functionality for submitting the form.
    Submit requests are handled by Workspace ES, which acts as an intermediary between the LiveCycle ES server and the form. Also, forms can be used both offline and online.
    Hope that helps.

  • Submit button - XML DATA

    Hi!
    I'm working with Adobe LiveCycle Designer 7.x to create forms..
    I need to "catch" the XML Data from a form using a perl script!
    At this moment I don't know how works the submit button internally.
    I figure out that when I create a Submit Button in a form with the XML Data option in the submit format list, and I put one http adress in the Submit to URL field, this is the target that LC Designer needs to know where put the data (in this case, just XML Data).
    Now, to complete the job, I need a script that "catch" the XML Data and in my case, save the XML file in my ISP Server..
    I'm learning perl but I don't know how do this task; could anyone help me?

    Trying some tests related to this Chris and I'm not sure I understand what I'm seeing.
    I wrote some code that takes the form you submit and dumps it back to the browser. I created a form that has three fields:
    TextField1
    Subform1
    TextField2
    TextField3
    So TextField2 is in a subform, TextField1 is on the page. When I type into each field and submit, what I get is:
    TextField1=aa&TextField3=cc
    This is the application/x-www-form-urlencoded body of the POST, which decodes to two fields, TextField1 and TextField3. I'm not sure why TextField2 didn't show up. Any ideas?
    SteveX
    Adobe Systems

  • Submit Button in adobe interactive form

    Hi All,
    Anyone have step by step how to use SUBMIT button in adobe interactive form?
    The scenario is:
    I am using ABAP Program (SE38) to display the form, then user will enter value some required fields in the form. After user klik SUBMIT button in the form, the value will be stored in customized table in SAP system.
    Kindly advise.
    Thanks,
    Nonik

    Hi Chintan,
    Basically, I have tried to search in the forum within this two days... But I could not find the step by step how to do it. Anyway, I will try to search again. Really appreciate if you don't mind give me the link of it.
    Hi Otto,
    I have created the WD application. Unfortunately, the requirement is online processing form which is attached in the SAP transaction. So, when user open document number of one transaction, the form will be displayed and user can fill the information in this form. Then after that user will click SAVE button to submit data to SAP.
    Any advise?
    Thanks,
    Nonik

  • Submit Button always active

    I have online fillable pdf forms. but it is quite irritating as I have a few forms that our customers fill in and they can submit multiple times and all it says at the top is form data sent. How  can the submit button be deactivated when the forms is sent? it is good to restrict respondents from sending the same form twice Can adobe team explain to us how this can be avoided?
    thanks
    honory

    It is solved! I did not have to enable those triggers after all.
    It looks like it had something to do with a problem with the FND_GLOBAL package. Because in addition to the symptoms above, when using FNDCPASS to change the schema passwords, I was getting this error:
    APP-FND-01564: ORACLE error 4068 in afpobinit
    Then I researched and read the following notes and previous thread:
    MOS 1070973.6 ERRORS SIGNING INTO ORACLE APPLICATIONS: APP-1564, ORA-6550, PLS-302
    Error running SQL and EXEC commands in parallel
    And I did the following fixes:
    1. Run adadmin--> 4 -> 2 -> Recreate grants and synonyms
    2. As the apps user, recreated the package FND_GLOBAL by running these scripts in this order:
    cd $FND_TOP/patch/115/sql/
    sqlplus apps/apps
    @AFSCGBLS.pls
    @AFSCGBLB.pls
    ALTER PACKAGE FND_GLOBAL COMPILE BODY;
    @AFSCCTXB.pls     
    @AFSCCTXS.pls
    ALTER PACKAGE FND_GLOBAL COMPILE BODY;
    3. Run adadmin--> 4 -> 2 -> Recreate grants and synonyms
    4. Adadmin -> Recompile apps schema.
    5. While this was probably not part of the fix, was doing this anyway as part
    of the cloning steps:
    Adadmin -> Generate Jar files (Force)
    chmod 755 $COMMON_TOP/_pages     
    rm -rf $COMMON_TOP/_pages/*     
    $FND_TOP/patch/115/bin
    ojspCompile.pl compile flush -p 20 –log /tmp/ojsp.log
    6. Brought up the instances - and active users and active responsibilities works
    again!
    Thanks Hussein for jumping on this as usual! Marvin.
    Edited by: MarvinHecht on Sep 2, 2012 11:44 PM

  • How to prevent multiple clicks of submit buttons in OAF Pages

    Hi All,
    Our page takes around 30 seconds to 1 minute for processing.
    Some users are not patient enough. I have tried putting the below code in my PR method.
    OAWebBean body = pageContext.getRootWebBean();
        if (body instanceof OABodyBean)
        ((OABodyBean)body).setBlockOnEverySubmit(true);
    This code disables submit button for some time. After few seconds, the submit button can be clicked again by the user.
    Also, if I click on other browser window and come back to OAF page, the submit button can be clicked again immediately.
    Have also searched OAF forum but didn't find any satisfactory answer.
    Need answer from Oracle on this. If not answered on the forum, will raise an SR.

    Hi Amit,
    Try using the Processing Symbol , after clicking the Submit button. Which does shows you processing clock symbol once you click Submit Button.
    Regards
    Raghu

  • How to open a new OAF page in new window while clicking submit button

    Dear All
    I am facing one problem.I have to pass some parameter in new page only after validation.I can't do validation in processRequest bacause I perform validation after clicking the submit button.
    So I have to write redirect code in processForm Request. I can not use simple "Button" bean since I have to set destination uri which could be set only in processRequest.But I can not pass parameter with it in process request.
    Thats why I have decided to use submit button but there is not target frame option in property inspector,So I am not able to open it in new window.
    Kindly give me some suggestion .
    Thanks in Advance

    hi,
    u can use submit button. U need to handle submit button press in processFormRequest method.
    if(pageContext.getParameter("Submit"!=null))
    // validate your parameter
    if parameter u capturing are valid then...
    pageContext.setForwardURL(func, params ...............) // check devguide for details
    if u want to access these parameter in second page . you can write this logic to processRequest of target page.
    U can refer toolbox tutorial drilldown and createpage examples for implementation details.
    Regards,
    Ram

  • How to get current row using submit button ?

    Hello Friends ,
    Is there any way i can capture the value of current row by submit button ?
    Here is my requirement , i have seeded OAF screen and it has table region one of the column has radio button , the existing
    functionality is when ever the radio button is selected and click on submit button ( submit button attached on top of the table region )
    other oaf page is getting opened .
    Now i wish to restrict the navigation based on some condition , but i don't know how to get the current row using submit button .
    Note : there is no Fire Action event for radio button column ? I dont' know how orale is selecting a specific row
    Any suggestion please ?
    Regards ,
    Vamsi

    Thanks sushant for your response ,
    Well i have tried your approch , i am not getting values for current row .
    if (pageContext.getParameter("paApply") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject localOAViewObject1 = (OAViewObject)am.findViewObject("ProjectDatesVO");
    if(localOAViewObject1!=null) {
    Row DateVoROw = localOAViewObject1.first();
    RowSetIterator iterator = localOAViewObject1.createRowSetIterator("iterator");
    iterator.setRangeStart(0);
    iterator.setRangeSize(localOAViewObject1.getRowCount());
    for(int i=0; i<iterator.getRowCount(); i++)
    DateVoROw=iterator.getRowAtRangeIndex(i);
    String vacancyValue= DateVoROw .getAttribute("vacancyname).toString();
    Could you please let me know where i am going wrong
    Thanks again ,
    Vamsi

Maybe you are looking for

  • Error when using Variable Transport Binding in Sender Mail Adapter

    Hi, I am using the Sender Mail Adapter to receive an email, convert the attached tab delimited text file into xml and map it to an IDOC. I am using PayloadSwapBean and MessageTransformBean in order to do this, and this all works perfectly. I am now t

  • Drag and Drop in a Creative Suite Extension

    Hi, One of the reports we've had about using the Creative Suite SDK is that native drag and drop doesn't work when dragging from an extension to the host application (for example, dragging an image from an extension to be placed in InDesign). This is

  • DNS Error when dowloading Application Manager

    Hi, I am trying to download the trial version creative cloud but after I click on Download/Try it gives me instructions to dowload the Application Manager.  After I click on OK it takes me to a new page that says DNS Error.  Any clue as to why this i

  • Very slow PDF printing on Canon MG7550 printer

    Hi, When I print large PDF files (25 pages) using network or cable it prints very slow. It lasts forever before the print job has been sent to the printer. When the print job is finally received there can be 1-2 minutes between each page. It just sto

  • Problem in forums.

    These days a lot of problems are being seen in forums, Clicking on blogs dont open them, then manually i have to edit the address to remove s from https, to make the link work, clicking on posts given back in search too face the same issue. after log