RE: Using a key as var-value in validator

2004-12-03 Thread Ram Venkataswamy
Well, I think for now using Global Constant is the only option. Unless
somebody else have a answer for this. 


 
-Original Message-
From: Kinjal Sonpal [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 01, 2004 10:20 PM
To: Struts Users Mailing List
Subject: RE: Using a key as var-value in validator

Ram,

Thanks for replying back.

> If you have defined resource bundle in struts config & are able to
> access key from jsp then no additional step/configuration
> is required to
> access them in validation file. The arg/msg lookup resource bundle
> defined for the application and then pick up value

Yeah, this is fine. But I also need to access the key in defining
 tag of the  tag. Right now I have to do a
workaround by using a global constant. I want to avoid multiple points
of updation.

Thanks and regards,
Kinjal Sonpal

"In the real world, the right thing never happens in the right place
at the right time. It is the task of journalists and historians to
rectify this error."
Mark Twain




-
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]



RE: Problem with validation using both minlength and maxlength on the same field

2004-12-01 Thread Ram Venkataswamy
This is do with argument number - change errors.maxlength={0} can not be
greater than {1} characters. 

To 

errors.maxlength={0} can not be greater than {2} characters.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 01, 2004 9:49 AM
To: [EMAIL PROTECTED]
Subject: Problem with validation using both minlength and maxlength on
the same field

I'm trying to validate a simple field.  I want to validate that the
field 
is an integer, and meets the min and max length requirements.  In the
same 
application I am able to correctly validate a date field so I'm
confident 
my overall struts setup is correct.  However when I try to do both a min

and max length check on the same field, the max length check doesn't
work. 
 If I exceed the max length I get the min length message.  Below is a 
snippet from my validation.xml file.  I've setup my properties file to 
include the min and max length constants.

validation.xml
...
...
 
   
   
   
 
...
...

SampleApp.properties
...
...
   errors.required={0} is required.
   errors.minlength={0} can not be less than {1} characters.
   errors.maxlength={0} can not be greater than {1} characters.
   errors.invalid={0} is invalid.

   errors.byte={0} must be a byte.
   errors.short={0} must be a short.
   errors.integer={0} must be an integer.
   errors.long={0} must be a long.
   errors.float={0} must be a float.
   errors.double={0} must be a double.

   errors.date={0} is not a date.
   errors.range={0} is not in the range {1} through {2}.
   errors.creditcard={0} is an invalid credit card number.
   errors.email={0} is an invalid e-mail address.
...
...
   sampleApp.myField.label=My field:
   sampleApp.myField.minLen=5
   sampleApp.myField.maxLen=5



If I enter 8 charcters in myField and submit I get "My field: can not be

less than 5 characters."

Any ideas what's wrong?

Thanks,

James

-
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]



RE: Using a key as var-value in validator

2004-12-01 Thread Ram Venkataswamy
Hi,

If you have defined resource bundle in struts config & are able to
access key from jsp then no additional step/configuration is required to
access them in validation file. The arg/msg lookup resource bundle
defined for the application and then pick up value

FYI: 
 There is glitch though the resource key's specified in the "msg" tag as
well as the validator's "msg" attribute are found regardless of their
bundle. The field arg tag however does not behave the same way, even
when the bundle attribute is specified (it seems that the bundle
attribute is ignored).
 

-Original Message-
From: Kinjal Sonpal [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 01, 2004 3:07 AM
To: Struts User List
Subject: Using a key as var-value in validator

Dear all,

I'm using Struts 1.2.4 with Validator 1.1.3 for my application. I need
to access the Date Format stirng across the application at many
places.

Instead of hard-coding format string everywhere I would like to use a
key from the Resource Bundle for the purpose. I can access the key
from all of my Java, Jsp code, but how do I access it the
validation.xml file?

Please share your views on this.

Thanks and regards,
Kinjal Sonpal

"In the real world, the right thing never happens in the right place
at the right time. It is the task of journalists and historians to
rectify this error."
Mark Twain





-
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]



RE: request between actions

