bean:write format property

2003-06-02 Thread Fernando Esteban Barril Otero
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

Re: Cancel button with Javascript validation

2002-11-04 Thread Fernando Esteban Barril Otero
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

Re: please help - validator null pointer

2002-05-31 Thread Fernando Esteban Barril Otero
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

Re: please help - validator null pointer

2002-05-31 Thread Fernando Esteban Barril Otero
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

Re: Struts Validator

2002-05-28 Thread Fernando Esteban Barril Otero
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

Struts Validator

2002-05-27 Thread Fernando Esteban Barril Otero
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

Re: Digester and inheritance

2002-03-01 Thread Fernando Esteban Barril Otero
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 -

Re: Digester and inheritance

2002-03-01 Thread Fernando Esteban Barril Otero
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

Re: tiles-config.dtd - 403 Forbidden Error

2002-03-01 Thread Fernando Esteban Barril Otero
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

Re: Digester Link Question

2002-03-01 Thread Fernando Esteban Barril Otero
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

Re: How can I register a DTD in a war or jar

2002-02-20 Thread Fernando Esteban Barril Otero
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

Re: ActionForm Problem

2002-02-19 Thread Fernando Esteban Barril Otero
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

Re: tag

2002-02-19 Thread Fernando Esteban Barril Otero
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

Re: BeanUtil BUG

2002-02-18 Thread Fernando Esteban Barril Otero
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

Re: bean comparison using tags

2002-01-24 Thread Fernando Esteban Barril Otero
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

Re: Is there a better way to write this code?

2002-01-17 Thread Fernando Esteban Barril Otero
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.

Re: Is there a better way to write this code?

2002-01-17 Thread Fernando Esteban Barril Otero
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