In "Struts in Action" book on page 424, there is a tip to
don't use custom tags to format data. I'm wondering why.
There are any performance issues?
Ideas?
Fernando.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comm
Assuming that you are using de Struts validator, you can try this:
...
This will "turn off" the form validation and in your action you can
check with isCacelled(HttpServletResquest). The bCancel variable is
created by the validator's javascript and it is used to check if the
validade*Form will b
I don't know where to find a complete documentation of validator. Try to
set the form name attribute to be equal to the action path attribute
(which is required by the server-side validation).
Like:
--- struts-config.xml ---
--- validator.xml ---
In the jsp, you could use the
Try to put the dynamic="true" attribute in your form-bean definition.
(MyForm extends ValidatorForm)
I was getting a NullPointerException in the getDynaClass() method inside the
validate() and it worked after I put the dynamic attribute (which tells that
the bean have dynamic properties).
Fern
When I put the dynamic attribute in the form-bean tag it worked.
Thanks Chuck!
This is the configuration that I'm using:
--- in struts-config.xml ---
...
...
--- in validator.xml ---
Hope this
Hi,
Has anyone used the server-side validation with DynaActionForms using
the Struts Validator included in Struts 1.1-b1?
There are two classes (DynaValidatorForm and DynaValidatorActionForm) in
the package org.apache.struts.validator, but when I tried always generates
a NullPointerException whi
Try writting a small class to list the properties
of your classes (using the JavaBeans API - PropertyDescriptor, etc.).
Then, you can figure out what could be wrong.
Digester doesn't has limitations of this kind. I have the same
hierarchy and it works fine.
Fernando
- Original Message -
I'm using digester and inheritance without problems. What kind
of exception are you getting?
Fernando
- Original Message -
From: "Stacy Weng" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 01, 2002 1:20 PM
Subject: Digester and inheritance
H
Tiles digester uses the public id specified in tiles-def.xml
"-//Apache Software Foundation//DTD Tiles Configuration//EN"
to link the dtd that should be used for validation. The
dtd is retrieved from the jar.
Using digester, you can register a DTD URL for the specified
public id, so you can pass
Take a look at Jakarta-Commons
(http://jakarta.apache.org/commons/index.html).
Fernando
- Original Message -
From: "Stacy Weng" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 01, 2002 2:02 PM
Subject: Digester Link Question
Does anyone have
You need to implement the EntityResolver interface and
write the resolveEntity() method to return a InputSource
for your dtd (see EntityResolver doc). Actualy the
DefaultHandler already implements this interface, so
you need to overwrite the resolveEntity() method.
Don't forget to set the entity
You need to follow the JavaBeans convention. If you have a
setUserName() and a getUserName(), you need to set the
property name to "userName" and so on.
Fernando
- Original Message -
From: "Tom Bednarz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 19, 2002 2:00 PM
Complementing, you don't need to specify the iterate tag's
type attribute if you are using the tag
(which uses reflection to get the properties).
Fernando
- Original Message -
From: "Keith" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 1
I think that is the normal behavior for JavaBean properties.
When you have a setter/getter for a property starting with
more than one upper char, the property name must have exactly
the same name (without the "normal" convention).
- Original Message -
From: "emmanuel.boudrant" <[EMAIL PR
Try to use the to get the property
of the second bean (b2) first and then use .
Yes, the two are equal
Fernando
- Original Message -
From: "Afshartous, Nick" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 12:39 PM
Subject
In my opinion, one should use JSP with taglibs to
present the data. If you need special
processing or more complex behavior, you
should encapsulate it inside a bean or a
custom tag.
The examples you mentioned (Integer.toOctalString(),
String.toLowerCase()) can be easily achieved using
the JSTL.
To write the size of collection object or array,
you can
and write with .
The "size" bean can also be used with the tag
...
In the case of toString, if you don't specify a property
attribute in the tag , the output is the toString
of the object, like the above example.
This may help to avoid
17 matches
Mail list logo