2004-11-30 Thread Ram Venkataswamy
Set to "true" if a redirect instruction should be issued to the user-agent so 
that a new request is issued for this forward's resource. If true, 
RequestDispatcher.Redirect is called. If "false", RequestDispatcher.forward is 
called instead. [false]. 

 

The culprit is redirect=true - check the definition above 

 

 

-Original Message-
From: Morales de Frías, David [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 30, 2004 12:17 PM
To: [EMAIL PROTECTED]
Subject: request between actions

 

Hi all¡¡

 

I need your help, please.

 

I have an action that forwards to another action, and i'm loosing request 
parameters.

 

I have in struts-config this lines:

 



 

but it doesn't work.

 

Can you help me?



RE: Validator question

2004-11-30 Thread Ram Venkataswamy
Or if you want custom msg for required validator then name attribute of
msg element should match that specified for depends attribute
 
 
-Original Message-
From: Ram Venkataswamy 
Sent: Tuesday, November 30, 2004 9:57 AM
To: Struts Users Mailing List
Subject: RE: Validator question

Check "required" validator in your validator-rules file - the message
takes one argument {0} is required - whereas in validation file you are
passing two values for 1 argument





try removing  - it should work 


 
-Original Message-
From: Vinicius Caldeira Carvalho
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 30, 2004 5:44 AM
To: Struts Users Mailing List
Subject: Validator question

Hi there! I'm trying to make my validator projetct work on oc4j (oracle 
10g) and so far I got no success at all.
First thing that is really strange is that at deploy time the 
application runs it complains about some attributes being used but not 
declared: " XML-0149: (Error) Element 'arg0' used but not declared."
well this doesn't seem to be affecting the application though.

But when I submit a form that uses validation nothin happens, I'm 
submitted to a null page with this error on the stack:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Objec
t, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException: 
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Objec
t, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
at 
org.apache.commons.validator.ValidatorAction.loadValidationMethod(Valida
torAction.java:627)
at 
org.apache.commons.validator.ValidatorAction.executeValidationMethod(Val
idatorAction.java:557)
at
org.apache.commons.validator.Field.validateForRule(Field.java:811)
at org.apache.commons.validator.Field.validate(Field.java:890)
at org.apache.commons.validator.Form.validate(Form.java:174)
at
org.apache.commons.validator.Validator.validate(Validator.java:367)
at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:11
2)
at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcess
or.java:921)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
206)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestD
ispatcher.java:765)
at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Servle
tRequestDispatcher.java:317)
at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHa
ndler.java:790)
at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
270)
at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
112)
at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Releasab
leResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)

No matter if I entered a value or not on the field:

here's my validation.xml













Any ideas?

-
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]


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



RE: Validator question

2004-11-30 Thread Ram Venkataswamy
Check "required" validator in your validator-rules file - the message
takes one argument {0} is required - whereas in validation file you are
passing two values for 1 argument





try removing  - it should work 


 
-Original Message-
From: Vinicius Caldeira Carvalho
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 30, 2004 5:44 AM
To: Struts Users Mailing List
Subject: Validator question

Hi there! I'm trying to make my validator projetct work on oc4j (oracle 
10g) and so far I got no success at all.
First thing that is really strange is that at deploy time the 
application runs it complains about some attributes being used but not 
declared: " XML-0149: (Error) Element 'arg0' used but not declared."
well this doesn't seem to be affecting the application though.

But when I submit a form that uses validation nothin happens, I'm 
submitted to a null page with this error on the stack:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Objec
t, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException: 
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Objec
t, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
at 
org.apache.commons.validator.ValidatorAction.loadValidationMethod(Valida
torAction.java:627)
at 
org.apache.commons.validator.ValidatorAction.executeValidationMethod(Val
idatorAction.java:557)
at
org.apache.commons.validator.Field.validateForRule(Field.java:811)
at org.apache.commons.validator.Field.validate(Field.java:890)
at org.apache.commons.validator.Form.validate(Form.java:174)
at
org.apache.commons.validator.Validator.validate(Validator.java:367)
at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:11
2)
at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcess
or.java:921)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
206)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestD
ispatcher.java:765)
at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Servle
tRequestDispatcher.java:317)
at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHa
ndler.java:790)
at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
270)
at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
112)
at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Releasab
leResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)

