Hi all,
I have a bit of a problem grasping how to implement a seemingly simple
thing with struts. What I want to do is have a JSP page listing items
each with its own Delete or Edit button, like this:
Chocolate |Delete| |Edit| (index 0)
Bananas |Delete| |Edit|
On 24/03/2004 06:07, Caroline Jen [EMAIL PROTECTED] wrote:
In my Struts application, postForm is of the
DynaActionForm type:
DynaActionForm postForm = ( DynaActionForm )form;
Later on, I want to save one of the fields receiver,
which is a String, in the request context. Which
...
-Original Message-
From: Norris, David A. ERDC-CERL-IL Contractor
[mailto:[EMAIL PROTECTED]
Sent: Monday, March 22, 2004 4:45 PM
To: [EMAIL PROTECTED]
Subject: DynaActionForm caching issues?
Hello,
This message is in response to Geeta Ramani's post on March 4
Message-
From: Hubert Rabago
To: Struts Users Mailing List
Sent: 3/23/04 7:28 AM
Subject: RE: DynaActionForm caching issues?
In my experience, it's not that the bean config is cached, it's that the
form itself is cached. If your bean is not in request scope, it gets
reused. Tomcat can keep
In my Struts application, postForm is of the
DynaActionForm type:
DynaActionForm postForm = ( DynaActionForm )form;
Later on, I want to save one of the fields receiver,
which is a String, in the request context. Which is
the following is the correct syntax?
request.setAttribute( Receiver
Hello,
This message is in response to Geeta Ramani's post on March 4 entitled
DynaActionForm IllegalArgumentException.
In short, I have a DynaActionForm defined in struts-config.xml. It's been
around for a while, but I find that each time I make a change to it (for
instance, adding a new
PROTECTED]
Subject: DynaActionForm caching issues?
Hello,
This message is in response to Geeta Ramani's post on March 4
entitled DynaActionForm IllegalArgumentException.
In short, I have a DynaActionForm defined in
struts-config.xml. It's been around for a while, but I find
that each
i am using DynaActionForm in my application. Now I need to set
the properties of my DynaActionForm from within my EJB,i need to
knnow the code for accesssing my DynaActionForm from EJB that
has already been accesed by Action class and contains values.
Thanks in advance.
Regards,
Farrukh Naqvi
I am newbie to Struts and have a problem with populating
DynaActionForm. I have two actions: one to set up userForm and one to
process it. 1st one is suposed to grab user info and populate the form.
The second one updates user info after the form is submitted. The
problem is that the from
As far as I can tell, there really isn't any support for prepopulating a
DynaActionForm. The ff is from
http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_action_form_classes
DynaActionForms are not a drop-in replacement for ActionForms. If you need
to access ActionForm
My bad. I didn't read your mail through; only saw the top portion.
In your setupUserAction, after you prepopulate the form, set it as a request
attribute:
from SetUpUserAction.execute()
DynaActionForm userForm = (DynaActionForm)form;
userForm.set
SetUpUserAction.execute()
DynaActionForm userForm = (DynaActionForm)form;
userForm.set(userName,user.getUserName());
userForm.set(password,user.getPassword());
userForm.set(fullName,user.getFullName());
userForm.set(email,user.getEmail
At 12:09 PM -0800 3/12/04, Hubert Rabago wrote:
As far as I can tell, there really isn't any support for prepopulating a
DynaActionForm. The ff is from
http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_action_form_classes
DynaActionForms are not a drop-in replacement
describe.
Niall
- Original Message -
From: Danko Desancic [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, March 12, 2004 8:26 PM
Subject: Re: (pre)populating DynaActionForm
I tried that and it does not work. No errors though just balnk form with
initial
a
DynaActionForm. The ff is from
http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_action_form_classes
DynaActionForms are not a drop-in replacement for ActionForms. If you
need
to access ActionForm properties in your Action, you will need to use the
map-style accessor, like
describe.
Niall
- Original Message -
From: Danko Desancic [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, March 12, 2004 8:26 PM
Subject: Re: (pre)populating DynaActionForm
I tried that and it does not work. No errors though just balnk form with
initial value
At 12:42 PM -0800 3/12/04, Hubert Rabago wrote:
Thanks for the clarification, Joe. The copy of RequestUtils I really studied
was from late Dec/early Jan, so I just missed that method. I remember
reading the message you linked to and I've been meaning to ask, what did you
mean by prefilling forms
actions - make
them all the same.
Niall
- Original Message -
From: Danko Desancic [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, March 12, 2004 9:04 PM
Subject: Re: (pre)populating DynaActionForm
This is really funny, I did output the request scope
I have an html:image tag inside a html:form tag, which points to one of my
Struts Actions. My Action utilizes a DynaActionForm, in which I have defined
several form-property entries. One of these form-property entries, lets call it
imageProperty matches the property attribute of my html:image
Hi,
I am using declaring a dynaActionForm in struts-config.xml as
form-bean name=exForm type=org.apache.struts.action.DynaActionForm
form-property name=navigate
type=java.lang.String /
form-property name=prop1
type=java.lang.String
Anirudh:
I'm assuming your have written getter/setter methods for this newproperty,
right? Double-check the case: it should be getMNum() (and
setMNum(String)).. If all else fails, clean out your work directory and try
again..
Regards,
Geeta
Anirudh Jayanth wrote:
[ERROR] RequestUtils -
]
-Original Message-
From: Geeta Ramani [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 7:52 PM
To: Struts Users Mailing List
Subject: Re: DynaActionForm IllegalArgumentException
Anirudh:
I'm assuming your have written getter/setter methods for this
newproperty, right? Double-check
Oops! My mistake entirely: sorry..(:(
Ok, try rebuilding the app entirely (clean all first), then clean out the
work directory and try again. Seems like something wierd is happening..
Geeta
Anirudh Jayanth wrote:
Hey Geeta,
I am using a DynaActionFrom This doesn't require getter and
Road,
3rd Block, Jayanagar,
Bangalore - 560011
Tel: 6655165 / 052 [ ext - 244 ]
[EMAIL PROTECTED]
-Original Message-
From: Geeta Ramani [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 8:12 PM
To: Struts Users Mailing List
Subject: Re: DynaActionForm IllegalArgumentException
From: Anirudh Jayanth [mailto:[EMAIL PROTECTED]
Nope.created a whole new app. Tried just about anything.
Its giving the same exception and for the same property aswell.
It sure seems weird.. Cant help wondering if I am doing something
fundamentally wrong
though Any suggestions?
I had the similar problem, and Wendy's approach worked for me.
-- Nitin
Ivis Technologies
-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 8:43 AM
To: Struts Users Mailing List
Subject: RE: DynaActionForm IllegalArgumentException
From
]
Sent: Thursday, March 04, 2004 8:12 PM
To: Struts Users Mailing List
Subject: Re: DynaActionForm IllegalArgumentException
Oops! My mistake entirely: sorry..(:(
Ok, try rebuilding the app entirely (clean all first), then clean out
the work directory and try again. Seems like something wierd
]
[EMAIL PROTECTED]
-Original Message-
From: Nitin Mulimani [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 9:14 PM
To: Struts Users Mailing List
Subject: RE: DynaActionForm IllegalArgumentException
I had the similar problem, and Wendy's approach worked for me.
-- Nitin
Ivis
From: Anirudh Jayanth [mailto:[EMAIL PROTECTED]
I wish Wendy would have won the bet. Unfortunately that too doesn't
work. Actually mNum used to be messageNumber when I added it the first
time.
I took the struts-blank webapp, and pasted in your form-bean
definition.
I added the name to the
]
[EMAIL PROTECTED]
-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 10:22 PM
To: Struts Users Mailing List
Subject: RE: DynaActionForm IllegalArgumentException
From: Anirudh Jayanth [mailto:[EMAIL PROTECTED]
I wish Wendy would have won
Did you change the form definition to
enctype=multipart/form-data yet?
Yes, that is set correctly. Here's what it renders as HTML:
form name=pollForm method=post action=/mafo2-dev/editPollSubmit.do
enctype=multipart/form-data id=theForm
Thanks
Carl-Eric
--
Carl-Eric Menzel * OpenPGP KeyID
Hello Carl-Eric,
What browser you used for testing?
Opera have bug when upload field in form is null.
I'm using Mozilla Firefox and IE6, but this happens *before* the form
is even displayed. I'm only going to the page where it should show up,
and get the mentioned error message instead.
I don't believe that DynaActionForm supports the
org.apache.struts.upload.FormFile type.
See:
http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_action_form_classes
-Rob
Carl-Eric Menzel wrote:
Hello,
I'm having trouble getting file upload working when using
Hello,
I'm having trouble getting file upload working when using a DynaAction
form. Here are the relevant parts:
form-bean
name=pollForm
type=org.apache.struts.action.DynaActionForm
form-property name=active
Did you change the form definition to enctype=multipart/form-data yet?
--- Carl-Eric Menzel [EMAIL PROTECTED] wrote:
Hello,
I'm having trouble getting file upload working when using a DynaAction
form. Here are the relevant parts:
form-bean
name=pollForm
Hello Carl-Eric,
What browser you used for testing?
Opera have bug when upload field in form is null.
Wednesday, February 18, 2004, 5:45:24 AM, you wrote:
CEM Hello,
CEM I'm having trouble getting file upload working when using a DynaAction
CEM form. Here are the relevant parts:
CEM
I want to use DynaActionForm...
my problem is in my jsp i have no of textfields. but they r generated
dynamically
now in struts-config.xml how should i decaler those dynamic textfields
so that struts makes bean clas on it's own.
can anyone solve my problem.
Thanks in Advance
I hope this time
There are a few ways of going about this.
What are you trying to do?
On 13 Feb 2004, at 12:20, Vishal Arora wrote:
I want to use DynaActionForm...
my problem is in my jsp i have no of textfields. but they r generated
dynamically
now in struts-config.xml how should i decaler those dynamic
? (Or are there any plans to
provide this functionality in future releases?)
Thanks
Doug
-Original Message-
From: Doug Dixon [mailto:[EMAIL PROTECTED]
Sent: 31 January 2004 11:50
To: '[EMAIL PROTECTED]'
Subject: Populating a DynaActionForm with a complex object graph
Hi
I'm trying to populate
PROTECTED]
Sent: 31 January 2004 11:50
To: '[EMAIL PROTECTED]'
Subject: Populating a DynaActionForm with a complex object graph
Hi
I'm trying to populate a DynaActionForm dynamically, using this how-to as a
starting point: http://www.developer.com/java/other/article.php/2233591
Because the number
Hi
I'm trying to populate a DynaActionForm dynamically, using this how-to as a
starting point: http://www.developer.com/java/other/article.php/2233591
Because the number of elements in my form can vary at runtime, I take the
advice near the bottom of the article:
You can even dynamically
Hi list,
here is a nice article on choice of
ActionForm or DynaActionForm.
http://weblogs.java.net/pub/wlg/964
cheers,
Matthias Weßendorf
Email: mailto:[EMAIL PROTECTED]
URL: http://www.wessendorf.net
-
To unsubscribe, e
I can set initial values for String[] in a dynaActionForm in the
struts-config.xml however when I try to set initial values for Integer[]
I get the following error:
2004-01-26 13:40:49,224 [ERROR] RequestUtils: Error creating form bean
of class org.apache.struts.validator.DynaValidatorForm
You should use a subclass of DynaActionForm and implement reset() in
this one, just calling initialize() should be ok.
Extract from struts source code javadoc:
* The default implementation (since Struts 1.1) does nothing.
* Subclasses may override this method to reset bean properties
Hi,
I'm using a DynaActionForm (lazy, didn't want to write all the setter and getter with
ActionForm) but I don't know how to reset it property inside my action class. I did
use DynaActionForm.reset() method in my action class but did not work. Is there
another way to reset it property?
Use the initial attribute on the form-property/ (???) element.
-Original Message-
From: Daynell Trent [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 21, 2004 4:44 PM
To: Struts Users Mailing List
Subject: reset property using DynaActionForm
Hi,
I'm using a DynaActionForm (lazy
-property name=reslntGrpNewInd type=java.lang.String
initial=N/
/form-bean
in my action class:
DynaActionForm dmainDtForm = (DynaActionForm) form;
dmainDtForm.reset(mapping, request);
- Original Message -
From: Richard Hightower [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED
Hi all,
I have some troubles out print some DynaActionForm values from a map -
using the iterate tag! Can anyone help me?
Thanks
Oliver
CreateForm:
DynaActionForm mappedForm2 = (DynaActionForm) form;
HashMap mappedForm = new HashMap();
mappedForm.put(username, );
mappedForm.put(email
This might work as you have things, but there are more elegant ways of
achieving what you want.
input name=bean:write name=mappedForm property=key /
type=text
On 10 Jan 2004, at 15:51, Oliver Thiel wrote:
Hi all,
I have some troubles out print some DynaActionForm values from a map -
using
resource on that?
Thanks again
Oliver
-Ursprüngliche Nachricht-
Von: Mark Lowe [mailto:[EMAIL PROTECTED]
Gesendet: Samstag, 10. Januar 2004 17:16
An: Struts Users Mailing List
Betreff: Re: iterate DynaActionForm values from a HashMap
This might work as you have things, but there are more
is it possible to have dynamic parameters sent to to a dyna form?
I do not know how many or the name of the parameters that are being
sent?
Nathan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Look at IndexedProperties:
http://jakarta.apache.org/struts/faqs/indexedprops.html
robert
-Original Message-
From: Nathan Maves [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 08, 2004 1:02 PM
To: Struts Users Mailing List
Subject: dynamic parameters to DynaActionForm
parameters to DynaActionForm
is it possible to have dynamic parameters sent to to a dyna form?
I do not know how many or the name of the parameters that are being
sent?
Nathan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Nathan,
Try a map backed form
http://www.mail-archive.com/[EMAIL PROTECTED]/msg88704.html
-Richard
-Original Message-
From: Nathan Maves [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 08, 2004 12:13 PM
To: Struts Users Mailing List
Subject: Re: dynamic parameters to DynaActionForm
, i see:
org.apache.struts.taglib.html.BEAN[1].price 1
org.apache.struts.taglib.html.BEAN[0].price 2
No, i want to read the values of the checkboxes in my action:
DynaActionForm form = (DynaActionForm)actionForm;
String price1 = (String) form.get(price,0);
String price2
implementation will create a new object using the
specified Factory when Struts indexes into a position in the list
which is null.
form-bean name=myForm
type=com.company.MyForm
form-property name=colors
type=java.util.List/
/form-bean
Subclass your DynaActionForm
: DynaActionForm and radio-buttons
Hi,
i have a problem with handling my DynaActionsForm (Struts 1.1)and
radio-buttons.
In the JSP is a iteration over a bean (bookingPaymentTickets) that
creates radio-options.
logic:iterate id=tickets name=bookingPaymentTickets
scope=request
Price 1html:radio
On (2003/12/23 13:57), Marco Mistroni wrote:
Sorry that I bothered the list with my spam.
I found the problem..in the struts config I was still associating
The old MyForm bean to the new action created 'AliasMaintenanceAction'
I have the same problem, but I can't spot my
Not sure if its deprecated but i always use
action path=/foo name=myForm ..
rather than attribute which i don't know anything about.
Cheers Mark
On 2 Jan 2004, at 20:44, Sifuentes, Ben wrote:
I have been trying to do the following:
form-bean
name=searchForm
: DynaActionForm question
Not sure if its deprecated but i always use
action path=/foo name=myForm ..
rather than attribute which i don't know anything about.
Cheers Mark
On 2 Jan 2004, at 20:44, Sifuentes, Ben wrote:
I have been trying to do the following:
form-bean
name=searchForm
().getAttribute(foo);
greetings
matthias
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 2:05 PM
To: Struts Users Mailing List
Subject: Re: DynaActionForm question
Not sure if its deprecated but i always use
action path=/foo name=myForm ..
rather
I have been trying to do the following:
form-bean
name=searchForm
type=com.mckesson.eig.actions.search.patient.SearchForm
form-property name=facilities
type=java.util.ArrayList/
form-property name=sexes
Hi all,
I am trying to get things working with DynaActionform.
I have defined my dynaAction form in my struts-config file as follows..
form-bean name=productAliasForm
type=org.apache.struts.validator.DynaValidatorForm
form-property name=aliasRef type=java.lang.String/
form
:25, Marco Mistroni wrote:
Hi all,
I am trying to get things working with DynaActionform.
I have defined my dynaAction form in my struts-config file as follows..
form-bean name=productAliasForm
type=org.apache.struts.validator.DynaValidatorForm
form-property name=aliasRef type
Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: 23 December 2003 11:26
To: 'Struts Users Mailing List'
Subject: Error in JSP when using DynaActionForm
Hi all,
I am trying to get things working with DynaActionform.
I have defined my dynaAction form in my struts-config file
Hi,
The page is correct.
Now to avoid any null values that may cause any problems, I have
Writte following code in my action class..
DynaActionForm aliasForm = (DynaActionForm)form;
aliasForm.set(buttonSelected,enter);
aliasForm.set(aliasRef, 1234) ;
forward = mapping.findForward
it,
And then I forward the request to aliasMaintenance.jsp
In aliasMaintenance.jsp, I am supposing to get properties from a
DynaActionForm, but the JSP is assuming that the form used is still
MyFormBean used before.
As a proof of that, i tried to output the buttonSelected property, and
with
My
Hi all,
Sorry that I bothered the list with my spam.
I found the problem..in the struts config I was still associating
The old MyForm bean to the new action created 'AliasMaintenanceAction'
So whenever, in my aliasMaintenance.jsp, I was using the tag
html:form
Hi all,
Can you tell me how can I initialize dynamic form in struts
config?
Do I have to do something like this
form-property name=name type=java.lang.String value=init/
??
how about when I have to initialize a java.sql.Timestamp? I was used to
initialize it like this new
PROTECTED]
Sent: Monday, December 22, 2003 12:17 PM
Subject: Initializing DynaActionForm
Hi all,
Can you tell me how can I initialize dynamic form in struts
config?
Do I have to do something like this
form-property name=name type=java.lang.String value=init/
??
how about when I have
PROTECTED]
Sent: 18 December 2003 04:50
To: 'Struts Users Mailing List'
Subject: RE: validation and DynaActionForm / concrete question
Hi Marco!
I think using only one jsp wherein the number of form elements vary
according to what you are doing can be considered as anti-pattern and
is more of a JSP
of a) primitive types.
Thanks to Pedro Salgado and Martin Gainty (see Retrieving boolean
properties from a DynaActionForm on december 16), I partially succeeded in
solving the first problem which only confronted me with the next problem :-(
And while looking for a solution to that problem, I found
property can be of a (array of a) primitive
types.
Thanks to Pedro Salgado and Martin Gainty (see Retrieving boolean
properties from a DynaActionForm on december 16), I partially
succeeded in
solving the first problem which only confronted me with the next
problem :-(
And while looking
, December 17, 2003 9:24 AM
To: '[EMAIL PROTECTED]'
Subject: Newbie: java.lang.boolean and DynaActionForm?
Hi,
Both 'Struts in Action' and 'Programming Jakarta Struts' state that
ActionForms and DynaActionForms are nearly equivalent and the
main advantage
of using DynaActionForms is that you don't
to
use wisely or hang yourself :)
robert
-Original Message-
From: Engbers, ir. J.B.O.M. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 9:24 AM
To: '[EMAIL PROTECTED]'
Subject: Newbie: java.lang.boolean and DynaActionForm?
Hi,
Both 'Struts in Action' and 'Programming
a good thing or a bad thing?
Thank you,
Ed
- Original Message -
From: Mark Lowe [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 10:33 AM
Subject: Re: Newbie: java.lang.boolean and DynaActionForm?
No one's suggesting that anyone hangs
: Newbie: java.lang.boolean and DynaActionForm?
No one's suggesting that anyone hangs them selves or that struts isn't
good. But the fact that this list sees a high influx of newbies,
getting battered with high-brow design concepts which while are very
interesting have a certain chocolate fire guard
Hi all,
I am experiencing problems with DynaActionForm..
I have a DynaActionForm that contains 13 properties and
A DispatchAction used calling different methods depending
On the value of one parameter (named methodToCall).
Now, when I enter the page for the first time the only request
, December 17, 2003 10:33 AM
Subject: Re: Newbie: java.lang.boolean and DynaActionForm?
No one's suggesting that anyone hangs them selves or that struts isn't
good. But the fact that this list sees a high influx of newbies,
getting battered with high-brow design concepts which while are very
interesting
wrote:
Hi all,
I am experiencing problems with DynaActionForm..
I have a DynaActionForm that contains 13 properties and
A DispatchAction used calling different methods depending
On the value of one parameter (named methodToCall).
Now, when I enter the page for the first time the only request
Dec 2003, at 16:10, Marco Mistroni wrote:
Hi all,
I am experiencing problems with DynaActionForm..
I have a DynaActionForm that contains 13 properties and
A DispatchAction used calling different methods depending
On the value of one parameter (named methodToCall).
Now, when I enter
Hi all,
After struggling with my application, I have
One question to ask.
I have a DispatchAction class that handles my logic, and
A DynaActionForm associated with it.
The problem is that the jsp from which the request comes can
Contain either 1, 2 parameters (out of 13 of DynaActionForm
Thank you for the translation. ;-)
Ed
- Original Message -
From: Mark Lowe [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 11:11 AM
Subject: Re: Newbie: java.lang.boolean and DynaActionForm?
Hi Ed
I've checked my spellings
you
were suggesting doing with jsp.
Cheers Mark
On 17 Dec 2003, at 16:35, Marco Mistroni wrote:
Hi all,
After struggling with my application, I have
One question to ask.
I have a DispatchAction class that handles my logic, and
A DynaActionForm associated with it.
The problem is that the jsp
well i think the problem your having is because you're using
a dispatch action
so the form is mapped to the action and its set to validate. You can
either separte yu dispatch actions into standard actions or
hack it by having a single action that calls your dispatch action much
like you
Hi Wendy,
Only a little problem.. I haven't written any class for my
DynaActionForm. Instead, I declare all the properties in the
struts-config.xml
Struts does all the rest
But, anyway, can u give more details on ur solution to my problem?
Regards
marco
-Original
Marco wrote:
Only a little problem.. I haven't written any class for my
DynaActionForm. Instead, I declare all the properties in the
struts-config.xml
That does not preclude you from writing a class-- Dyna forms just get
you out of writing a bunch of get/set methods. You can still
a.k.a. the witness to your long debates with Chad regarding
morality and politcs :o)
-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 1:30 AM
To: 'Struts Users Mailing List'
Subject: RE: validation and DynaActionForm / concrete question
Hi
Hi,
I have defined a boolean property in a DynaActionForm (volledig which
means complete).
The value should be checked in the validate()-method.
It is easy to retrieve String-properties from the hash-map but the compiler
does not accept the following construct:
if ((boolean)this.get
in a DynaActionForm (volledig which
means complete).
The value should be checked in the validate()-method.
It is easy to retrieve String-properties from the hash-map but the compiler
does not accept the following construct:
if ((boolean)this.get(volledig))
complaining that it :Cannot cast from
: Retrieving boolean properties from a DynaActionForm
Hi,
I have defined a boolean property in a DynaActionForm (volledig which
means complete).
The value should be checked in the validate()-method.
It is easy to retrieve String-properties from the hash-map but the
compiler
does not accept
();
if (volleNaam) {
errors.add(Volledige naam, new
ActionError(error.naam.volledig));
} else {
errors.add(Beginletters, new
ActionError(error.naam.deel));
}
}
The DynaActionForm belongs
I'm trying to modify the simple Register application from Chapter 1 of Struts in
Action to use a DynaActionForm in place on the ActionForm shown in the book. I've
modified struts-config.xml accordingly. According to the book, whether you use an
ActionForm or a DynaActionForm should
Jim,
I'm not exactly sure what the book means when they say that whether you use
an ActionForm or a DynaActionForm should be transparent, but once you use
DynaActionForm, you form is no longer of type RegisterForm (hence the
ClassCastException). You must cast it to DynaActionFrom now
on DynaActionForm
Jim,
I'm not exactly sure what the book means when they say that whether you use
an ActionForm or a DynaActionForm should be transparent, but once you use
DynaActionForm, you form is no longer of type RegisterForm (hence the
ClassCastException). You must cast it to DynaActionFrom now
a DynaActionForm:
Almost the same thing, but do not create a separate AuthorForm.
DynaActionForm authorForm = (DynaActionForm) form;
Author author = new Author();
BeanUtils.copyProperties(author, authorForm);
try {
baseDAO.insertAuthor(author);
} catch
them when submitted. I am specifically having trouble
retrieving values from the three fields automatically created from an
arrayList (generated by using JSTL, a DynaActionForm, and a forEach loop).
Below are code fragments detailing the issue:
The entry in the struts-config.xml looks like
specifically having trouble
retrieving values from the three fields automatically created from an
arrayList (generated by using JSTL, a DynaActionForm, and a forEach loop).
Below are code fragments detailing the issue:
The entry in the struts-config.xml looks like this:
form-bean name
JSTL 1.1 was a typo - I am using JSTL 1.0. Thanks.
Thanks to everyone who contributed to this thread. I was able to accomplish
(initially, anyway) what I am needing to do by using the nested: tag;
similar to:
nested:nest property=grandparent
nested:write property=name
nested:iterate property=parents
nested:write property=name
1 - 100 of 620 matches
Mail list logo