RE: Tiles extend

2002-09-24 Thread Padma Ginnaram

I had a simillar problem using tiles(version prior to 1.1) and enclosed is
an email discussing the issue. See if this fix works for you.

- Padma

-Original Message-
From: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 12:30 PM
To: Struts Users Mailing List
Subject: Tiles extend


Hi all:

I'm developing my first aplication with struts and tiles. I define the tiles
in a XML file and I wanted to extend a definition. In the documentation said
when I extend a definition only must fill the attributes "name" and
"extends", but not "path" because it's extended. However when I did that an
error occur (Cannot get request dispatcher for path). If I put the same path
in both definitions it works fine. Is it a bug or always a must fill the
path attribute.

I'm using Struts 1.1 beta2.

Thank you

-
Miguel Ángel Medina López
Logic Factory: www.logic-factory.com
Granada - España




--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--- Begin Message ---


  Padma,

  Yes, this is the expected behavior. I have discover and corrected this
bug few days ago, but forget to update distribution ;-(. The same thing
should be done with  role !
  Thanks for this bug report, and its fixe, even if we have found it
nearly in the same time ;-) I will update distribution asap.

  Cedric

Padma Ginnaram wrote:

>
>
> Cedric,
>
> I am trying to extend a definition and found that the path of the
> parent definition is always used. In the
> XmlDefinition.resolveInheritance method.
>
> I assuming this is a bug, since the overload method documents that we
> need to use the childs path. I made the following change, can you
> confirm if this is the expected behaviour.
>
>
>   if (this.path == null) {
>  setPath( parent.getPath() );
>   }
>
> Thanks,
> Padma
>


--- End Message ---

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


RE: Struts Validation Required and Float

2002-10-02 Thread Padma Ginnaram

Check if your float validator depends on required. Removing this dependency
should solve your problem.

-Padma 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 8:24 PM
To: [EMAIL PROTECTED]
Subject: Struts Validation Required and Float


