You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by aum strut <au...@gmail.com> on 2008/04/18 20:12:55 UTC

Clearing form value

Hi all,

a little point which i want to know.
i have a form by which we can add billing detais in the database

form is working fine, it is adding the value to the database as expected,
the problem whcih i am facing is even after successfully submitting the
values, it is not clearing the form values which has been added

i can clear the fields values  using java script,but i want to know is it
possible using Struts2,is theer any was that when ever data is submitted
successfully in the database form fields values should get cleared.


any help in this regard will be much appriciated.


thanks in advance
--aum

Re: Clearing form value

Posted by "Dustin S." <ic...@gmail.com>.
If your using Spring as the objectFactory then you would need to
define your action bean as prototype instead of singleton in your
applicationContext.xml

for example:
<bean id="personAction" scope="prototype" class="some.class.PersonAction"/>

On Fri, Apr 18, 2008 at 10:59 PM, aum strut <au...@gmail.com> wrote:
> yes you are right
>
>  not providing complete information in one mail is really not good
>
>  i wil take this in to account in future...
>
>  well i am not using spring in my application i have a simple form which is
>  sending the input values to my action where i am adding these in to the data
>  base using simple jdbc call everything is working fine i am even getting
>  back the success response in my add form.
>
>  i am not able to understand what u mean by "not have your action defined as
>  being "prototype"
>  scope"
>
>  aum
>
>
>
>
>  On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>  >
>  > Are you using Spring?
>  >
>  > Would it be possible for you to provide more useful information in your
>  > initial emails rather than generating a stream of a half-dozen or more?
>  > It's
>  > rather frustrating; we've gone through this before.
>  >
>  > One common error is to not have your action defined as being "prototype"
>  > scope. Since actions are instantiated on each request (normally) it's not
>  > typical to see this behavior without some effort on your part or
>  > mis-configuration.
>  >
>  > Dave
>  >
>  > --- aum strut <au...@gmail.com> wrote:
>  >
>  > > currently i am using struts-2.0.11.1
>  > >
>  > > On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>  > > >
>  > > > Which version of Struts?
>  > > >
>  > > > --- aum strut <au...@gmail.com> wrote:
>  > > >
>  > > > > Hi all,
>  > > > >
>  > > > > a little point which i want to know.
>  > > > > i have a form by which we can add billing detais in the database
>  > > > >
>  > > > > form is working fine, it is adding the value to the database as
>  > > > expected,
>  > > > > the problem whcih i am facing is even after successfully submitting
>  > the
>  > > > > values, it is not clearing the form values which has been added
>  > > > >
>  > > > > i can clear the fields values  using java script,but i want to know
>  > is
>  > > > it
>  > > > > possible using Struts2,is theer any was that when ever data is
>  > > submitted
>  > > > > successfully in the database form fields values should get cleared.
>  > > > >
>  > > > >
>  > > > > any help in this regard will be much appriciated.
>  > > > >
>  > > > >
>  > > > > thanks in advance
>  > > > > --aum
>  > > > >
>  > > >
>  > > >
>  > > > ---------------------------------------------------------------------
>  > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > > > For additional commands, e-mail: user-help@struts.apache.org
>  > > >
>  > > >
>  > >
>  >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > For additional commands, e-mail: user-help@struts.apache.org
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Clearing form value

Posted by aum strut <au...@gmail.com>.
ok i got that

thks for helping me out


