Conceptual question about populating/validating values

2003-09-17 Thread lecker
Hi there,

I have a conceptual question about the population process for properties
inside Struts.

First of all a description:

I have a JSP which includes a text input field like this:



"currentPerson" is a Person-Object which has a birthDate-Attribute of type
java.util.Date (!).
This object is part of the myForm-Bean. 

I know about the alternative to have string values in my FormBean and set
the property of my object "by hand", but I don't like this !!

The Request-Processing now does the following:

1. RequestProcessor.processPopulate(...)
   2. RequestUtils.populate(...request)
  3. BeanUtils.populate(bean, properties)
  ...
  4. BeanUtils.setProperty(...)
 5. ConvertUtils.convert(...)
6. PropertyUtils.setProperty(...)

6. RequestProcessor.processValidate(...)
..

In my example the string representing a date is converted into a
Date-Object in step 5 (ConvertUtils.convert())
I could use the sessions locale here for LOCALE-specific conversions and
set a default value in case the conversion failes.
I know about this !

Lets asume the following:
-> A user enters an invalid date 
-> conversion failes and the default value will be set as birthDate
-> the user gets the page back including an error message about an invalid
date
-> the date input field holds the default date now

BUT: What I would like the user to see is it's original text, not the
default value or anything else.

ANY IDEA, how to do this ? (Without having string variables to store the
form-values !)
Since I also would also like to specify a regexp-mask in the
validation.xml it looks to me, that the processValidate() is a bit too
late.

Thanks in advance,
Dirk









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



RE: Conceptual question about populating/validating values

2003-09-17 Thread Edgar P Dollin
If I were you I would use strings in my form beans (or at least methods or
parallel field which accept strings as arguments) and look into third party
stuff, i.e. Matt Kruse's date handling javascript.  Additionally, I would
bypass the validator and validate in my action (that way you would have the
text the user entered).  It is easy enough to emulate the validator flow of
control (just read the mapping and get the 'input' value and forward to it).

Edgar

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 17, 2003 6:23 AM
> To: [EMAIL PROTECTED]
> Subject: Conceptual question about populating/validating values
> 
> 
> Hi there,
> 
> I have a conceptual question about the population process for 
> properties inside Struts.
> 
> First of all a description:
> 
> I have a JSP which includes a text input field like this:
> 
> 
> 
> "currentPerson" is a Person-Object which has a 
> birthDate-Attribute of type java.util.Date (!). This object 
> is part of the myForm-Bean. 
> 
> I know about the alternative to have string values in my 
> FormBean and set the property of my object "by hand", but I 
> don't like this !!
> 
> The Request-Processing now does the following:
> 
> 1. RequestProcessor.processPopulate(...)
>2. RequestUtils.populate(...request)
>   3. BeanUtils.populate(bean, properties)
>   ...
>   4. BeanUtils.setProperty(...)
>  5. ConvertUtils.convert(...)
> 6. PropertyUtils.setProperty(...)
> 
> 6. RequestProcessor.processValidate(...)
> ..
> 
> In my example the string representing a date is converted 
> into a Date-Object in step 5 (ConvertUtils.convert()) I could 
> use the sessions locale here for LOCALE-specific conversions 
> and set a default value in case the conversion failes. I know 
> about this !
> 
> Lets asume the following:
> -> A user enters an invalid date
> -> conversion failes and the default value will be set as birthDate
> -> the user gets the page back including an error message 
> about an invalid
> date
> -> the date input field holds the default date now
> 
> BUT: What I would like the user to see is it's original text, 
> not the default value or anything else.
> 
> ANY IDEA, how to do this ? (Without having string variables 
> to store the form-values !) Since I also would also like to 
> specify a regexp-mask in the validation.xml it looks to me, 
> that the processValidate() is a bit too late.
> 
> Thanks in advance,
> Dirk
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -
> 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: Conceptual question about populating/validating values

2003-09-17 Thread Bygrave, Graham BGI UK
I hit the same problem.  I don't like having two fields (string and type
specific) as you have to sync. them and it bloats your objects out.  I
don't like the idea of having two suites of objects, it's just more
work.  I don't like not using the validator either.  I made some minor
modifications to beanutils/convertutils to allow for the passing through
of the property name in question.  You also need to get access to the
ServletRequest object in your custom converter (I did this using a
filter which stores the requests in a thread local object, which you may
find distasteful).  I don't want to loose any erroneous input the user
entered, so my custom converter writes the input into the http request
(just using the full a.b.c notation is a key) and this is then put back
into the jsp using a slightly modified TextTag.  You have access to the
request in your converter, so you can build any validation errors there.

Regards,
Graham.