When entering validations on a  form  in validation.xml, If you have a
fieldA  with "depends=required" and FieldB with "depends=float" (versus
depends="float,required) , if both those validation errors occur, the
validator will display only the "depends=required" validation error (FieldA
is required) the first time the user clicks on the Submit Button.

Once you enter a value for FieldA and re-click the Submit button, the
"depends=float" validation error  is displayed on the form (FieldB must be
a float).  Is there a way for both to appear at the same time the when the
Submit button is first clicked?

  Thanks, Pete Gabriel


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




FW: Struts forms best practice

2002-10-15 Thread Padma Ginnaram



>  -Original Message-
> From:     Padma Ginnaram  
> Sent: Tuesday, October 15, 2002 10:04 AM
> To:   '[EMAIL PROTECTED]'; 'David Winterfeldt'
> Subject:  RE: Struts forms best practice
> 
> 
> I was going thru the new version of the validator framework used in struts
> 1.1. The pluggable validators like Long,Date, etc seem to return the
> parsed value. Am I correct in assuming that this parsed value was intended
> to be used as a converted value?. Just want some feedback from you to make
> sure I am using these framework properly.
> 
> thanks,
> Padma
> 
>  -Original Message-
> From: Padma Ginnaram  
> Sent: Friday, October 11, 2002 2:07 PM
> To:   '[EMAIL PROTECTED]'
> Subject:  RE: Struts forms best practice
> 
> Rules for validating also apply for converting the data, eg. would be a
> specific date pattern used to validate a date field would also be applied
> to converting the dates. Why not convert the data as part of the
> validation? The same rules also apply for formatting the data which can
> also be different based on the users locale. Don't these rules belong in
> the view, so should I access them in the action?
> 
> Here is what I am doing, appreciate any feedback. 
> 
> * My Form contains a value map pre-populated by an action class with
> values that need to be formatted. 
>   myForm.fromValue(myValue);
> * I am using struts 1.0, extended the validator framework to support
> validation/formatting rules to specify the formatters to be applied for
> each field, extended the form tag to call these formatters on the form
> beans value map. These formatted values are available for the body of the
> tag.
> * Validators(date, time, money, etc) parse these values and save the
> converted value on the form beans value map.
> * myForm.toValue() creates a value object using the values in the map,
> this is called in the action class.
> 
> thanks,
> Padma
> 
> 
> 
> 
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 1:00 PM
> To: Struts Users Mailing List
> Subject: Re: Struts forms best practice
> 
> 
> 
> 
> On Fri, 11 Oct 2002, rainer juenger wrote:
> 
> > Date: Fri, 11 Oct 2002 18:38:40 +0200
> > From: rainer juenger <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Struts forms best practice
> >
> > Hi,
> >
> > I was wondering what the best data type for Struts ActionForm class is.
> > According to the design I would say it should be the same as the data
> type
> > in the application.
> > (e.g. float) But then the associated form already comes with a "0" filed
> in
> > the form. That's something I don't wont at all!
> > As I found out, the only solution is to use String as data type an
> convert
> > it later.
> >
> > Is there a more elegant way?
> >
> 
> Form bean properties should generally be Strings, so that you can
> redisplay whatever the user actually typed.  Do your conversions in the
> Action after validation is complete -- in 1.1b2 and later, you can use
> BeanUtils.copyProperties() to copy the form bean properties into a
> coresponding business object, complete with doing the conversions as
> needed.
> 
> > Raine
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Struts forms best practice

2002-10-15 Thread Padma Ginnaram



>  -Original Message-
> From:     Padma Ginnaram  
> Sent: Tuesday, October 15, 2002 10:04 AM
> To:   '[EMAIL PROTECTED]'; 'David Winterfeldt'
> Subject:  RE: Struts forms best practice
> 
> 
> I was going thru the new version of the validator framework used in struts
> 1.1. The pluggable validators like Long,Date, etc seem to return the
> parsed value. Am I correct in assuming that this parsed value was intended
> to be used as a converted value?. Just want some feedback from you to make
> sure I am using these framework properly.
> 
> thanks,
> Padma
> 
>-Original Message-
>   From:   Padma Ginnaram  
>   Sent:   Friday, October 11, 2002 2:07 PM
>   To: '[EMAIL PROTECTED]'
>   Subject:RE: Struts forms best practice
> 
>   Rules for validating also apply for converting the data, eg. would
> be a specific date pattern used to validate a date field would also be
> applied to converting the dates. Why not convert the data as part of the
> validation? The same rules also apply for formatting the data which can
> also be different based on the users locale. Don't these rules belong in
> the view, so should I access them in the action?
> 
>   Here is what I am doing, appreciate any feedback. 
> 
> * My Form contains a value map pre-populated by an action class with
> values that need to be formatted. 
>   myForm.fromValue(myValue);
> * I am using struts 1.0, extended the validator framework to support
> validation/formatting rules to specify the formatters to be applied for
> each field, extended the form tag to call these formatters on the form
> beans value map. These formatted values are available for the body of the
> tag.
> * Validators(date, time, money, etc) parse these values and save the
> converted value on the form beans value map.
> * myForm.toValue() creates a value object using the values in the map,
> this is called in the action class.
> 
>   thanks,
>   Padma
> 
> 
> 
> 
>   -Original Message-
>   From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
>   Sent: Friday, October 11, 2002 1:00 PM
>   To: Struts Users Mailing List
>   Subject: Re: Struts forms best practice
> 
> 
> 
> 
>   On Fri, 11 Oct 2002, rainer juenger wrote:
> 
>   > Date: Fri, 11 Oct 2002 18:38:40 +0200
>   > From: rainer juenger <[EMAIL PROTECTED]>
>   > Reply-To: Struts Users Mailing List
> <[EMAIL PROTECTED]>
>   > To: [EMAIL PROTECTED]
>   > Subject: Struts forms best practice
>   >
>   > Hi,
>   >
>   > I was wondering what the best data type for Struts ActionForm
> class is.
>   > According to the design I would say it should be the same as the
> data type
>   > in the application.
>   > (e.g. float) But then the associated form already comes with a "0"
> filed in
>   > the form. That's something I don't wont at all!
>   > As I found out, the only solution is to use String as data type an
> convert
>   > it later.
>   >
>   > Is there a more elegant way?
>   >
> 
>   Form bean properties should generally be Strings, so that you can
>   redisplay whatever the user actually typed.  Do your conversions in
> the
>   Action after validation is complete -- in 1.1b2 and later, you can
> use
>   BeanUtils.copyProperties() to copy the form bean properties into a
>   coresponding business object, complete with doing the conversions as
>   needed.
> 
>   > Raine
> 
>   Craig
> 
> 
>   --
>   To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
>   For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Struts forms best practice

2002-10-15 Thread Padma Ginnaram


I tried posting this to struts-user group, trying one more time.
>  -Original Message-
> From:     Padma Ginnaram  
> Sent: Tuesday, October 15, 2002 4:43 PM
> To:   '[EMAIL PROTECTED]'
> Subject:  RE: Struts forms best practice
> 
> 
> 
>-Original Message-
>   From:   Padma Ginnaram  
>   Sent:   Tuesday, October 15, 2002 10:04 AM
>   To: '[EMAIL PROTECTED]'; 'David Winterfeldt'
>   Subject:RE: Struts forms best practice
> 
> 
>   I was going thru the new version of the validator framework used in
> struts 1.1. The pluggable validators like Long,Date, etc seem to return
> the parsed value. Am I correct in assuming that this parsed value was
> intended to be used as a converted value?. Just want some feedback from
> you to make sure I am using these framework properly.
> 
>   thanks,
>   Padma
> 
>-Original Message-
>   From:   Padma Ginnaram  
>   Sent:   Friday, October 11, 2002 2:07 PM
>   To: '[EMAIL PROTECTED]'
>   Subject:RE: Struts forms best practice
> 
>   Rules for validating also apply for converting the data, eg.
> would be a specific date pattern used to validate a date field would also
> be applied to converting the dates. Why not convert the data as part of
> the validation? The same rules also apply for formatting the data which
> can also be different based on the users locale. Don't these rules belong
> in the view, so should I access them in the action?
> 
>   Here is what I am doing, appreciate any feedback. 
> 
> * My Form contains a value map pre-populated by an action class with
> values that need to be formatted. 
>   myForm.fromValue(myValue);
> * I am using struts 1.0, extended the validator framework to support
> validation/formatting rules to specify the formatters to be applied for
> each field, extended the form tag to call these formatters on the form
> beans value map. These formatted values are available for the body of the
> tag.
> * Validators(date, time, money, etc) parse these values and save the
> converted value on the form beans value map.
> * myForm.toValue() creates a value object using the values in the map,
> this is called in the action class.
> 
>   thanks,
>   Padma
> 
> 
> 
> 
>   -Original Message-
>   From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
>   Sent: Friday, October 11, 2002 1:00 PM
>   To: Struts Users Mailing List
>   Subject: Re: Struts forms best practice
> 
> 
> 
> 
>   On Fri, 11 Oct 2002, rainer juenger wrote:
> 
>   > Date: Fri, 11 Oct 2002 18:38:40 +0200
>   > From: rainer juenger <[EMAIL PROTECTED]>
>   > Reply-To: Struts Users Mailing List
> <[EMAIL PROTECTED]>
>   > To: [EMAIL PROTECTED]
>   > Subject: Struts forms best practice
>   >
>   > Hi,
>   >
>   > I was wondering what the best data type for Struts
> ActionForm class is.
>   > According to the design I would say it should be the same
> as the data type
>   > in the application.
>   > (e.g. float) But then the associated form already comes
> with a "0" filed in
>   > the form. That's something I don't wont at all!
>   > As I found out, the only solution is to use String as data
> type an convert
>   > it later.
>   >
>   > Is there a more elegant way?
>   >
> 
>   Form bean properties should generally be Strings, so that
> you can
>   redisplay whatever the user actually typed.  Do your
> conversions in the
>   Action after validation is complete -- in 1.1b2 and later,
> you can use
>   BeanUtils.copyProperties() to copy the form bean properties
> into a
>   coresponding business object, complete with doing the
> conversions as
>   needed.
> 
>   > Raine
> 
>   Craig
> 
> 
>   --
>   To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
>   For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Am I the only one using java.util.Date?

2002-10-16 Thread Padma Ginnaram

If you are using struts 1.1 and validator framework,
StrutsValidator.validateDate converts the string to a java.util.Date and
returns this Date. This returned value gets saved on the validationResults
in the ValidatorForm.

ValidatorForm.getResultValueMap() returns a HashMap containing these
converted values associated to each form property that is being
validated/translated.

I am not using 1.1 yet, but used the same approach in 1.0 by extending
struts validator framework to do my form property conversion. 

-Padma

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 12:22 PM
To: Struts List
Subject: Am I the only one using java.util.Date?


My business layer bean has a field as java.util.Date (example:
birthDate). My form bean uses the String for this date (in this
example.. String birthDate). The problem is I can't seem to use
BeanUtils to copy the properties since it appears BeanUtils will only
convert a java.sql.Date by default (get
java.lang.IllegalArgumentException: argument type mismatch when using
java.util.Date) . I tried dealing with registering a custom Coverter I
wrote and registering it with ConvertUtils and below is a copy of the
message I posted concerning this problem.

I'm posting this question, though, because I'm curious how others have
dealt with this situation? Maybe using the BeanUtils or PropertyUtils
is not that common of a practice or most use a java.sql.Date as
opposed to java.util.Date? Having dates in form fields is common so
I'm curious how others transfer their form field dates to their
business model (as java.util.Date?).

Thanks for any info.

Below was Converter question I posted last night, in case anyone is
interested:

I'm still having a bit of trouble trying to use BeanUtils to copy
java.util.Date properties. It appears that it will work fine by
default with java.sql.Date but isn't set up by default for
java.util.Date (which I'm using for Dates in my business bean). I
build a class implements Converter interface and used the ConvertUtils
to register java.util.Date with this Converter. It works great
converting the String form properties to Dates as expected. The
question I have is how do I build a converter (or modify the existing
one) that will convert the Date properties to String properties when I
want to go the other way with the copyProperties (populate my DynaForm
from a business bean)? I tried modifying the covert method of the
Converter I created so that if the arg was a String property it would
covert and return a Date but the problem is this Converter never got
used when going the other direction (Date to String). Any ideas what
I'm doing wrong or what I can do to solve this problem?


-- 

Rick
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: help please: Validator basic use

2002-10-18 Thread Padma Ginnaram
Try applying a simple validator like required to one of your form fields, if
it does not work verify the following.

1. name used in the validation resource file matches the name in your action
mapping
2. validate set to true in your action mapping
3. your form extends ValidatorActionForm, and if you have any custom
validation in your form, you  don't ignore the errors returned by
super.validate.

If the problem is only with date validator, are you entering this garbage
after you enter a valid date?

The date validator that comes with struts1.1 uses a short pattern (M/d/YY
for en_US) if you do not explicitly pass a valid date. It does not do strict
parsing by default unless you specify pattern using the variable
datePatternStrict.

If you want to implement strict date parsing with out having to specify this
pattern, write your own pluggable validator and check for the parse position

DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale);   
df.setLenient(false);  
  
ParsePosition pos = new ParsePosition(0);
Object obj = df.parseObject(value, pos);
if (pos.getIndex() == 0)
  throw new ParseException("Unparseable value: \"" + value + "\"" ,
pos.getErrorIndex());
if (pos.getIndex() < value.length())
  throw new ParseException("Unparseable value: \"" + value + "\"" ,
  pos.getIndex());

-Original Message-
From: Clayson, Jim [mailto:Jim.Clayson@;centrica.co.uk]
Sent: Thursday, October 17, 2002 9:05 AM
To: '[EMAIL PROTECTED]'
Subject: help please: Validator basic use


Hi I am attempting to use the date validation provided by the framework - I
am using struts1.1b2.

I think I must be missing something fairly fundamental but maybe someone
will be able to confirm what that is. The problem is when I enter garbage
into the form's date fields and submit them, I get no errors. How does one
usually display the errors when using the validator framework.

I have my validator-rules.xml and validation.xml config files in my
application's web-inf dir.

Their relevent contents are as follows:

validator-rules.xml

  

 
 

  

 and validation.xml:

   
  
 
 
 
 
 
 
  
  

I have my action's validate attribute set to "true".

Are the above setup correctly?

Thanks
Jim




The information contained in or attached to this email is
intended only for the use of the individual or entity to
which it is addressed. If you are not the intended
recipient, or a person responsible for delivering it to the
intended recipient, you are not authorised to and must not
disclose, copy, distribute, or retain this message or any
part of it. It may contain information which is confidential
and/or covered by legal professional or other privilege (or
other rules or laws with similar effect in jurisdictions
outside England and Wales).

The views expressed in this email are not necessarily the
views of Centrica plc, and the company, its directors,
officers or employees make no representation or accept any
liability for its accuracy or completeness unless expressly
stated to the contrary.


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Sub Application & Shared Tiles Definitions Factory

2002-10-18 Thread Padma Ginnaram
I found the following note in tiles user guide about the shared definitions
factory 

"This plugin creates one single shared factory even if you have
several modules. The plugin first read factory parameters from web.xml and
then overload them with parameters from the first struts-config.xml file
read. Read order is determined by the order of module declarations in
web.xml." 

Why force the sub apps to share the definitions, and why force our selves
into providing unique names for definitions across multiple sub
applications?  If there are any common definitions across the sub apps, we
can specify multiple files, so what am I missing.

thanks,
Padma

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Struts Validator / i18N] accentuated letters with \w pattern dont work