On 4/21/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
>
> By "redirect" I mean using the redirect action result type.
>
> Nils-H
>
> On Mon, Apr 21, 2008 at 6:40 AM, aum strut <au...@gmail.com> wrote:
> > Nils can u just describe a bit wat u mean here by redirect
> >  its quite possible that i am taking redirect in some other way..
> >
> >  aum
> >
> >
> >
> >
> >  On 4/21/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
> >  >
> >  > I don't see why that should prevent you from doing a redirect?
> >  >
> >  > Nils-H
> >  >
> >  > On Mon, Apr 21, 2008 at 5:44 AM, aum strut <au...@gmail.com>
> wrote:
> >  > > Nils
> >  > >
> >  > >  though i have achieved this using javascript
> >  > >  my problem was that i can not redirect as i have to enter multipal
> >  > records
> >  > >  at a given time
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >  On 4/20/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
> >  > >  >
> >  > >  > Considering you're processing the form and displaying the form
> using
> >  > >  > the same action within the same request, I would say this is
> expected
> >  > >  > behavior. I would consider doing a redirect after the post
> instead.
> >  > >  >
> >  > >  > Nils-H
> >  > >  >
> >  > >  > On Sat, Apr 19, 2008 at 12:06 PM, aum strut <
> aum.struts@gmail.com>
> >  > wrote:
> >  > >  > > i am not using Spring at all.here is the code for my
> configuration
> >  > and
> >  > >  > >  action class
> >  > >  > >
> >  > >  > >  my *Quotation.jsp page* by which i am adding data
> >  > >  > >
> >  > >  > >
> >  > >  > >  <%@ taglib prefix="s" uri="/struts-tags" %>
> >  > >  > >
> >  > >  > >  <html>
> >  > >  > >
> >  > >  > >  <head>
> >  > >  > >
> >  > >  > >  <title>Quotation Form</title>
> >  > >  > >
> >  > >  > >  <s:head theme="ajax"/>
> >  > >  > >
> >  > >  > >  </head>
> >  > >  > >
> >  > >  > >  <body>
> >  > >  > >
> >  > >  > >  <center><font face="verdana" size="2"
> >  > color="red"><s:actionmessage></
> >  > >  > >  s:actionmessage></font></center>
> >  > >  > >
> >  > >  > >  <h1 align="center"> &nbsp;&nbsp;&nbsp;Quotation Form</h1>
> >  > >  > >
> >  > >  > >  <s:form action="SaveBill">
> >  > >  > >
> >  > >  > >  <table align="center">
> >  > >  > >
> >  > >  > >   <s:datetimepicker label="Date:" name="date"/></td><td>
> >  > >  > >
> >  > >  > >  <s:textfield label="Voucher Number:" name="voucherNumber"/>
> >  > >  > >
> >  > >  > >  <s:textfield label="Customer Name:" name="customerName"/>
> >  > >  > >
> >  > >  > >  <s:textarea label="Address" name="address" cols="20"
> rows="4"/>
> >  > >  > >
> >  > >  > >  <s:textfield label="Contact No:" name="contactNo"/>
> >  > >  > >
> >  > >  > >  <s:textfield label="Item Name:" name="itemName"/>
> >  > >  > >
> >  > >  > >  <s:textfield label="Purity:" name="purity"/>
> >  > >  > >
> >  > >  > >  <s:textfield label="Gross Weight(Gms):" name="grossWeight"/>
> >  > >  > >
> >  > >  > >  <s:textfield label="Net Weight(Gms):" name="netWeight"/>
> >  > >  > >
> >  > >  > >  <s:textfield label="Diamond Weight:" name="diamondWeight"/>
> >  > >  > >
> >  > >  > >  <s:textfield label="Gold Rate(Rs):" name="goldRate"/>
> >  > >  > >
> >  > >  > >  <s:textfield label="Amount:" name="amount"/>
> >  > >  > >
> >  > >  > >  <s:submit label="Save" align="center" />
> >  > >  > >
> >  > >  > >  </table>
> >  > >  > >
> >  > >  > >  </s:form>
> >  > >  > >
> >  > >  > >  </body>
> >  > >  > >
> >  > >  > >  </html>
> >  > >  > >  *my action class*
> >  > >  > >
> >  > >  > >
> >  > >  > >  package raisonne.billgeneration;
> >  > >  > >
> >  > >  > >  import com.opensymphony.xwork2.ActionSupport;
> >  > >  > >  import raisonne.billgeneration.GetBillConnection;
> >  > >  > >
> >  > >  > >  public class SaveBillingData extends ActionSupport{
> >  > >  > >
> >  > >  > >   /**
> >  > >  > >   *
> >  > >  > >   */
> >  > >  > >   private static final long serialVersionUID =
> >  > -5856152810070496725L;
> >  > >  > >   private int rowInserted=0;
> >  > >  > >   private String date=null;
> >  > >  > >   private String voucherNumber=null;
> >  > >  > >   private String customerName=null;
> >  > >  > >   private String address=null;
> >  > >  > >   private String contactNo=null;
> >  > >  > >   private String itemName=null;
> >  > >  > >   private String purity=null;
> >  > >  > >   private double grossWeight=0.0;
> >  > >  > >   private double netWeight=0.0;
> >  > >  > >   private double diamondWeight=0.0;
> >  > >  > >   private double goldRate=0.0;
> >  > >  > >   private double amount=0.0;
> >  > >  > >
> >  > >  > >  /*
> >  > >  > >
> >  > >  > >  Getter and Setter Method
> >  > >  > >
> >  > >  > >  */
> >  > >  > >
> >  > >  > >   public String execute() throws Exception{
> >  > >  > >   GetBillConnection billCollection =new GetBillConnection();
> >  > >  > >
> >  > >  >
> >  >
> rowInserted=billCollection.AddBillingData(getDate(),getVoucherNumber(),
> >  > >  > >     getCustomerName(),getAddress(),getContactNo(),
> >  > >  > >     getItemName(),getPurity(),getGrossWeight(),
> >  > >  > >
> getNetWeight(),getDiamondWeight(),getGoldRate(),getAmount());
> >  > >  > >   if(rowInserted>0){
> >  > >  > >    addActionMessage("Quotation data has been submitted
> >  > successfully");
> >  > >  > >    return SUCCESS;
> >  > >  > >   }
> >  > >  > >   else{
> >  > >  > >    addActionMessage("Error while saving Quotation data, Pleaes
> >  > retry");
> >  > >  > >    return INPUT;
> >  > >  > >   }
> >  > >  > >   }
> >  > >  > >
> >  > >  > >
> >  > >  > >  }
> >  > >  > >
> >  > >  > >
> >  > >  > >  lastly *Struts.xml file*
> >  > >  > >
> >  > >  > >
> >  > >  > >  <package name="raisonne.billgeneration"
> extends="struts-default"
> >  > >  > namespace=
> >  > >  > >  "/">
> >  > >  > >
> >  > >  > >  <action name="SaveBill"
> >  > >  > class="raisonne.billgeneration.SaveBillingData">
> >  > >  > >
> >  > >  > >  <result name="success">/BillGeneration/Quotation.jsp</result>
> >  > >  > >
> >  > >  > >  <result name="input">/Login/Login.jsp</result>
> >  > >  > >
> >  > >  > >  </action>
> >  > >  > >
> >  > >  > >  </package>
> >  > >  > >  -aum
> >  > >  > >
> >  > >  > >
> >  > >  > >
> >  > >  > >
> >  > >  > >  On 4/19/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
> >  > >  > >  >
> >  > >  > >  > It would be a lot easier helping if you show us some
> >  > configuration
> >  > >  > >  > files and code....
> >  > >  > >  >
> >  > >  > >  > Nils-H
> >  > >  > >  >
> >  > >  > >  > On Sat, Apr 19, 2008 at 6:59 AM, aum strut <
> aum.struts@gmail.com
> >  > >
> >  > >  > wrote:
> >  > >  > >  > > yes you are right
> >  > >  > >  > >
> >  > >  > >  > >  not providing complete information in one mail is really
> not
> >  > good
> >  > >  > >  > >
> >  > >  > >  > >  i wil take this in to account in future...
> >  > >  > >  > >
> >  > >  > >  > >  well i am not using spring in my application i have a
> simple
> >  > form
> >  > >  > which
> >  > >  > >  > is
> >  > >  > >  > >  sending the input values to my action where i am adding
> these
> >  > in
> >  > >  > to the
> >  > >  > >  > data
> >  > >  > >  > >  base using simple jdbc call everything is working fine i
> am
> >  > even
> >  > >  > >  > getting
> >  > >  > >  > >  back the success response in my add form.
> >  > >  > >  > >
> >  > >  > >  > >  i am not able to understand what u mean by "not have
> your
> >  > action
> >  > >  > >  > defined as
> >  > >  > >  > >  being "prototype"
> >  > >  > >  > >  scope"
> >  > >  > >  > >
> >  > >  > >  > >  aum
> >  > >  > >  > >
> >  > >  > >  > >
> >  > >  > >  > >
> >  > >  > >  > >
> >  > >  > >  > >  On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
> >  > >  > >  > >  >
> >  > >  > >  > >  > Are you using Spring?
> >  > >  > >  > >  >
> >  > >  > >  > >  > Would it be possible for you to provide more useful
> >  > information
> >  > >  > in
> >  > >  > >  > your
> >  > >  > >  > >  > initial emails rather than generating a stream of a
> >  > half-dozen
> >  > >  > or
> >  > >  > >  > more?
> >  > >  > >  > >  > It's
> >  > >  > >  > >  > rather frustrating; we've gone through this before.
> >  > >  > >  > >  >
> >  > >  > >  > >  > One common error is to not have your action defined as
> >  > being
> >  > >  > >  > "prototype"
> >  > >  > >  > >  > scope. Since actions are instantiated on each request
> >  > (normally)
> >  > >  > it's
> >  > >  > >  > not
> >  > >  > >  > >  > typical to see this behavior without some effort on
> your
> >  > part or
> >  > >  > >  > >  > mis-configuration.
> >  > >  > >  > >  >
> >  > >  > >  > >  > Dave
> >  > >  > >  > >  >
> >  > >  > >  > >  > --- aum strut <au...@gmail.com> wrote:
> >  > >  > >  > >  >
> >  > >  > >  > >  > > currently i am using struts-2.0.11.1
> >  > >  > >  > >  > >
> >  > >  > >  > >  > > On 4/19/08, Dave Newton <ne...@yahoo.com>
> wrote:
> >  > >  > >  > >  > > >
> >  > >  > >  > >  > > > Which version of Struts?
> >  > >  > >  > >  > > >
> >  > >  > >  > >  > > > --- aum strut <au...@gmail.com> wrote:
> >  > >  > >  > >  > > >
> >  > >  > >  > >  > > > > Hi all,
> >  > >  > >  > >  > > > >
> >  > >  > >  > >  > > > > a little point which i want to know.
> >  > >  > >  > >  > > > > i have a form by which we can add billing detais
> in
> >  > the
> >  > >  > >  > database
> >  > >  > >  > >  > > > >
> >  > >  > >  > >  > > > > form is working fine, it is adding the value to
> the
> >  > >  > database as
> >  > >  > >  > >  > > > expected,
> >  > >  > >  > >  > > > > the problem whcih i am facing is even after
> >  > successfully
> >  > >  > >  > submitting
> >  > >  > >  > >  > the
> >  > >  > >  > >  > > > > values, it is not clearing the form values which
> has
> >  > been
> >  > >  > added
> >  > >  > >  > >  > > > >
> >  > >  > >  > >  > > > > i can clear the fields values  using java
> script,but
> >  > i
> >  > >  > want to
> >  > >  > >  > know
> >  > >  > >  > >  > is
> >  > >  > >  > >  > > > it
> >  > >  > >  > >  > > > > possible using Struts2,is theer any was that
> when
> >  > ever
> >  > >  > data is
> >  > >  > >  > >  > > submitted
> >  > >  > >  > >  > > > > successfully in the database form fields values
> >  > should get
> >  > >  > >  > cleared.
> >  > >  > >  > >  > > > >
> >  > >  > >  > >  > > > >
> >  > >  > >  > >  > > > > any help in this regard will be much
> appriciated.
> >  > >  > >  > >  > > > >
> >  > >  > >  > >  > > > >
> >  > >  > >  > >  > > > > thanks in advance
> >  > >  > >  > >  > > > > --aum
> >  > >  > >  > >  > > > >
> >  > >  > >  > >  > > >
> >  > >  > >  > >  > > >
> >  > >  > >  > >  > > >
> >  > >  > >  >
> >  > ---------------------------------------------------------------------
> >  > >  > >  > >  > > > To unsubscribe, e-mail:
> >  > user-unsubscribe@struts.apache.org
> >  > >  > >  > >  > > > For additional commands, e-mail:
> >  > user-help@struts.apache.org
> >  > >  > >  > >  > > >
> >  > >  > >  > >  > > >
> >  > >  > >  > >  > >
> >  > >  > >  > >  >
> >  > >  > >  > >  >
> >  > >  > >  > >  >
> >  > >  >
> ---------------------------------------------------------------------
> >  > >  > >  > >  > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> >  > >  > >  > >  > For additional commands, e-mail:
> >  > user-help@struts.apache.org
> >  > >  > >  > >  >
> >  > >  > >  > >  >
> >  > >  > >  > >
> >  > >  > >  >
> >  > >  > >  >
> >  > ---------------------------------------------------------------------
> >  > >  > >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > >  > >  > For additional commands, e-mail:
> user-help@struts.apache.org
> >  > >  > >  >
> >  > >  > >  >
> >  > >  > >
> >  > >  >
> >  > >  >
> ---------------------------------------------------------------------
> >  > >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > >  > For additional commands, e-mail: user-help@struts.apache.org
> >  > >  >
> >  > >  >
> >  > >
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > For additional commands, e-mail: user-help@struts.apache.org
> >  >
> >  >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Clearing form value

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
By "redirect" I mean using the redirect action result type.

Nils-H

On Mon, Apr 21, 2008 at 6:40 AM, aum strut <au...@gmail.com> wrote:
> Nils can u just describe a bit wat u mean here by redirect
>  its quite possible that i am taking redirect in some other way..
>
>  aum
>
>
>
>
>  On 4/21/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
>  >
>  > I don't see why that should prevent you from doing a redirect?
>  >
>  > Nils-H
>  >
>  > On Mon, Apr 21, 2008 at 5:44 AM, aum strut <au...@gmail.com> wrote:
>  > > Nils
>  > >
>  > >  though i have achieved this using javascript
>  > >  my problem was that i can not redirect as i have to enter multipal
>  > records
>  > >  at a given time
>  > >
>  > >
>  > >
>  > >
>  > >  On 4/20/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
>  > >  >
>  > >  > Considering you're processing the form and displaying the form using
>  > >  > the same action within the same request, I would say this is expected
>  > >  > behavior. I would consider doing a redirect after the post instead.
>  > >  >
>  > >  > Nils-H
>  > >  >
>  > >  > On Sat, Apr 19, 2008 at 12:06 PM, aum strut <au...@gmail.com>
>  > wrote:
>  > >  > > i am not using Spring at all.here is the code for my configuration
>  > and
>  > >  > >  action class
>  > >  > >
>  > >  > >  my *Quotation.jsp page* by which i am adding data
>  > >  > >
>  > >  > >
>  > >  > >  <%@ taglib prefix="s" uri="/struts-tags" %>
>  > >  > >
>  > >  > >  <html>
>  > >  > >
>  > >  > >  <head>
>  > >  > >
>  > >  > >  <title>Quotation Form</title>
>  > >  > >
>  > >  > >  <s:head theme="ajax"/>
>  > >  > >
>  > >  > >  </head>
>  > >  > >
>  > >  > >  <body>
>  > >  > >
>  > >  > >  <center><font face="verdana" size="2"
>  > color="red"><s:actionmessage></
>  > >  > >  s:actionmessage></font></center>
>  > >  > >
>  > >  > >  <h1 align="center"> &nbsp;&nbsp;&nbsp;Quotation Form</h1>
>  > >  > >
>  > >  > >  <s:form action="SaveBill">
>  > >  > >
>  > >  > >  <table align="center">
>  > >  > >
>  > >  > >   <s:datetimepicker label="Date:" name="date"/></td><td>
>  > >  > >
>  > >  > >  <s:textfield label="Voucher Number:" name="voucherNumber"/>
>  > >  > >
>  > >  > >  <s:textfield label="Customer Name:" name="customerName"/>
>  > >  > >
>  > >  > >  <s:textarea label="Address" name="address" cols="20" rows="4"/>
>  > >  > >
>  > >  > >  <s:textfield label="Contact No:" name="contactNo"/>
>  > >  > >
>  > >  > >  <s:textfield label="Item Name:" name="itemName"/>
>  > >  > >
>  > >  > >  <s:textfield label="Purity:" name="purity"/>
>  > >  > >
>  > >  > >  <s:textfield label="Gross Weight(Gms):" name="grossWeight"/>
>  > >  > >
>  > >  > >  <s:textfield label="Net Weight(Gms):" name="netWeight"/>
>  > >  > >
>  > >  > >  <s:textfield label="Diamond Weight:" name="diamondWeight"/>
>  > >  > >
>  > >  > >  <s:textfield label="Gold Rate(Rs):" name="goldRate"/>
>  > >  > >
>  > >  > >  <s:textfield label="Amount:" name="amount"/>
>  > >  > >
>  > >  > >  <s:submit label="Save" align="center" />
>  > >  > >
>  > >  > >  </table>
>  > >  > >
>  > >  > >  </s:form>
>  > >  > >
>  > >  > >  </body>
>  > >  > >
>  > >  > >  </html>
>  > >  > >  *my action class*
>  > >  > >
>  > >  > >
>  > >  > >  package raisonne.billgeneration;
>  > >  > >
>  > >  > >  import com.opensymphony.xwork2.ActionSupport;
>  > >  > >  import raisonne.billgeneration.GetBillConnection;
>  > >  > >
>  > >  > >  public class SaveBillingData extends ActionSupport{
>  > >  > >
>  > >  > >   /**
>  > >  > >   *
>  > >  > >   */
>  > >  > >   private static final long serialVersionUID =
>  > -5856152810070496725L;
>  > >  > >   private int rowInserted=0;
>  > >  > >   private String date=null;
>  > >  > >   private String voucherNumber=null;
>  > >  > >   private String customerName=null;
>  > >  > >   private String address=null;
>  > >  > >   private String contactNo=null;
>  > >  > >   private String itemName=null;
>  > >  > >   private String purity=null;
>  > >  > >   private double grossWeight=0.0;
>  > >  > >   private double netWeight=0.0;
>  > >  > >   private double diamondWeight=0.0;
>  > >  > >   private double goldRate=0.0;
>  > >  > >   private double amount=0.0;
>  > >  > >
>  > >  > >  /*
>  > >  > >
>  > >  > >  Getter and Setter Method
>  > >  > >
>  > >  > >  */
>  > >  > >
>  > >  > >   public String execute() throws Exception{
>  > >  > >   GetBillConnection billCollection =new GetBillConnection();
>  > >  > >
>  > >  >
>  > rowInserted=billCollection.AddBillingData(getDate(),getVoucherNumber(),
>  > >  > >     getCustomerName(),getAddress(),getContactNo(),
>  > >  > >     getItemName(),getPurity(),getGrossWeight(),
>  > >  > >     getNetWeight(),getDiamondWeight(),getGoldRate(),getAmount());
>  > >  > >   if(rowInserted>0){
>  > >  > >    addActionMessage("Quotation data has been submitted
>  > successfully");
>  > >  > >    return SUCCESS;
>  > >  > >   }
>  > >  > >   else{
>  > >  > >    addActionMessage("Error while saving Quotation data, Pleaes
>  > retry");
>  > >  > >    return INPUT;
>  > >  > >   }
>  > >  > >   }
>  > >  > >
>  > >  > >
>  > >  > >  }
>  > >  > >
>  > >  > >
>  > >  > >  lastly *Struts.xml file*
>  > >  > >
>  > >  > >
>  > >  > >  <package name="raisonne.billgeneration" extends="struts-default"
>  > >  > namespace=
>  > >  > >  "/">
>  > >  > >
>  > >  > >  <action name="SaveBill"
>  > >  > class="raisonne.billgeneration.SaveBillingData">
>  > >  > >
>  > >  > >  <result name="success">/BillGeneration/Quotation.jsp</result>
>  > >  > >
>  > >  > >  <result name="input">/Login/Login.jsp</result>
>  > >  > >
>  > >  > >  </action>
>  > >  > >
>  > >  > >  </package>
>  > >  > >  -aum
>  > >  > >
>  > >  > >
>  > >  > >
>  > >  > >
>  > >  > >  On 4/19/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
>  > >  > >  >
>  > >  > >  > It would be a lot easier helping if you show us some
>  > configuration
>  > >  > >  > files and code....
>  > >  > >  >
>  > >  > >  > Nils-H
>  > >  > >  >
>  > >  > >  > On Sat, Apr 19, 2008 at 6:59 AM, aum strut <aum.struts@gmail.com
>  > >
>  > >  > wrote:
>  > >  > >  > > yes you are right
>  > >  > >  > >
>  > >  > >  > >  not providing complete information in one mail is really not
>  > good
>  > >  > >  > >
>  > >  > >  > >  i wil take this in to account in future...
>  > >  > >  > >
>  > >  > >  > >  well i am not using spring in my application i have a simple
>  > form
>  > >  > which
>  > >  > >  > is
>  > >  > >  > >  sending the input values to my action where i am adding these
>  > in
>  > >  > to the
>  > >  > >  > data
>  > >  > >  > >  base using simple jdbc call everything is working fine i am
>  > even
>  > >  > >  > getting
>  > >  > >  > >  back the success response in my add form.
>  > >  > >  > >
>  > >  > >  > >  i am not able to understand what u mean by "not have your
>  > action
>  > >  > >  > defined as
>  > >  > >  > >  being "prototype"
>  > >  > >  > >  scope"
>  > >  > >  > >
>  > >  > >  > >  aum
>  > >  > >  > >
>  > >  > >  > >
>  > >  > >  > >
>  > >  > >  > >
>  > >  > >  > >  On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>  > >  > >  > >  >
>  > >  > >  > >  > Are you using Spring?
>  > >  > >  > >  >
>  > >  > >  > >  > Would it be possible for you to provide more useful
>  > information
>  > >  > in
>  > >  > >  > your
>  > >  > >  > >  > initial emails rather than generating a stream of a
>  > half-dozen
>  > >  > or
>  > >  > >  > more?
>  > >  > >  > >  > It's
>  > >  > >  > >  > rather frustrating; we've gone through this before.
>  > >  > >  > >  >
>  > >  > >  > >  > One common error is to not have your action defined as
>  > being
>  > >  > >  > "prototype"
>  > >  > >  > >  > scope. Since actions are instantiated on each request
>  > (normally)
>  > >  > it's
>  > >  > >  > not
>  > >  > >  > >  > typical to see this behavior without some effort on your
>  > part or
>  > >  > >  > >  > mis-configuration.
>  > >  > >  > >  >
>  > >  > >  > >  > Dave
>  > >  > >  > >  >
>  > >  > >  > >  > --- aum strut <au...@gmail.com> wrote:
>  > >  > >  > >  >
>  > >  > >  > >  > > currently i am using struts-2.0.11.1
>  > >  > >  > >  > >
>  > >  > >  > >  > > On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>  > >  > >  > >  > > >
>  > >  > >  > >  > > > Which version of Struts?
>  > >  > >  > >  > > >
>  > >  > >  > >  > > > --- aum strut <au...@gmail.com> wrote:
>  > >  > >  > >  > > >
>  > >  > >  > >  > > > > Hi all,
>  > >  > >  > >  > > > >
>  > >  > >  > >  > > > > a little point which i want to know.
>  > >  > >  > >  > > > > i have a form by which we can add billing detais in
>  > the
>  > >  > >  > database
>  > >  > >  > >  > > > >
>  > >  > >  > >  > > > > form is working fine, it is adding the value to the
>  > >  > database as
>  > >  > >  > >  > > > expected,
>  > >  > >  > >  > > > > the problem whcih i am facing is even after
>  > successfully
>  > >  > >  > submitting
>  > >  > >  > >  > the
>  > >  > >  > >  > > > > values, it is not clearing the form values which has
>  > been
>  > >  > added
>  > >  > >  > >  > > > >
>  > >  > >  > >  > > > > i can clear the fields values  using java script,but
>  > i
>  > >  > want to
>  > >  > >  > know
>  > >  > >  > >  > is
>  > >  > >  > >  > > > it
>  > >  > >  > >  > > > > possible using Struts2,is theer any was that when
>  > ever
>  > >  > data is
>  > >  > >  > >  > > submitted
>  > >  > >  > >  > > > > successfully in the database form fields values
>  > should get
>  > >  > >  > cleared.
>  > >  > >  > >  > > > >
>  > >  > >  > >  > > > >
>  > >  > >  > >  > > > > any help in this regard will be much appriciated.
>  > >  > >  > >  > > > >
>  > >  > >  > >  > > > >
>  > >  > >  > >  > > > > thanks in advance
>  > >  > >  > >  > > > > --aum
>  > >  > >  > >  > > > >
>  > >  > >  > >  > > >
>  > >  > >  > >  > > >
>  > >  > >  > >  > > >
>  > >  > >  >
>  > ---------------------------------------------------------------------
>  > >  > >  > >  > > > To unsubscribe, e-mail:
>  > user-unsubscribe@struts.apache.org
>  > >  > >  > >  > > > For additional commands, e-mail:
>  > user-help@struts.apache.org
>  > >  > >  > >  > > >
>  > >  > >  > >  > > >
>  > >  > >  > >  > >
>  > >  > >  > >  >
>  > >  > >  > >  >
>  > >  > >  > >  >
>  > >  > ---------------------------------------------------------------------
>  > >  > >  > >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > >  > >  > >  > For additional commands, e-mail:
>  > user-help@struts.apache.org
>  > >  > >  > >  >
>  > >  > >  > >  >
>  > >  > >  > >
>  > >  > >  >
>  > >  > >  >
>  > ---------------------------------------------------------------------
>  > >  > >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > >  > >  > For additional commands, e-mail: user-help@struts.apache.org
>  > >  > >  >
>  > >  > >  >
>  > >  > >
>  > >  >
>  > >  > ---------------------------------------------------------------------
>  > >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > >  > For additional commands, e-mail: user-help@struts.apache.org
>  > >  >
>  > >  >
>  > >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > For additional commands, e-mail: user-help@struts.apache.org
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Clearing form value

Posted by aum strut <au...@gmail.com>.
Nils can u just describe a bit wat u mean here by redirect
its quite possible that i am taking redirect in some other way..

aum


On 4/21/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
>
> I don't see why that should prevent you from doing a redirect?
>
> Nils-H
>
> On Mon, Apr 21, 2008 at 5:44 AM, aum strut <au...@gmail.com> wrote:
> > Nils
> >
> >  though i have achieved this using javascript
> >  my problem was that i can not redirect as i have to enter multipal
> records
> >  at a given time
> >
> >
> >
> >
> >  On 4/20/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
> >  >
> >  > Considering you're processing the form and displaying the form using
> >  > the same action within the same request, I would say this is expected
> >  > behavior. I would consider doing a redirect after the post instead.
> >  >
> >  > Nils-H
> >  >
> >  > On Sat, Apr 19, 2008 at 12:06 PM, aum strut <au...@gmail.com>
> wrote:
> >  > > i am not using Spring at all.here is the code for my configuration
> and
> >  > >  action class
> >  > >
> >  > >  my *Quotation.jsp page* by which i am adding data
> >  > >
> >  > >
> >  > >  <%@ taglib prefix="s" uri="/struts-tags" %>
> >  > >
> >  > >  <html>
> >  > >
> >  > >  <head>
> >  > >
> >  > >  <title>Quotation Form</title>
> >  > >
> >  > >  <s:head theme="ajax"/>
> >  > >
> >  > >  </head>
> >  > >
> >  > >  <body>
> >  > >
> >  > >  <center><font face="verdana" size="2"
> color="red"><s:actionmessage></
> >  > >  s:actionmessage></font></center>
> >  > >
> >  > >  <h1 align="center"> &nbsp;&nbsp;&nbsp;Quotation Form</h1>
> >  > >
> >  > >  <s:form action="SaveBill">
> >  > >
> >  > >  <table align="center">
> >  > >
> >  > >   <s:datetimepicker label="Date:" name="date"/></td><td>
> >  > >
> >  > >  <s:textfield label="Voucher Number:" name="voucherNumber"/>
> >  > >
> >  > >  <s:textfield label="Customer Name:" name="customerName"/>
> >  > >
> >  > >  <s:textarea label="Address" name="address" cols="20" rows="4"/>
> >  > >
> >  > >  <s:textfield label="Contact No:" name="contactNo"/>
> >  > >
> >  > >  <s:textfield label="Item Name:" name="itemName"/>
> >  > >
> >  > >  <s:textfield label="Purity:" name="purity"/>
> >  > >
> >  > >  <s:textfield label="Gross Weight(Gms):" name="grossWeight"/>
> >  > >
> >  > >  <s:textfield label="Net Weight(Gms):" name="netWeight"/>
> >  > >
> >  > >  <s:textfield label="Diamond Weight:" name="diamondWeight"/>
> >  > >
> >  > >  <s:textfield label="Gold Rate(Rs):" name="goldRate"/>
> >  > >
> >  > >  <s:textfield label="Amount:" name="amount"/>
> >  > >
> >  > >  <s:submit label="Save" align="center" />
> >  > >
> >  > >  </table>
> >  > >
> >  > >  </s:form>
> >  > >
> >  > >  </body>
> >  > >
> >  > >  </html>
> >  > >  *my action class*
> >  > >
> >  > >
> >  > >  package raisonne.billgeneration;
> >  > >
> >  > >  import com.opensymphony.xwork2.ActionSupport;
> >  > >  import raisonne.billgeneration.GetBillConnection;
> >  > >
> >  > >  public class SaveBillingData extends ActionSupport{
> >  > >
> >  > >   /**
> >  > >   *
> >  > >   */
> >  > >   private static final long serialVersionUID =
> -5856152810070496725L;
> >  > >   private int rowInserted=0;
> >  > >   private String date=null;
> >  > >   private String voucherNumber=null;
> >  > >   private String customerName=null;
> >  > >   private String address=null;
> >  > >   private String contactNo=null;
> >  > >   private String itemName=null;
> >  > >   private String purity=null;
> >  > >   private double grossWeight=0.0;
> >  > >   private double netWeight=0.0;
> >  > >   private double diamondWeight=0.0;
> >  > >   private double goldRate=0.0;
> >  > >   private double amount=0.0;
> >  > >
> >  > >  /*
> >  > >
> >  > >  Getter and Setter Method
> >  > >
> >  > >  */
> >  > >
> >  > >   public String execute() throws Exception{
> >  > >   GetBillConnection billCollection =new GetBillConnection();
> >  > >
> >  >
> rowInserted=billCollection.AddBillingData(getDate(),getVoucherNumber(),
> >  > >     getCustomerName(),getAddress(),getContactNo(),
> >  > >     getItemName(),getPurity(),getGrossWeight(),
> >  > >     getNetWeight(),getDiamondWeight(),getGoldRate(),getAmount());
> >  > >   if(rowInserted>0){
> >  > >    addActionMessage("Quotation data has been submitted
> successfully");
> >  > >    return SUCCESS;
> >  > >   }
> >  > >   else{
> >  > >    addActionMessage("Error while saving Quotation data, Pleaes
> retry");
> >  > >    return INPUT;
> >  > >   }
> >  > >   }
> >  > >
> >  > >
> >  > >  }
> >  > >
> >  > >
> >  > >  lastly *Struts.xml file*
> >  > >
> >  > >
> >  > >  <package name="raisonne.billgeneration" extends="struts-default"
> >  > namespace=
> >  > >  "/">
> >  > >
> >  > >  <action name="SaveBill"
> >  > class="raisonne.billgeneration.SaveBillingData">
> >  > >
> >  > >  <result name="success">/BillGeneration/Quotation.jsp</result>
> >  > >
> >  > >  <result name="input">/Login/Login.jsp</result>
> >  > >
> >  > >  </action>
> >  > >
> >  > >  </package>
> >  > >  -aum
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >  On 4/19/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
> >  > >  >
> >  > >  > It would be a lot easier helping if you show us some
> configuration
> >  > >  > files and code....
> >  > >  >
> >  > >  > Nils-H
> >  > >  >
> >  > >  > On Sat, Apr 19, 2008 at 6:59 AM, aum strut <aum.struts@gmail.com
> >
> >  > wrote:
> >  > >  > > yes you are right
> >  > >  > >
> >  > >  > >  not providing complete information in one mail is really not
> good
> >  > >  > >
> >  > >  > >  i wil take this in to account in future...
> >  > >  > >
> >  > >  > >  well i am not using spring in my application i have a simple
> form
> >  > which
> >  > >  > is
> >  > >  > >  sending the input values to my action where i am adding these
> in
> >  > to the
> >  > >  > data
> >  > >  > >  base using simple jdbc call everything is working fine i am
> even
> >  > >  > getting
> >  > >  > >  back the success response in my add form.
> >  > >  > >
> >  > >  > >  i am not able to understand what u mean by "not have your
> action
> >  > >  > defined as
> >  > >  > >  being "prototype"
> >  > >  > >  scope"
> >  > >  > >
> >  > >  > >  aum
> >  > >  > >
> >  > >  > >
> >  > >  > >
> >  > >  > >
> >  > >  > >  On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
> >  > >  > >  >
> >  > >  > >  > Are you using Spring?
> >  > >  > >  >
> >  > >  > >  > Would it be possible for you to provide more useful
> information
> >  > in
> >  > >  > your
> >  > >  > >  > initial emails rather than generating a stream of a
> half-dozen
> >  > or
> >  > >  > more?
> >  > >  > >  > It's
> >  > >  > >  > rather frustrating; we've gone through this before.
> >  > >  > >  >
> >  > >  > >  > One common error is to not have your action defined as
> being
> >  > >  > "prototype"
> >  > >  > >  > scope. Since actions are instantiated on each request
> (normally)
> >  > it's
> >  > >  > not
> >  > >  > >  > typical to see this behavior without some effort on your
> part or
> >  > >  > >  > mis-configuration.
> >  > >  > >  >
> >  > >  > >  > Dave
> >  > >  > >  >
> >  > >  > >  > --- aum strut <au...@gmail.com> wrote:
> >  > >  > >  >
> >  > >  > >  > > currently i am using struts-2.0.11.1
> >  > >  > >  > >
> >  > >  > >  > > On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
> >  > >  > >  > > >
> >  > >  > >  > > > Which version of Struts?
> >  > >  > >  > > >
> >  > >  > >  > > > --- aum strut <au...@gmail.com> wrote:
> >  > >  > >  > > >
> >  > >  > >  > > > > Hi all,
> >  > >  > >  > > > >
> >  > >  > >  > > > > a little point which i want to know.
> >  > >  > >  > > > > i have a form by which we can add billing detais in
> the
> >  > >  > database
> >  > >  > >  > > > >
> >  > >  > >  > > > > form is working fine, it is adding the value to the
> >  > database as
> >  > >  > >  > > > expected,
> >  > >  > >  > > > > the problem whcih i am facing is even after
> successfully
> >  > >  > submitting
> >  > >  > >  > the
> >  > >  > >  > > > > values, it is not clearing the form values which has
> been
> >  > added
> >  > >  > >  > > > >
> >  > >  > >  > > > > i can clear the fields values  using java script,but
> i
> >  > want to
> >  > >  > know
> >  > >  > >  > is
> >  > >  > >  > > > it
> >  > >  > >  > > > > possible using Struts2,is theer any was that when
> ever
> >  > data is
> >  > >  > >  > > submitted
> >  > >  > >  > > > > successfully in the database form fields values
> should get
> >  > >  > cleared.
> >  > >  > >  > > > >
> >  > >  > >  > > > >
> >  > >  > >  > > > > any help in this regard will be much appriciated.
> >  > >  > >  > > > >
> >  > >  > >  > > > >
> >  > >  > >  > > > > thanks in advance
> >  > >  > >  > > > > --aum
> >  > >  > >  > > > >
> >  > >  > >  > > >
> >  > >  > >  > > >
> >  > >  > >  > > >
> >  > >  >
> ---------------------------------------------------------------------
> >  > >  > >  > > > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> >  > >  > >  > > > For additional commands, e-mail:
> user-help@struts.apache.org
> >  > >  > >  > > >
> >  > >  > >  > > >
> >  > >  > >  > >
> >  > >  > >  >
> >  > >  > >  >
> >  > >  > >  >
> >  > ---------------------------------------------------------------------
> >  > >  > >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > >  > >  > For additional commands, e-mail:
> user-help@struts.apache.org
> >  > >  > >  >
> >  > >  > >  >
> >  > >  > >
> >  > >  >
> >  > >  >
> ---------------------------------------------------------------------
> >  > >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > >  > For additional commands, e-mail: user-help@struts.apache.org
> >  > >  >
> >  > >  >
> >  > >
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > For additional commands, e-mail: user-help@struts.apache.org
> >  >
> >  >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Clearing form value

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
I don't see why that should prevent you from doing a redirect?

Nils-H

On Mon, Apr 21, 2008 at 5:44 AM, aum strut <au...@gmail.com> wrote:
> Nils
>
>  though i have achieved this using javascript
>  my problem was that i can not redirect as i have to enter multipal records
>  at a given time
>
>
>
>
>  On 4/20/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
>  >
>  > Considering you're processing the form and displaying the form using
>  > the same action within the same request, I would say this is expected
>  > behavior. I would consider doing a redirect after the post instead.
>  >
>  > Nils-H
>  >
>  > On Sat, Apr 19, 2008 at 12:06 PM, aum strut <au...@gmail.com> wrote:
>  > > i am not using Spring at all.here is the code for my configuration and
>  > >  action class
>  > >
>  > >  my *Quotation.jsp page* by which i am adding data
>  > >
>  > >
>  > >  <%@ taglib prefix="s" uri="/struts-tags" %>
>  > >
>  > >  <html>
>  > >
>  > >  <head>
>  > >
>  > >  <title>Quotation Form</title>
>  > >
>  > >  <s:head theme="ajax"/>
>  > >
>  > >  </head>
>  > >
>  > >  <body>
>  > >
>  > >  <center><font face="verdana" size="2" color="red"><s:actionmessage></
>  > >  s:actionmessage></font></center>
>  > >
>  > >  <h1 align="center"> &nbsp;&nbsp;&nbsp;Quotation Form</h1>
>  > >
>  > >  <s:form action="SaveBill">
>  > >
>  > >  <table align="center">
>  > >
>  > >   <s:datetimepicker label="Date:" name="date"/></td><td>
>  > >
>  > >  <s:textfield label="Voucher Number:" name="voucherNumber"/>
>  > >
>  > >  <s:textfield label="Customer Name:" name="customerName"/>
>  > >
>  > >  <s:textarea label="Address" name="address" cols="20" rows="4"/>
>  > >
>  > >  <s:textfield label="Contact No:" name="contactNo"/>
>  > >
>  > >  <s:textfield label="Item Name:" name="itemName"/>
>  > >
>  > >  <s:textfield label="Purity:" name="purity"/>
>  > >
>  > >  <s:textfield label="Gross Weight(Gms):" name="grossWeight"/>
>  > >
>  > >  <s:textfield label="Net Weight(Gms):" name="netWeight"/>
>  > >
>  > >  <s:textfield label="Diamond Weight:" name="diamondWeight"/>
>  > >
>  > >  <s:textfield label="Gold Rate(Rs):" name="goldRate"/>
>  > >
>  > >  <s:textfield label="Amount:" name="amount"/>
>  > >
>  > >  <s:submit label="Save" align="center" />
>  > >
>  > >  </table>
>  > >
>  > >  </s:form>
>  > >
>  > >  </body>
>  > >
>  > >  </html>
>  > >  *my action class*
>  > >
>  > >
>  > >  package raisonne.billgeneration;
>  > >
>  > >  import com.opensymphony.xwork2.ActionSupport;
>  > >  import raisonne.billgeneration.GetBillConnection;
>  > >
>  > >  public class SaveBillingData extends ActionSupport{
>  > >
>  > >   /**
>  > >   *
>  > >   */
>  > >   private static final long serialVersionUID = -5856152810070496725L;
>  > >   private int rowInserted=0;
>  > >   private String date=null;
>  > >   private String voucherNumber=null;
>  > >   private String customerName=null;
>  > >   private String address=null;
>  > >   private String contactNo=null;
>  > >   private String itemName=null;
>  > >   private String purity=null;
>  > >   private double grossWeight=0.0;
>  > >   private double netWeight=0.0;
>  > >   private double diamondWeight=0.0;
>  > >   private double goldRate=0.0;
>  > >   private double amount=0.0;
>  > >
>  > >  /*
>  > >
>  > >  Getter and Setter Method
>  > >
>  > >  */
>  > >
>  > >   public String execute() throws Exception{
>  > >   GetBillConnection billCollection =new GetBillConnection();
>  > >
>  > rowInserted=billCollection.AddBillingData(getDate(),getVoucherNumber(),
>  > >     getCustomerName(),getAddress(),getContactNo(),
>  > >     getItemName(),getPurity(),getGrossWeight(),
>  > >     getNetWeight(),getDiamondWeight(),getGoldRate(),getAmount());
>  > >   if(rowInserted>0){
>  > >    addActionMessage("Quotation data has been submitted successfully");
>  > >    return SUCCESS;
>  > >   }
>  > >   else{
>  > >    addActionMessage("Error while saving Quotation data, Pleaes retry");
>  > >    return INPUT;
>  > >   }
>  > >   }
>  > >
>  > >
>  > >  }
>  > >
>  > >
>  > >  lastly *Struts.xml file*
>  > >
>  > >
>  > >  <package name="raisonne.billgeneration" extends="struts-default"
>  > namespace=
>  > >  "/">
>  > >
>  > >  <action name="SaveBill"
>  > class="raisonne.billgeneration.SaveBillingData">
>  > >
>  > >  <result name="success">/BillGeneration/Quotation.jsp</result>
>  > >
>  > >  <result name="input">/Login/Login.jsp</result>
>  > >
>  > >  </action>
>  > >
>  > >  </package>
>  > >  -aum
>  > >
>  > >
>  > >
>  > >
>  > >  On 4/19/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
>  > >  >
>  > >  > It would be a lot easier helping if you show us some configuration
>  > >  > files and code....
>  > >  >
>  > >  > Nils-H
>  > >  >
>  > >  > On Sat, Apr 19, 2008 at 6:59 AM, aum strut <au...@gmail.com>
>  > wrote:
>  > >  > > yes you are right
>  > >  > >
>  > >  > >  not providing complete information in one mail is really not good
>  > >  > >
>  > >  > >  i wil take this in to account in future...
>  > >  > >
>  > >  > >  well i am not using spring in my application i have a simple form
>  > which
>  > >  > is
>  > >  > >  sending the input values to my action where i am adding these in
>  > to the
>  > >  > data
>  > >  > >  base using simple jdbc call everything is working fine i am even
>  > >  > getting
>  > >  > >  back the success response in my add form.
>  > >  > >
>  > >  > >  i am not able to understand what u mean by "not have your action
>  > >  > defined as
>  > >  > >  being "prototype"
>  > >  > >  scope"
>  > >  > >
>  > >  > >  aum
>  > >  > >
>  > >  > >
>  > >  > >
>  > >  > >
>  > >  > >  On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>  > >  > >  >
>  > >  > >  > Are you using Spring?
>  > >  > >  >
>  > >  > >  > Would it be possible for you to provide more useful information
>  > in
>  > >  > your
>  > >  > >  > initial emails rather than generating a stream of a half-dozen
>  > or
>  > >  > more?
>  > >  > >  > It's
>  > >  > >  > rather frustrating; we've gone through this before.
>  > >  > >  >
>  > >  > >  > One common error is to not have your action defined as being
>  > >  > "prototype"
>  > >  > >  > scope. Since actions are instantiated on each request (normally)
>  > it's
>  > >  > not
>  > >  > >  > typical to see this behavior without some effort on your part or
>  > >  > >  > mis-configuration.
>  > >  > >  >
>  > >  > >  > Dave
>  > >  > >  >
>  > >  > >  > --- aum strut <au...@gmail.com> wrote:
>  > >  > >  >
>  > >  > >  > > currently i am using struts-2.0.11.1
>  > >  > >  > >
>  > >  > >  > > On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>  > >  > >  > > >
>  > >  > >  > > > Which version of Struts?
>  > >  > >  > > >
>  > >  > >  > > > --- aum strut <au...@gmail.com> wrote:
>  > >  > >  > > >
>  > >  > >  > > > > Hi all,
>  > >  > >  > > > >
>  > >  > >  > > > > a little point which i want to know.
>  > >  > >  > > > > i have a form by which we can add billing detais in the
>  > >  > database
>  > >  > >  > > > >
>  > >  > >  > > > > form is working fine, it is adding the value to the
>  > database as
>  > >  > >  > > > expected,
>  > >  > >  > > > > the problem whcih i am facing is even after successfully
>  > >  > submitting
>  > >  > >  > the
>  > >  > >  > > > > values, it is not clearing the form values which has been
>  > added
>  > >  > >  > > > >
>  > >  > >  > > > > i can clear the fields values  using java script,but i
>  > want to
>  > >  > know
>  > >  > >  > is
>  > >  > >  > > > it
>  > >  > >  > > > > possible using Struts2,is theer any was that when ever
>  > data is
>  > >  > >  > > submitted
>  > >  > >  > > > > successfully in the database form fields values should get
>  > >  > cleared.
>  > >  > >  > > > >
>  > >  > >  > > > >
>  > >  > >  > > > > any help in this regard will be much appriciated.
>  > >  > >  > > > >
>  > >  > >  > > > >
>  > >  > >  > > > > thanks in advance
>  > >  > >  > > > > --aum
>  > >  > >  > > > >
>  > >  > >  > > >
>  > >  > >  > > >
>  > >  > >  > > >
>  > >  > ---------------------------------------------------------------------
>  > >  > >  > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > >  > >  > > > For additional commands, e-mail: user-help@struts.apache.org
>  > >  > >  > > >
>  > >  > >  > > >
>  > >  > >  > >
>  > >  > >  >
>  > >  > >  >
>  > >  > >  >
>  > ---------------------------------------------------------------------
>  > >  > >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > >  > >  > For additional commands, e-mail: user-help@struts.apache.org
>  > >  > >  >
>  > >  > >  >
>  > >  > >
>  > >  >
>  > >  > ---------------------------------------------------------------------
>  > >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > >  > For additional commands, e-mail: user-help@struts.apache.org
>  > >  >
>  > >  >
>  > >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > For additional commands, e-mail: user-help@struts.apache.org
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Clearing form value

Posted by aum strut <au...@gmail.com>.
Nils

though i have achieved this using javascript
my problem was that i can not redirect as i have to enter multipal records
at a given time


On 4/20/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
>
> Considering you're processing the form and displaying the form using
> the same action within the same request, I would say this is expected
> behavior. I would consider doing a redirect after the post instead.
>
> Nils-H
>
> On Sat, Apr 19, 2008 at 12:06 PM, aum strut <au...@gmail.com> wrote:
> > i am not using Spring at all.here is the code for my configuration and
> >  action class
> >
> >  my *Quotation.jsp page* by which i am adding data
> >
> >
> >  <%@ taglib prefix="s" uri="/struts-tags" %>
> >
> >  <html>
> >
> >  <head>
> >
> >  <title>Quotation Form</title>
> >
> >  <s:head theme="ajax"/>
> >
> >  </head>
> >
> >  <body>
> >
> >  <center><font face="verdana" size="2" color="red"><s:actionmessage></
> >  s:actionmessage></font></center>
> >
> >  <h1 align="center"> &nbsp;&nbsp;&nbsp;Quotation Form</h1>
> >
> >  <s:form action="SaveBill">
> >
> >  <table align="center">
> >
> >   <s:datetimepicker label="Date:" name="date"/></td><td>
> >
> >  <s:textfield label="Voucher Number:" name="voucherNumber"/>
> >
> >  <s:textfield label="Customer Name:" name="customerName"/>
> >
> >  <s:textarea label="Address" name="address" cols="20" rows="4"/>
> >
> >  <s:textfield label="Contact No:" name="contactNo"/>
> >
> >  <s:textfield label="Item Name:" name="itemName"/>
> >
> >  <s:textfield label="Purity:" name="purity"/>
> >
> >  <s:textfield label="Gross Weight(Gms):" name="grossWeight"/>
> >
> >  <s:textfield label="Net Weight(Gms):" name="netWeight"/>
> >
> >  <s:textfield label="Diamond Weight:" name="diamondWeight"/>
> >
> >  <s:textfield label="Gold Rate(Rs):" name="goldRate"/>
> >
> >  <s:textfield label="Amount:" name="amount"/>
> >
> >  <s:submit label="Save" align="center" />
> >
> >  </table>
> >
> >  </s:form>
> >
> >  </body>
> >
> >  </html>
> >  *my action class*
> >
> >
> >  package raisonne.billgeneration;
> >
> >  import com.opensymphony.xwork2.ActionSupport;
> >  import raisonne.billgeneration.GetBillConnection;
> >
> >  public class SaveBillingData extends ActionSupport{
> >
> >   /**
> >   *
> >   */
> >   private static final long serialVersionUID = -5856152810070496725L;
> >   private int rowInserted=0;
> >   private String date=null;
> >   private String voucherNumber=null;
> >   private String customerName=null;
> >   private String address=null;
> >   private String contactNo=null;
> >   private String itemName=null;
> >   private String purity=null;
> >   private double grossWeight=0.0;
> >   private double netWeight=0.0;
> >   private double diamondWeight=0.0;
> >   private double goldRate=0.0;
> >   private double amount=0.0;
> >
> >  /*
> >
> >  Getter and Setter Method
> >
> >  */
> >
> >   public String execute() throws Exception{
> >   GetBillConnection billCollection =new GetBillConnection();
> >
> rowInserted=billCollection.AddBillingData(getDate(),getVoucherNumber(),
> >     getCustomerName(),getAddress(),getContactNo(),
> >     getItemName(),getPurity(),getGrossWeight(),
> >     getNetWeight(),getDiamondWeight(),getGoldRate(),getAmount());
> >   if(rowInserted>0){
> >    addActionMessage("Quotation data has been submitted successfully");
> >    return SUCCESS;
> >   }
> >   else{
> >    addActionMessage("Error while saving Quotation data, Pleaes retry");
> >    return INPUT;
> >   }
> >   }
> >
> >
> >  }
> >
> >
> >  lastly *Struts.xml file*
> >
> >
> >  <package name="raisonne.billgeneration" extends="struts-default"
> namespace=
> >  "/">
> >
> >  <action name="SaveBill"
> class="raisonne.billgeneration.SaveBillingData">
> >
> >  <result name="success">/BillGeneration/Quotation.jsp</result>
> >
> >  <result name="input">/Login/Login.jsp</result>
> >
> >  </action>
> >
> >  </package>
> >  -aum
> >
> >
> >
> >
> >  On 4/19/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
> >  >
> >  > It would be a lot easier helping if you show us some configuration
> >  > files and code....
> >  >
> >  > Nils-H
> >  >
> >  > On Sat, Apr 19, 2008 at 6:59 AM, aum strut <au...@gmail.com>
> wrote:
> >  > > yes you are right
> >  > >
> >  > >  not providing complete information in one mail is really not good
> >  > >
> >  > >  i wil take this in to account in future...
> >  > >
> >  > >  well i am not using spring in my application i have a simple form
> which
> >  > is
> >  > >  sending the input values to my action where i am adding these in
> to the
> >  > data
> >  > >  base using simple jdbc call everything is working fine i am even
> >  > getting
> >  > >  back the success response in my add form.
> >  > >
> >  > >  i am not able to understand what u mean by "not have your action
> >  > defined as
> >  > >  being "prototype"
> >  > >  scope"
> >  > >
> >  > >  aum
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >  On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
> >  > >  >
> >  > >  > Are you using Spring?
> >  > >  >
> >  > >  > Would it be possible for you to provide more useful information
> in
> >  > your
> >  > >  > initial emails rather than generating a stream of a half-dozen
> or
> >  > more?
> >  > >  > It's
> >  > >  > rather frustrating; we've gone through this before.
> >  > >  >
> >  > >  > One common error is to not have your action defined as being
> >  > "prototype"
> >  > >  > scope. Since actions are instantiated on each request (normally)
> it's
> >  > not
> >  > >  > typical to see this behavior without some effort on your part or
> >  > >  > mis-configuration.
> >  > >  >
> >  > >  > Dave
> >  > >  >
> >  > >  > --- aum strut <au...@gmail.com> wrote:
> >  > >  >
> >  > >  > > currently i am using struts-2.0.11.1
> >  > >  > >
> >  > >  > > On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
> >  > >  > > >
> >  > >  > > > Which version of Struts?
> >  > >  > > >
> >  > >  > > > --- aum strut <au...@gmail.com> wrote:
> >  > >  > > >
> >  > >  > > > > Hi all,
> >  > >  > > > >
> >  > >  > > > > a little point which i want to know.
> >  > >  > > > > i have a form by which we can add billing detais in the
> >  > database
> >  > >  > > > >
> >  > >  > > > > form is working fine, it is adding the value to the
> database as
> >  > >  > > > expected,
> >  > >  > > > > the problem whcih i am facing is even after successfully
> >  > submitting
> >  > >  > the
> >  > >  > > > > values, it is not clearing the form values which has been
> added
> >  > >  > > > >
> >  > >  > > > > i can clear the fields values  using java script,but i
> want to
> >  > know
> >  > >  > is
> >  > >  > > > it
> >  > >  > > > > possible using Struts2,is theer any was that when ever
> data is
> >  > >  > > submitted
> >  > >  > > > > successfully in the database form fields values should get
> >  > cleared.
> >  > >  > > > >
> >  > >  > > > >
> >  > >  > > > > any help in this regard will be much appriciated.
> >  > >  > > > >
> >  > >  > > > >
> >  > >  > > > > thanks in advance
> >  > >  > > > > --aum
> >  > >  > > > >
> >  > >  > > >
> >  > >  > > >
> >  > >  > > >
> >  > ---------------------------------------------------------------------
> >  > >  > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > >  > > > For additional commands, e-mail: user-help@struts.apache.org
> >  > >  > > >
> >  > >  > > >
> >  > >  > >
> >  > >  >
> >  > >  >
> >  > >  >
> ---------------------------------------------------------------------
> >  > >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > >  > For additional commands, e-mail: user-help@struts.apache.org
> >  > >  >
> >  > >  >
> >  > >
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > For additional commands, e-mail: user-help@struts.apache.org
> >  >
> >  >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Clearing form value

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
Considering you're processing the form and displaying the form using
the same action within the same request, I would say this is expected
behavior. I would consider doing a redirect after the post instead.

Nils-H

On Sat, Apr 19, 2008 at 12:06 PM, aum strut <au...@gmail.com> wrote:
> i am not using Spring at all.here is the code for my configuration and
>  action class
>
>  my *Quotation.jsp page* by which i am adding data
>
>
>  <%@ taglib prefix="s" uri="/struts-tags" %>
>
>  <html>
>
>  <head>
>
>  <title>Quotation Form</title>
>
>  <s:head theme="ajax"/>
>
>  </head>
>
>  <body>
>
>  <center><font face="verdana" size="2" color="red"><s:actionmessage></
>  s:actionmessage></font></center>
>
>  <h1 align="center"> &nbsp;&nbsp;&nbsp;Quotation Form</h1>
>
>  <s:form action="SaveBill">
>
>  <table align="center">
>
>   <s:datetimepicker label="Date:" name="date"/></td><td>
>
>  <s:textfield label="Voucher Number:" name="voucherNumber"/>
>
>  <s:textfield label="Customer Name:" name="customerName"/>
>
>  <s:textarea label="Address" name="address" cols="20" rows="4"/>
>
>  <s:textfield label="Contact No:" name="contactNo"/>
>
>  <s:textfield label="Item Name:" name="itemName"/>
>
>  <s:textfield label="Purity:" name="purity"/>
>
>  <s:textfield label="Gross Weight(Gms):" name="grossWeight"/>
>
>  <s:textfield label="Net Weight(Gms):" name="netWeight"/>
>
>  <s:textfield label="Diamond Weight:" name="diamondWeight"/>
>
>  <s:textfield label="Gold Rate(Rs):" name="goldRate"/>
>
>  <s:textfield label="Amount:" name="amount"/>
>
>  <s:submit label="Save" align="center" />
>
>  </table>
>
>  </s:form>
>
>  </body>
>
>  </html>
>  *my action class*
>
>
>  package raisonne.billgeneration;
>
>  import com.opensymphony.xwork2.ActionSupport;
>  import raisonne.billgeneration.GetBillConnection;
>
>  public class SaveBillingData extends ActionSupport{
>
>   /**
>   *
>   */
>   private static final long serialVersionUID = -5856152810070496725L;
>   private int rowInserted=0;
>   private String date=null;
>   private String voucherNumber=null;
>   private String customerName=null;
>   private String address=null;
>   private String contactNo=null;
>   private String itemName=null;
>   private String purity=null;
>   private double grossWeight=0.0;
>   private double netWeight=0.0;
>   private double diamondWeight=0.0;
>   private double goldRate=0.0;
>   private double amount=0.0;
>
>  /*
>
>  Getter and Setter Method
>
>  */
>
>   public String execute() throws Exception{
>   GetBillConnection billCollection =new GetBillConnection();
>   rowInserted=billCollection.AddBillingData(getDate(),getVoucherNumber(),
>     getCustomerName(),getAddress(),getContactNo(),
>     getItemName(),getPurity(),getGrossWeight(),
>     getNetWeight(),getDiamondWeight(),getGoldRate(),getAmount());
>   if(rowInserted>0){
>    addActionMessage("Quotation data has been submitted successfully");
>    return SUCCESS;
>   }
>   else{
>    addActionMessage("Error while saving Quotation data, Pleaes retry");
>    return INPUT;
>   }
>   }
>
>
>  }
>
>
>  lastly *Struts.xml file*
>
>
>  <package name="raisonne.billgeneration" extends="struts-default" namespace=
>  "/">
>
>  <action name="SaveBill" class="raisonne.billgeneration.SaveBillingData">
>
>  <result name="success">/BillGeneration/Quotation.jsp</result>
>
>  <result name="input">/Login/Login.jsp</result>
>
>  </action>
>
>  </package>
>  -aum
>
>
>
>
>  On 4/19/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
>  >
>  > It would be a lot easier helping if you show us some configuration
>  > files and code....
>  >
>  > Nils-H
>  >
>  > On Sat, Apr 19, 2008 at 6:59 AM, aum strut <au...@gmail.com> wrote:
>  > > yes you are right
>  > >
>  > >  not providing complete information in one mail is really not good
>  > >
>  > >  i wil take this in to account in future...
>  > >
>  > >  well i am not using spring in my application i have a simple form which
>  > is
>  > >  sending the input values to my action where i am adding these in to the
>  > data
>  > >  base using simple jdbc call everything is working fine i am even
>  > getting
>  > >  back the success response in my add form.
>  > >
>  > >  i am not able to understand what u mean by "not have your action
>  > defined as
>  > >  being "prototype"
>  > >  scope"
>  > >
>  > >  aum
>  > >
>  > >
>  > >
>  > >
>  > >  On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>  > >  >
>  > >  > Are you using Spring?
>  > >  >
>  > >  > Would it be possible for you to provide more useful information in
>  > your
>  > >  > initial emails rather than generating a stream of a half-dozen or
>  > more?
>  > >  > It's
>  > >  > rather frustrating; we've gone through this before.
>  > >  >
>  > >  > One common error is to not have your action defined as being
>  > "prototype"
>  > >  > scope. Since actions are instantiated on each request (normally) it's
>  > not
>  > >  > typical to see this behavior without some effort on your part or
>  > >  > mis-configuration.
>  > >  >
>  > >  > Dave
>  > >  >
>  > >  > --- aum strut <au...@gmail.com> wrote:
>  > >  >
>  > >  > > currently i am using struts-2.0.11.1
>  > >  > >
>  > >  > > On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>  > >  > > >
>  > >  > > > Which version of Struts?
>  > >  > > >
>  > >  > > > --- aum strut <au...@gmail.com> wrote:
>  > >  > > >
>  > >  > > > > Hi all,
>  > >  > > > >
>  > >  > > > > a little point which i want to know.
>  > >  > > > > i have a form by which we can add billing detais in the
>  > database
>  > >  > > > >
>  > >  > > > > form is working fine, it is adding the value to the database as
>  > >  > > > expected,
>  > >  > > > > the problem whcih i am facing is even after successfully
>  > submitting
>  > >  > the
>  > >  > > > > values, it is not clearing the form values which has been added
>  > >  > > > >
>  > >  > > > > i can clear the fields values  using java script,but i want to
>  > know
>  > >  > is
>  > >  > > > it
>  > >  > > > > possible using Struts2,is theer any was that when ever data is
>  > >  > > submitted
>  > >  > > > > successfully in the database form fields values should get
>  > cleared.
>  > >  > > > >
>  > >  > > > >
>  > >  > > > > any help in this regard will be much appriciated.
>  > >  > > > >
>  > >  > > > >
>  > >  > > > > thanks in advance
>  > >  > > > > --aum
>  > >  > > > >
>  > >  > > >
>  > >  > > >
>  > >  > > >
>  > ---------------------------------------------------------------------
>  > >  > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > >  > > > For additional commands, e-mail: user-help@struts.apache.org
>  > >  > > >
>  > >  > > >
>  > >  > >
>  > >  >
>  > >  >
>  > >  > ---------------------------------------------------------------------
>  > >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > >  > For additional commands, e-mail: user-help@struts.apache.org
>  > >  >
>  > >  >
>  > >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > For additional commands, e-mail: user-help@struts.apache.org
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Clearing form value

Posted by aum strut <au...@gmail.com>.
i am not using Spring at all.here is the code for my configuration and
action class

my *Quotation.jsp page* by which i am adding data


<%@ taglib prefix="s" uri="/struts-tags" %>

<html>

<head>

<title>Quotation Form</title>

<s:head theme="ajax"/>

</head>

<body>

<center><font face="verdana" size="2" color="red"><s:actionmessage></
s:actionmessage></font></center>

<h1 align="center"> &nbsp;&nbsp;&nbsp;Quotation Form</h1>

<s:form action="SaveBill">

<table align="center">

 <s:datetimepicker label="Date:" name="date"/></td><td>

<s:textfield label="Voucher Number:" name="voucherNumber"/>

<s:textfield label="Customer Name:" name="customerName"/>

<s:textarea label="Address" name="address" cols="20" rows="4"/>

<s:textfield label="Contact No:" name="contactNo"/>

<s:textfield label="Item Name:" name="itemName"/>

<s:textfield label="Purity:" name="purity"/>

<s:textfield label="Gross Weight(Gms):" name="grossWeight"/>

<s:textfield label="Net Weight(Gms):" name="netWeight"/>

<s:textfield label="Diamond Weight:" name="diamondWeight"/>

<s:textfield label="Gold Rate(Rs):" name="goldRate"/>

<s:textfield label="Amount:" name="amount"/>

<s:submit label="Save" align="center" />

</table>

</s:form>

</body>

</html>
*my action class*


package raisonne.billgeneration;

import com.opensymphony.xwork2.ActionSupport;
import raisonne.billgeneration.GetBillConnection;

public class SaveBillingData extends ActionSupport{

 /**
  *
  */
 private static final long serialVersionUID = -5856152810070496725L;
 private int rowInserted=0;
 private String date=null;
 private String voucherNumber=null;
 private String customerName=null;
 private String address=null;
 private String contactNo=null;
 private String itemName=null;
 private String purity=null;
 private double grossWeight=0.0;
 private double netWeight=0.0;
 private double diamondWeight=0.0;
 private double goldRate=0.0;
 private double amount=0.0;

/*

Getter and Setter Method

*/

 public String execute() throws Exception{
  GetBillConnection billCollection =new GetBillConnection();
  rowInserted=billCollection.AddBillingData(getDate(),getVoucherNumber(),
    getCustomerName(),getAddress(),getContactNo(),
    getItemName(),getPurity(),getGrossWeight(),
    getNetWeight(),getDiamondWeight(),getGoldRate(),getAmount());
  if(rowInserted>0){
   addActionMessage("Quotation data has been submitted successfully");
   return SUCCESS;
  }
  else{
   addActionMessage("Error while saving Quotation data, Pleaes retry");
   return INPUT;
  }
 }


}


lastly *Struts.xml file*


<package name="raisonne.billgeneration" extends="struts-default" namespace=
"/">

<action name="SaveBill" class="raisonne.billgeneration.SaveBillingData">

<result name="success">/BillGeneration/Quotation.jsp</result>

<result name="input">/Login/Login.jsp</result>

</action>

</package>
-aum


On 4/19/08, Nils-Helge Garli Hegvik <ni...@gmail.com> wrote:
>
> It would be a lot easier helping if you show us some configuration
> files and code....
>
> Nils-H
>
> On Sat, Apr 19, 2008 at 6:59 AM, aum strut <au...@gmail.com> wrote:
> > yes you are right
> >
> >  not providing complete information in one mail is really not good
> >
> >  i wil take this in to account in future...
> >
> >  well i am not using spring in my application i have a simple form which
> is
> >  sending the input values to my action where i am adding these in to the
> data
> >  base using simple jdbc call everything is working fine i am even
> getting
> >  back the success response in my add form.
> >
> >  i am not able to understand what u mean by "not have your action
> defined as
> >  being "prototype"
> >  scope"
> >
> >  aum
> >
> >
> >
> >
> >  On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
> >  >
> >  > Are you using Spring?
> >  >
> >  > Would it be possible for you to provide more useful information in
> your
> >  > initial emails rather than generating a stream of a half-dozen or
> more?
> >  > It's
> >  > rather frustrating; we've gone through this before.
> >  >
> >  > One common error is to not have your action defined as being
> "prototype"
> >  > scope. Since actions are instantiated on each request (normally) it's
> not
> >  > typical to see this behavior without some effort on your part or
> >  > mis-configuration.
> >  >
> >  > Dave
> >  >
> >  > --- aum strut <au...@gmail.com> wrote:
> >  >
> >  > > currently i am using struts-2.0.11.1
> >  > >
> >  > > On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
> >  > > >
> >  > > > Which version of Struts?
> >  > > >
> >  > > > --- aum strut <au...@gmail.com> wrote:
> >  > > >
> >  > > > > Hi all,
> >  > > > >
> >  > > > > a little point which i want to know.
> >  > > > > i have a form by which we can add billing detais in the
> database
> >  > > > >
> >  > > > > form is working fine, it is adding the value to the database as
> >  > > > expected,
> >  > > > > the problem whcih i am facing is even after successfully
> submitting
> >  > the
> >  > > > > values, it is not clearing the form values which has been added
> >  > > > >
> >  > > > > i can clear the fields values  using java script,but i want to
> know
> >  > is
> >  > > > it
> >  > > > > possible using Struts2,is theer any was that when ever data is
> >  > > submitted
> >  > > > > successfully in the database form fields values should get
> cleared.
> >  > > > >
> >  > > > >
> >  > > > > any help in this regard will be much appriciated.
> >  > > > >
> >  > > > >
> >  > > > > thanks in advance
> >  > > > > --aum
> >  > > > >
> >  > > >
> >  > > >
> >  > > >
> ---------------------------------------------------------------------
> >  > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > > > For additional commands, e-mail: user-help@struts.apache.org
> >  > > >
> >  > > >
> >  > >
> >  >
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > For additional commands, e-mail: user-help@struts.apache.org
> >  >
> >  >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Clearing form value

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
It would be a lot easier helping if you show us some configuration
files and code....

Nils-H

On Sat, Apr 19, 2008 at 6:59 AM, aum strut <au...@gmail.com> wrote:
> yes you are right
>
>  not providing complete information in one mail is really not good
>
>  i wil take this in to account in future...
>
>  well i am not using spring in my application i have a simple form which is
>  sending the input values to my action where i am adding these in to the data
>  base using simple jdbc call everything is working fine i am even getting
>  back the success response in my add form.
>
>  i am not able to understand what u mean by "not have your action defined as
>  being "prototype"
>  scope"
>
>  aum
>
>
>
>
>  On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>  >
>  > Are you using Spring?
>  >
>  > Would it be possible for you to provide more useful information in your
>  > initial emails rather than generating a stream of a half-dozen or more?
>  > It's
>  > rather frustrating; we've gone through this before.
>  >
>  > One common error is to not have your action defined as being "prototype"
>  > scope. Since actions are instantiated on each request (normally) it's not
>  > typical to see this behavior without some effort on your part or
>  > mis-configuration.
>  >
>  > Dave
>  >
>  > --- aum strut <au...@gmail.com> wrote:
>  >
>  > > currently i am using struts-2.0.11.1
>  > >
>  > > On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>  > > >
>  > > > Which version of Struts?
>  > > >
>  > > > --- aum strut <au...@gmail.com> wrote:
>  > > >
>  > > > > Hi all,
>  > > > >
>  > > > > a little point which i want to know.
>  > > > > i have a form by which we can add billing detais in the database
>  > > > >
>  > > > > form is working fine, it is adding the value to the database as
>  > > > expected,
>  > > > > the problem whcih i am facing is even after successfully submitting
>  > the
>  > > > > values, it is not clearing the form values which has been added
>  > > > >
>  > > > > i can clear the fields values  using java script,but i want to know
>  > is
>  > > > it
>  > > > > possible using Struts2,is theer any was that when ever data is
>  > > submitted
>  > > > > successfully in the database form fields values should get cleared.
>  > > > >
>  > > > >
>  > > > > any help in this regard will be much appriciated.
>  > > > >
>  > > > >
>  > > > > thanks in advance
>  > > > > --aum
>  > > > >
>  > > >
>  > > >
>  > > > ---------------------------------------------------------------------
>  > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > > > For additional commands, e-mail: user-help@struts.apache.org
>  > > >
>  > > >
>  > >
>  >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > For additional commands, e-mail: user-help@struts.apache.org
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Clearing form value

Posted by aum strut <au...@gmail.com>.
yes you are right

not providing complete information in one mail is really not good

i wil take this in to account in future...

well i am not using spring in my application i have a simple form which is
sending the input values to my action where i am adding these in to the data
base using simple jdbc call everything is working fine i am even getting
back the success response in my add form.

i am not able to understand what u mean by "not have your action defined as
being "prototype"
scope"

aum


On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>
> Are you using Spring?
>
> Would it be possible for you to provide more useful information in your
> initial emails rather than generating a stream of a half-dozen or more?
> It's
> rather frustrating; we've gone through this before.
>
> One common error is to not have your action defined as being "prototype"
> scope. Since actions are instantiated on each request (normally) it's not
> typical to see this behavior without some effort on your part or
> mis-configuration.
>
> Dave
>
> --- aum strut <au...@gmail.com> wrote:
>
> > currently i am using struts-2.0.11.1
> >
> > On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
> > >
> > > Which version of Struts?
> > >
> > > --- aum strut <au...@gmail.com> wrote:
> > >
> > > > Hi all,
> > > >
> > > > a little point which i want to know.
> > > > i have a form by which we can add billing detais in the database
> > > >
> > > > form is working fine, it is adding the value to the database as
> > > expected,
> > > > the problem whcih i am facing is even after successfully submitting
> the
> > > > values, it is not clearing the form values which has been added
> > > >
> > > > i can clear the fields values  using java script,but i want to know
> is
> > > it
> > > > possible using Struts2,is theer any was that when ever data is
> > submitted
> > > > successfully in the database form fields values should get cleared.
> > > >
> > > >
> > > > any help in this regard will be much appriciated.
> > > >
> > > >
> > > > thanks in advance
> > > > --aum
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Clearing form value

Posted by Dave Newton <ne...@yahoo.com>.
Are you using Spring?

Would it be possible for you to provide more useful information in your
initial emails rather than generating a stream of a half-dozen or more? It's
rather frustrating; we've gone through this before.

One common error is to not have your action defined as being "prototype"
scope. Since actions are instantiated on each request (normally) it's not
typical to see this behavior without some effort on your part or
mis-configuration.

Dave

--- aum strut <au...@gmail.com> wrote:

> currently i am using struts-2.0.11.1
> 
> On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
> >
> > Which version of Struts?
> >
> > --- aum strut <au...@gmail.com> wrote:
> >
> > > Hi all,
> > >
> > > a little point which i want to know.
> > > i have a form by which we can add billing detais in the database
> > >
> > > form is working fine, it is adding the value to the database as
> > expected,
> > > the problem whcih i am facing is even after successfully submitting the
> > > values, it is not clearing the form values which has been added
> > >
> > > i can clear the fields values  using java script,but i want to know is
> > it
> > > possible using Struts2,is theer any was that when ever data is
> submitted
> > > successfully in the database form fields values should get cleared.
> > >
> > >
> > > any help in this regard will be much appriciated.
> > >
> > >
> > > thanks in advance
> > > --aum
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Clearing form value

Posted by aum strut <au...@gmail.com>.
currently i am using struts-2.0.11.1

On 4/19/08, Dave Newton <ne...@yahoo.com> wrote:
>
> Which version of Struts?
>
> --- aum strut <au...@gmail.com> wrote:
>
> > Hi all,
> >
> > a little point which i want to know.
> > i have a form by which we can add billing detais in the database
> >
> > form is working fine, it is adding the value to the database as
> expected,
> > the problem whcih i am facing is even after successfully submitting the
> > values, it is not clearing the form values which has been added
> >
> > i can clear the fields values  using java script,but i want to know is
> it
> > possible using Struts2,is theer any was that when ever data is submitted
> > successfully in the database form fields values should get cleared.
> >
> >
> > any help in this regard will be much appriciated.
> >
> >
> > thanks in advance
> > --aum
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Clearing form value

Posted by Dave Newton <ne...@yahoo.com>.
Which version of Struts?

--- aum strut <au...@gmail.com> wrote:

> Hi all,
> 
> a little point which i want to know.
> i have a form by which we can add billing detais in the database
> 
> form is working fine, it is adding the value to the database as expected,
> the problem whcih i am facing is even after successfully submitting the
> values, it is not clearing the form values which has been added
> 
> i can clear the fields values  using java script,but i want to know is it
> possible using Struts2,is theer any was that when ever data is submitted
> successfully in the database form fields values should get cleared.
> 
> 
> any help in this regard will be much appriciated.
> 
> 
> thanks in advance
> --aum
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org