This is exactly what FormDef does. It reads your existing bean and
configures a form bean for it. Reuse.
You can continue to use BeanUtils with the FormDef-configured beans as
you would any other form bean, or you can also use FormDef's
setFormValues()/getFormValues() and take advantage of its
f
Thank God I haven't ventured into Struts validation - what a waste of time if
it only does
String and boolean.
mc
On 8 Nov 2005 at 23:10, Hubert Rabago wrote:
> I feel I have to explain something about Struts form beans.
>
> It is not recommended that you use fields other than String and
> bo
Hubert,
You made a very good point. Thanks for your patient explanation, that's
exactly the problem I am facing, all int fields are initialized to 0.
Probably even I want to use this feature, I need design a DTO for the form,
and put all String or boolean values as properties.
At beginning I just
On 11/8/05, Yujun Liang <[EMAIL PROTECTED]> wrote:
> in Struts, you can define
>
>type="com.clear2pay.bph.bean.Instruction"/>
>
>
> and you can just call,
>
> bean = ((DynaActionForm) form).get(pageName);
> in this case pageName = "instruction";
>
> and Struts automatically populate a
> com.c
Hubert,
I checked formDef and but I found out it is not what I want, here is the
reason, in Struts, you can define
and you can just call,
bean = ((DynaActionForm) form).get(pageName);
in this case pageName = "instruction";
and Struts automatically populate a
com.clear2pay.bph.bean.Instructio
On 11/3/05, Yujun Liang <[EMAIL PROTECTED]> wrote:
> Hubert,
>
> Good morning! ( Since I am sending it from Australia.)
Good morning!
> How can I convert an input from user to the Date field base on the Locale?
> I mean the locale is a varible during the session and conversion can
> handle multip
Hubert,
Good morning! ( Since I am sending it from Australia.)
I am reading the document on formDef, it is such a nice plugin so why don't
you incorporate it into Struts? It will make project much productive.
Question for you,
Property type global converters
Property type global converters ar
FormDef works fine with Validator. For the most part they won't even
be aware of each other. There's no overlap in functionality and they
won't get in the way of one another.
Hubert
On 11/2/05, Yujun Liang <[EMAIL PROTECTED]> wrote:
> Hubert, your input is quite valuable. But I just wonder this
Hubert, your input is quite valuable. But I just wonder this suppose to be
handled by Struts itsself,
You may also place a bean instance on your form, and use nested property
references. For example, you might have a "customer" bean on your
ActionForm, and then refer to the property
"customer.name
[ Oh, I missed my cue! :) ]
If your form bean maps to a business object (and it sounds like it
does since you're using BeanUtils), you can try FormDef:
http://formdef.dev.java.net/
You won't need to create a separate ActionForm class or manually
define your DynaActionForm, FormDef will configure
Thanks Richard, I wasn't aware of this.
mc
On 28 Oct 2005 at 6:48, Richard Yee wrote:
> You should be aware that when using a java.text.DateFormat class or its
> subclass as a static variable in a bean that can be accessed via
> multiple threads simultaneously, you need to synchronize access to
You should be aware that when using a java.text.DateFormat class or its
subclass as a static variable in a bean that can be accessed via
multiple threads simultaneously, you need to synchronize access to it
because DateFormat is not thread-safe. So you should change the code
below to:
publ
ngwood" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Friday, October 28, 2005 2:44 PM
Subject: Re: java.util.Date in Action Form Bean
Hi
I add additional getters and setters for handling dates and prices (and
other special
numeric formats). For example, in additio
Hi
I add additional getters and setters for handling dates and prices (and other
special
numeric formats). For example, in addition to the normal getter I code an
additional
one to retrieve the date as a string.
public Date getDateStart() {
return dateStart;
}
public Str
14 matches
Mail list logo