-Original Message-
From: Edgar P Dollin [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 12:33
To: Struts Developers List
Subject: RE: Conceptual question about populating/validating values


If I were you I would use strings in my form beans (or at least methods
or
parallel field which accept strings as arguments) and look into third
party
stuff, i.e. Matt Kruse's date handling javascript.  Additionally, I
would
bypass the validator and validate in my action (that way you would have
the
text the user entered).  It is easy enough to emulate the validator flow
of
control (just read the mapping and get the 'input' value and forward to
it).

Edgar

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 17, 2003 6:23 AM
> To: [EMAIL PROTECTED]
> Subject: Conceptual question about populating/validating values
> 
> 
> Hi there,
> 
> I have a conceptual question about the population process for 
> properties inside Struts.
> 
> First of all a description:
> 
> I have a JSP which includes a text input field like this:
> 
> 
> 
> "currentPerson" is a Person-Object which has a 
> birthDate-Attribute of type java.util.Date (!). This object 
> is part of the myForm-Bean. 
> 
> I know about the alternative to have string values in my 
> FormBean and set the property of my object "by hand", but I 
> don't like this !!
> 
> The Request-Processing now does the following:
> 
> 1. RequestProcessor.processPopulate(...)
>2. RequestUtils.populate(...request)
>   3. BeanUtils.populate(bean, properties)
>   ...
>   4. BeanUtils.setProperty(...)
>  5. ConvertUtils.convert(...)
> 6. PropertyUtils.setProperty(...)
> 
> 6. RequestProcessor.processValidate(...)
> ..
> 
> In my example the string representing a date is converted 
> into a Date-Object in step 5 (ConvertUtils.convert()) I could 
> use the sessions locale here for LOCALE-specific conversions 
> and set a default value in case the conversion failes. I know 
> about this !
> 
> Lets asume the following:
> -> A user enters an invalid date
> -> conversion failes and the default value will be set as birthDate
> -> the user gets the page back including an error message 
> about an invalid
> date
> -> the date input field holds the default date now
> 
> BUT: What I would like the user to see is it's original text, 
> not the default value or anything else.
> 
> ANY IDEA, how to do this ? (Without having string variables 
> to store the form-values !) Since I also would also like to 
> specify a regexp-mask in the validation.xml it looks to me, 
> that the processValidate() is a bit too late.
> 
> Thanks in advance,
> Dirk
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -
> 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]

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



AW: Conceptual question about populating/validating values

2003-09-17 Thread lecker
Thanks ! I don't give up to try it without parallel variables :-)
The date was just an example ... and the customer does'nt like javascript
a lot ...

 --- Ursprüngliche Nachricht ---
Datum: 17.09.2003 13:33
Von: "Struts Developers List" <[EMAIL PROTECTED]>
An: "'Struts Developers List'" <[EMAIL PROTECTED]>
Betreff: RE: Conceptual question about populating/validating values

> If I were you I would use strings in my form beans (or at least methods
or
> parallel field which accept strings as arguments) and look into third
party
> stuff, i.e. Matt Kruse's date handling javascript.  Additionally, I
would
> bypass the validator and validate in my action (that way you would have
the
> text the user entered).  It is easy enough to emulate the validator flow
of
> control (just read the mapping and get the 'input' value and forward to
it).
>
> Edgar
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, September 17, 2003 6:23 AM
> > To: [EMAIL PROTECTED]
> > Subject: Conceptual question about populating/validating values
> >
> >
> > Hi there,
> >
> > I have a conceptual question about the population process for
> > properties inside Struts.
> >
> > First of all a description:
> >
> > I have a JSP which includes a text input field like this:
> >
> > 
> >
> > "currentPerson" is a Person-Object which has a
> > birthDate-Attribute of type java.util.Date (!). This object
> > is part of the myForm-Bean.
> >
> > I know about the alternative to have string values in my
> > FormBean and set the property of my object "by hand", but I
> > don't like this !!
> >
> > The Request-Processing now does the following:
> >
> > 1. RequestProcessor.processPopulate(...)
> >2. RequestUtils.populate(...request)
> >   3. BeanUtils.populate(bean, properties)
> >   ...
> >   4. BeanUtils.setProperty(...)
> >  5. ConvertUtils.convert(...)
> > 6. PropertyUtils.setProperty(...)
> >
> > 6. RequestProcessor.processValidate(...)
> > ..
> >
> > In my example the string representing a date is converted
> > into a Date-Object in step 5 (ConvertUtils.convert()) I could
> > use the sessions locale here for LOCALE-specific conversions
> > and set a default value in case the conversion failes. I know
> > about this !
> >
> > Lets asume the following:
> > -> A user enters an invalid date
> > -> conversion failes and the default value will be set as birthDate
> > -> the user gets the page back including an error message
> > about an invalid
> > date
> > -> the date input field holds the default date now
> >
> > BUT: What I would like the user to see is it's original text,
> > not the default value or anything else.
> >
> > ANY IDEA, how to do this ? (Without having string variables
> > to store the form-values !) Since I also would also like to
> > specify a regexp-mask in the validation.xml it looks to me,
> > that the processValidate() is a bit too late.
> >
> > Thanks in advance,
> > Dirk
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > -
> > 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]
>
>


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



RE: Conceptual question about populating/validating values

2003-09-17 Thread Edgar P Dollin
If you are saving system objects, i.e. request, to persistent objects, you
will have synchronization problems.  At least null them out at the end of
the action cycle.  

I am not sure struts is the right framework to start your customizations
since you have problems with the precepts.  There are other frameworks out
there which don't force the MVC abstraction through single use beans which
might be a better starting point.

Edgar

