Merrill
Consultant, Sima Solutions
Originally posted by Merrill Higginson:
One other suggestion: In Struts, it's better to make all input fields Strings, and then convert them to other data types in your Model objects if you need to. While the above code will work for valid data, if the user enters a value that cannot be converted to a float, Struts will throw an exception. If you use Strings, you can validate the values first, and then convert them to floats in your Model. Another point is that with the above code, you're forced to accept the default formatting of your floats. If you use Strings, you can format the output however you want.
Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
Merrill
Consultant, Sima Solutions
Merrill
Consultant, Sima Solutions
Merrill
Consultant, Sima Solutions
Merrill
Consultant, Sima Solutions
Merrill
Consultant, Sima Solutions
Originally posted by Jobin Mathew:
But the number of textbox varies according to the selection by the user in the previous page.
Merrill
Consultant, Sima Solutions
Merrill
Consultant, Sima Solutions
Originally posted by Jobin Mathew:
I dont get the flow of the extra getter/setter ie the one with index as parameter.
Merrill
Consultant, Sima Solutions
But if we are providing getter/setter of only ArrayList type how it will work.
Merrill
Consultant, Sima Solutions
Other problem is that once if I add 7 values and at a later time if only 3 textboxes are appearing, still the size of ArrayList is 7. So I cant write my further logic by using the count of ArrayList. Is there any commonly used way to handle these.
Merrill
Consultant, Sima Solutions
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |