RE: Resend : Multiple Struts-config files, multiple properties and validator

2005-07-07 Thread Venkat Reddy Valluri
Use latest validator-rules.xml and use latest  tld's 

use bundle this way 

   field property=user_name
depends=required
arg  key=userEdit.user_name.displayname bundle=user/
/field


-Original Message-
From:   Sagar Naik [mailto:[EMAIL PROTECTED]
Sent:   Thu 7/7/2005 1:58 PM
To: user@struts.apache.org
Cc: 
Subject:Resend : Multiple Struts-config files, multiple properties and 
validator
Hi
I m using struts 1.2

mulitple struts-config files
multiple properties files
and now I have a validation.xml file for input
validation of the form
Ques 1. How do I get the keys defined in properties
files in validation.xml 's field's arg0's key
attribute

Ques 2. Even if I get all the error messages in 1
files , I still get NoSuchMethod Exception
( I using the latest struts files)

Thanks




___
Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for 
FREE! http://in.mail.yahoo.com

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





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

[ERROR] ValidatorForm - -No such validation methodcté

2005-06-15 Thread Venkat Reddy Valluri
Hi
   I am using struts-1.2.4 and latest commons-validator to make use of the 
feature of multiple valiadtions files support

   Here I am getting the error like below.Can some one plEase help me solve 
this 

[ERROR] ValidatorForm - -No such validation method: null 
org.apache.commons.validator.ValidatorException: No such validation method: 
nullorg.apache.commons.validator.ValidatorException: No such validation 
method: null

Thanks in advance
--Venkat



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

RE: Can struts-1.1 support multiple configurations and multiple resources

2005-06-14 Thread Venkat Reddy Valluri
Manfred,
   THanks again for giving clarification. Here I got some solution. I used 
bundle parametre in html:erros bundle=sub/  so that I can find the 
Resources where It was tied to the key sub which is as I already mentioned 
given in struts-sub.xml like below
   
message-resources
  parameter=com.sub.examp.SubResources key=sub
/message-resources
   But again I got some problem with validation files.  Can struts-1.1 support 
multiple validation files? 

Thank you Manfred 
  

--Venkat



-Original Message-
From:   Manfred Wolff [mailto:[EMAIL PROTECTED]
Sent:   Tue 6/14/2005 1:12 AM
To: Struts Users Mailing List
Cc: 
Subject:Re: Can struts-1.1 support multiple configurations and multiple 
resources

--Venkat

Thats the trick. If you set null to false, than *if* a error message is not 
found, the struts framework prints the language and the key, that is not found. 
So it says: You have an error here. So you have an other mistake. It is good 
practice to set null to false in all ressurce bundles, so you can see if 
anything is wrong.


-Manfred

Venkat Reddy Valluri wrote:

Hi Manfred,
   I have given null=false  for my main module struts config file and still 
 the error message is not displayed

 instead it is just dipaying like below
   en.us.error.user.user_name.required. (It is just displaying 
 property but not value)

Thank you very much

--Venkat

  



-Original Message-
From:  Manfred Wolff [mailto:[EMAIL PROTECTED]
Sent:  Mon 6/13/2005 1:47 PM
To:Struts Users Mailing List
Cc:
Subject:   Re: Can struts-1.1 support multiple configurations and multiple 
resources
Venkat

I think you don't have to deal with suffixes (like sub) because struts 
itsselfs concatinate the module in the key, stored into the session. I 
have a little example written for my struts book (only in german) that 
deals with multiple struts config files. You may download it under

http://struts-ge-packt.de/download/code.zip

Because it is no maven project it comes with a lot of libraries.

1st Struts config: (struts-config.xml)
message-resources parameter=MessageResources null=false /

2nd Struts config with Module (struts-modul-confix.xml)
message-resources parameter=MessageModulResources /

It is a struts 1.2 application but the module support is fine in 1.1

-Manfred

Venkat Reddy Valluri wrote:

  

Hi  Manfred,
Thank you very much for responding immediately. I ended up multiple  
 struts config files successfully. But the thing is when I tried to use 
 separate resources for each struts config file using bundle parametre,  It 
 seems not to be working.  

Here is my struts configurations

 In my main module struts config file
I included below one
struts-main.xml---
message-resources
   parameter=com.main.examp.ApplicationResources/


In my sub module struts config file

I included below one
struts-sub.xml---
  message-resources
   parameter=com.sub.examp.SubResources key=sub
/message-resources

SubResources.properties
error.user.user_name.required=UserName is required

Here in my sub module
  
SubEditActionForm.java---

In validate method I have given like this

public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
  ActionErrors errors = new ActionErrors();

   if (user_name == null || user_name.length() == 0) {
   errors.add(user_name, new  
 ActionError(error.user.user_name.required));
   }
  return errors;
}

But here the error messgae UserName is required  is not able to be displyed 
on screen  when I submit the page with out entering user_name

   So I thought of passing buddle  attribute sub  which is used 
 struts-sub.xml  to ActionError class
(
message-resources
   parameter=com.sub.examp.SubResources key=sub
/message-resources)

  But there is no option to pass that attribute in ActionError or 
 ActionMessage class
 
   SO here where I struck 

Can you please  throw some light on this

Thanks in advace

--Venkat



  





  
-Original Message-
From: Manfred Wolff [mailto:[EMAIL PROTECTED]
Sent: Mon 6/13/2005 10:00 AM
To:   Struts Users Mailing List
Cc:   
Subject:  Re: Can struts-1.1 support multiple configurations and multiple 
resources

Yes it can with multiple module support.

http://struts.apache.org/userGuide/configuration.html#dd_config_modules

Manfred

Venkat Reddy Valluri wrote:

 



Hi

 Can struts-1.1 support multiple configurations and multiple resources. Can 
 some body please throw some light on this. I need it very urgent

Thanks in advance

--Venkat





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

Can struts-1.1 support multiple configurations and multiple resources

2005-06-13 Thread Venkat Reddy Valluri
Hi

   Can struts-1.1 support multiple configurations and multiple resources. Can 
some body please throw some light on this. I need it very urgent

Thanks in advance

--Venkat

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

RE: Can struts-1.1 support multiple configurations and multiple resources

2005-06-13 Thread Venkat Reddy Valluri
Hi Manfred,
   I have given null=false  for my main module struts config file and still 
the error message is not displayed

 instead it is just dipaying like below
   en.us.error.user.user_name.required. (It is just displaying property 
but not value)

Thank you very much

--Venkat

  



-Original Message-
From:   Manfred Wolff [mailto:[EMAIL PROTECTED]
Sent:   Mon 6/13/2005 1:47 PM
To: Struts Users Mailing List
Cc: 
Subject:Re: Can struts-1.1 support multiple configurations and multiple 
resources
Venkat

I think you don't have to deal with suffixes (like sub) because struts 
itsselfs concatinate the module in the key, stored into the session. I 
have a little example written for my struts book (only in german) that 
deals with multiple struts config files. You may download it under

http://struts-ge-packt.de/download/code.zip

Because it is no maven project it comes with a lot of libraries.

1st Struts config: (struts-config.xml)
message-resources parameter=MessageResources null=false /

2nd Struts config with Module (struts-modul-confix.xml)
message-resources parameter=MessageModulResources /

It is a struts 1.2 application but the module support is fine in 1.1

-Manfred

Venkat Reddy Valluri wrote:

Hi  Manfred,
 Thank you very much for responding immediately. I ended up multiple  
 struts config files successfully. But the thing is when I tried to use 
 separate resources for each struts config file using bundle parametre,  It 
 seems not to be working.  

Here is my struts configurations

  In my main module struts config file
I included below one
struts-main.xml---
 message-resources
parameter=com.main.examp.ApplicationResources/


In my sub module struts config file

I included below one
struts-sub.xml---
   message-resources
parameter=com.sub.examp.SubResources key=sub
/message-resources

SubResources.properties
error.user.user_name.required=UserName is required

Here in my sub module
   
SubEditActionForm.java---

In validate method I have given like this

public ActionErrors validate(ActionMapping mapping,
 HttpServletRequest request) {
   ActionErrors errors = new ActionErrors();

if (user_name == null || user_name.length() == 0) {
errors.add(user_name, new  
 ActionError(error.user.user_name.required));
}
   return errors;
 }
 
But here the error messgae UserName is required  is not able to be displyed 
on screen  when I submit the page with out entering user_name

So I thought of passing buddle  attribute sub  which is used 
 struts-sub.xml  to ActionError class
(
message-resources
parameter=com.sub.examp.SubResources key=sub
/message-resources)

   But there is no option to pass that attribute in ActionError or 
 ActionMessage class
  
SO here where I struck 

Can you please  throw some light on this

Thanks in advace

--Venkat



   





   
-Original Message-
From:  Manfred Wolff [mailto:[EMAIL PROTECTED]
Sent:  Mon 6/13/2005 10:00 AM
To:Struts Users Mailing List
Cc:
Subject:   Re: Can struts-1.1 support multiple configurations and multiple 
resources

Yes it can with multiple module support.

http://struts.apache.org/userGuide/configuration.html#dd_config_modules

Manfred

Venkat Reddy Valluri wrote:

  

Hi

  Can struts-1.1 support multiple configurations and multiple resources. Can 
 some body please throw some light on this. I need it very urgent

Thanks in advance

--Venkat

 



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





  



-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
---
http://www.manfred-wolff.de
http://www.struts-it.org
---

Die fatale Neigung der Menschen,
vom Nachdenken ber eine Sache nachzulassen,
wenn sie nicht lnger zweifelhaft ist,
ist die Ursache der Hlfte ihrer Irrtmer.
- John Stuart Mil -
___


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





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

Does struts1.1 support multiple validation files and multiple resources

2005-06-10 Thread Venkat Reddy Valluri
Hi,
  Does struts1.1 support multiple validation files and multiple resources
ThksRgds
--Venkat

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

Any option to pass bundle attribute to ActionError class

2005-06-10 Thread Venkat Reddy Valluri
Hi,
   I would like to use alternate resources file for errors
Any option available to pass bundle attribute to ActionError class or 
ActionMessage object

ThksRgds
--Venkat

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

How to validate html:select

2005-06-01 Thread Venkat Reddy Valluri
Hi 
  I would like to validate  roles   in   html:select property=roles 
multiple=truehtml:options collection=roleDomain property=value 
labelProperty=label//html:select


in validation.xml i have given like this

   field property=roles
depends=required
arg0   key=userEdit.role.displayname/
/field


But I am not getting any error message when I submitted the page without 
selecting any role from list box

PS: I am using struts1.1

Can some body throw some light on this

Thanks in advance
--Venkat






 

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



multiple struts configuration files and application resources

2005-05-27 Thread Venkat Reddy Valluri
Hi 
I created  main module and user module separately and used separate strus 
configurations for main module and user module
 Here I have included main module application resources in main 
struts-confiration file and user module appliaction resources in user struts 
configuration file
 Using ant I managed to move user stuts configuration, and user validation 
files to WEB-INF directory of main module  and user apllication resourcesto 
appropriate directory of main module and  try to run the main module on tomcat

   Here every thing worked fine and was able to access user functionality 

   but only thing is I am not able to get UserApllicationResources for message 
displays and error displays on user jsp pages   

   Can some body please throw light on this

Thanks in advance

--Venkat

   

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