You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brandon Goodin <ma...@phase.ws> on 2001/11/05 20:30:40 UTC
A curious problem.
Let me give an idea of what I am trying to accomplish and then see if you
can feedback.
Using struts (obviously) I am creating a reusable contact form. It is
configured through an xml-config file that defines where the contact form
goes and the smtp server it is to use, etc.. I want to set it up so that it
does not have to be recompiled upon alternate use. This is one part of a set
of components that make it easy for web designers to add functionality to
websites they are building using the struts framework (whether they know it
or not). i.e. most web designers to not have ide for compiling java classes.
So, with those desing goals in mind let me share with you my issue.
The contact form by default captures the Name, Address, City, State, Phone
Number, and any other basic contact form info needed. It has an ActionForm
bean that captures the input of these predefined items and the data is then
passed on to the Action and sent as an email to the recipient. My hangup
is... I need to allow the flexibility of adding form elements to the form
that are not defined in the ActionForm bean. I would also need to be able to
pass the values back to the form in the event that a validation error occurs
with the form. With the model the way it is I would have to specifically
define the setters and getters in the ActionForm so that the Action could
retrive the values of each form element and use them or route them back to
the input form for errors or to another Action.
Is there a way to have a generic getter/setter that can capture any non
defined data? For example say a company cleans linen and they want to add a
form element that asks for the type of detergent the contactee prefers. The
added form element is called "preferredDetergent" yet it is not specifically
defined in my ActionForm bean. First, how would I avoid getting an error
that says preferredDetergent is not defined in xxxForm? Next, how would I
then capture that value in the ActionForm for use in error checking and/or
usage in the Action class?
Brandon Goodin
Phase Communications
P (406)862-2245
F (406)862-0354
http://www.phase.ws
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Dynamic form elements
Posted by Brandon Goodin <ma...@phase.ws>.
I posted this earlier but I received no comments on specific current
solutions that will address this problem. I was also wondering if the
nightly build has the following ability within it.
Let me give an idea of what I am trying to accomplish and then see if you
can feedback.
Using struts (obviously) I am creating a reusable contact form. It is
configured through an xml-config file that defines where the contact form
goes and the smtp server it is to use, etc.. I want to set it up so that it
does not have to be recompiled upon alternate use. This is one part of a set
of components that make it easy for web designers to add functionality to
websites they are building using the struts framework (whether they know it
or not). i.e. most web designers to not have ide for compiling java classes.
So, with those desing goals in mind let me share with you my issue.
The contact form by default captures the Name, Address, City, State, Phone
Number, and any other basic contact form info needed. It has an ActionForm
bean that captures the input of these predefined items and the data is then
passed on to the Action and sent as an email to the recipient. My hangup
is... I need to allow the flexibility of adding form elements to the form
that are not defined in the ActionForm bean. I would also need to be able to
pass the values back to the form in the event that a validation error occurs
with the form. With the model the way it is I would have to specifically
define the setters and getters in the ActionForm so that the Action could
retrive the values of each form element and use them or route them back to
the input form for errors or to another Action.
Is there a way to have a generic getter/setter that can capture any non
defined data? For example say a company cleans linen and they want to add a
form element that asks for the type of detergent the contactee prefers. The
added form element is called "preferredDetergent" yet it is not specifically
defined in my ActionForm bean. First, how would I avoid getting an error
that says preferredDetergent is not defined in xxxForm? Next, how would I
then capture that value in the ActionForm for use in error checking and/or
usage in the Action class?
Brandon Goodin
Phase Communications
P (406)862-2245
F (406)862-0354
http://www.phase.ws
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Dynamic form elements
Posted by Brandon Goodin <ma...@phase.ws>.
I posted this earlier but I received no comments on specific current
solutions that will address this problem. I was also wondering if the
nightly build has the following ability within it.
Let me give an idea of what I am trying to accomplish and then see if you
can feedback.
Using struts (obviously) I am creating a reusable contact form. It is
configured through an xml-config file that defines where the contact form
goes and the smtp server it is to use, etc.. I want to set it up so that it
does not have to be recompiled upon alternate use. This is one part of a set
of components that make it easy for web designers to add functionality to
websites they are building using the struts framework (whether they know it
or not). i.e. most web designers to not have ide for compiling java classes.
So, with those desing goals in mind let me share with you my issue.
The contact form by default captures the Name, Address, City, State, Phone
Number, and any other basic contact form info needed. It has an ActionForm
bean that captures the input of these predefined items and the data is then
passed on to the Action and sent as an email to the recipient. My hangup
is... I need to allow the flexibility of adding form elements to the form
that are not defined in the ActionForm bean. I would also need to be able to
pass the values back to the form in the event that a validation error occurs
with the form. With the model the way it is I would have to specifically
define the setters and getters in the ActionForm so that the Action could
retrive the values of each form element and use them or route them back to
the input form for errors or to another Action.
Is there a way to have a generic getter/setter that can capture any non
defined data? For example say a company cleans linen and they want to add a
form element that asks for the type of detergent the contactee prefers. The
added form element is called "preferredDetergent" yet it is not specifically
defined in my ActionForm bean. First, how would I avoid getting an error
that says preferredDetergent is not defined in xxxForm? Next, how would I
then capture that value in the ActionForm for use in error checking and/or
usage in the Action class?
Brandon Goodin
Phase Communications
P (406)862-2245
F (406)862-0354
http://www.phase.ws
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Dynamic form elements
Posted by Brandon Goodin <ma...@phase.ws>.
I posted this earlier but I received no comments on specific current
solutions that will address this problem. I was also wondering if the
nightly build has the following ability within it.
Let me give an idea of what I am trying to accomplish and then see if you
can feedback.
Using struts (obviously) I am creating a reusable contact form. It is
configured through an xml-config file that defines where the contact form
goes and the smtp server it is to use, etc.. I want to set it up so that it
does not have to be recompiled upon alternate use. This is one part of a set
of components that make it easy for web designers to add functionality to
websites they are building using the struts framework (whether they know it
or not). i.e. most web designers to not have ide for compiling java classes.
So, with those desing goals in mind let me share with you my issue.
The contact form by default captures the Name, Address, City, State, Phone
Number, and any other basic contact form info needed. It has an ActionForm
bean that captures the input of these predefined items and the data is then
passed on to the Action and sent as an email to the recipient. My hangup
is... I need to allow the flexibility of adding form elements to the form
that are not defined in the ActionForm bean. I would also need to be able to
pass the values back to the form in the event that a validation error occurs
with the form. With the model the way it is I would have to specifically
define the setters and getters in the ActionForm so that the Action could
retrive the values of each form element and use them or route them back to
the input form for errors or to another Action.
Is there a way to have a generic getter/setter that can capture any non
defined data? For example say a company cleans linen and they want to add a
form element that asks for the type of detergent the contactee prefers. The
added form element is called "preferredDetergent" yet it is not specifically
defined in my ActionForm bean. First, how would I avoid getting an error
that says preferredDetergent is not defined in xxxForm? Next, how would I
then capture that value in the ActionForm for use in error checking and/or
usage in the Action class?
Brandon Goodin
Phase Communications
P (406)862-2245
F (406)862-0354
http://www.phase.ws
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: A curious problem.
Posted by Brandon Goodin <ma...@phase.ws>.
Is this addition contained within the nightly build?
-----Original Message-----
From: Scott Watson [mailto:swatson@datachest.com]
Sent: Monday, November 05, 2001 12:45 PM
To: 'Struts Users Mailing List'
Subject: RE: A curious problem.
This is one of the shortcomings of struts 1.0, however, it has been
identified and should be rectified for version 1.1.
Scott.
-----Original Message-----
From: Brandon Goodin [mailto:mail@phase.ws]
Sent: Monday, November 05, 2001 2:31 PM
To: 'Struts Users Mailing List'
Subject: A curious problem.
Let me give an idea of what I am trying to accomplish and then see if you
can feedback.
Using struts (obviously) I am creating a reusable contact form. It is
configured through an xml-config file that defines where the contact form
goes and the smtp server it is to use, etc.. I want to set it up so that it
does not have to be recompiled upon alternate use. This is one part of a set
of components that make it easy for web designers to add functionality to
websites they are building using the struts framework (whether they know it
or not). i.e. most web designers to not have ide for compiling java classes.
So, with those desing goals in mind let me share with you my issue.
The contact form by default captures the Name, Address, City, State, Phone
Number, and any other basic contact form info needed. It has an ActionForm
bean that captures the input of these predefined items and the data is then
passed on to the Action and sent as an email to the recipient. My hangup
is... I need to allow the flexibility of adding form elements to the form
that are not defined in the ActionForm bean. I would also need to be able to
pass the values back to the form in the event that a validation error occurs
with the form. With the model the way it is I would have to specifically
define the setters and getters in the ActionForm so that the Action could
retrive the values of each form element and use them or route them back to
the input form for errors or to another Action.
Is there a way to have a generic getter/setter that can capture any non
defined data? For example say a company cleans linen and they want to add a
form element that asks for the type of detergent the contactee prefers. The
added form element is called "preferredDetergent" yet it is not specifically
defined in my ActionForm bean. First, how would I avoid getting an error
that says preferredDetergent is not defined in xxxForm? Next, how would I
then capture that value in the ActionForm for use in error checking and/or
usage in the Action class?
Brandon Goodin
Phase Communications
P (406)862-2245
F (406)862-0354
http://www.phase.ws
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: A curious problem.
Posted by Brandon Goodin <ma...@phase.ws>.
Is it contained in the current 1.1 build
-----Original Message-----
From: Scott Watson [mailto:swatson@datachest.com]
Sent: Monday, November 05, 2001 12:45 PM
To: 'Struts Users Mailing List'
Subject: RE: A curious problem.
This is one of the shortcomings of struts 1.0, however, it has been
identified and should be rectified for version 1.1.
Scott.
-----Original Message-----
From: Brandon Goodin [mailto:mail@phase.ws]
Sent: Monday, November 05, 2001 2:31 PM
To: 'Struts Users Mailing List'
Subject: A curious problem.
Let me give an idea of what I am trying to accomplish and then see if you
can feedback.
Using struts (obviously) I am creating a reusable contact form. It is
configured through an xml-config file that defines where the contact form
goes and the smtp server it is to use, etc.. I want to set it up so that it
does not have to be recompiled upon alternate use. This is one part of a set
of components that make it easy for web designers to add functionality to
websites they are building using the struts framework (whether they know it
or not). i.e. most web designers to not have ide for compiling java classes.
So, with those desing goals in mind let me share with you my issue.
The contact form by default captures the Name, Address, City, State, Phone
Number, and any other basic contact form info needed. It has an ActionForm
bean that captures the input of these predefined items and the data is then
passed on to the Action and sent as an email to the recipient. My hangup
is... I need to allow the flexibility of adding form elements to the form
that are not defined in the ActionForm bean. I would also need to be able to
pass the values back to the form in the event that a validation error occurs
with the form. With the model the way it is I would have to specifically
define the setters and getters in the ActionForm so that the Action could
retrive the values of each form element and use them or route them back to
the input form for errors or to another Action.
Is there a way to have a generic getter/setter that can capture any non
defined data? For example say a company cleans linen and they want to add a
form element that asks for the type of detergent the contactee prefers. The
added form element is called "preferredDetergent" yet it is not specifically
defined in my ActionForm bean. First, how would I avoid getting an error
that says preferredDetergent is not defined in xxxForm? Next, how would I
then capture that value in the ActionForm for use in error checking and/or
usage in the Action class?
Brandon Goodin
Phase Communications
P (406)862-2245
F (406)862-0354
http://www.phase.ws
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: A curious problem.
Posted by Scott Watson <sw...@datachest.com>.
This is one of the shortcomings of struts 1.0, however, it has been identified and should be rectified for version 1.1.
Scott.
-----Original Message-----
From: Brandon Goodin [mailto:mail@phase.ws]
Sent: Monday, November 05, 2001 2:31 PM
To: 'Struts Users Mailing List'
Subject: A curious problem.
Let me give an idea of what I am trying to accomplish and then see if you
can feedback.
Using struts (obviously) I am creating a reusable contact form. It is
configured through an xml-config file that defines where the contact form
goes and the smtp server it is to use, etc.. I want to set it up so that it
does not have to be recompiled upon alternate use. This is one part of a set
of components that make it easy for web designers to add functionality to
websites they are building using the struts framework (whether they know it
or not). i.e. most web designers to not have ide for compiling java classes.
So, with those desing goals in mind let me share with you my issue.
The contact form by default captures the Name, Address, City, State, Phone
Number, and any other basic contact form info needed. It has an ActionForm
bean that captures the input of these predefined items and the data is then
passed on to the Action and sent as an email to the recipient. My hangup
is... I need to allow the flexibility of adding form elements to the form
that are not defined in the ActionForm bean. I would also need to be able to
pass the values back to the form in the event that a validation error occurs
with the form. With the model the way it is I would have to specifically
define the setters and getters in the ActionForm so that the Action could
retrive the values of each form element and use them or route them back to
the input form for errors or to another Action.
Is there a way to have a generic getter/setter that can capture any non
defined data? For example say a company cleans linen and they want to add a
form element that asks for the type of detergent the contactee prefers. The
added form element is called "preferredDetergent" yet it is not specifically
defined in my ActionForm bean. First, how would I avoid getting an error
that says preferredDetergent is not defined in xxxForm? Next, how would I
then capture that value in the ActionForm for use in error checking and/or
usage in the Action class?
Brandon Goodin
Phase Communications
P (406)862-2245
F (406)862-0354
http://www.phase.ws
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>