No matter if I entered a value or not on the field:

here's my validation.xml













Any ideas?

-
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]



RE: a fine example of an example

2004-06-21 Thread Ram Venkataswamy
There are few good examples at this site
http://sourceforge.net/project/showfiles.php?group_id=49385 

V.K.Ram
NitroX Struts Team
 
 
-Original Message-
From: josh [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 21, 2004 10:01 AM
To: [EMAIL PROTECTED]
Subject: a fine example of an example

Hi,

I have recently completed my first struts application and I am beginning
to feel comfortable with the framework.  What I would like now is to
look at someone else's code for a really good example of how things
should be done.  Does anyone know where I can download a shining example
of coding in struts?  I would like to get some ideas on how to make my
code better.

Thanks in advance

josh


-
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]



RE: getInputForward() question

2004-06-16 Thread Ram Venkataswamy
Yep, your colleague is right - input attribute is used to re-direct the
control if validation fails - not for Success / user defined forwards

V.K.Ram
NitroX Struts Team
 
 

-Original Message-
From: Carl Fyffe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 16, 2004 4:36 PM
To: [EMAIL PROTECTED]
Subject: getInputForward() question

For the past year or so, I have been using getInputForward() and the
input attribute in the  to define the "default" end point for
that action.  I did that because normally there is only one tile for
the action to go to, so being lazy I wouldn't create a forward I would
just use the input to act as the default forward.

Today a colleague informed me that was a poor strategy because the
input is only for when validation fails.  Am I missusing the input
attribute?

Carl

-
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]



RE: help plz

2004-06-16 Thread Ram Venkataswamy
FYI: setting contextRelative=true is required only for switching modules
(that is call to action defined in other module)

V.K.Ram
NitroX Struts Team
 
 

-Original Message-
From: Arif ERSIN [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 16, 2004 10:53 AM
To: [EMAIL PROTECTED]
Subject: help plz

Hi all,
I have a problem,

I was split my application to 3 modules. They have a configuration file,

struts-m1.xml
struts-m2.xml
struts-m3.xml

and  one global conf. file

struts-congig.xml.

I am define action in struts-m1.xml, like this,


   
   
in web.xml,

action
*.do


and in jsp,


it doesnt work. I've got a
javax.servlet.ServletException: Cannot retrieve mapping for
action
/bizmap error


It was working before i splitted app.(When i had a 1 config file.)

Thanks and sorry my english



-
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]



RE: help plz

2004-06-16 Thread Ram Venkataswamy
Hi,

Web.xml of Struts module need little extra configuration, basically the
default struts-config.xml is defined as config parameter and then all
the module struts config as config/moduleName. 

In your case you have to define struts-m1.xml in web.xml as below

  config/mod1
  /WEB-INF/struts-m1.xml 


you can find more info @
http://jakarta.apache.org/struts/userGuide/configuration.html


V.K.Ram
NitroX Struts Team
 
 
-Original Message-
From: Arif ERSIN [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 16, 2004 10:53 AM
To: [EMAIL PROTECTED]
Subject: help plz

Hi all,
I have a problem,

I was split my application to 3 modules. They have a configuration file,

struts-m1.xml
struts-m2.xml
struts-m3.xml

and  one global conf. file

struts-congig.xml.

I am define action in struts-m1.xml, like this,


   
   
in web.xml,

action
*.do


and in jsp,


it doesnt work. I've got a
javax.servlet.ServletException: Cannot retrieve mapping for
action
/bizmap error


It was working before i splitted app.(When i had a 1 config file.)

Thanks and sorry my english



-
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]



RE: session time out

2004-06-15 Thread Ram Venkataswamy
Hi,

Alternatively the more standard way is to have a custom tag that you can
include in page within  tag or before any other tag of the page is
executed. And check for the session validity in the tag handler class
you can find this implementation in struts-example application.

V.K.Ram
www.m7.com
NitroX for Struts
 
 

