Has anyone on the list had a requirement to validate (in a general way)
fields that are not associated with forms. For example if one has a hidden
field called productId which is not a form value but is posted in the
request, is there a way using Struts, to validate such fields in a general
sort
Not sure if I follow your question. But if I'm assuming correctly you have a
form bean with a property as an array
Ex:
String[] arrProp;
The form bean has the related accessor methods to this property.
void setArrProp(String[] arrProp){}
The html form can now have multiple inputs with the same
BeanUtils.copyProperties
-Original Message-
From: Daniel H. F. e Silva [mailto:[EMAIL PROTECTED]
Sent: 24 March 2003 14:31
To: [EMAIL PROTECTED]
Subject: [OT] BeanUtils property copying facility
Hi all,
Forgive me for posting an off-topic e-mail but i am needing help and as
some
You could remove the validate call in your form and call the form's validate
method in your Action depending on whether it was a submit or reset.
//validate form
ActionErrors errors = new ActionErrors();
errors = yourForm.validate(mapping, request);
//put the errors object in request
You can also set the content type in your response object like so:
response.setContentType(text\html);
response.setContentType(text\pdf);
etc...
-Original Message-
From: Joe Latty [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 30, 2002 10:34 AM
To: Struts Users Mailing List
Subject:
Think of your Flash movie as a very basic HTML form/page, this is because you don't
have the flexibility to embed any sort of scripting other than Flash's actionscript in
the movie as you can in a JSP. But you can get flash movies to interact with servlets,
JSP's, ASP's, a DB, whatever - both
Assign a name to the button object, then in your action class iterate
through all the form attributes, the pressed button will show up with
it's corresponding name and a suffix of .X or .Y, it's a tedious way
to do it especially if you have a large number of form elements, I
prefer using
Try the following:
dt:format pattern=MM/dd/yy
bean:define id=someProp name=filterForm property=fromDate
type=java.lang.String/
/dt:format
html:text property=someProp size=10 maxlength=10/
-Original Message-
From: Chen, Dean [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002
maxlength=10/
I get an Exception:
javax.servlet.ServletException: No getter method for property fmDt of bean
org.apache.struts.taglib.html.BEAN
Any ideas?
Dean
-Original Message-
From: Ady Das-O'Toole [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 12:07 PM
To: Struts Users Mailing
Rick - you could use the label-value method to construct your options list, this way
you set up your labels as a combination of both first and last name from their
respective bean properties.
If you do go this route, do a search for label-value beans in this archive, I remember
seeing a
I guess what you mean by this is that you don't want a form bean
associated with your action mapping, but you still want to pass data
either through another bean or in the request?
Could you clarify?
-Original Message-
From: Jennings, Christofer J. [mailto:[EMAIL PROTECTED]]
Sent:
You can also set validate=false in your mapping, but call the form's validate method
in your Action, that way you get to decide when to turn validation on. Of course
there's the additional hit of going to the action every time, in this case.
Ady
-Original Message-
From: Zeltser, Mark
Michael coincidentally enough the last few threads have addressed the same issue. To
summarize you could do one of two things:
1. Define 2 identical action-mappings in your struts-config
- Call the first one firstVisitSomething...Action and set validate=false
Now when a user clicks on the link
13 matches
Mail list logo