Re: [Form field values.. regarding]

2005-10-21 Thread Laurie Harper

Deva Pitchai(NatureSoft) wrote:

Hi group

hope you all must come across this situation...
If u can tell me how to solve this... i will be very much thankful

when i edit a form (say with 10 fields in it. some are dropdown, textbox 
etc), the non-mandatory fields are displaying 0.0 as the field value, 
which is the value from the database.


Now my question is is there any simple way to avoid this kind of 
displaying 0.0.

Or I need to write a method to make it as null


How are you getting the data from your database into your form? If 
you're using an ActionForm and you have primitive typed properties 
(float, for example) the easiest quick-fix would be to use the 
corresponding wrapper type (e.g. Float).


Without knowing more about how your pages are put together it's 
difficult to offer more specific advice, but feel free to post more 
details of what you're doing now if you need more guidance.


L.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Form field values.. regarding]

2005-10-21 Thread rajasekhar . cherukuri

Hi,
You can use the value= attribute in the tag in which you don't 
want the default values to be loaded. This doe not require any special 
method.

Regards,
Rajasekhar Cherukuri




Deva Pitchai(NatureSoft) [EMAIL PROTECTED] 
10/21/2005 01:10 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
[Form field values.. regarding]






[With snapshot attached]

Hi group

hope you all must come across this situation...
If u can tell me how to solve this... i will be very much thankful

when i edit a form (say with 10 fields in it. some are dropdown, textbox
etc), the non-mandatory fields are displaying 0.0 as the field value,
which is the value from the database.


Now my question is is there any simple way to avoid this kind of
displaying 0.0.
Or I need to write a method to make it as null


Thanks in adv
Deva


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ForwardSourceID:NT661E 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: [Form field values.. regarding]

2005-10-21 Thread Deva Pitchai(NatureSoft)

inline reply!

Laurie Harper wrote:


Deva Pitchai(NatureSoft) wrote:


Hi group

hope you all must come across this situation...
If u can tell me how to solve this... i will be very much thankful

when i edit a form (say with 10 fields in it. some are dropdown, 
textbox etc), the non-mandatory fields are displaying 0.0 as the 
field value, which is the value from the database.


Now my question is is there any simple way to avoid this kind of 
displaying 0.0.

Or I need to write a method to make it as null



How are you getting the data from your database into your form? If 
you're using an ActionForm and you have primitive typed properties 
(float, for example) the easiest quick-fix would be to use the 
corresponding wrapper type (e.g. Float).



wht u guessed is right. I will try to use the wrapper class
Thanks

Without knowing more about how your pages are put together it's 
difficult to offer more specific advice, but feel free to post more 
details of what you're doing now if you need more guidance.


L.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Form field values.. regarding]

2005-10-21 Thread Deva Pitchai(NatureSoft)

you mean to say that in struts tag we can have  value='' attribute?

[EMAIL PROTECTED] wrote:


Hi,
   You can use the value= attribute in the tag in which you don't 
want the default values to be loaded. This doe not require any special 
method.


Regards,
Rajasekhar Cherukuri




Deva Pitchai(NatureSoft) [EMAIL PROTECTED] 
10/21/2005 01:10 PM

Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
[Form field values.. regarding]






[With snapshot attached]

Hi group

hope you all must come across this situation...
If u can tell me how to solve this... i will be very much thankful

when i edit a form (say with 10 fields in it. some are dropdown, textbox
etc), the non-mandatory fields are displaying 0.0 as the field value,
which is the value from the database.


Now my question is is there any simple way to avoid this kind of
displaying 0.0.
Or I need to write a method to make it as null


Thanks in adv
Deva


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ForwardSourceID:NT661E 



Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Form field values.. regarding]

2005-10-21 Thread Laurie Harper

Deva Pitchai(NatureSoft) wrote:
How are you getting the data from your database into your form? If 
you're using an ActionForm and you have primitive typed properties 
(float, for example) the easiest quick-fix would be to use the 
corresponding wrapper type (e.g. Float).