2002-10-18 Thread Padma Ginnaram

from regexp javadoc at http://jakarta.apache.org/regexp/apidocs/ 
 \w   Matches a "word" character (alphanumeric plus
"_")

You probably need letters of latin-1 supplement (U+00C0 - U+00FF), refer to
http://www.unicode.org/charts/ for more details.

specify this range of characters in your mask pattern and the validator
should work. This worked for me for chinese characters with an older version
of the validator framework which use jakarta regexp.

  mask
  ^[a-zA-Z\u00C0-\u00FF]*$


-Padma

-Original Message-
From: Vincent PROSPER [mailto:Vincent.Prosper@;Alkinos.com]
Sent: Friday, October 18, 2002 4:44 AM
To: [EMAIL PROTECTED]
Subject: [Struts Validator / i18N] accentuated letters with \w pattern
dont work


Hi,

In my validation.xml file, I have the following formset tag:


  
   name
   ^[\w|-|'| ]+$
  
 ...




  
 
 
   mask
   ${name}
 

...



All works fine, except for accentuated letters which aren't matched by the
regexp ${name}... That is to say, "Rene" works but "René" doesn't!

Could you please help me on this topic?
NB:  is also set in the JSP.

Another question, that has nothing to do with the previous one, except it
also concerns Struts Validator:

How can I remove the Error... that is generated by
Struts Validator when replacing ? I put error messages besides
each field with a , and it displays that
ugly HTML stuff instead of a simple error message (and also without taking
into account my CSS class...)

Thanks in advance for both answers.

Vince



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Sub Application & Shared Tiles Definitions Factory

2002-10-18 Thread Padma Ginnaram
Cedric,

Thanks for contributing this neat framework. Support for extending tiles
definitions, and sharing the common definitions between sub applications
using the comma delimited notation will help us separate and share what we
need similar the validation plugin which allows loading resources specific
to the app. 

We can also learn from tiles and add support for extending form validation
rules as well and being able to load the localized resource files based on
language postfix. 

I have gone thru the discussions on struts-dev and I am happy that we have a
proposal to make tiles definitions visible with in a sub app. 

Separating this will make our life easier when migrating to 1.1 to use sub
apps since we are currently using separate struts application using Stoehr's
extensions to support multiple controllers. If for some reason we need to
access definitions associated to a specific subapp in a page, we can
probably provide context/prefix attribute on the tiles tags.

I cannot give you a real example, since I am not using the sub apps yet.
Here is something that might be close.

we have definitions corresponding to error_400 page for each application
which differ in the nav bar. There is a common error_400 definition in a
common definitions file used by all apps. And each application extend this
definition and override the nav bar parameters.

If we use the current version of tiles in 1.1, the first sub applications
nav bar will be used when the displaying the error page for all sub apps. We
can probably come up with a better implementation for handling errors using
declarative exception handling but there are other scenarios like these that
need to be accounted for.

thanks,
Padma

-Original Message-
From: Cedric Dumoulin [mailto:cedric@;apache.org]
Sent: Friday, October 18, 2002 4:42 AM
To: Struts Users Mailing List
Subject: Re: Sub Application & Shared Tiles Definitions Factory



  It was just a quick adaptation of Tiles to the new concept of modules. 
You are right that there is no reasons to enforce such rules. Any 
proposal, and why not examples of how the Tiles config files should 
behave and look like in the case of modules are welcome.

    Cedric

Padma Ginnaram wrote:

>I found the following note in tiles user guide about the shared definitions
>factory 
>
>   "This plugin creates one single shared factory even if you have
>several modules. The plugin first read factory parameters from web.xml and
>then overload them with parameters from the first struts-config.xml file
>read. Read order is determined by the order of module declarations in
>web.xml." 
>
>Why force the sub apps to share the definitions, and why force our selves
>into providing unique names for definitions across multiple sub
>applications?  If there are any common definitions across the sub apps, we
>can specify multiple files, so what am I missing.
>
>thanks,
>Padma
>
>--
>To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
>For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>
>
>  
>


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




RE: Problem with logic:iterate

2002-08-12 Thread Padma Ginnaram

Try this



.


.

In your example you named indexed attribute is same as the name of the bean
containing the array you are iterating through which probably confused you.

In the iterate tag you are already iterating thru a list of strings returned
by sampleRowForm.getTempsud(), id holds name of the variable which refers to
the String corresponding to the current index. 

Hope this helps,
Padma


-Original Message-
From: Sudhir S. Shetty [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 12, 2001 7:24 AM
To: Struts Users Mailing List
Subject: Problem with logic:iterate


Hi ,
Im having some problems with logic Iterate,
I have a Form Bean SampleRowForm.java in which I define a String []
---
private String [] tempsud =
{"Sudhir","Shetty","Ramesh","K","'Doug","Wong","Aloke","Thimi","InveniTech",
"Powershare"};

public void setTempsud(String tempsud[]){
  this.tempsud = tempsud;
 }

 public String[] getTempsud(){
return  this.tempsud;
 }
-
and in my JSP
I have the following code.




 
 <%="Sudhir"%>
 
 
 

when i run the JSP file I get the following error
javax.servlet.jsp.JspException: No getter method for property tempsud of
bean 

Can you guide me how should i write the bean:write tag to print the values
of the String array on to the JSP?
regards,
Sudhir


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: localization with multiple charsets

2002-08-16 Thread Padma Ginnaram

According to this post
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12490.html 
the browser uses the charset specified in the   to send form
data. 

If the user changes the charset, it is probably used but you can look up
http spec at ftp://ftp.isi.edu/in-notes/rfc2616.txt.

You also want to think about decoding the data if you are going to use
different content type per locale. Refer to this thread for more details
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10552.html.

- Padma

-Original Message-
From: Frederic Laub [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 10:44 AM
To: Struts Users Mailing List
Subject: localization with multiple charsets


Hi,

I'm developing a multi-lingual database driven web application with struts.
I've selected the Unicode character set (UNICODE_FSS) for my database
(Firebird), java manages strings in Unicode.
I've read the excellent chapter on Internationalization and Struts but some
questions remain concerning the view components.
For the Hebrew language there are several charsets available:
UTF-8 (unfortunately not all browser versions accept this charset)
Hebrew Windows
Hebrew ISO Visual
Hebrew ISO Logical
Etc.
Suppose I store my Hebrew resource text with the charset ISO-8859-8 and
I set all my content type for users with locale "he" to "text/html;
charset=ISO-8859-8".
What happens when the user changes his browser charset parameter to another
Hebrew charset and sends text input back to the server?
Any advice for planning my internationalization with Struts is welcome!

Your help will be appreciated.
Fred


have to develop a multi



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: encoding problem

2002-08-16 Thread Padma Ginnaram

You need both, refer to
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12490.html for
details.
-Original Message-
From: santhosh [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 17, 2002 3:01 AM
To: 'Struts Users Mailing List'
Subject: encoding problem




In my jsp i have the directive " <%@ page contentType= "text/html;
charset=Shift_JIS" %>"

In this case if i input any japanese character  when redisplaying the form
these character displays perfectly.

But the japanese characters from resource_ja.properties doesnot display
correctly.


At the same time instead of  putting above said directine , if i put  html
tag  ""

the characters from resource_ja.properties  display perfectly  but  when
redisplaying the form after submitting , japanese characters entered in the
form does not display correctly.

But i want both to display perfectly.

Can anyone  suggest me the proceedure by which i can handle this situation
perfectly.

thanx with regds

santhosh hegde A

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Validating nested:text fields in an iterate block

2002-08-20 Thread Padma Ginnaram

I did not use the nested tag but you should be able to validate indexed
fields by specifying indexedProperty and indexedListProperty (the version of
the struts validator framework I use never uses the indexedProperty).

http://home.earthlink.net/~dwinterfeldt/revision.html for changes made on
9/25/2001.

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 10:29 AM
To: ''Struts Users Mailing List' '
Subject: Validating nested:text fields in an iterate block


Hi All,

Is is possible to use the struts validator to validate a nested:text field
within an iterate block.

I can't see a way to do this; validation.xml wants the name of a property on
the form; but within an iterate block the field names are made on the fly -
ie address[0].street. Is it possible to define a
property="address[*].street" ?

Any pointers much appreciated.

Jon.

The contents of this email are intended only for the named addressees and
may contain confidential and/or privileged material. If received in error
please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
e-mail from your system. Unauthorised review, distribution, disclosure or
other use of this information could constitute a breach of confidence. Your
co-operation in this matter is greatly appreciated. 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: how do i get a Field object in Validator?

2002-10-22 Thread Padma Ginnaram
Andy,

Its possible but you have to extend the commons validator, override the
validate method and add the form fields (validation resources not action
form) as a resource under . 

Extend the ValidatorActionForm and use your version of the validator.

Default method parameters are defined in the ValidatorAction (class
corresponding to the validator specified in the resource files). You can
override this when you define your validator in the xml file by specifying
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors,
javax.servlet.http.HttpServletRequest,

I am trying to do something similar to pass the validation results for some
of my validators like daterange so I can compare the parsed value saved of
in the result map by the date validator using parsed values associated to
other form fields as min/max values.

-Padma
-Original Message-
From: Andy Kriger [mailto:akriger@;greaterthanone.com]
Sent: Tuesday, October 22, 2002 2:45 PM
To: Struts Users Mailing List
Subject: RE: how do i get a Field object in Validator?


That much I understand - but is it possible to get a reference to the Field
objec that represents that 2nd property? For example, if you wanted to get
message arguments from the other field.

-Original Message-
From: Jerry Jalenak [mailto:Jerry.Jalenak@;LABONE.com]
Sent: Tuesday, October 22, 2002 14:19
To: 'Struts Users Mailing List'
Subject: RE: how do i get a Field object in Validator?


In your validator-rules.xml file, add the following for each form field you
need access to:




secondProperty-Label
secondProperty-Value




secondProperty-Label would be what you want to call the variable in your
custom routine; secondProperty-Value would be the actual form field name
that contains the entered value.  Then in your custom routine you can access
these values by

public static boolean yourCustomRoutine(Object object,
ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest
request)
{
String fp = ValidatorUtil.getValueAsString(object,
field.getProperty());
String sp = ValidatorUtil.getValueAsString(object,
field.getVarValue("secondProperty-Label"));

... do something ...
return true;  // or false if the validation fails
}

HTH,

Jerry

> -Original Message-
> From: Andy Kriger [mailto:akriger@;greaterthanone.com]
> Sent: Tuesday, October 22, 2002 11:33 AM
> To: Struts Users Mailing List
> Subject: how do i get a Field object in Validator?
>
>
> I am writing a custom rule and I need to know how I can get a
> handle to a
> different Field object? (not the one passed into the method
> in the first
> place)
>
> thx
> a
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>

This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at (800)388-4675.



--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Validator and multi-tiered nesting

2002-10-24 Thread Padma Ginnaram
You can try specifying rules for every monthbean "monthBean[0].dayBeans,
monthBean[1].dayBeans" as your indexed list property. 


or you can extend the validate method and call the validations on each
MonthBean yourself

ActionErrors errors = super.validate(.
for each month bean .

Validator validator =
StrutsValidatorUtil.initValidator(
mapping.getAttribute()+
".monthBean",
getMonthBean(indx), application, 
request,monthBeanErrors, page);
validator.validate();
merge(errors, monthBeanErrors, "monthBean", indx);

provide your monthBean validation rules using mainFormName.monthBean as the
form name.



-Original Message-
From: Zeitlin, Mike [mailto:ZeitlinM@;daugherty.com]
Sent: Thursday, October 24, 2002 3:23 PM
To: [EMAIL PROTECTED]
Subject: Validator and multi-tiered nesting



Using an example,  let us say that I have a CalendarForm,  and this Form has
a Collection of MonthBeans,  and each MonthBean has a collection of
DayBeans.  How can I reference fields in the DayBean in the validation.xml?
It seems that using indexedListProperty will only allow me to go to the
collection of MonthBeans but no deeper.

Any help would be appreciated,
Mike Zeitlin
Daugherty Systems

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using ActionErrors

2001-02-14 Thread Padma Ginnaram



I need 
to display an indicator for the fields that result in error and display all the 
errors on the top of the page. Using the error tag I can display all the errors 
at one location, but I am not able to figure out how to display the indicator. 
Any suggestions?
 -Original Message-From: 
Deadman, Hal [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 
13, 2001 5:07 PMTo: [EMAIL PROTECTED]Subject: 
RE: Using ActionErrors

  I 
  haven't tried it but I thought that you could specify the property attribute 
  on the errors tag and it would pull out the error that has that property. When 
  you add to the ActionErrors object the property is the first argument. You 
  should probably use the property name that cooresponds to the property of the 
  form field. 
   
   -Original 
  Message-From: David J Snowsill 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 13, 
  2001 4:31 PMTo: [EMAIL PROTECTED]Subject: 
  Using ActionErrors
  
Can anybody point me in the right direction on 
how to associate a particular error with a particular input field in a 
form
 
Thanks
 
David J SnowsillPrincipal 
ConsultantCalibre Financial Technology[EMAIL PROTECTED]Office: 
(61-2) 9212 0527Mobile: 0403 091 468
 
***This E-mail is 
intended only for the use of the individual or entity namedabove and may 
contain information that is confidential and privileged. If you are 
not the intended recipient, you are hereby notified that 
anydissemination, distribution or copying of this E-mail is strictly 
prohibited. If you have received this E-mail in error, please 
notify us immediatelyby return e-mail to the sender or by telephoning 
one of our staff on (61-2)9212 0527.  Please then destroy any 
copies of the original message thatare in your possession. Thank 
you.***


RE: Using ActionErrors

2001-02-14 Thread Padma Ginnaram



I need 
to put the indicator right next to the field(s) that result in error. 
As Hal explains in his response that the error 
description can be displayed using the property name corresponding to the field. 
Instead of displaying the error description I need to conditionally display an 
image or highlight the field in some way if an error exists corresponding to 
that field's property.
 
Appreciate your help.

  -Original Message-From: Maya Muchnik 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, February 14, 2001 
  12:32 PMTo: [EMAIL PROTECTED]Subject: Re: 
  Using ActionErrorsPadma, 
  Can you be more specific? Do you need to display an error corresponding a 
  label to the field, or you need to display a field number ? I think, 
  struts-example shows how to display a field label together with its error. And 
  all errors are displayed on the top of the page. Do you need something 
  different? 
  Maya 
  Padma Ginnaram wrote: 
  

I need to display an indicator for the fields that result in error 
and display all the errors on the top of the page. Using the error tag I can 
display all the errors at one location, but I am not able to figure out how 
to display the indicator. Any suggestions? -Original Message- From: Deadman, Hal [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 13, 2001 
5:07 PM To: 
[EMAIL PROTECTED] Subject: RE: Using ActionErrors   
I haven't tried it but I thought that you could specify the 
  property attribute on the errors tag and it would pull out the error that 
  has that property. When you add to the ActionErrors object the property is 
  the first argument. You should probably use the property name that 
  cooresponds to the property of the form 
  field. -Original Message- From: David J Snowsill [mailto:[EMAIL PROTECTED]] 
  Sent: Tuesday, February 13, 
  2001 4:31 PM To: 
  [EMAIL PROTECTED] Subject: Using ActionErrors   
  Can anybody point me in the right direction on how to associate 
a particular error with a particular input field in a 
form Thanks David J 
Snowsill Principal 
Consultant Calibre 
Financial Technology [EMAIL PROTECTED] 
Office: (61-2) 9212 
0527 Mobile: 0403 091 
468 *** 
This E-mail is intended only for the 
use of the individual or entity named above and may contain information that is 
confidential and privileged.  If you are not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this E-mail is 
strictly prohibited.  If you have received this E-mail in error, please notify 
us immediately by 
return e-mail to the sender or by telephoning one of our staff on 
(61-2) 9212 0527.  
Please then destroy any copies of the original message 
that are in your 
possession. Thank you. ***


RE: JUNIT and Struts

2001-03-29 Thread Padma Ginnaram
Title: RE: JUNIT and Struts






Is there a sample available for testing struts with j2eeunit


Thanks,
Padma
-Original Message-
From: Vincent Massol [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 5:27 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: JUNIT and Struts



Yes, and you can also do unit tests of your server side code if you want,
using J2EEUnit (http://j2eeunit.sourceforge.net). We are in the process of
writing a test suite using J2EEUnit for Struts.
Thanks.
Vincent.


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 5:43 AM
Subject: JUNIT and Struts



> We use a JUnit extension (HttpUnit) to do all of our functional testing.
We
> can effectively 'fake' the user submitting a form, and check for page
> results. We've added some code into a base test class so that we can use
> methods like assertPageText("xyz") or assertPageError
> ("struts.resources.key").
>
> This works very well.
> --
> dIon Gillard, Multitask Consulting
> Work:  http://www.multitask.com.au
> NetRexx: http://www.multitask.com.au/NetRexx.nsf
> - Forwarded by dIon Gillard/Multitask Consulting/AU on 02/03/2001
03:39
> PM -
> JUNIT and Struts
>
>
> Hello,
>
> We are using the XP development
process(http://www.extremeprogramming.org/)
> as
> we develop our Struts web application.  We need to write some tests in
> JUnit(http://www.junit.org) to incrementally test as we write code.  Has
> anyone
> ever used JUnit with Struts?  Does anyone have any advice about how to
> proceed
> in coding these tests?
>
> TIA,
>
> Julia
>
>
>
>
>
>
>   Previous Document (Embe (Embe Next Document
> dded   dded
> image image
> moved moved
> to   to
> file: file:
> pic26 pic19
> 500.p 169.p
> cx) cx)
>
> Return to View
>
> (Embedded image moved to
>   file: pic15724.pcx)
>
>
>
>





RE: JUNIT and Struts

2001-03-29 Thread Padma Ginnaram
Title: RE: JUNIT and Struts





Is there a sample available for testing struts with j2eeunit


Thanks,
Padma
-Original Message-
From: Vincent Massol [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 5:27 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: JUNIT and Struts



Yes, and you can also do unit tests of your server side code if you want,
using J2EEUnit (http://j2eeunit.sourceforge.net). We are in the process of
writing a test suite using J2EEUnit for Struts.
Thanks.
Vincent.


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 5:43 AM
Subject: JUNIT and Struts



> We use a JUnit extension (HttpUnit) to do all of our functional testing.
We
> can effectively 'fake' the user submitting a form, and check for page
> results. We've added some code into a base test class so that we can use
> methods like assertPageText("xyz") or assertPageError
> ("struts.resources.key").
>
> This works very well.
> --
> dIon Gillard, Multitask Consulting
> Work:  http://www.multitask.com.au
> NetRexx: http://www.multitask.com.au/NetRexx.nsf
> - Forwarded by dIon Gillard/Multitask Consulting/AU on 02/03/2001
03:39
> PM -
> JUNIT and Struts
>
>
> Hello,
>
> We are using the XP development
process(http://www.extremeprogramming.org/)
> as
> we develop our Struts web application.  We need to write some tests in
> JUnit(http://www.junit.org) to incrementally test as we write code.  Has
> anyone
> ever used JUnit with Struts?  Does anyone have any advice about how to
> proceed
> in coding these tests?
>
> TIA,
>
> Julia
>
>
>
>
>
>
>   Previous Document (Embe (Embe Next Document
> dded   dded
> image image
> moved moved
> to   to
> file: file:
> pic26 pic19
> 500.p 169.p
> cx) cx)
>
> Return to View
>
> (Embedded image moved to
>   file: pic15724.pcx)
>
>
>
>





RE: Display JSPs based on language/country/variant

2001-09-26 Thread Padma Ginnaram
Title: RE: Display JSPs based on language/country/variant





You can support this by using tiles. This framework supports a concept called definition that can be localized. It also supports forwarding struts actions to these definitions. 

Write an action that forwards the request to a definition corresponding to the requested jsp. If there is no definition just forward to the requested jsp. The limitation is that all your jsps should be accessed through this action. So, instead of using xxx.jsp, you would use /jspForward.do?jsp=type.jsp.

You need to provide definitions for each jsp in the jspForward action as 


    
    type="ForwardJspAction">
  
  


This is just my understanding and not sure if this is the intended usage, you will get more information at http://www.geocities.com/cedricdumoulin/tiles/.

-Padma



-Original Message-
From: Jolly, Gautam [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 25, 2001 5:03 PM
To: '[EMAIL PROTECTED] '
Subject: Display JSPs based on language/country/variant



Requirement - suppose the servlet-container is asked to present 'abc.jsp',
it should serve the very first jsp that meets the following lookup sequence:
abc___.jsp
abc__.jsp
abc_.jsp
abc___.jsp
abc__.jsp
abc_.jsp
abc.jsp
 
Is it possible to do it declaratively in tomcat (or any other container), or
is this something that needs to be coded ??
Any help is appreciated.
 
Gautam
 
 





RE: Problem integrating STRUTS and WEBLOGIC 6.0

2001-10-04 Thread Padma Ginnaram
Title: RE: Problem integrating STRUTS and WEBLOGIC 6.0





The problem is in weblogic6.0. Read these messages for details.


http://www.mail-archive.com/jakarta-commons@jakarta.apache.org/msg02086.
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02611.html


-Padma


-Original Message-
From: BinhMinh Nguyen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 04, 2001 2:29 PM
To: [EMAIL PROTECTED]
Subject: Problem integrating STRUTS and WEBLOGIC 6.0



Hi, 
I posted this one once, but I have response, please
help me.



I download the Struts overnight release version, I
then copy the struts-upload.war into the app directory
of weblogic. I then got the below error message.
Please help me spot out my problem, it took my hours
and I still could not fix it. It also happened when I
copy this same struts-upload.war into Tomcat 3.2.3
I really need this to be fix, help me please.
Thank you very much
BHN


Error Message:


  
<[WebAppServletContext(3162544,struts-upload)] Error
loading
et: 'action'
java.lang.NoSuchMethodError
    at
org.apache.commons.digester.Digester.parse(Digester.java:859)
    at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1273)
    at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:460)
    at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:638)
    at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:581)
    at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:526)
    at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1078)
    at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:1022)
    at
weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:499)
    at
weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:421)



__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1