You ActionError constructor takes additional parameters. Here's a sample from some
code that passes two parameters to a message I'm working
on. In my example, if the user tries to insert a group with the same name as one in
the DB, an error is thrown and html:errors is used to
display the
I wrote a filter to strip these lines out. My application returned a CSV document
that looked strange in Excel with all of the blank lines caused by the various JSP
constructs that aren't visible to the user. In my case, the rendering of the
whitespace in the document is important. You're
Compile the tiles into .java files, compile these files into .class files
and jar them up. You'll need to add servlet mappings to every webapp's
web.xml, though.
Here's the test JSP I'm working with (called myjsp.jsp).
%@ page session=false %
%@ page import=java.util.Date %
html
body
h1Hi, the
I ran into the same problem and converted all my DispatchActions to
Actions. The downside is that there are more class files, but the mappings
seem cleaner, especially in handling the 'input' attribute for html:errors
/.
Also, using Actions lets me specify different values for the 'validate'
?
what about the form paths? and then mapping those in struts config to
tiles defs (by way of forwards, assuming thats the way one would want
to do things). and the additional problem of multiple forms on one
page?
I'll ponder some more..
On 18 Feb 2004, at 15:47, Carl Walker wrote
Make sure
1) that the entry in struts-config.xml matches the entry in validation.xml and that
both refer to the attribute value in html:javascript name=... /
2) that the validation.xml syntax is ok. Try testing a form entry with a construct
that you know works. Add each new field element
Hi,
I'm having a problem setting an initial value for a DynaValidatorForm. I have a date
field that is not required to be filled in. However, when I submit the form without a
value, I get a Date.valueOf exception thrown from SQLConverter.
If I submit a valid value or attempt to submit a
and java.sql.Date
You can have a string that looks like a date and validator will
still
validate it. To my knowledge there is no need to have the property
of
type Date. same is true of other types also.
On 12 Feb 2004, at 14:36, Carl Walker wrote:
Hi,
I'm having a problem
]
Date: Thursday, February 12, 2004 9:09 am
Subject: RE: Javscript
I've satisfied both your suggestions the javascript text no longer
appears.but How do i activate the JS validation?
-Original Message-
From: Carl Walker [EMAIL PROTECTED]
Sent: 12 February 2004 12:34
To: Struts Users
?
-Original Message-
From: Darren Massel [EMAIL PROTECTED]
Sent: 12 February 2004 14:42
To: 'Struts Users Mailing List'
Subject: RE: RE: Javscript
Cheers worked a dream.
-Original Message-
From: Carl Walker [EMAIL PROTECTED]
Sent: 12 February 2004 14:31
To: Struts Users Mailing
into the html:text box.
Is this the way it's supposed to work, or am I missing something.
Thanks,
Carl Walker
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Set JAVA_OPTS=-server -verbose:gc -Xms64m -Xmx64m and test your application manually
or using some kind
automated loop. At some point, excessive garbage collection will take place. Look
for Full GC.
If you don't see it, you may not be exercising the problem part on the application.
Full GC
Can you rewrite SetUpLanguages to take an empty constructor? If you can,
then you can use jsp:setProperty to take what you need from the request
object and put it in a Java Bean.
SetUpLanguages.java
---
package myclasses;
public class SetUpLanguages implements java.io.Serializable
{
public
Use a href=c:out value=${url} escapeXml=false /.../a instead.
Eric Jain wrote:
The following JSP fragment
jstl:url value=/view var=url
jstl:param name=id value=1 /
jstl:param name=format value=rdf /
/jstl:url
html:link href=${url}.../html:link
generates a link with an
Maybe you should create some app-specfic custom tags. Here's one example.
sched:table
sched:entry start=4pm end=5pm event=Watch TV/
sched:entry start=5pm end=6pm event=Eat Dinner /
/sched:table
With RT values in a loop.
sched:table
logic:iterate id=event name=event_collection
I think you will end up needing both the JavaScript and some server-side
check because there are actually two problems you are facing. The first
is if a panicky user repeatedly hits the 'Submit' button, sending multiple
requests to the server. This is the race condition you describe. It's
a
This should work. I've used the same construct before. Make sure that myObj !=
null in the Action and that you are referencing request.getAttribute(label) in
the JSP.
-Carl
Rachell, Morgan wrote:
In a JSP page, I have a link that calls an Action. Usually, this is done
with a submit button
I have an org.apache.struts.validator.DynaValidatorForm called AccountForm in
my struts-config.xml. The code below is similar to that found in the link
referenced below, except I call the initialize() method to get the initial=
attributes from the form bean definition.
// load up
Here's an example where I make a URL with two parameters, 'action' and
'accountId'.
'account' is a pageContext-scoped variable put on the page by the
logic:iterate tag.
%
HashMap editParams = new HashMap();
editParams.put(action, prepareEditForm);
You should use JavaScript to solve this.
Here's a sample function.
script language=JavaScript
var bAlreadySubmitted = false;
function isAlreadySubmitted()
{
if (document.forms[0].elements[14].style) {
document.forms[0].elements[14].style.visibility='hidden';
I had a problem with this version and Tomcat request parameters. The
Content-type of the form submitted by IE was
'application/x-www-form-url-encoded,application/x-www-form-url-encoded' instead
of 'application/x-www-form-url-encoded'. As a result, Tomcat wouldn't parse
out the request parameters
You should use a java.lang.String or java.lang.String[] property if you want
to have 'abc' submitted when checkbox 'chk' is checked.
If you want 'true' to be sent when 'chk' is checked, then change 'abc' to
'true'.
Take a look at this example for additional guidance
%-- FILE checkForm.jsp --%
You'll need to use your own bean:message key=errors.header
/,bean:message key=error.myproperty / scheme or remove the
errors.header/prefix, etc. from the resource file.
Bailey, Shane C. wrote:
I was looking at this:
http://husted.com/struts/tips/017.html
I use the request object to deal with parameters whose names aren't known in
advance. For instance, I had an app that allowed the user to associate
attributes on-the-fly with a given record. So I used the identifier for
these schema-changing attributes to come up with input type=text names like
24 matches
Mail list logo