> -Original Message-
> From: Bygrave, Graham BGI UK 
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 17, 2003 6:53 AM
> To: Struts Developers List
> Subject: RE: Conceptual question about populating/validating values
> 
> 
> I hit the same problem.  I don't like having two fields 
> (string and type
> specific) as you have to sync. them and it bloats your 
> objects out.  I don't like the idea of having two suites of 
> objects, it's just more work.  I don't like not using the 
> validator either.  I made some minor modifications to 
> beanutils/convertutils to allow for the passing through of 
> the property name in question.  You also need to get access 
> to the ServletRequest object in your custom converter (I did 
> this using a filter which stores the requests in a thread 
> local object, which you may find distasteful).  I don't want 
> to loose any erroneous input the user entered, so my custom 
> converter writes the input into the http request (just using 
> the full a.b.c notation is a key) and this is then put back 
> into the jsp using a slightly modified TextTag.  You have 
> access to the request in your converter, so you can build any 
> validation errors there.
> 
> Regards,
> Graham.
> 
> 
> -Original Message-
> From: Edgar P Dollin [mailto:[EMAIL PROTECTED]
> Sent: 17 September 2003 12:33
> To: Struts Developers List
> Subject: RE: Conceptual question about populating/validating values
> 
> 
> If I were you I would use strings in my form beans (or at 
> least methods or parallel field which accept strings as 
> arguments) and look into third party stuff, i.e. Matt Kruse's 
> date handling javascript.  Additionally, I would bypass the 
> validator and validate in my action (that way you would have 
> the text the user entered).  It is easy enough to emulate the 
> validator flow of control (just read the mapping and get the 
> 'input' value and forward to it).
> 
> Edgar
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, September 17, 2003 6:23 AM
> > To: [EMAIL PROTECTED]
> > Subject: Conceptual question about populating/validating values
> > 
> > 
> > Hi there,
> > 
> > I have a conceptual question about the population process for
> > properties inside Struts.
> > 
> > First of all a description:
> > 
> > I have a JSP which includes a text input field like this:
> > 
> > 
> > 
> > "currentPerson" is a Person-Object which has a
> > birthDate-Attribute of type java.util.Date (!). This object 
> > is part of the myForm-Bean. 
> > 
> > I know about the alternative to have string values in my
> > FormBean and set the property of my object "by hand", but I 
> > don't like this !!
> > 
> > The Request-Processing now does the following:
> > 
> > 1. RequestProcessor.processPopulate(...)
> >2. RequestUtils.populate(...request)
> >   3. BeanUtils.populate(bean, properties)
> >   ...
> >   4. BeanUtils.setProperty(...)
> >  5. ConvertUtils.convert(...)
> > 6. PropertyUtils.setProperty(...)
> > 
> > 6. RequestProcessor.processValidate(...)
> > ..
> > 
> > In my example the string representing a date is converted
> > into a Date-Object in step 5 (ConvertUtils.convert()) I could 
> > use the sessions locale here for LOCALE-specific conversions 
> > and set a default value in case the conversion failes. I know 
> > about this !
> > 
> > Lets asume the following:
> > -> A user enters an invalid date
> > -> conversion failes and the default value will be set as birthDate 
> > -> the user gets the page back including an error message
> > about an invalid
> > date
> > -> the date input field holds the default date now
> > 
> > BUT: What I would like the user to see is it's original text,
> > not the default value or anything else.
> > 
> > ANY IDEA, how to do this ? (Without having string variables
> > to store the form-values !) Since I also would also like to 
> > specify a regexp-mask in the validation.xml it looks to me, 
> > that the processValidate() is a bit too late.
> > 
> > Thanks in advance,
> > Dirk
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> -
> > 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: Where is Struts 2 going?

2003-09-17 Thread Mike Jasnowski
I like this idea as well, we've been trying to represent forms as XML also,
not just for bullets you mentioned, but it also enables flexible layout and
presentation, which can be shared across like forms, custom error
placement,etc.. We're running our forms through an XSLT template to render
the final HTML output.

-Original Message-
From: Don Brown [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:04 PM
To: Struts Developers List
Subject: Re: Where is Struts 2 going?


In the aforementioned stxx (http://stxx.sf.net) project, I've been working
on combining Struts with xmlforms (http://www.xmlform.org) to create
Struts ActionForms that use plain XML as the model.  Using pure XML as the
model has several advantages over javabeans I believe:

- Quicker development
- Use of XPath for powerful data access
- Many different validation options (schematron, xsd, relax-ng, etc)
- Ability to simultaneously expose forms as document-based SOAP web
services

While xml mapping toolkits have gotten better, I found keeping the model
in XML saves development time, and with xpath and JDOM, the data can be
accessed much quicker (in development time, not runtime of course).

Don

On Sat, 13 Sep 2003, robert burrell donkin wrote:

> On Friday, September 12, 2003, at 12:01 AM, Jing Zhou wrote:
>
> 
>
> > 4) We could add more... (like portlets)
>
> (this is probably a bit left field but you need to make time to dream...)
>
> i'm a big fan of cocoon and have some idea about when webservices are the
> answer but one idea i've been turning over in ideal moments is whether (or
> rather how) MVC (and in particular struts) could (or rather should) be
> applied to xml-centric environments.
>
> at the moment struts has action forms which are mapped from http requests.
>   i've been wondering about plugging some kind of bean-centric
> pre-processor (could be betwixt, could be castor, could be a JAXB
> implementation, could be XMLBeans) to convert an incoming xml document
> into a bean representation and then feeding that into a struts action.
> probably need an xml-centric output wrapper to help write a response to
> xml from output beans.
>
> the advantage of this kind of approach is that it cuts the overhead which
> i've observed you get when you ask java coders to 'just go do that xml
> thing'. on the other hand, an experience struts coder should be able to
> handle java bean-in, java bean-out just fine.
>
> too much to do, too little time
>
> - robert
>
>
> -
> 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]



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



RE: Conceptual question about populating/validating values

2003-09-17 Thread Bygrave, Graham BGI UK
I'm assuming the same thread handles the client request all the way
through - which is the case in my environment (which environments should
I steer clear of?).  If this is the case, using ThreadLocal should be ok
(I think, if not can you be more specific).  I've used it here simply to
reduce the amount of struts code I have to modify.

I don't view this kind of on-the-fly type conversion as being
incompatible with MVC - converting data to and from human readable forms
is just a presentation issue, in my humble opinion.

Let me know your thoughts,
Best wishes,
Graham.


-Original Message-
From: Edgar P Dollin [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 13:08
To: Struts Developers List
Subject: RE: Conceptual question about populating/validating values


If you are saving system objects, i.e. request, to persistent objects,
you
will have synchronization problems.  At least null them out at the end
of
the action cycle.  

I am not sure struts is the right framework to start your customizations
since you have problems with the precepts.  There are other frameworks
out
there which don't force the MVC abstraction through single use beans
which
might be a better starting point.

Edgar

> -Original Message-
> From: Bygrave, Graham BGI UK 
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 17, 2003 6:53 AM
> To: Struts Developers List
> Subject: RE: Conceptual question about populating/validating values
> 
> 
> I hit the same problem.  I don't like having two fields 
> (string and type
> specific) as you have to sync. them and it bloats your 
> objects out.  I don't like the idea of having two suites of 
> objects, it's just more work.  I don't like not using the 
> validator either.  I made some minor modifications to 
> beanutils/convertutils to allow for the passing through of 
> the property name in question.  You also need to get access 
> to the ServletRequest object in your custom converter (I did 
> this using a filter which stores the requests in a thread 
> local object, which you may find distasteful).  I don't want 
> to loose any erroneous input the user entered, so my custom 
> converter writes the input into the http request (just using 
> the full a.b.c notation is a key) and this is then put back 
> into the jsp using a slightly modified TextTag.  You have 
> access to the request in your converter, so you can build any 
> validation errors there.
> 
> Regards,
> Graham.
> 
> 
> -Original Message-
> From: Edgar P Dollin [mailto:[EMAIL PROTECTED]
> Sent: 17 September 2003 12:33
> To: Struts Developers List
> Subject: RE: Conceptual question about populating/validating values
> 
> 
> If I were you I would use strings in my form beans (or at 
> least methods or parallel field which accept strings as 
> arguments) and look into third party stuff, i.e. Matt Kruse's 
> date handling javascript.  Additionally, I would bypass the 
> validator and validate in my action (that way you would have 
> the text the user entered).  It is easy enough to emulate the 
> validator flow of control (just read the mapping and get the 
> 'input' value and forward to it).
> 
> Edgar
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, September 17, 2003 6:23 AM
> > To: [EMAIL PROTECTED]
> > Subject: Conceptual question about populating/validating values
> > 
> > 
> > Hi there,
> > 
> > I have a conceptual question about the population process for
> > properties inside Struts.
> > 
> > First of all a description:
> > 
> > I have a JSP which includes a text input field like this:
> > 
> > 
> > 
> > "currentPerson" is a Person-Object which has a
> > birthDate-Attribute of type java.util.Date (!). This object 
> > is part of the myForm-Bean. 
> > 
> > I know about the alternative to have string values in my
> > FormBean and set the property of my object "by hand", but I 
> > don't like this !!
> > 
> > The Request-Processing now does the following:
> > 
> > 1. RequestProcessor.processPopulate(...)
> >2. RequestUtils.populate(...request)
> >   3. BeanUtils.populate(bean, properties)
> >   ...
> >   4. BeanUtils.setProperty(...)
> >  5. ConvertUtils.convert(...)
> > 6. PropertyUtils.setProperty(...)
> > 
> > 6. RequestProcessor.processValidate(...)
> > ..
> > 
> > In my example the string representing a date is converted
> > into a Date-Object in step 5 (ConvertUtils.convert()) I could 
> > use the sessions locale here for LOCALE-specific conversions 
> > and set a default value in case the conversion failes. I know 
> > about this !
> > 
> > Lets asume the following:
> > -> A user enters an invalid date
> > -> conversion failes and the default value will be set as birthDate 
> > -> the user gets the page back including an error message
> > about an invalid
> > date
> > -> the date input field holds the default date now
> > 
> > BUT: What I would like the user to see is it's original text,

Re: Where is Struts 2 going?

2003-09-17 Thread David Graham
--- Ted Husted <[EMAIL PROTECTED]> wrote:
> I working on something similar right now too, but using the FormProc 
> package. I believe that we should represent entire input form in XML, 
> including things like the default control type and field labels, and so 
>   forth, along with prompts, error messages, validations, and type 
> conversions. Ideally, we should be able to write a default form just by 
> reference to an XML element.
> 
> What I like about FormProc is that is not focussed on JavaBeans, but on 
> the process of validating a list of parameters against a form definition
> 
> and then transferring the validated properties to some target object. 
> The object can also be a Map, which makes for a very nifty hand-off to 
> something like a Context. =:)
> 
> In fact, expanding on the DynaForm idea, it might also be possible to 
> create a type-safe Context backed by a XML-configured form object. We 
> could then use the same XML document on both layers. On the presentation
> 
> layer, it can generate and/or validate the data-entry form. On the 
> business layer, it can define the properties expected by a Context.
> 
> Of course, this is much like what we've been talking about doing for the
> 
> Validator, but right now the emphasis there seems to be on the JavaBean 
> and moving away from the form, where I believe we should be emphasizing 
> the form and moving away from (pure) JavaBeans.

I disagree.  Limiting Validator to forms isn't needed.  The business layer
doesn't deal with "forms" it deals with Java objects.  If validation is to
happen in the business layer, Validator needs to be bean oriented.  An
HTML form is just one type of JavaBean that Validator can perform
validations on.

David


> 
> -Ted.
> 
> Don Brown wrote:
> > In the aforementioned stxx (http://stxx.sf.net) project, I've been
> working
> > on combining Struts with xmlforms (http://www.xmlform.org) to create
> > Struts ActionForms that use plain XML as the model.  Using pure XML as
> the
> > model has several advantages over javabeans I believe:
> > 
> > - Quicker development
> > - Use of XPath for powerful data access
> > - Many different validation options (schematron, xsd, relax-ng, etc)
> > - Ability to simultaneously expose forms as document-based SOAP web
> > services
> > 
> > While xml mapping toolkits have gotten better, I found keeping the
> model
> > in XML saves development time, and with xpath and JDOM, the data can
> be
> > accessed much quicker (in development time, not runtime of course).
> > 
> > Don
> > 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



DO NOT REPLY [Bug 23213] New: - html:javascript tag scriptLanguage attribute

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23213

html:javascript tag scriptLanguage attribute

   Summary: html:javascript tag scriptLanguage attribute
   Product: Struts
   Version: Unknown
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Documentation
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


According to the docs on the website the way I read them, I should be able to
specify the a scriptLanguage attribute on the html:javascript tag. 

When I got an error with "invalid in TLD", I thought I might have an old TLD. 

I'm not sure what the impact of this is. I had a bug in Internet Explorer, which
didn't like my html script tag doing this:



Has to be a pair of opening and closing tags strangely. This is XHTML, and the
docs say that the taglib will ignore the scriptLanguage anyway in XHTML (even if
it did exist...)

I just checked on the W3C website & language is not an attribute in strict
XHTML, so I guess I don't have a problem. 

But it would be nice to change the docs.

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2 
Linux 2.4.20 RH9

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



DO NOT REPLY [Bug 23213] - html:javascript tag scriptLanguage attribute

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23213

html:javascript tag scriptLanguage attribute





--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 14:06 ---
The description of scriptLanguage is:
The 

RE: Conceptual question about populating/validating values

2003-09-17 Thread Edgar P Dollin
I test my apps under tomcat and use the shutdown / restart with session
restoration to test if my apps are serializable.

Edgar

> -Original Message-
> From: Bygrave, Graham BGI UK 
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 17, 2003 8:06 AM
> To: Struts Developers List
> Subject: RE: Conceptual question about populating/validating values
> 
> 
> I'm assuming the same thread handles the client request all 
> the way through - which is the case in my environment (which 
> environments should I steer clear of?).  If this is the case, 
> using ThreadLocal should be ok (I think, if not can you be 
> more specific).  I've used it here simply to reduce the 
> amount of struts code I have to modify.
> 
> I don't view this kind of on-the-fly type conversion as being 
> incompatible with MVC - converting data to and from human 
> readable forms is just a presentation issue, in my humble opinion.
> 
> Let me know your thoughts,
> Best wishes,
> Graham.
> 
> 

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



RE: Conceptual question about populating/validating values

2003-09-17 Thread Bygrave, Graham BGI UK
Ok, but I'm not suggesting the request be saved or serialised.

-Original Message-
From: Edgar P Dollin [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 15:16
To: Struts Developers List
Subject: RE: Conceptual question about populating/validating values


I test my apps under tomcat and use the shutdown / restart with session
restoration to test if my apps are serializable.

Edgar

> -Original Message-
> From: Bygrave, Graham BGI UK 
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 17, 2003 8:06 AM
> To: Struts Developers List
> Subject: RE: Conceptual question about populating/validating values
> 
> 
> I'm assuming the same thread handles the client request all 
> the way through - which is the case in my environment (which 
> environments should I steer clear of?).  If this is the case, 
> using ThreadLocal should be ok (I think, if not can you be 
> more specific).  I've used it here simply to reduce the 
> amount of struts code I have to modify.
> 
> I don't view this kind of on-the-fly type conversion as being 
> incompatible with MVC - converting data to and from human 
> readable forms is just a presentation issue, in my humble opinion.
> 
> Let me know your thoughts,
> Best wishes,
> Graham.
> 
> 

-
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]



DO NOT REPLY [Bug 23214] New: - HTML messages and errors taglib API

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23214

HTML messages and errors taglib API

   Summary: HTML messages and errors taglib API
   Product: Struts
   Version: Unknown
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Documentation
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Currently on the website taglib API doc it specifies that the messages and the
errors taglibs will retrieve their message collections from some scope using the
Action.MESSAGE_KEY and Action.ERROR_KEY constants as keys, but this is not the
case, they will / should retrieve them from Globals.MESSAGE_KEY and
Globals.ERROR_KEY

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



DO NOT REPLY [Bug 23214] - HTML messages and errors taglib API

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23214

HTML messages and errors taglib API

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Normal  |Enhancement



--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 14:42 ---
Sorry, missed that select-box.

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



DO NOT REPLY [Bug 23213] - html:javascript tag scriptLanguage attribute

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23213

html:javascript tag scriptLanguage attribute





--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 14:49 ---
What I mean is, scriptLanguage is not ignored by the TLD on parsing. It is
actually invalid. Hence the docs and the error message do not agree. 

In fact its absence from the TLD means that the attribute can never be used, not
in XHTML nor in standard HTML, as far as I can tell.

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



DO NOT REPLY [Bug 23215] New: - idName property not being released in taglib

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23215

 idName property not being released in taglib

   Summary:  idName property not being released in
taglib
   Product: Struts
   Version: 1.1 Final
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Custom Tags
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The idName property of the  tag is not being released in the 
release method of the taglib (or its super class). This causes erratic behavior 
when a page that uses an iterator to set the radio (using the idName attribute) 
and then goes to a page that does not use the idName attribute. The idName 
attribute is still set to whatever the last page set it as and it can't find 
that bean from the old page in the new page.

Solution: reset idName in release() method of taglib so that the container 
initializes the value.

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



DO NOT REPLY [Bug 23213] - html:javascript tag scriptLanguage attribute

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23213

html:javascript tag scriptLanguage attribute

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 15:25 ---
The scriptLanguage is defined in the TLD for both the  and  tags.  Download a nightly build to get the updates.

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



DO NOT REPLY [Bug 23214] - HTML messages and errors taglib API

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23214

HTML messages and errors taglib API

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Enhancement |Normal



--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 15:32 ---
This is a documentation bug rather than enhancement.  The Action.* constants 
have been removed for 1.2.

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



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html RadioTag.java

2003-09-17 Thread rleland
rleland 2003/09/17 08:31:35

  Modified:src/share/org/apache/struts/taglib/html RadioTag.java
  Log:
  Bug#: 23215
Release idName on cleanup.
  
  Revision  ChangesPath
  1.25  +5 -4  
jakarta-struts/src/share/org/apache/struts/taglib/html/RadioTag.java
  
  Index: RadioTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/RadioTag.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- RadioTag.java 31 Jul 2003 00:19:04 -  1.24
  +++ RadioTag.java 17 Sep 2003 15:31:35 -  1.25
  @@ -328,6 +328,7 @@
   public void release() {
   
   super.release();
  +idName = null;
   name = Constants.BEAN_KEY;
   property = null;
   text = null;
  
  
  

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



DO NOT REPLY [Bug 23215] - idName property not being released in taglib

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23215

 idName property not being released in taglib





--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 15:35 ---
Fixed ! This will be in the nightly build, Sept 18 2003.

Thanks,

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



DO NOT REPLY [Bug 23215] - idName property not being released in taglib

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23215

 idName property not being released in taglib

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

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



cvs commit: jakarta-struts/doc/stylesheets struts.xsl

2003-09-17 Thread sraeburn
sraeburn2003/09/17 11:54:26

  Modified:doc/userGuide struts-bean.xml struts-logic.xml
struts-html.xml configuration.xml
   doc  struts.css
   doc/stylesheets struts.xsl
  Log:
  Fix missing deprecation warnings on taglib docs.
  
  Revision  ChangesPath
  1.18  +8 -6  jakarta-struts/doc/userGuide/struts-bean.xml
  
  Index: struts-bean.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/struts-bean.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- struts-bean.xml   11 Sep 2003 21:31:23 -  1.17
  +++ struts-bean.xml   17 Sep 2003 18:54:25 -  1.18
  @@ -440,9 +440,11 @@
 
 Application-relative name (starting with a '/') of the web application
 resource to be dispatched, and whose response data is to be made
  -  available as a bean.  DEPRECATED - Use the "page" attribute
  -  instead.
  +  available as a bean.
 
  +  
  +  Use the "page" attribute instead.
  +  
   
   
   
  @@ -551,7 +553,7 @@
 MessageResources object containing our messages
 is stored.
 
  -  Action.MESSAGES_KEY
  +  Globals.MESSAGES_KEY
   
   
   
  @@ -574,7 +576,7 @@
 The name of the session scope bean under which our currently
 selected Locale object is stored.
 
  -  Action.LOCALE_KEY
  +  Globals.LOCALE_KEY
   
   
   
  @@ -968,7 +970,7 @@
 MessageResources object containing our messages
 is stored.
 
  -  Action.MESSAGES_KEY
  +  Globals.MESSAGES_KEY
   
   
   
  @@ -1070,7 +1072,7 @@
   The name of the session scope bean under which our currently
   selected Locale object is stored.
 
  -  Action.LOCALE_KEY
  +  Globals.LOCALE_KEY
   
   
   
  
  
  
  1.16  +4 -4  jakarta-struts/doc/userGuide/struts-logic.xml
  
  Index: struts-logic.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/struts-logic.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- struts-logic.xml  11 Sep 2003 21:31:23 -  1.15
  +++ struts-logic.xml  17 Sep 2003 18:54:25 -  1.16
  @@ -950,9 +950,9 @@
 true
 
 By default the tag will retrieve the request scope bean it will
  - iterate over from the Action.ERROR_KEY constant string,
  + iterate over from the Globals.ERROR_KEY constant string,
but if this attribute is set to 'true' the request scope bean
  - will be retrieved from the Action.MESSAGE_KEY
  + will be retrieved from the Globals.MESSAGE_KEY
constant string.  Also if this is set to 'true', any value
assigned to the name attribute will be ignored.
 
  @@ -1007,9 +1007,9 @@
 true
 
 By default the tag will retrieve the request scope bean it will
  - iterate over from the Action.ERROR_KEY constant string,
  + iterate over from the Globals.ERROR_KEY constant string,
but if this attribute is set to 'true' the request scope bean
  - will be retrieved from the Action.MESSAGE_KEY
  + will be retrieved from the Globals.MESSAGE_KEY
constant string.  Also if this is set to 'true', any value
assigned to the name attribute will be ignored.
 
  
  
  
  1.65  +15 -11jakarta-struts/doc/userGuide/struts-html.xml
  
  Index: struts-html.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/struts-html.xml,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- struts-html.xml   11 Sep 2003 21:31:23 -  1.64
  +++ struts-html.xml   17 Sep 2003 18:54:25 -  1.65
  @@ -992,7 +992,7 @@
 
 Name of the request scope bean under which our error messages
 have been stored.  If not present, the name specified by the
  -  Action.ERROR_KEY constant string will be used.
  +  Globals.ERROR_KEY constant string will be used.
 
   
   
  @@ -2228,7 +2228,7 @@
   
   
   Creating a session is undesirable for apps that don't support them. 
 Use the lang
  -attribute to acheive the same functionality without creating a 
session.
  +attribute to achieve the same functionality without creating a 
session.
   
 
   
  @@ -2289,10 +2289,11 @@
   true
   
   The alignment option for this image.
  -The alignment option for this image. The ali

DO NOT REPLY [Bug 23214] - HTML messages and errors taglib API

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23214

HTML messages and errors taglib API

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 19:02 ---
Documentation updated.

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



DO NOT REPLY [Bug 21239] - nested:iterate not setting current object

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21239

nested:iterate not setting current object





--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 20:32 ---
You should check out bug #18343.


I had the same problem a while back. The JAR file Arron Bates suggests to try ( 
http://keyboardmonkey.com/downloads/km-nested-v2.03.jar) solved the problem 
then.


I recently moved my webapp to struts 1.1 final and have the same problem. 
Including that JAR file in WEB-INF/lib solves the problem.

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



DO NOT REPLY [Bug 14471] - validator-rules.xml JavaScript fails when field not present in jsp

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14471>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14471

validator-rules.xml JavaScript fails when field not present in jsp





--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 21:24 ---
Created an attachment (id=8263)
validator-rules.xml nightly build 20030917 w/ null tests included

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



DO NOT REPLY [Bug 14471] - validator-rules.xml JavaScript fails when field not present in jsp

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14471

validator-rules.xml JavaScript fails when field not present in jsp

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Enhancement |Normal

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



Re: Conceptual question about populating/validating values

2003-09-17 Thread Ted Husted
I'd agree with Edgar. Since ActionForms are a class rather than an 
interface, as it stands, you either have to live with the duplicate 
objects, or least two sets of properties, or go to other extremes. You 
can do things like use the ActionForms as an adaptor or facade for your 
business objects, or nest your business objects on the ActionForm, but 
that's no less work, and causes its own set of problems.

The other leading Java frameworks are WebWork, Maverick, JPublish, and 
Barracuda, if you care to have a look. After choosing Java itself, 
selecting an application framework and persistence layer are the most 
important decisions you will make. So, it's worth shopping around.

For harvesting form values, I've been playing with FormProc recently. It 
has a different approach than the Validator, in that it doesn't validate 
JavaBeans, it validated a list of input entries against a collection of 
field elements that comprise the form. Once the input for a field is 
validated, then it is converted and transferred to a target object (an 
arbitrary JavaBean or Map implementation).

One thing to note is that FormProc doesn't do a wholesale transfer. If a 
parameter does not correspond to a field element, it is not harvested. 
So, you don't have to worry about inappropriate properties being 
populated by a hostile client. Also, the target property (or entry) is 
only populated *after* it has been validated, so bad data is never 
tendered to good objects =:0)

Meanwhile, the original input is maintained on a separate List. So, when 
you go back to the page, you can redisplay the original (buffered) 
input, whether it was valid or not. (Well, I had to submit a patch for 
that one, to give the list a public accessor.)

I'm working on a FormProc extension for Maverick now and may try one for 
Struts next (by hooking into the reset method). This would let you 
define your form without subclassing a base ActionForm, much like the 
DynaActionForm.

-Ted.

[EMAIL PROTECTED] wrote:

Hi there,

I have a conceptual question about the population process for properties
inside Struts.
First of all a description:

I have a JSP which includes a text input field like this:



"currentPerson" is a Person-Object which has a birthDate-Attribute of type
java.util.Date (!).
This object is part of the myForm-Bean. 

I know about the alternative to have string values in my FormBean and set
the property of my object "by hand", but I don't like this !!
The Request-Processing now does the following:

1. RequestProcessor.processPopulate(...)
   2. RequestUtils.populate(...request)
  3. BeanUtils.populate(bean, properties)
  ...
  4. BeanUtils.setProperty(...)
 5. ConvertUtils.convert(...)
6. PropertyUtils.setProperty(...)

6. RequestProcessor.processValidate(...)
..

In my example the string representing a date is converted into a
Date-Object in step 5 (ConvertUtils.convert())
I could use the sessions locale here for LOCALE-specific conversions and
set a default value in case the conversion failes.
I know about this !
Lets asume the following:
-> A user enters an invalid date 
-> conversion failes and the default value will be set as birthDate
-> the user gets the page back including an error message about an invalid
date
-> the date input field holds the default date now

BUT: What I would like the user to see is it's original text, not the
default value or anything else.
ANY IDEA, how to do this ? (Without having string variables to store the
form-values !)
Since I also would also like to specify a regexp-mask in the
validation.xml it looks to me, that the processValidate() is a bit too
late.
Thanks in advance,
Dirk








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

--
Ted Husted,
  Junit in Action  - ,
  Struts in Action - ,
  JSP Site Design  - .


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


DO NOT REPLY [Bug 23230] New: - Struts Binary 20030917 doesn't run on Java 1.3

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23230>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23230

Struts Binary 20030917 doesn't run on Java 1.3

   Summary: Struts Binary 20030917 doesn't run on Java 1.3
   Product: Struts
   Version: Nightly Build
  Platform: All
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Controller
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I just downloaded the latest nightly of Struts (20030917). It doesn't run on
Java 1.3 (I haven't tried compiling it, but it seems it *can* be compiled on
1.3). It seems that there is a problem using Java 1.4s
StringBuffer.append(StringBuffer) method. Check here:

http://www.biojava.org/pipermail/biojava-l/2001-July/001430.html

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



DO NOT REPLY [Bug 14471] - validator-rules.xml JavaScript fails when field not present in jsp

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14471

validator-rules.xml JavaScript fails when field not present in jsp

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Keywords||PatchAvailable

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



DO NOT REPLY [Bug 14068] - Why can't I use forwards with exception elements in struts-config.xml

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14068

Why can't I use forwards with exception elements in struts-config.xml

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|LATER   |



--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 23:34 ---
Reopening for handling.

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



DO NOT REPLY [Bug 14183] - html:img does not support forward attribute

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14183

html:img does not support forward attribute

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|LATER   |



--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 23:36 ---
Reopening for handling.

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



DO NOT REPLY [Bug 14332] - RequestUtils.applicationClass problem with ContextClassLoader

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14332

RequestUtils.applicationClass problem with ContextClassLoader

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

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



DO NOT REPLY [Bug 14380] - Validator Mask - regular expression

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14380

Validator Mask - regular expression

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

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



DO NOT REPLY [Bug 14749] - Action "input" not starting with '/' and not a valid forward will cause an internal server error

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14749

Action "input" not starting with '/' and not a valid forward will cause an internal 
server error

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|LATER   |



--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 23:44 ---
Reopening to link with #5739.

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



DO NOT REPLY [Bug 14404] - MultipartIterator does not reflect ServletRequest#setCharacterEncoding

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14404

MultipartIterator does not reflect ServletRequest#setCharacterEncoding

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 23:45 ---


*** This bug has been marked as a duplicate of 5739 ***

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



DO NOT REPLY [Bug 5739] - Struts fails silently in too many places

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5739

Struts fails silently in too many places

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2003-09-17 23:45 ---
*** Bug 14404 has been marked as a duplicate of this bug. ***

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



Re: DO NOT REPLY [Bug 14471] - validator-rules.xml JavaScript fails when field not present in jsp

2003-09-17 Thread Cyber.Zombie
Ted, just a quick note that - though it works in all tests for me - I am 
not a JS guru.  I'm not sure of the differences between field == null 
(what I added) and field == undefined (a prior note)...

Rob

[EMAIL PROTECTED] wrote:

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14471

validator-rules.xml JavaScript fails when field not present in jsp

[EMAIL PROTECTED] changed:

  What|Removed |Added

  Keywords||PatchAvailable
-
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]


DO NOT REPLY [Bug 16401] - ActionValidatorUtil

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16401

ActionValidatorUtil





--- Additional Comments From [EMAIL PROTECTED]  2003-09-18 04:18 ---
Created an attachment (id=8268)
new patch with requested changes

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



DO NOT REPLY [Bug 16401] - ActionValidatorUtil

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16401

ActionValidatorUtil





--- Additional Comments From [EMAIL PROTECTED]  2003-09-18 04:19 ---
Created an attachment (id=8269)
The base Action class with methods added to take advantage of the ActionValidatorUtil

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



DO NOT REPLY [Bug 16401] - ActionValidatorUtil

2003-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16401

ActionValidatorUtil





--- Additional Comments From [EMAIL PROTECTED]  2003-09-18 04:26 ---
I began to make everything create ActionMessages. However, with the validator 
hooks provided by struts the ActionErrors class is pretty tightly interwoven. I 
made everything in the ActionValidatorUtil return ActionErrors because i didn't 
want to intermingle ActionErrors and ActionMessages. I can make the change back 
to ActionMessages once all the hooks are provided to seemlessly use 
ActionMessages in the Struts base classes.

For example:
Resources.initValidator only accepts ActionErrors in it's method signature.

I think we need to go through the Struts code and deprecate ActionErrors and 
provide alternate ActionMessages method signatures.

If you want i can lock away some time to do this. Otherwise, I will keep my 
patches using the ActionErrors until the base struts classes deprecate 
ActionErrors and provide ActionMessages hooks.

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