wht u guessed is right. I will try to use the wrapper class
Thanks


OK. You might also want to consider using String rather than a number 
type like Float.


The reason is, you can then redisplay invalid data for the user to 
correct. For example, if the user types in 'xyz' validation should fail. 
If you have the form property type as Float, you now can't redisplay 
that input (because a Float object can't represent the entered value, 
'xyz'). With a String, the form will redisplay with the incorrect value 
along with your validation error message, so the user can see what he 
entered wrong.


L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Form field values.. regarding]

2005-10-21 Thread Laurie Harper
Yes, that will work; but if you do that, the field will always be 
displayed empty (or with whatever value you specify). Again, that 
reduces the amount of feedback to the user when redisplaying the form 
following validation failure.


Using 'value' works well when you always want to force the input to a 
particular value, regardless of what is loaded into the form from your 
database or following a form submit and redisplay. That's usually not 
what you want though :-)


L.

Deva Pitchai(NatureSoft) wrote:

you mean to say that in struts tag we can have  value='' attribute?

[EMAIL PROTECTED] wrote:


Hi,
   You can use the value= attribute in the tag in which you 
don't want the default values to be loaded. This doe not require any 
special method.


Regards,
Rajasekhar Cherukuri




Deva Pitchai(NatureSoft) [EMAIL PROTECTED] 10/21/2005 01:10 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
[Form field values.. regarding]






[With snapshot attached]

Hi group

hope you all must come across this situation...
If u can tell me how to solve this... i will be very much thankful

when i edit a form (say with 10 fields in it. some are dropdown, textbox
etc), the non-mandatory fields are displaying 0.0 as the field value,
which is the value from the database.


Now my question is is there any simple way to avoid this kind of
displaying 0.0.
Or I need to write a method to make it as null


Thanks in adv
Deva


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ForwardSourceID:NT661E

Notice: The information contained in this e-mail message and/or 
attachments to it may contain confidential or privileged 
information.   If you are not the intended recipient, any 
dissemination, use, review, distribution, printing or copying of the 
information contained in this e-mail message and/or attachments to it 
are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately 
and permanently delete the message and any attachments.  Thank you
 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Form field values.. regarding]

2005-10-21 Thread Deva Pitchai(NatureSoft)
i feel this is not required since this is handled by the struts and the 
form bean.


Laurie Harper wrote:

Yes, that will work; but if you do that, the field will always be 
displayed empty (or with whatever value you specify). Again, that 
reduces the amount of feedback to the user when redisplaying the form 
following validation failure.


Using 'value' works well when you always want to force the input to a 
particular value, regardless of what is loaded into the form from your 
database or following a form submit and redisplay. That's usually not 
what you want though :-)


L.

Deva Pitchai(NatureSoft) wrote:


you mean to say that in struts tag we can have  value='' attribute?

[EMAIL PROTECTED] wrote:


Hi,
   You can use the value= attribute in the tag in which you 
don't want the default values to be loaded. This doe not require any 
special method.


Regards,
Rajasekhar Cherukuri




Deva Pitchai(NatureSoft) [EMAIL PROTECTED] 10/21/2005 01:10 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
[Form field values.. regarding]






[With snapshot attached]

Hi group

hope you all must come across this situation...
If u can tell me how to solve this... i will be very much thankful

when i edit a form (say with 10 fields in it. some are dropdown, 
textbox

etc), the non-mandatory fields are displaying 0.0 as the field value,
which is the value from the database.


Now my question is is there any simple way to avoid this kind of
displaying 0.0.
Or I need to write a method to make it as null


Thanks in adv
Deva


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ForwardSourceID:NT661E

Notice: The information contained in this e-mail message and/or 
attachments to it may contain confidential or privileged 
information.   If you are not the intended recipient, any 
dissemination, use, review, distribution, printing or copying of the 
information contained in this e-mail message and/or attachments to 
it are strictly prohibited.   If you have received this 
communication in error, please notify us by reply e-mail or 
telephone and immediately and permanently delete the message and any 
attachments.  Thank you
 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]