-Original Message-
From: Rajat Pandit, Gurgaon [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 9:56 PM
To: 'Struts Users Mailing List'
Subject: RE: session time out

Hello Lokanath,
I am not sure if this is the best way to go about it, but yes maybe you
could give it a shot, in the action where you are checking for the
session
object (could be a login bean or something) make sure that you throw a
custom exception and using the global exception handler in the
struts-config.xml you can use GlobalForward to forward it to a
particular
page, say a login page or something.
Do tell me if this worked out for you, because I might have to implement
it
at a later stage, I am currently documenting the specs for my project.
Regards
rajat


-Original Message-
From: Lokanath [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 9:56 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: session time out

hi all ,

can anyone tell me how to reach a page automatically when session
expires in
a stusts application

  lokanath

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 3:04 PM
To: Struts Users Mailing List
Subject: RE: session problem


The servlet container will try to encode this sessionId in a cookie if
it
can (saving the need to rewrite links) so you may wish to check the
browser
settings to see if cookies are enabled. (Its best to make sure you use
the
html:rewrite tag (or equivelent) for your links though so that your app
will
support users when they have cookies disabled).

-Original Message-
>From: nikhil walvekar [mailto:[EMAIL PROTECTED]
Sent: Friday, 11 June 2004 17:34
To: Struts Users Mailing List
Subject: Re: session problem


Hi,
same thing i have experienced with IE 6.0, it will work with mozilla
Problem is that with each request session id is not passed.
You need to explicitly pass it as url parameter.
http://dbomis.com/anyLink;jsessionid=A0698B81A1F1AA2B1ECDA19B0ACFD6E2


Nikhil

Shailender Jain <[EMAIL PROTECTED]> wrote:
I am using session object in my application to validate whether the user
is valid or not.

I am doing this in the processPreprocess() method of RequestProcessor.
But in I.E. 6.0 update version: SP1, the session object becomes null.
So once user click at any link in the application he gets logged out.

The system admin has also done the following configuration


1. I installed the application on a machine having the IP
(10.1.252.41). The system admin made a virtual IP (10.1.252.42) and
gave me a DSN "dbomis.com" which can be used to access the
application. This DSN points to virtual IP.
2. Now when i access the application using http://10.1.252.41/ or
"http://10.1.252.42/"; in IE 6.0 SP1 then it works ok.
3. When i use the "http://dbomis.com/"; then the login page come. User
is able to login (processPreprocess() method does not check for
session while user is logging in). But when the user clicks on any
link the session becomes null so the user is logged out of the
application. This problem happens only on I.E. update version SP1.
On I.E 5.5 this url works ok.

Anyone has got any idea why this must be happening






Yahoo! India Matrimony: Find your partner online.


-
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]

-
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]



RE: How to convert tag to a submit button

2004-06-11 Thread Ram Venkataswamy
In addition you can check whether you are receiving the form element
values using alert() - or even check whether method is getting called 


V.K.Ram
www.m7.com
NitroX for Struts
 
 
-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 11, 2004 9:38 AM
To: Struts Users Mailing List
Subject: RE: How to convert  tag to a submit button

I think your problem is that the link itself goes somewhere instead of
just
calling the JS function.  Why don't you try something like

attName

or even just a regular, non-struts tag, link?

--- "PADALA, SANDHYA (SBCSI)" <[EMAIL PROTECTED]> wrote:
> 
> 
> Hello Wendy,
> 
> Thank you for replying to my mail. 
> What I have tried is something like this
> 
>
> attName
> 
> 
> 
> function attSubmit(ID)
> {
>   document.forms[0].action="/attachment.do";
>   document.forms[0].submit();
> }
> 
> 
> Can you please tell me what I am doing wrong.
> 
> Thank you,
> Sandhya
> 
> -Original Message-
> From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 11, 2004 9:37 AM
> To: Struts Users Mailing List
> Subject: RE: How to convert  tag to a submit button
> 
> 
> > From: PADALA, SANDHYA (SBCSI) [mailto:[EMAIL PROTECTED] 
> > I tried using onClick java script method in the  tag and
in
> > the method  implementation I have done document.forms[0].submit().NO
> > luck. I was not successful.
> 
> Why don't you post what you tried that didn't work?  That's the
solution
> I use, and I have lots of links that set hidden form fields and then
> submit the form.  They work fine.
> 
> -- 
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management 
> 
> 
> 
> -
> 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]
> 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.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]



