April 26, 2007 12:37 PM
To: Struts Users Mailing List
Subject: Re: Struts/FormDef formatting question
Then you'll have to have code to convert between the two. If you're
using Formdef, you can put this logic in Converter and associate that
converter with the field in the form you'
n at least see if
the destination type is a subclass of Actionform and format accordingly. Sound
ok?
-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 26, 2007 12:37 PM
To: Struts Users Mailing List
Subject: Re: Struts/FormDef formatting question
T
Then you'll have to have code to convert between the two. If you're
using Formdef, you can put this logic in Converter and associate that
converter with the field in the form you're using. If not, you'll
have to handle this within your Action when you prepopulate your
outgoi
Users Mailing List
Subject: Re: Struts/FormDef formatting question
Your form field will come in as String. If you'll be storing the data
as string as well, maybe you don't need any more conversion between
the two.
Hubert
On 4/26/07, Givler, Eric <[EMAIL PROTECTED]> wrote:
> I
Your form field will come in as String. If you'll be storing the data
as string as well, maybe you don't need any more conversion between
the two.
Hubert
On 4/26/07, Givler, Eric <[EMAIL PROTECTED]> wrote:
I was reading on the Formdef site about using a formatter (converter)
I was reading on the Formdef site about using a formatter (converter) for
handling a phone number for dynamic form beans in Struts. I have a situation
that is very similar to this but I'm not sure how to go about writing it. The
existing table has numeric phone fields which will n
On 8/2/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
On 7/20/06, Hubert Rabago <[EMAIL PROTECTED]> wrote:
> FormDef support nested beans, and nested collections of beans. If you
> had a nested Address object, your form would look like:
>
>
>
>
In your ex
On 7/20/06, Hubert Rabago <[EMAIL PROTECTED]> wrote:
FormDef support nested beans, and nested collections of beans. If you
had a nested Address object, your form would look like:
In your example Address is nested within ActionForm, right? What if I
have an object like Person
ing List
> Subject: Re: FormDef
>
> Um, by nested beans I mean a bean which is a property of ActionForm
> like Employee, not a bean which is a property of a bean which is a
> property of an ActionForm, like Address. I guess there is a
> discrepancy in terminology here ;-)
>
&
(inline)
-Original Message-
From: Michael Jouravlev [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 20, 2006 6:16 PM
To: Struts Users Mailing List
Subject: Re: FormDef
Um, by nested beans I mean a bean which is a property of ActionForm
like Employee, not a bean which is a property of a
/formdef/manual.htm):
"To declare a form bean using FormDef, simple add a entry in
the configuration file, provide the name for your form bean, and the
name of the class from which the form bean will be patterned after.
... When the plugin gets executed, it will create a DynaActionForm
conta
(was: Is there any direct link between model and view in struts..)
On 7/20/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
Another library,
FormDef, can build a dynaform based on properties of nested business
object
Hey Michael,
Just thought I'd set the record straight.
FormD
I've always told people I'll start [ANN]ouncing once I hit 1.0, so...
FormDef 1.0 has been released and is ready for download.
http://www.rabago.net/struts/formdef/
FormDef allows you to easily declare Struts form beans based on
existing business classes. This allows an applicatio
On 11/3/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> Started a new thread, so it were visible in GMail.
>
> That was the idea. If FormDef could somehow pull my definitions from
> struts-config.xml or, which is much better, from configured Java
> objects, I would not
ould not have to reimplement this property in FormDef, and I
> > would not have to wait for you to reimplement it ;-) I would just
> > apply your patch to my copy of DynaActionForm, and FormDef would pick
> > up transparently whatever properties are defined in struts-config.xml.
> >
On 11/2/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
>
> If it were possible to use form definitions made in struts-config.xml,
> then you would not have to reimplement this property in FormDef, and I
> would not have to wait for you to reimplement it ;-) I would just
> a
gt; > don't care where), for example:
> >
> > > type="org.apache.struts.validator.DynaValidatorForm">
> >
> >> reset="true"/>
> >
>
> Well, once Struts supports resettable fields then it'll be supported
> by FormD
struts.validator.DynaValidatorForm">
>
>reset="true"/>
>
Well, once Struts supports resettable fields then it'll be supported
by FormDef. FormDef supports the same attributes that
supports. (Of course, there's no reset yet in struts-config, so there
ain't
On 11/2/05, Hubert Rabago <[EMAIL PROTECTED]> wrote:
> On 11/2/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > Hubert,
> >
> > I cannot find if you explained it already, how to combine FormDef and
> > a regular Struts dynaform definitions.
On 11/2/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> Hubert,
>
> I cannot find if you explained it already, how to combine FormDef and
> a regular Struts dynaform definitions. In your manual you write only
> about DynaValidatorForm.
FormDef can only work with for
Hubert,
I cannot find if you explained it already, how to combine FormDef and
a regular Struts dynaform definitions. In your manual you write only
about DynaValidatorForm.
Considering your recent patch to DynaActionForm, I would like to
define a form with resettable properties, and to use
Hubert Rabago wrote:
On 10/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
Do you want to say, that Struts somehow gets to know that a form was
submitted? How exactly does it do that? Can you show it in the code?
There is nothing in request which says "this stuff comes from an HTML
form"
On 10/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> Well, that means that I should patch RequestProcessor/RequestUtils
> myself. Thanks for clarification. Still, that enhancement in Bugzilla,
> it is important despite the fact that it is outside of FormDef's
> scope. All I am asking for is
On 10/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> I am telling you that checkbox values should be cleared, you are
> telling me that reset() is get called. Don't you think these are
> different things? ;-)
I don't think there are any disagreements there. :) We're discussing
clearing th
bmission.
On 10/12/05, Hubert Rabago <[EMAIL PROTECTED]> wrote:
> On 10/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > I really want to use your stuff, but I need to differentiate between
> > request types (more generally, between input and output phases, but in
&
de the scope of FormDef.
FormDef scope is limited to configuring the form beans upon startup,
and any other method the Action itself calls. Aside from that,
nothing else changes. The following might help (I might add these to
the FAQ):
1) How are the form beans that FormDef configure different f
On 10/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> It is not *my* GET ;-) Ok, I will try to analyze what happens on
> request, please correct me if I am wrong.
>
> HTML form is submitted to an action (in 99% of cases via POST);
>
> 1) RequestProcessor.process() is called:
>
> 2) Action
On 10/12/05, Hubert Rabago <[EMAIL PROTECTED]> wrote:
> Still not quite getting you. Are you saying that reset will be called
> during your GET? Is this because you've configured your action with
> the same form?
It is not *my* GET ;-) Ok, I will try to analyze what happens on
request, please co
Still not quite getting you. Are you saying that reset will be called
during your GET? Is this because you've configured your action with
the same form?
On 10/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
>
> > If you're prepopulating your form, none of this matters, since either
> > (1)
On 10/12/05, Hubert Rabago <[EMAIL PROTECTED]> wrote:
> I'm not sure we're understanding each other about this request type.
>
> When a form is submitted, here's what happens:
>
> * Struts receives a request for an action
> * Struts sees that a form was configured for the mapping, so it calls
> ret
I'm not sure we're understanding each other about this request type.
When a form is submitted, here's what happens:
* Struts receives a request for an action
* Struts sees that a form was configured for the mapping, so it calls
retrieves the form (if it can find it) or creates a new one
[processA
That would be great, but please don't forget the request type. Usually
I need to do this for POST requests only, this separation by type is
really important to me. So instead of reset="true" I would rather
have:
where "reset" can be:
* "true" or "ALL" to reset for any request type;
* "POST" or
Wow, you've got good timing, because someone is calling for this very
feature in FormDef, patch provided:
https://formdef.dev.java.net/issues/show_bug.cgi?id=2
The quick answer to your question is "no". FormDef doesn't meddle
with how Struts populates the form. It's mo
est-scoped
dynaforms, but session-scoped forms need to clear their
checkbox-related fields right before a form is populated.
Hubert, is it possible to add a feature in FormDef, which would allow to:
* either clear all boolean fields when request comes;
* or to clean only selected fields;
*
No, though to be honest I didn't try very hard; I found another route to
achieving what I needed and never came back to look further at FormDef.
L.
Ted Husted wrote:
Just curious, Laurie. Did you ever find a way to use FormDef within
your constraints?
On 7/18/05, Laurie Harper &l
Just curious, Laurie. Did you ever find a way to use FormDef within
your constraints?
On 7/18/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
> Hubert Rabago wrote:
> > On 7/16/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
> >>I then fill the form in using a JSP tag if
won't. For one thing, the FormDef set/getFormUtils
methods need resources available to the Action object, such as the
ActionMapping.
Damn, that's pretty much a deal-breaker for me, since I have a requirement
to avoid using 'setup' actions in front of my JSPs. I'll take a
On 7/16/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
>
> 1) Given that FormDef is using DynaBeans / DynaForms under the covers, am I
> right in assuming that form properties would need to be accessed with
> expressings like ${EmployeeForm.map['address'].map['cit
Hubert Rabago wrote:
Well, since you asked.
The current FormDef dev build supports defining dynamic forms that
have nested properties.
https://formdef.dev.java.net/servlets/ReadMsg?list=users&msgNo=116
Awsome, I clearly need to check this out :-)
I have an article to illustrate how
39 matches
Mail list logo