Results 1 to 2 of 2
  1. #1
    Sachin. is offline Member
    Join Date
    Mar 2009
    Location
    new delhi
    Posts
    9
    Rep Power
    0

    Question resting text field values on jsp page to null......

    hi friends....

    i made one page by name registration to register information of users into the database( sql 2005) and m also using struts framework.

    so my problem is that whenever i submit the values from the registration to the database, data is successfully stored in the database but after submitting the data all the fields(text fields , combo box , radion butons) on the jsp page in not showing null values or not reseting the values in the fields.

    my jsp page is code is here:-
    Java Code:
     <html:form action="registration" method="post">
                                <html:errors/>
    
     Email Id<font color="red">&nbsp;*</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                               
                                <html:text property="email" name="registrationbean"  title="Enter Email Id" size="31" tabindex="5" > </html:text>
    
      Password<font color="red">&nbsp;*</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
                               
                                <html:password property="password" name="registrationbean" title="Enter Password" size="32" tabindex="6" ></html:password>
    
     Password Question<font color="red">&nbsp;*</font>
                               <html:select property="passques" name="registrationbean" tabindex="8" title="Select a Password Question">
                                    <option>Select Password Question ?</option>
                                    <option>What's your pet Name ?</option>
                                    <option>What's Your Favorite Sports ?</option>
                                    <option>What's Your favorite Timepass ?</option>
                                    <option>What's Your First Mobile No. ?</option>
                                </html:select>
    
     Password Answer<font color="red">&nbsp;*</font>
                                <html:text property="passans" name="registrationbean" size="32" tabindex="9" title="Enter Password Answer Here." ></html:text>
    
    Promotionals Mails                  
        <html:radio property="proemails" name="registrationbean" value="yes" title="Yes" tabindex="18" ></html:radio>Yes;
                              <html:radio property="proemails" name="registrationbean" value="no" title="No" tabindex="19"></html:radio>No
    
    <html:submit property="submit" title="Submit" tabindex="21" >Submit</html:submit>
    
     
                      </html:form>

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    5

    Default

    I think the struts form bean has a reset() method that you can override and implement. where the default reset() doesn't do anything by default. Here you would want to make your reset() null out the values in the form bean.

Similar Threads

  1. How to get null values stored in array
    By Ms.Ranjan in forum New To Java
    Replies: 4
    Last Post: 05-21-2009, 10:29 PM
  2. launching Jframe from text field
    By crunchymonkey in forum AWT / Swing
    Replies: 4
    Last Post: 10-15-2008, 02:50 AM
  3. get numeric value from a text field
    By Lehane_9 in forum New To Java
    Replies: 2
    Last Post: 06-14-2008, 03:19 AM
  4. Regarding Text Field
    By adeeb in forum AWT / Swing
    Replies: 1
    Last Post: 06-05-2008, 11:01 PM
  5. Waste Space & Text Field
    By Gajesh Tripathi in forum AWT / Swing
    Replies: 2
    Last Post: 12-01-2007, 07:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •