Any samples on multiple forms/beans in struts...
Thanks in advance!
(addendum to my previous post)
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
I am working on a web project in which there is a need to submit two
forms from a same html file.
Does anybody have such experience as submitting two forms separately?
Thanks!
Daniel,
You will only be able to submit one form at a time. If
you are using form validation, you might have to use
the logic tags to select/hide the errors/message tag
for the forms. If you are going to pre-fill the form
data, you might have to also do some extra work or
consider using session
It was an bug, I solved at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22462
Thanks!!!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi all, me again ;-)
Heres one. How do I handle an unknown number of forms. For example, lets say I
am outputting 5 records from a database. Each row needs to have a small form
to update a value fro that row. These updates are all the same, using the
same form and action, but sourcing
Use 1 ActionForm with a nested collection of beans for the rows
see: http://www.keyboardmonkey.com/next/index.jsp
-Original Message-
From: Derek Clarkson [mailto:[EMAIL PROTECTED]
Sent: Friday, 5 December 2003 08:38
To: struts-user
Subject: Multiple Forms
Hi all, me again ;-)
Heres
Hi. Is it allowable to have multiple struts forms on the same page. I
can't really think that there should be a problem. Currently my page
looks something like this:
%@ page language=java autoFlush=true %
%@ taglib uri=/tags/struts-bean prefix=bean %
%@ taglib uri=/tags/struts-html prefix=html
I have a page with two forms. For one an action gets called so I can
initialize the first form easily. But for the second form in the same
page, how can it be initialized?
Thanks in advance,
Erez
-
To unsubscribe, e-mail:
Instantiate it yourself from within the action and attact it to the
request object inside of your action.
On Sun, 2003-09-28 at 18:12, Erez Efrati wrote:
I have a page with two forms. For one an action gets called so I can
initialize the first form easily. But for the second form in the same
hello,
i am using multiple forms in one page which are
attached to the same form bean. now the problem is
that when there is an validation error and the page is
returned back to INPUT all the forms in the page are
prefilled with the same value. i am giving the
struture of my jsp pls help
Use multiple form-bean entries for the same form and struts will keep them
separate.
Edgar
-Original Message-
From: Rajat Pandit [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 4:21 AM
To: [EMAIL PROTECTED]
Subject: multiple forms with the same formBean
hello,
i am
form-bean entries for the same form and struts will keep them
separate.
Edgar
-Original Message-
From: Rajat Pandit [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 4:21 AM
To: [EMAIL PROTECTED]
Subject: multiple forms with the same formBean
hello,
i am
hello,
my question in one line.. how do u handle multiple
forms attached to the same form bean in one bean?
longer question --
say i have a list of products and each product has a
list of states. i store all the states in an ArrayList
and add that as a property of product and then add all
I have two forms both of which will need to use validators.
My JavaScript is messed up. Suppose I have form
A { fieldA1 - required, fieldA2 - required }
B { fieldB1 - required }
When javascript is generated it generates two scripts both of which have
required () method.
What do I do to avoid
To avoid this problem, you just need to make full use of javascript tag,
which has a parameter named 'staticJavaScript'. When set to false the
different validation faunction are not written. So you just need to have
only one tag with this parameter set to true. Example :
html:javascript
I have a page with two forms. The page works on other servlet containers
like tomcat and weblogic, but when we switched to JBoss it could not find
any of the form bean elements after the html:form tag on the second form.
Any ideas on how to fix this?
This e-mail, including attachments, may
Nevermind, I figured it out! We were missing property on an html:options
tag.
-Original Message-
From: Amit Kirdatt
Sent: Monday, August 04, 2003 8:04 AM
To: '[EMAIL PROTECTED]'
Subject: multiple forms on one page on JBoss 3.2.1
I have a page with two forms. The page works on other
The submit will only submit the one form...
sandeep
--- Ajay Patil [EMAIL PROTECTED] wrote:
Dear Jing,
In the scenario that you describe (Multiple forms on
same HTML page) -
The browser will send only the data inputted on the
form whose submit
button is clicked. The data inputted
: [EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 12:46 AM
Subject: Multiple forms on same page
Dear Jing,
In the scenario that you describe (Multiple forms on same HTML page) -
The browser will send only the data inputted on the form whose submit
button is clicked. The data inputted in other
Dear Jing,
In the scenario that you describe (Multiple forms on same HTML page) -
The browser will send only the data inputted on the form whose submit
button is clicked. The data inputted in other forms will not be
sent to the server, and so there is no way the server can send it
back
;
1) I need to know if [OT] this can be written in html?
Html does not do forms in forms. But I have come accross a solution using
multiple forms and a small piece of java code to force all forms to submit
at the same time.
[FYI]
!--
script language=JavaScript
function SubmitAll
Be carreful, submiting your forms this way you will submit N request,
and only the last one will get a response. If others one have
validation or processing errors, you will not get them.
I would suggest you to set a new form with hidden fields, and
javascript to copy values. On submit, submit
Assume that I have a three page application form, which consists of
the following parts:
member info (name, username, password)
company info (name, address)
companyMeta info (description, industries, services)
Now, I want the user to be able to reuse the parts of the form
individually to update
this in each jsp page.
Jason Long - CEO and Chief Software Engineer
Supernova Software - supernovasoftware.com
BS Physics, MS Chemical Engineering
-Original Message-
From: Jason Long [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 09, 2003 1:58 AM
To: [EMAIL PROTECTED]
Subject: Multiple forms
I have no way of knowing all of the forwards. The pages are generated
dynamically when a new inventory is uploaded. I just need a way to specify
this in each jsp page.
Could you just have the input page's path as a hidden form field and
create a new ActionForward in the Action rather than
It has been recommended that ActionForm.validate() be
used only for trivial validations like the input
format, range etc. And these validations can be pushed
to the browser and caught there instead. The other
business validations are recommended to be done in the
Action classes like its been
and Chief Software Engineer
Supernova Software - supernovasoftware.com
BS Physics, MS Chemical Engineering
-Original Message-
From: harish krishnaswamy [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 09, 2003 11:43 AM
To: Struts Users Mailing List
Subject: RE: Multiple forms with same format
, March 09, 2003 8:02 AM
To: Struts Users Mailing List
Subject: RE: Multiple forms with same format and validation problem.
I have no way of knowing all of the forwards. The pages are generated
dynamically when a new inventory is uploaded. I just need a way to
specify
this in each jsp page.
Could
Supernova Software - supernovasoftware.com
BS Physics, MS Chemical Engineering
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 09, 2003 8:02 AM
To: Struts Users Mailing List
Subject: RE: Multiple forms with same format and
validation problem
: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 09, 2003 3:57 PM
To: Jason Long
Subject: RE: Multiple forms with same format and validation problem.
1. request.getAttribute(page) is returning null and I cannot use the
action form methods for inside this class even though it is being
I have an application that creates hundreds of jsp/struts form pages in xml
format. All pages have the same input fields, except that there is a
varying number of checkbox fields. I specified the following action:
!-- Validate item config --
actionpath=/itemConfig
I think this was discuess eariler but I can't seem to find the answer I
need. Anyway...
I have two forms on one .jsp page and I wish to use javascript validation
for both of them.
The problem is that if I have two tags list so:
html:javascript formName=pantryLoadingAddBitmap/
html:javascript
and some javascript.
Nico.
- Original Message -
From: Ray Madigan
To: Struts Users Mailing List
Sent: Thursday, February 20, 2003 5:15 PM
Subject: RE: Multiple Forms on One Page
Hi,
Im fairly new to Struts, but i can't see what the restriction is. Can't
you
define two forms
Hello everyone,
I want to be able to have multiple forms on a single web page. These forms are
totally unrelated in that I want them to materialize into different beans depending on
which form was submitted. I don't see that it is possible to configure this scenario
in the the struts-config
PROTECTED]]
Sent: Thursday, February 20, 2003 10:41 AM
To: [EMAIL PROTECTED]
Subject: Multiple Forms on One Page
Hello everyone,
I want to be able to have multiple forms on a single web
page. These forms are totally unrelated in that I want them
to materialize into different beans
]
Subject: Multiple Forms on One Page
Hello everyone,
I want to be able to have multiple forms on a single web page. These forms
are totally unrelated in that I want them to materialize into different
beans depending on which form was submitted. I don't see that it is
possible to configure
.
Nico.
- Original Message -
From: Ray Madigan [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, February 20, 2003 5:15 PM
Subject: RE: Multiple Forms on One Page
Hi,
Im fairly new to Struts, but i can't see what the restriction is. Can't
you
define two
You just put multiple html:form/html:form tags in your page, each defined
appropriately. Struts-config isn't directly involved in multiple forms on a single
page, except insofar as the form beans and Actions are initially defined there.
Ex:
html:form action=/someAction
... form tags, HTML
-Original Message-
From: C F [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 10:41 AM
To: [EMAIL PROTECTED]
Subject: Multiple Forms on One Page
Hello everyone,
I want to be able to have multiple forms on a single web page. These forms
are totally unrelated in that I want them
Hi: This statement caught my eye because I was about to do something
like this.
I would avoid using multiple Forms per page.
In my application the user is going to assemble a complex set of
things, and in order to do this needs to view another set of
things. The view step involves querying
Here I go:
I have a jsp that contains 4 forms. One for main info, another for
merchandise info, and two for ship address address and bill address.
Currently upon submit, I have an addressAction that gets passed the
addressForms info. I stuff those parameters into AddressValue objects and
by the
Struts old-timers.
I would avoid using multiple Forms per page. I would also avoid any use of the
innerHTML for dynamic client side adding of input fields into a Form. About the only
choice left that I see is to make a server hit and let the JSP build more line items.
Anyone else out there use
Hi,
How can we get different Frames Forms data in Struts.
Their is any possibility of using multiple forms in a single page.
Thanks in Advance,
Ashok.D
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Hi all,
I have 3 forms on my page each having a field that is required. The
validation stores these fields in an that can be obtained by caliing by
required().
Unfortunately, my 3
html:javascript formName=blah1/
html:javascript formName=blah2/
html:javascript formName=blah3/
produces 3
to avoid
name conflicts and still be able to work with multiple forms simultaneously.
Is this possible in any way? Or what is a better solution for this?
I dont want to make the bean request-scope because session-scope beans allow
for better functionality. BTW I am using Nested tags in this case
One thing Ive never understood about forms in session scope, is how does
struts deal with the situation where there are two concurrent requests in
the same session both of which are for the same action (and form type)?
As far as I can make out however, the key for a form is fixed without a way
to
Andrew Hill wrote:
One thing Ive never understood about forms in session scope, is how does
struts deal with the situation where there are two concurrent requests in
the same session both of which are for the same action (and form type)?
They would use the same form, I'd think. If you needed
in the session. Not a problem in my app, but
if I was rewriting amazon.com I reckon Id be looking for a different
solution...
-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 12:11
To: Struts Users Mailing List
Subject: Re: Multiple forms
Eddie Bush wrote:
They'd get trampled :-( In fact, there's really not a good solution
that comes to mind. The only single thing I see that we can do to
make using session-based forms more safe is to add the module name to
the key we use to place the forms into scope. I'm going to go look
Sorry, this is for everyone too.
_CJ
-- Forwarded Message --
Subject: Re: Populating multiple forms from one action class
Date: Wed, 4 Dec 2002 23:42:14 +
From: Curtney Jacobs [EMAIL PROTECTED]
To: Craig R. McClanahan [EMAIL PROTECTED]
Greetings Craig!!
just to verify
Greetings,
I have the form with multiple rows. Rows are populated from database.
Each row is displayed as a separate form using the tags
logic:iterate name=myobject id=myid indexId=inx
scope=request
form
in the form tag I have the button for each row
: Re: Populating multiple forms from one action class
Date: Wed, 4 Dec 2002 23:42:14 +
From: Curtney Jacobs [EMAIL PROTECTED]
To: Craig R. McClanahan [EMAIL PROTECTED]
Greetings Craig!!
just to verify.
So, it is possible to populate multiple forms (contained on a single JSP
page) from
On Fri, 29 Nov 2002, Curtney Jacobs wrote:
Date: Fri, 29 Nov 2002 11:43:24 +
From: Curtney Jacobs [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
[EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Populating multiple forms from
PROTECTED]]
Sent: Donnerstag, 28. November 2002 17:15
To: [EMAIL PROTECTED]
Subject: Populating multiple forms from one action class
Greetings!
is it possible to populate multiple forms on the same jsp page from only one
action class?
I have three forms (more may be added later on) on one jsp
.
Hope that helps,
Sven
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-Original Message-
From: Curtney Jacobs [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 28. November 2002 17:15
To: [EMAIL PROTECTED]
Subject: Populating multiple forms from one action class
Greetings!
is it possible
Greetings!
is it possible to populate multiple forms on the same jsp page from only one
action class?
I have three forms (more may be added later on) on one jsp page. Each form is
associated with its own action class for updating (submit) data. However,
when I select an employee I would like
I have two problems, your help is appreciated.
1. Multiple forms from collection
I have collection of beans for which I need to display multiple forms
with submit button. The size of collection varies. Example: A
collection of Persons. For each person, there will be html form
Consider the following scenario:
I have a JSP (A) with two forms. Form B and Form C.
Form B maps to Action B and forwards to JSP B.
Form C maps to Action C and creates to JSP C.
On JSP B, I want to have an HREF that takes me back to Page A with entries
for Form B preserved.
On JSP C, I want
Hi
I have a JSP page that has 4 different forms on it.
Three of these forms represent different layers that get displayed based on
a drop down selection. The selections are for undergrad, graduate and
research. The 3 forms need to have different names so that the layering
would work and the user
type=form.myForm/
form-bean name=research type=form.myForm/
Yong Chen
-Original Message-
From: walid sallam [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 26, 2002 4:06 PM
To: [EMAIL PROTECTED]
Subject: multiple Forms, one ActionForm and layers
Hi
I have a JSP page that has 4
I have a view page that contains two forms each form has to be populated
with dynamic data and each of the forms ideally would be processed by
different actions when they are submitted.
page with two forms.
html:form action=foo
html:select property=item
html:options property=items
Maybe this code snippet is not complete, but there is only one FORM on this
page. Everything between html:form and /html:form is a single form.
There may be multiple html:submit tags, but there is only one FORM.
I don't believe struts will work with multiple-forms, but I'm not sure.
Multiple
.
- Original Message -
From: Rustad, Aaron
Sent: Wednesday, February 06, 2002 8:22 PM
To: 'Struts user '
Subject: RE: Multiple Forms on one JSP...
Alright, this is not what I want.
I have ONE JSP, it contains TWO forms, each form goes to a separate action.
However, when the JSP is rendered
, February 07, 2002 7:23 AM
To: Struts user
Subject: Re: Multiple Forms on one JSP...
Sounds like you need some debugging of you code. Hum, I don't see
enough posted here to help.
Normally, one would post more code or look at the code sample that was
offered to compare and see what's wrong. I
Jay,
You are correct in that the JSP snip was not complete. This is contained in an
iterate tag. I mentioned that after the code snip.
Multiple forms do work in struts. I have sample code that shows it. Sometimes while
debugging a problem its easier to look at working code and see what
I seem to be running into a bit of a problem with one of my JSP pages that
has two forms on it. Only one Form is being instantiated for it. I am sure
you should be able to have multiple forms.
Here is an example of my JSP:
html:form action=/searchFood
table width=224 border=0
I use multiple forms successfully in my sample application that I did in the
Wrox Pro JSP 2nd Edition book. There is one per entry in the HTML table.
--- snip: from showshoppingcart.jsp
html:form action=/checkout.do
html:hidden property=action value=update /
html:hidden property
PROTECTED]]
Sent: Wednesday, February 06, 2002 2:57 PM
To: [EMAIL PROTECTED]
Subject: Re: Multiple Forms on one JSP...
I use multiple forms successfully in my sample application that I did in the
Wrox Pro JSP 2nd Edition book. There is one per entry in the HTML table.
--- snip: from
that name.
I am sure that you should be able to have TWO forms, referencing two
different actions, using TWO different formBean.
Any suggestions?
AR.
-Original Message-
From: STEVE WILKINSON
To: Struts user
Sent: 2/6/02 4:39 PM
Subject: Re: Multiple Forms on one JSP...
I know that works
Hi
I want to be able to use multiple forms on the same jsp page. There is
ever only one form on the page, which form is dependent on the value of
a bean, ie something like
logic:equal name=adminPage value=deleteOldAccounts
code for form 1 goes in here
/logic:equal
logic:equal name
Keith.
--- [EMAIL PROTECTED] wrote:
Hi
I want to be able to use multiple forms on the same jsp page. There is
ever only one form on the page, which form is dependent on the value of
a bean, ie something like
logic:equal name=adminPage value=deleteOldAccounts
code for form 1 goes in here
Hello there,
I am fighting with the specifications of struts, request scopes, checkboxes and so
on...(as Marcel knows)
One answer to a simple question can make many things clear:
is it allowed to have two forms in one jsp? What are the resctrictions? Is it possible
to access a field of one
14:06:07 -0700:
The short answer is you can't. Though, you could create a single
ActionForm as a wrapper around other forms and then access them
through the infamous dotted syntax. If that doesn't work for
you, if you talked a bit more about why you want multiple forms
I'm just starting out with Struts, and I've run into a snag I couldn't
adequately answer using the list archives. I'm hoping someone could
take the time to explain it slowly.
I've got an initial JSP page that looks like this:
index.jsp
table
tr
html:form action=/order.do
Hello all,
I am not sure whether if this is a HTML question of a Struts question.
Anyways, I am trying my luck here.
I have a JSP with multiple forms. When the submit of form 1 is clicked, I
would like to read the value from the source of form 2 and set it in the
action property of form 1.
How
Thanks to all.
I got it working.
-Mike.
-Original Message-
From: Michael Skariah [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 20, 2001 1:21 PM
To: [EMAIL PROTECTED]
Subject: Handling multiple forms...in a JSP
Hello all,
I am not sure whether if this is a HTML question of a Struts
On Wed, 4 Jul 2001, Narasimhan, Shyamala wrote:
hi
i would like to use two different forms in an action class... kindly advise
as to how to specify the action mapping
Although it is not possible to have 1 form beans per action *mapping*, it
is definitely possible to have 1 form beans
that encapsulates the two others, while exposing both set of
properties.
Fr.
-Original Message-
From: Grassotti, Michael [mailto:[EMAIL PROTECTED]]
Sent: 09 July 2001 22:27
To: [EMAIL PROTECTED]
Subject: RE: specifying multiple forms in an action mapping
Has anyone gotten back to you on this? I'm
Has anyone gotten back to you on this? I'm having the same problem...
-Original Message-
From: Narasimhan, Shyamala [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 04, 2001 9:21 AM
To: [EMAIL PROTECTED]
Subject: specifying multiple forms in an action mapping
hi
i would like
The short answer is you can't.
Though, you could create a single ActionForm as a wrapper around other
forms and then access them through the infamous dotted syntax.
If that doesn't work for you, if you talked a bit more about why you
want multiple forms, someone may have a better answer
If what you want is to have one Action class that can handle input from
multiple forms, then you just need to add a different action mapping in
struts-config.xml for each input form, giving each a distinct path. In the
Action itself, you would need to check to see which kind of form (or which
hi
i would like to use two different forms in an action class... kindly advise
as to how to specify the action mapping
thanks
shyamala.
Hi,
I have a common Action class,which will receive request from multiple
forms.
This action class will then forward request to a common jsp and on
selection of a value from this jsp,the value has to be set in the input
form(which called the common action class).
Then,request has
PROTECTED]]
Sent: Friday, May 11, 2001 9:25 AM
To: struts
Subject: Passing request to a common action class from multiple forms
Hi,
I have a common Action class,which will receive request from multiple
forms.
This action class will then forward request to a common jsp and on
selection of a value
everybody is trying to run away from it.
cheers,
Amar..
-Original Message-
From: B Manikandan [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 9:25 AM
To: struts
Subject: Passing request to a common action class from multiple forms
Hi,
I have a common Action class,which
I have designed a survey for my company using STRUTS. I have tried to
follow the MVC paradigm, but I fear I may have missed something.
I have two forms, Survey1 and Survey2. They are in the same context called
survey. They are represented by their own JSPs called survey1.jsp and
survey2.jsp.
: Multiple Forms, Single Action
I have designed a survey for my company using STRUTS. I have tried to
follow the MVC paradigm, but I fear I may have missed something.
I have two forms, Survey1 and Survey2. They are in the same
context called
survey. They are represented by their own
Hi,
I am new to struts, so I don't know clearly about it. Can anybody explain to
me the roles of struts in an web application?
I saw some versions of struts available at struts home page (e.g. binary,
source or something like that). Could you give me the differences between
these versions?
By
: Multiple forms per page
Hello,
On one of the pages in my application, I'd like to
write out the same form in multiple places with
different scripting names (for some Javascript code).
When submitted, these forms will be handled by the
same Action code.
form name="searchForm1" ...
...
/for
How do you handle the situation where I have multiple forms on one input
page?
The docs are geared toward a one-to-one relationship between form and form
bean. I also saw a suggestion on handling cases where a form spans multiple
pages.
Is it necessarily bad practice to combine multiple forms
90 matches
Mail list logo