RE: Passing parameter : include

2004-06-10 Thread Ram Venkataswamy
You can check this
http://jakarta.apache.org/struts/userGuide/struts-bean.html  but could
not figure out solution for your problem :-(

 

 

V.K.Ram

www.m7.com

NitroX for Struts

 

 

-Original Message-
From: Naresh Sharma [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 10, 2004 10:13 AM
To: Struts Users Mailing List
Subject: Passing parameter : include

 

HI,

 

 

Please let me know equivalent struts tag,... I guess its bean:include
but I am not sure how to pass parameters(struts equivalent of jsp:param)
to this.

 

Can you please suggest good online resource on struts tags.

 







 

 

 

Regards

naresh



RE: html:img Tag Problem

2004-06-10 Thread Ram Venkataswamy
Hi 

You are missing to close the html:img tag (The tag "html:img" should end
with "/>".)

Empty tags: tags do not have Body - like  or 

Non empty tags : tags with body tag Untitled Document

V.K.Ram
www.m7.com
NitroX for Struts
 
 
-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 09, 2004 10:09 PM
To: [EMAIL PROTECTED]
Subject: html:img Tag Problem

In my JSP, I have a html:img tag:


and the above statement gives me the error message:

'According to TLD, tag html:img must be empty, but is
not' 

I am very confused by the error message.  I should
have an empty html:img tag?  Please advise.  Thank you.




__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.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]



RE:

2004-06-09 Thread Ram Venkataswamy
Include value="Search String" inside html:select tag - the option value
matching this will be marked as selected


V.K.Ram
www.m7.com
NitroX for Struts
 
 

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 09, 2004 5:29 PM
To: Struts Users Mailing List
Subject: RE: 

Huh?  Sorry, I do not understand.
--- Ram Venkataswamy <[EMAIL PROTECTED]> wrote:
> You can specify value=" Last Post Date"  in
> html:select - The value to
> compare with for marking an option selected.
> 
> 
> 
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 09, 2004 3:52 PM
> To: Struts Users Mailing List
> Subject: RE: 
> 
> It is not exactly what I am looking for.
> 
> The drop down list I have now is:
> 
>  onchange="document.forms[4].elements[2].focus()">
>  labelProperty="label"/>
> 
> 
> The collection "SORT" has the following options:
> 
> Last Post Date
> First Post Date
> Sender Name
> Replies
> Views
> 
> I want the "Last Post Date" to be the default
> selection.  If we use HTML, we do the following:
> 
> Last Post
> Date
> 
> How do I do the same thing when LabelValueBean is
> used
> in Struts?
> 
> 
> --- Satish Kataria <[EMAIL PROTECTED]> wrote:
> > Here is the code for defalt value
> > 
> >  > onchange="document.forms[4].elements[2].focus()">
> > SELECTED
> >  > labelProperty="label"/>
> > 
> > 
> > Thanks,
> > Satish
> > -Original Message-
> > From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, June 09, 2004 8:00 AM
> > To: [EMAIL PROTECTED]
> > Subject: 
> > 
> > 
> > I try to create a drop down menu as follow:
> > 
> >  > onchange="document.forms[4].elements[2].focus()">
> >  > labelProperty="label"/>
> > 
> > 
> > I am able to disply the menu.  
> > 
> > I want one of the options to be selected by
> default.
> > 
> > Therefore, I want to type SELECTED somewhere.  How
> > do
> > I do it?
> > 
> > 
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> > protection around 
> > http://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]
> > 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://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]
> 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.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]



RE:

2004-06-09 Thread Ram Venkataswamy
You can specify value=" Last Post Date"  in html:select - The value to
compare with for marking an option selected.



-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 09, 2004 3:52 PM
To: Struts Users Mailing List
Subject: RE: 

It is not exactly what I am looking for.

The drop down list I have now is:





The collection "SORT" has the following options:

Last Post Date
First Post Date
Sender Name
Replies
Views

I want the "Last Post Date" to be the default
selection.  If we use HTML, we do the following:

Last Post Date

How do I do the same thing when LabelValueBean is used
in Struts?


