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

Similar Messages

  • How to prevent (X button) closing window

    Hi!
    I am wondering how to prevent X button on
    the right top corner on the window closing
    the window.
    My jdev java app is intended to close window
    when user explicitly presses return button.
    That's works fine ... but how to catch
    window close event (X sys btn) and stop it?
    null

    Hi,
    You need to change the default close operation of JDialog or JFrame:
    myFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

  • How to prevent refresh button?

    how to prevent refresh button?
    ould anybady know pls tell it me

    Double-posted. See reply on http://forum.java.sun.com/thread.jspa?threadID=715948&tstart=0

  • 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

  • How to prevent submit twice?

    i just use jsp and jstl.
    There is some way can prevent submit twice?
    i use sql in jdbc, first get the last record in table, compare the submit data and the last record, if same, prevent submit.
    but it can't check the date -- not the last record, same with the submit record.
    anyway can do it?

    what he/she is saying that you can put unique key on you databse that you cannot duplicate inserting records.. another way is to put javascript confirm box.. that way your client has to click ok to submit your form and it can prevent the user from double clicking your submit button.

  • 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

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

  • 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 error - Data Connection failing

    I am the form designer and am currently testing a new form I have created, however there is an error with my submit button which Saves the form to SharePoint, I receive the following error message:
    InfoPath cannot submit the form.
    An error occurred while the form was being submitted.
    The form cannot be submitted to the following location: http://servername/siteA/siteB/siteC/FormLibrary/FormName.xml
    The file: http://servername/siteA/siteB/siteC/FormLibrary/FormName.xml" is checked out for editing by DOMAIN\MyUserName.
    The operation completed successfully.
    The form is not checked out to me, or open by anybody else, also check out functionality is not forced on this SharePoint library.
    On searching forums I have read about using friendly server names and I am using the server's name in the URL, i.e.
    http://servername instead of the alias
    http://intranet - this had solved the problem in other forms, but not this one.
    Looking closely at the rules on my submit button, the following actions occur:
    1st rule checks the selection of certain fields, if the conditions are right it will set the values of 3 different fields.
    The 2nd rule saves to SharePoint using a data connection (please note this data connection works fine on different submit buttons in different views). The second rule also closes the form.
    To test where the error occurs I added a series of actions to display messages, and the problem is definitely on the data connection rule.
    The data connection is to save to a Sharepoint library, using a field called "filename" as the file name. The data connection allows overwrites. The file name is set the first time a file is saved (it has a condition which checks a field which
    gets set upon any save event - if this field is set to 0 filename gets set and this field gets set to 1 - because this field is now equal to 1, the filename field will nwever get set again).
    I have 2 views on the form, one named phase 1, the other named phase 2. When the custom submit button is pressed on the phase 1 view, my data connection works, but on the save 2 view, the exact same data connection fails with the error message above.
    I am using Windows 7, InfoPath 2010, SharePoint 2010, InfoPath filler form).
    In Windows XP, for a different user, the error messaeg is a little different, and the form does actually save:
    InfoPath cannot submit the form
    An error occurred while the form was being submitted
    The form cannot be submitted to the following location: http://servername/siteA/siteB/siteC/FormLibrary/FormName.xml
    The file is in use by another application or user.
    As I said the form does actually save its changes but still throws up this error message which will be very confusing to end users.
    I've exhausted all avenues that I know of to find the cause of the error messages and I'm at a loss, please help!
    Thanks,
    Ben

    bgvball14. I found that the error was down to the friendly name / server name issue. I have made sure that everything uses the friendly name e.g.
    http://intranet instead of the servername e.g.
    http://servername. I made sure the data connection and all options in the publishing wizard are set to the friendly name. There were still some forms that didn't work though - this was because when trying to fix this problem I had switched several times
    between using the friendly /server names and some forms were looking for the template with the server name (these didn't work), other forms looked for the friendly name (these did work).
    What I did was open my form library in windows explorer view and then drag each form into Notepad so I could see the source code. On the top two lines I could see the reference to the template and in some cases the template weas referenced using the server
    aname, which I changed to the friendly name and this worked. I did have to check every form in the library. Basically, everything should reference the friendly name (e.g.
    http://intranet.
    Ben

  • How to prevent users from saving data in pdf

    I have created several new pdfs for my communications center and would like to know how I can have these documents to be filled out but not have the info saved by the users?  I dont want the original document to be lost because someone accidentally saved the info they were inputing into it.  The forms I have created already have a print button at the top right corner so that is all I want the users to be able to do, fill it out, print it out, then close out original document without saving.

    You can't prevent it absolutely, but there are some things you can try to minimize the problem, such as:
    1. Provide a reset form button that the user can click to clear all of the fields, either with a Reset Form action or the resetForm JavaScript method.
    2. Reset the form using JavaScript in the Document Will Save event.
    3. Have the users set the file to read-only in the file system.

  • 10133 ADF: How to stop search button to execute when there is an error

    Hi,
    I have two dropdownlists in a search criteria on a search page. The search result is at the bottom of the same page. The two values in the dropdownlists need to be validated when the search button is clicked. The validation logic is put in the searchBtn_action method binded to the search button. In the logic, when an invalid combination happens, I am able to post some error message on top of the page. But how can I stop the application to execute the sql statement? I mean if there is any method I can call to exit if there is an error? Thank you very much.
    Regards,
    Annie

    This is most likely an optimization problem. I know such behaviour existed in the past with some functions and NI usually fixed it in some later release, but the recent changes in the LabVIEW compiler to use LLVM and various optimization improvements may have added this "feature" back in. The default value behaviour is certainly correct and consistent but the behaviour without default value feels not right to me for LabVIEW. In C I would say ok this is simply undefined behaviour and that means the produced code is entitled to even format your harddisk, since C explicitedly says all undefined behaviour is subject to choices by the implementor and is allowed to do whatever the implementor sees fit, including changing behavior between any version of the compiler.
    But LabVIEW as a high level language has explicitedly so called default default data, which in this case should be used. Just having read a bit about LLVM I know they are wrestling with C undefined behaviour as well and LLVM being used a backend by several C compilers already has to deal with them. The reason that C explicitedly has many undefined behaviours is to allow various and sometimes significant optimizations, that could not be done, if the C standard would explicitedly require specific behaviour in certain cases (for instance uninitialized variables).
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to prevent user to enter data in "Date/Time Field"?

    Hi folks,
         Back after long time to the forums, where I get answers which are helpful in making me good at utilizing designer.
         I am trying to validate the "Date/Time Field" using JavaScript but couldn't get a proper RegEx expression for various invalid user input formats. If anyone can help me out in finding a proper script that would Great.
         My script grown bigger and bigger to accepting invalid dates, but felt like hardcoding. So, instead I decided why can't we prevent a user to enter data into "Date/Time Field" and use only calendar dropdown. Is there is a way to do this?
    find my sample testing docment
    https://acrobat.com/#d=mYXkrhO2txuEesCfmvxNXg
    Thanks in Advance,
    Rajesh

    Hi Rajesh,
    I don't think there is a way of stopping the user from using the keyboard to enter a date.  You can use the following script in the change event to stop them typing a date but they will still be able to paste a date in.
    if (xfa.event.change.length === 1)
    xfa.event.change = "";
    This code works because if the date is selected from the calendar dropdown then the date xfa.event.change value will be the whole date and therefore longer than one character.
    I couldn't access your sample but if you were to set an display picture for the date field to something other than date{YYYY-MM-DD} then a valid date will have a formattedValue that is different than the rawValue.
    Dave

  • How to prevent Apply button from automatic execution

    I'm using OBIEE 11.1.1.5.
    When user enter my dashboard he can see section with many prompts and some chart based reports below.
    Usually, when entering the page the reports are executed with default prompts values and it may take a while.
    Only after most of reports are being generated, user is able to open the listboxes in the prompts and select his desires.
    The listbox is not filled quick since the DB is busy on the reports execution.
    My question is:
    Can I prevent the reports to be executed automatically when entering the dashboard?
    I would like user to click on Apply in order to get results.

    Hi,
    Tune up your RPD,
    Make sure that joins are implemented correctly,
    use cache management to increase the performance to load.
    login to em and in overview you will get the cache management their also u can increase the performance
    even in RPD also u can tune the cache management to increase the perfrmance.
    Regards
    VG

Maybe you are looking for