You could have a point about the MVC model, in fact, I am not entirely onboard with JSP as an MVC model anyway, but, that being said, I usually consider the form beans as part of the view in a struts application. In my applications the form beans generally encapsulate a data bean and I try to keep separation that way.
Robert Nocera New England Open Solutions www.neosllc.com "You supply the vision, we'll do the rest." -----Original Message----- From: Krueger, Jeff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 11:23 AM To: '[EMAIL PROTECTED]' Subject: RE: Formatting a float for display Robert, Thanks for your response. Actually the way that I currently have it coded is the way that you have described. I created a getDisplayValue(), but this just doesn't seem right to me. My understanding about the MVC architecture should allow for your display to not have to be tied to your model. If my formBean is the one responsible for returning the data type for my model, then I am violating this principal. Maybe it is a minor detail, but that was the first thought that came to my mind. Thoughts Jeff -----Original Message----- From: Robert Nocera To: 'Struts Users Mailing List' Sent: 11/14/2001 11:11 AM Subject: RE: Formatting a float for display Did you try only changing the get method to return the formatted string? Or just creating a get method called getFloatFormatted and using that only to display the value? Robert Nocera New England Open Solutions www.neosllc.com "You supply the vision, we'll do the rest." -----Original Message----- From: Krueger, Jeff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 11:04 AM To: '[EMAIL PROTECTED]' Subject: Formatting a float for display All, My guess is there is some easy way to do this. I have a formBean that has a get and a set for a value that is a float. I want to display this float in a format of #,###.##. I am using java.text.DecimalFormat and that works pretty good except it returns a String. So if I change my get and set to return a String then I will have to convert that back in my action class to a float and Float.parse("#,###.##") will throw a format exception. So I am wondering if there is any utils or good practices to have your formBean display a float with formatting and then get that value back in the action class in a float data type. Thanks Jeff Krueger -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>