--- Satish Kataria <[EMAIL PROTECTED]> wrote:
> Here is the code for defalt value
> 
>  onchange="document.forms[4].elements[2].focus()">
> SELECTED
>  labelProperty="label"/>
> 
> 
> Thanks,
> Satish
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 09, 2004 8:00 AM
> To: [EMAIL PROTECTED]
> Subject: 
> 
> 
> I try to create a drop down menu as follow:
> 
>  onchange="document.forms[4].elements[2].focus()">
>  labelProperty="label"/>
> 
> 
> I am able to disply the menu.  
> 
> I want one of the options to be selected by default.
> 
> Therefore, I want to type SELECTED somewhere.  How
> do
> I do it?
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://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]
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://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]



RE: html:link with multiple parameters

2004-06-09 Thread Ram Venkataswamy


However, there are two ways you can append one or more dynamically
defined query parameters to the hyperlink -- specify a single parameter
with the paramId attribute (and its associated attributes to select the
value), or specify the name (and optional property) attributes to select
a java.util.Map bean that contains one or more parameter ids and
corresponding values. 

To specify a single parameter, use the paramId attribute to define the
name of the request parameter to be submitted. To specify the
corresponding value, use one of the following approaches:

Specify only the paramName attribute - The named JSP bean (optionally
scoped by the value of the paramScope attribute) must identify a value
that can be converted to a String. 
Specify both the paramName and paramProperty attributes - The specified
property getter method will be called on the JSP bean identified by the
paramName (and optional paramScope) attributes, in order to select a
value that can be converted to a String. 
If you prefer to specify a java.util.Map that contains all of the
request parameters to be added to the hyperlink, use one of the
following techniques:

Specify only the name attribute - The named JSP bean (optionally scoped
by the value of the scope attribute) must identify a java.util.Map
containing the parameters. 
Specify both name and property attributes - The specified property
getter method will be called on the bean identified by the name (and
optional scope) attributes, in order to return the java.util.Map
containing the parameters.

More http://jakarta.apache.org/struts/userGuide/struts-html.html#link 

Hope this should help 

