Problem in submiting the form onchange of html:select

I am using WSAD 5.0 and working on a small application with struts.
I have following code where I want to submit the form if user selects any option from the list. Problem is when i select any option it is giving error that this property is not supported. Following is my code
<html:form action="/NewUserAction1">
<tr>
               <td>
                    <font color="Blue">
                         <b><bean:message key="NewUser1.CountryName" /></b>
                    </font>*
               </td>
               <td>
                    <html:select property="state" onchange="submit();">
                         <html:option value="default">select state</html:option>
                         <html:option value="bangalore">Bangalore</html:option>
                         <html:option value="delhi">Delhi</html:option>
                    </html:select>
               </td>
          </tr>
     </html:form>
Please help me someone why i am not able to submit the form on onchange event of <html:select>
Thanks.

I got the solution :)
Finally I figured out that
by default, struts gives <html:submit/> tags a name of
"submit". Thus there was a namespace collision in the
form object, with the submit button overriding the
form's submit method. I fixed the problem by changing
the name of the submit button. Something like this
works great:
<html:submit property="submitPage">
                    <bean:message key="NewUse1.Submit"/>
               </html:submit></td>
Now i am able to submit the form.
Thanks alot.

Similar Messages

  • Problems with Submitting the form

    Hey Guys,
    I have a form with 7 different fields. my form is connected with the database. once the user fills out the information and clicks on submit the entry should be saved in the database.
    Everything is working fine. i can establish connection with the database. my only problem is that when i click on submit its not adding the entry in the database. I think i have problems with this command
    <form method = "post" > . Any helpo will be really appreciated. I am posting some part of the code.
    <%!
      public void jspInit() {
        try {
          Class.forName("org.apache.derby.jdbc.ClientDriver");
          System.out.println("JDBC driver loaded");
        catch (ClassNotFoundException e) {
          System.out.println(e.toString());
    <body>
    <%
    String name, unit, title, supervisor, region, dept, date;
    %>
    <p align="center"><b><font size="5" face="Arial">LOGIN REQUEST FORM </font></b>
    <form method="POST">
    <p align="left"><b><font size="2">                           
         </b>Name:<b> <input type="text" name="name" size="20">   </b>Title   <b>
         <input type="text" name="title" size="20">         </b> Dept <b>         
         <input type="text" name="dept" size="20"></b></font></p>
         <p align="left"><font size="2"><b>                 
         </b>Supervisor: <b> <input type="text" name="supervisor" size="20"> </b>Region<b> 
         <input type="text" name="region" size="20">  </b>Business Unit<b>
         <input type="text" name="unit" size="20"></b></font></p>
         <p align="left"><font size="2"><b>              </b>
         Effective Date:<b> <input type="text" name="date" size="20"></b></font></p>
         <input type = "reset">
         <input type = "submit">
         <%
         name = request.getParameter("name");
         unit = request.getParameter("unit");
         title = request.getParameter("title");
         supervisor = request.getParameter("supervisor");
         region = request.getParameter("region");
         dept = request.getParameter("dept");
         date = request.getParameter("date");
         boolean error = false;
         String message = null;
         try {
              Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/sample");
              System.out.println("Connection Established");
              Statement s = con.createStatement();
              String sql = "SELECT name FROM users" +
              "WHERE name='" + name + "'";
              ResultSet rs = s.executeQuery(sql);
              if(rs.next()) {
                   rs.close();
                   message = "The username <B>" + encodeHtmlTag(name) + "</B> has already been taken. Please select another name.";
                   error = true;
              else {
                   rs.close();
                   sql = "INSERT INTO user" +
                   "(name, unit, title, supervisor, region, dept, date)" +
                   "VALUES" +
                   "('" + name + "'," + " '" + unit + "'," + " '" + title + "'," + " '" + supervisor + "',"
                   + " '" + region + "'," + " '" + dept + "'," + " '" + date + "')";
                   int i = s.executeUpdate(sql);
                   if(i==1) {
                        message = "User Added";
              s.close();
              con.close();
         catch(SQLException e) {
              message = "Error " + e.toString();
         catch(Exception e) {
              message = "Error" + e.toString();
              error = true;
         %>
    </form>
    </body>
    </html>

    Even if there was an exception being thrown, you wouldn't see it because you're catching it but not doing anything with the message:
    catch(SQLException e) {
              message = "Error " + e.toString();
         catch(Exception e) {
              message = "Error" + e.toString();
              error = true;
         }Try changing this part to:
    catch(SQLException e) {
              message = "Error " + e.toString();
                    e.printStackTrace();
         catch(Exception e) {
              message = "Error" + e.toString();
              error = true;
                    e.printStackTrace();
         }

  • How to trigger a value change listener in JSF without submitting the form

    hi friends,
    I have a JSF Page which contains a check box and a text box.
    I made the text box property as readonly.
    when i click the check box , i want to make my text box as editable.
    i achieved the above task by submitting the whole form when i click the check box.
    i want to acheive the same functionality with out submitting the form.
    In one of the references it is stated that "Value-changed handlers are executed if the page is submitted and the value of the component has changed."
    hope you got the question.
    please let me know, if you know the answer.

    Hi,
    If at all you dont want to submit the form and wanna reflect same form's field(s) as per the change in drop-down/check-box,
    you can simply achive it using traditional way of 'JavaScript'.
    For that you may typically give <h:form> tag any specific id say
    <h:form id="myForm"> and for dropdown/checkbox also you may give id say
    <h:selectBooleanCheckbox id="group" onchange="javascript:reflectChangedValue();"  ... >
    </h:selectBooleanCheckbox>and in the same JSP you can write any JS function say reflectChangedValue() as
    function reflectChangedValue()  {
         var formPrefix  = "myForm:";
         var groupId = formPrefix + "group";
         var value = document.getElementById(groupId).value;
          if(value) {
               // enale textbox here
          } else {
               // disable textbox here
    }For formPrefix and groupId, f you are having any doubts, you can refer to 'view source' from the browser,
    generated HTML of the working JSP.

  • How to Save State on an Entry Form prior to Submitting the Form?

    I want to be able to save the values the user enters to fields on the entry form if they navigate away from the page and come back (without the user clicking the submit button for the form.) For example, one of the input fields has a goLink to go to another page to lookup a field value - when the user returns from the page, all other form field values are cleared. If the user does submit the form by clicking the command button, then all form field values are saved (if the user navigates from the page and comes back, all values are retained.) What I'm trying to do then is somehow save the values (passivate the state) for the field the user has filled in when the user navigates from the page without submitting the form. Any suggestions?
    I am using a read-only View Object with all transient values. The VO is configured to passivate state including all transient values. The initial row is created programmatically; there will only be one row for the VO used as an entry form. I am not using a backing bean for the values and would prefer not to use one, but would rather use the VO's capability to passivate state to save the data values. The question then seems to be how to force the VO to passivate state prior to the form being submitted.
    thanks
    Message was edited by:
    javaX

    "My hunch is that the real problem is that the fields are not being set into the bindings due to the use of immediate="true"."
    Yes. Now I see that is the real problem. Is there anyway to force setting the bindings from the input form field values if the user navigates from the page using a goLink, or commandButton with immediate="true" other than overriding the default FacesPageLifecycle classes?
    I'd prefer not to have to do that unless necessary, and, if I over-ride that method, then how could I get it to work normally when the user presses the commandButton at the end of the form and I do want all validation checks to be performed (immediate=false for the form's submit button; immediate=true only for lookup commandButtons used for certain fields)?
    Here's an overview of how I set the page up:
    1. create transient view object; all attributes marked as always updateable; passivate state=true for VO and all transient values; no key id field selected (will only ever be one row - just using VO to save values that will eventually be used to do an insert to the database);
    2. transient VO added to Application Module
    3. Add data control to .jspx page as an ADF Form (not an ADF Creation Form)
    4. Add code to AM to create the initial row for the input form
    protected void prepareSession(Session session) {
    super.prepareSession(session);
    insertTransientViewObjRows();
    private void insertTransientViewObjRows() {
    ViewObject transientvo = getViewObj1();
    transientvo.clearCache();
    transientvo.insertRow(transientvo.createRow());
    --- Entry Form .jspx pagedef.xml snippet ---
    <executables>
    <iterator id="MyIterator" RangeSize="10" Binds="MyView"
    DataControl="AMDataControl"/>
    </executables>
    <bindings>
    <attributeValues id="sponsorid" IterBinding="MyIterator">
    <AttrNames>
    <Item Value="sponsorid"/>
    </AttrNames>
    </attributeValues>
    --- Entry Form .jspx page snippet ---
    <h:form>
    <af:panelForm>
    <af:panelLabelAndMessage label="#{bindings.sponsorid.label}">
    <af:panelGroup layout="horizontal">
    <af:inputText value="#{bindings.sponsorid.inputValue}"/>
    // state will not be saved for other form field values if use immediate="true" when temporarily navigate away from page and return; don't want to validate other form fields here
    <af:commandButton text="Lookup Details"
    action="lookup-page" immediate="true"/>
    </af:panelGroup>
    </af:panelLabelAndMessage>....
    // state will be saved with immediate="false" when user submit forms at end of entry (need to perform validation of form's required fields here)
    <af:commandButton text="Continue to Next Step" immediate="false"
    action="nextpage"/>
    Message was edited by:
    javaX

  • Getting the value of iframe to next page while submitting the form

    hi,
    I have used iframe to change the text as bold or italic . This is changing the text as bold or italic.
    iframe has properties name & id, by using i have tried to get the value while submitting the form , I couldn't get the value.
    can u please help me how to read the iframe content.
    the html code is
    *<div><iframe id="xxx" name="xxxx"></frame></div>*

    Hi Anjan,
    I am using this workflow for an employee to send leave request. I have created an event in a program using SAP_WAPI_CREATE_EVENT to create an event zabsence_form. This event is used to trigger the workflow. I have created a table for leave details. The container used in the form is of that table type.
    The agent for ZFILL_ABS_FORM (for filling leave application)  is the workflow initiator and ZABS_APPROVE is a user who is his manager.
    Now the scenario is that I need to do some screen changes for those two users. For that, I need to get the workflow initiator value in the PBO of the form screen. Any way to do that?

  • Hi.  I purchased Adobe Acrobat Xi Pro from a store (card).  I submitted the number (under the scratch area on the card) on the adobe website, with my personal details etc.  When I submitted the form, I got an error message:  413 header length too large (a

    Hi.  I purchased Adobe Acrobat Xi Pro from a store (card).  I submitted the number (under the scratch area on the card) on the adobe website, with my personal details etc.  When I submitted the form, I got an error message:  413 header length too large (and on top the page reads JRun Servelet Error).  What does this mean? What should I do next?

    Hi.  I purchased Adobe Acrobat Xi Pro from a store (card).  I submitted the number (under the scratch area on the card) on the adobe website, with my personal details etc.  When I submitted the form, I got an error message:  413 header length too large (and on top the page reads JRun Servelet Error).  What does this mean? What should I do next?

  • Error"There was an internal error when submitting the form" URM Disposition

    Hello
    I get the following error - "*There was an internal error when submitting the form*" - when i allocate a Retention Disposition to a Retention Category.
    Any Ideas how this can be solved?
    Thank you

    Not based on the minimal information provided.
    Error messages in 11g, from a UI standpoint, are severely deficient. How about looking in the content server logs and posting some more information?

  • Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Here is one solution:
    // mouse up action for submit button;
    function GetField(cName) {
    // get field object for cName field with error checking;
    var oField = this.getField(cName);
    if(oField == null) app.alert("Error accessing field named " + cName + "\nPleae verigy field name, spelling and capitalizeation.", 1, 0);
    return oField;
    } // end GetField function;
    var oPhone = GetField("phone");
    oPhone.required = oPhone.value == oPhone.defaultValue;
    var oEmail = GetField("email");
    oEmail.required = oEmail.value == oEmail.defaultValue;
    if(oPhone.required && oEmail.required) {
    app.alert("Missing required fields.", 1, 0);
    } else {
    app.alert("Submitting form", 3, 0);
    // additional code for submission;

  • Populating values in jsp without submitting the form

    Hi,
    I have a jsp page in which i have 2 select boxes. The values to these select boxes should come from database. When i change the selection of select box, the corresponding values from database should be displayed in the other select box without submitting the form.
    How to accomplish that.
    Any one having any idea about how to implement this stuff, please reply.
    Thanks in advance,
    Joby.

    You should devide the JSP into two frames and make one frame size to 0 so it should not be visible to the use ,and put one jsp in this frame ,tht will work as the hidden jsp.
    now in other frame put ur main jsp and on the change event of th select call a java script function and in this function pass the parametr to the hidden jsp like
    parent.frames["hiddenframename"].document.location="hiddenJspName.jsp?parameter1=value1
    and now in hodden jsp populate the data frm database based on passed parameter and after getting the data fillup the select on the second frame.
    try it and if not work thn write me...
    Bye.

  • I opened Adobe Acrobate XI Standard to create a form.  I then selected From Template, which took me to Adobe FormsCentral Online.  However, I think the form is an HTML web form.  All I wanted was a regular PDF form that I could email my co-workers for an

    I opened Adobe Acrobate XI Standard to create a form.  I then selected From Template, which took me to Adobe FormsCentral Online.  However, I think the form is an HTML web form.  All I wanted was a regular PDF form that I could email my co-workers for an internal project we're colletively working on.  Now I see that FormsCentral is going away and I can't get my doc to save as a PDF without an upgrade?  Help

    You should be able to log into the online Formscentral Acrobat XI air app and see your doc there. From there you would need to save it out as a PDF without a submit button to have it continue to work past July. If you don't see your online form(s) please let me know the adobeID you use to log into the service as well as the form name that is missing and I will look into it for you.
    Andrew

  • My iPhone 4S locked to Tmobile so I contacted to Tmobile and submitted unlocking form, but I got a replied said my IMEI number was not recognized. So I tried second and third time submitted the form and got same reply.

    My iPhone 4S locked to Tmobile so I contacted to Tmobile and submitted unlocking form, but I got a replied said my IMEI number was not recognized. So I tried second and third time submitted the form and got same reply.  I've been using same handset they issued to and never changed. But I have know idea why they said they don't recognised my IMEI number. Can anyone help me to solve this issue. Thanks

    You need to call T-Mobile or visit a T-Mobile retail store.

  • I am currently using Lightroom 5.6 and operating on a Mac with OSX Ver 10.9.5. I am receiving an error problem when doing the following -  I am exporting selected photos from a particular Catalogue saved on Drive 1 to a folder created on another Drive whe

    Hi, I am having a little trouble with exporting images to another drive and Catalogue and need some help if anyone can give me some advice
    I am currently using Lightroom 5.6 and operating on a Mac with OSX Ver 10.9.5.
    I am receiving an error problem when doing the following -
    I am exporting selected photos from a particular Catalogue saved on Drive 1 to a folder created on another Drive where a Lightroom Catalogue has been created. In this Catalogue I have arranged for the images once exported to be moved to a different folder - I used the Auto Import process under the File dialogue box.
    When processing the Export I receive an error message for each of the images being exported indicating the following -
    Heading Import Results
    Some import operations were not performed
    Could not move a file to requested location. (1)
    then a description of the image with file name
    Box Save As                                  Box  OK
    If I click the OK button to each image I can then go to the other Catalogue and all images are then transferred to the file as required.
    To click the OK button each time is time consuming, possibly I have missed an action or maybe you can advise an alternative method to save the time in actioning this process.
    Thanks if you can can help out.

    Thank You, but this is a gong show. Why is something that is so important to us all so very, very difficult to do?

  • Peforming two processes on submitting the form

    Hi All,
    In my application i created a form in which i have to create one query...
    1) in this form on the basis of product & variant type, value of fields(model code & vin number ) automatically comes from the table by clicking on submit...
    2) but i already executed one process on submit button which gives me the value of field (sol available) as yes or no based on whether this query is raised before or not....
    now my problem is when i am performing the first operation while submitting second one is not executing.....
    so how can I execute both of them on submitting the values.
    please help me out...
    Thanks,
    shruti

    Hi All,
    In my application i created a form in which i have to create one query...
    1) in this form on the basis of product & variant type, value of fields(model code & vin number ) automatically comes from the table by clicking on submit...
    2) but i already executed one process on submit button which gives me the value of field (sol available) as yes or no based on whether this query is raised before or not....
    now my problem is when i am performing the first operation while submitting second one is not executing.....
    so how can I execute both of them on submitting the values.
    please help me out...
    Thanks,
    shruti

  • Constantly getting java.lang.OutOfMemoryError when submitting the form.

    Hello,
    I know this doesn't exactly pertain to Form Server, but maybe someone has some insight.
    I set up JBoss 3.2.5 with Java 1.4.2.11 on a seperate machine to do a remote connection to my LiveCycle environment.
    I am using the SOAPClient sample from the developer guide to save my form. I am able to save the submitted form for just fine, but I can only do so once and the second time I always get am error: "javax.servlet.ServletException: Servlet execution threw an exception" root cause: "java.lang.OutOfMemoryError"
    Even with just the code from the guide, I get this error. Does anyone have any insight into fixing this? I really don't know what to fix in the code since I used the sample from the guide and they close the objects if that was an issue. If it matters, the pdf file I am submitting to be saved is about 800KB and then the saved file size is about 1400KB
    I already tried setting within the run.conf file the following: JAVA_OPTS="-server -Xms1028m -Xmx1028m" but I still get the same out of Memory error. The only error within the server.log file is the following:
    2007-01-10 15:46:19,125 ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[SubmitPart1]: Servlet.service() for servlet SubmitPart1 threw exception
    java.lang.OutOfMemoryError
    Thanks,
    Jennifer

    Hi Jennifer,
    If the problem is not yet resolved here is my suggestion.
    With my interaction with Adobe I came to know that SOAP has a limitation of handling a max of 10 MB and in real-time you may stitch the forms more than 10MB.
    Use the EJBClient instead of SOAPClient.
    You may set this is in FormServerDefinition class.
    Thanks,
    Vijay

  • HI .. PROBLEM IN SUBMITTING THE EDITED DATA FROM THE EDIT PAGE

    HI,
    I am having a Main form consiting of a af:table which is binded .. so when i select the row and click on "edit" button binded with the table.. i am able to get the respective data form in the Edit page.
    Now when i modify any data in the binded textbox ..... and when i submit the form the "row currency change error " is displayed...
    Plz help me how to solve this problem.....

    Hi,
    so you have a table, select a row and navigate to an edit form. Inhere you change the data displayed and press submit to navigate back to the table. On otn.oracle.com/products/jdev this scenario is available in the OBE (Oracle By Example) if you need a sample.
    What you should try is to open the pageDef file in the StructureWindow, select the iterator, e.g. DepartmentsIterator, that populates the table and open teh Property Inspector. Under "Refresh Condition" set ${!adfFacesContext.postback} to avoid the table being refreshed on JSF postback
    Frank

Maybe you are looking for