-Original Message-
From: tomansley [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 09, 2004 3:13 PM
To: [EMAIL PROTECTED]
Subject: html:link with multiple parameters

Hi all,

I have a question regarding using the html:link tag where I want to have

multiple parameters added to the link url dynamically.  What I have 
tried to do is have a bean that I am using on the page context have a 
method that returns a Map object that contains all the keys and values 
for the parameters.  Each parameter can be accessed through the 
toString() method as required.

So, for example this is the class with the necessary code:

public class MenuItem {

/**
 * Empty constructor to conform to JavaBeans convention.
 *
 */
public MenuItem() {
// empty default constructor
}

private Map params = new HashMap();

public Map getMenuParams() {
return params;
}


..

Then, I try to get the html:link tag to call this bean with the 
paramProperty field being "menuParams".  The logic:iterate tag 
enumerates through a set of menuItems which may well be causing
problems.










Nothing gets inserted as expected.  I do not really want to be creating 
a Map and adding parameters using a scriptlet but would rather have it 
call a Map object from the bean I have created.  Does anybody have any 
better way of doing this or could somebody tell me where I am going
wrong.

I guess at the end of the day, I have searched on the Internet high and 
low for a way of being able to create dynamic parameterized urls using 
html:link within an iteration.

Help anybody!!

Cheers

Tom

-
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]



RE: Tool(s) to find missing properties

2004-06-09 Thread Ram Venkataswamy
Check out NitroX for Struts www.m7.com - I am sure most of your problem
are addressed


-Original Message-
From: Stunger, Kevin J [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 09, 2004 11:00 AM
To: Struts Users Mailing List (E-mail)
Subject: Tool(s) to find missing properties

Hello!

I'm searching for a tool or tool(s), either command-line or graphical
that can help find missing properties.  I'd like to be able to quickly
track down form properties that are defined in struts-config.xml, but
not defined in validation.xml.  I'd also like to know which jsp contains
the property.  I could probably write a script to do this, but I'm
hoping someone has built something already.

Any pointers?

Thanks!
Kevin



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



RE: Hoe to store objects in request scope

2004-06-09 Thread Ram Venkataswamy
I meant toScope

-Original Message-
From: Ram Venkataswamy 
Sent: Wednesday, June 09, 2004 1:19 PM
To: Struts Users Mailing List
Subject: RE: Hoe to store objects in request scope

Did u try providing scope attribute for bean:define

-Original Message-
From: PADALA, SANDHYA (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 09, 2004 9:05 AM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Hoe to store objects in request scope

Hi All,
  I have a question on how to save the objects into request scope.
In my Form class I have an array of objects of type Product.
My Product class has productId and productName as the variables with
getter setter methods.
On my JSP I use logic-iterate tag to iterate through the array and use
html:link tag to display URL with productname as the display name and
procuct Id as the URL query string to the link.
Now on my JSP , if there is a validation error, This part of code is
throwing error saying could not find the collection list , since these
objects are not stored in the request and not in the Form object.

How do I get around this problem. 
I cannot use hidden fields to store the product objects since they are
not string objects.

On my JSP


<%java.util.HashMap param = new java.util.HashMap();
param.put("productID", productID);
pageContext.setAttribute("parameter", param);
%>  





My Form class
public class TaskForm extends WorkFlowForm {

public Product[] productList;

public Product[] getProductList() {
return productList;
}

public void setProductList(Product product) {
this.productList[index] = product;
}
}

My Product class

public class Product {
/** @modelguid {CB0A7F3C-BEF2-46FB-8217-785C38D51CFD} */
public String productID;

/** @modelguid {B1408FF2-A899-4D46-A785-3B34DDE5D3C9} */
public String productName;

/**
 * Returns the attID.
 * @return String
 */
public String getProductID() {
return productID;
}

/**
 * Returns the attName.
 * @return String
 */
public String getProductName() {
return productName;
}

/**
 * Sets the attID.
 * @param attID The attID to set
 */
public void setProductID(String productID) {
this.productID = productID;
}

/**
 * Sets the attName.
 * @param attName The attName to set
 */
public void setProductName(String productName) {
this.productName = productName;
}

}




Can someone help me with this.
Thanks a lot for your help in advance.
Sandhya

-
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]


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



RE: Hoe to store objects in request scope

2004-06-09 Thread Ram Venkataswamy
Did u try providing scope attribute for bean:define

-Original Message-
From: PADALA, SANDHYA (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 09, 2004 9:05 AM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Hoe to store objects in request scope

Hi All,
  I have a question on how to save the objects into request scope.
In my Form class I have an array of objects of type Product.
My Product class has productId and productName as the variables with
getter setter methods.
On my JSP I use logic-iterate tag to iterate through the array and use
html:link tag to display URL with productname as the display name and
procuct Id as the URL query string to the link.
Now on my JSP , if there is a validation error, This part of code is
throwing error saying could not find the collection list , since these
objects are not stored in the request and not in the Form object.

How do I get around this problem. 
I cannot use hidden fields to store the product objects since they are
not string objects.

On my JSP


<%java.util.HashMap param = new java.util.HashMap();
param.put("productID", productID);
pageContext.setAttribute("parameter", param);
%>  





My Form class
public class TaskForm extends WorkFlowForm {

public Product[] productList;

public Product[] getProductList() {
return productList;
}

public void setProductList(Product product) {
this.productList[index] = product;
}
}

My Product class

public class Product {
/** @modelguid {CB0A7F3C-BEF2-46FB-8217-785C38D51CFD} */
public String productID;

/** @modelguid {B1408FF2-A899-4D46-A785-3B34DDE5D3C9} */
public String productName;

/**
 * Returns the attID.
 * @return String
 */
public String getProductID() {
return productID;
}

/**
 * Returns the attName.
 * @return String
 */
public String getProductName() {
return productName;
}

/**
 * Sets the attID.
 * @param attID The attID to set
 */
public void setProductID(String productID) {
this.productID = productID;
}

/**
 * Sets the attName.
 * @param attName The attName to set
 */
public void setProductName(String productName) {
this.productName = productName;
}

}




Can someone help me with this.
Thanks a lot for your help in advance.
Sandhya

-
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]