Re: how to selectively call struts validation from a form

2006-11-23 Thread Paul Benedict
Robin, I only have one issue with this approach. I dont know how to make use of the built-in validation rules provided in validation-rules.xml in my .java code. You are not trying to replace the validator. You are still going to use it, so code in your normal rules in the XML file. All you'r

Re: how to selectively call struts validation from a form

2006-11-23 Thread robin bajaj
Thanks Paul for your input on this issue and Thanks Wendy for suggesting the following link. > Rick has an article on calling validation manually, here: > http://learntechnology.net/validate-manually.do > I understand this stuff ActionErrors errors = form.validate( mapping, request )

Re: how to selectively call struts validation from a form

2006-11-23 Thread Paul Benedict
WongTseng wrote: You say the validator is based on whatever key I supply.Is that true, as far as I know the validation is linked with the form by the form's name. ValidatorForm and ValidatorActionForm are coded to select the keys for you. The former picks the form name, the second picks the acti

Re: how to selectively call struts validation from a form

2006-11-23 Thread Wendy Smoak
On 11/23/06, robinbajaj <[EMAIL PROTECTED]> wrote: Hi Folks, My previous post's subject was not clear. So here's a re-phrase of the problem. My loyaltyPAge.jsp has two buttons - Exit and continue. I want the validation to occur only when "Continue" is clicked upon. But the Rick has a

Re: how to selectively call struts validation from a form

2006-11-23 Thread WongTseng
hi,Paul: You say the validator is based on whatever key I supply.Is that true, as far as I know the validation is linked with the form by the form's name. 2006/11/24, Paul Benedict <[EMAIL PROTECTED]>: Robin, The validator is based on whatever key you supply. You can choose the key. I like t

Re: why/when to use redirect

2006-11-23 Thread Mississippi John Hurt
How could I forward via redirect option but have struts pass any request attributes or parameters to the new redirect url? I think its only possible to pass the request parameters and not the attributes right? How can I do that? Thanks. On 11/23/06, Adam Hardy <[EMAIL PROTECTED]> wrote: You

Re: how to selectively call struts validation from a form

2006-11-23 Thread Paul Benedict
Robin, Yes, there is a way, but Struts cannot automatically supply the solution for you. The stumbling block is that you have automatic validation turned on. If you only want to validate on a certain button, first turn automatic validation off. This will prevent Struts from running the valida

how to selectively call struts validation from a form

2006-11-23 Thread robinbajaj
Hi Folks, My previous post's subject was not clear. So here's a re-phrase of the problem. My loyaltyPAge.jsp has two buttons - Exit and continue. I want the validation to occur only when "Continue" is clicked upon. But the .xml and validator-rules.xml etc.) in this case, Thank

Re: org.apache.commons.validator.ValidatorException: No such validation method:

2006-11-23 Thread Paul Benedict
When you upgrade Struts, you must also replace your validator.xml file. The signatures have changed between versions. Thomas Thomas wrote: Hi, been one week I have this error When I try to submit a form, I have this error : *

Re: why/when to use redirect

2006-11-23 Thread Adam Hardy
You can also manipulate your forward to put the parameters (preferably just an ID, not a whole set of properties) onto the querystring, so that they reappear in the request parameters and your form bean. It's the Post-Redirect-Get pattern. Nuwan Chandrasoma on 21/11/06 10:15, wrote: if you use

org.apache.commons.validator.ValidatorException: No such validation method:

2006-11-23 Thread Thomas Thomas
Hi, been one week I have this error When I try to submit a form, I have this error : 23-nov.-2006 23:38:32 org.apache.struts.validator.DynaValidatorForm validate GRAVE: No such validation met

how to use validation rules from validatior-rules.xml in Struts Actions

2006-11-23 Thread robin bajaj
Hi Folks, I have an Email text field that I want to validate against Struts validation framework's provided "email" Rule in validator-rules.xml. Can I do this programmatically in Struts Action or ActionForm's java code instead of having to declaratively do it in validation.xml. ?? Any help wo

Parameters not being set on Action in Struts 2

2006-11-23 Thread Tarek Nabil
Hi, I'm experimenting with Struts 2, and I'm facing a problem with request parameters being populated on the Action. I checked out the source to make sure that the behavior I expect is the correct one, and judging by the source, it is, but it's not happening. I have an action that has a method

redirect-action parameters

2006-11-23 Thread Pascal Lalonde
Based on this sample from the web site documentation: generateReport /genReport pie 100 100 How can I add dynamic parameters ? Here, values are fixed but what if I want to set a dynamic value from the action data ? Based

Re: Indexed Properties

2006-11-23 Thread Adam K
Just thought that I would say that the following will be incredibly helpful to anyone working on indexed properties in the future: (It has a complete working example) http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=58&t=009880 thanks to everyone for all of the help. On

[Fwd: Having problems with Struts validation framework]

2006-11-23 Thread robin bajaj
Hello folks, I found a little issue with the action that's being called. Please dis-regard my previous mail reporting this issue. Its resolved now. However, I have another related issue. My loyaltyPAge.jsp has two buttons - Exit and continue. I want the validation to occur only when "Continue" i

Having problems with Struts validation framework

2006-11-23 Thread robin bajaj
Hi Folks, --- problem --- My validation is working but the control doesnt go back to the input page. I want the input page to render again showing the errors. --- Details -- I am using Struts 1.1.x for my webApp. My validation is working fine. (validator-rules.xml and validation-renewal.xml s

Re: Regarding Compatability for Struts-2.0.1

2006-11-23 Thread Wendy Smoak
On 11/23/06, Mitchell James <[EMAIL PROTECTED]> wrote: Struts 2 will not be backward compatible in the sense of allowing you to run things "as is". I would recommend taking a look at the migration guide. I was going to suggest taking a look a the "Struts 1 Plugin" but it is still awaiting doc

enctype="multipart/form-data" gives null values for other ActionForm properties

2006-11-23 Thread Morten Andersen
When I'm uploading a form I set the enctype to multipart/form-data in the jsp file. In the action receiving the form I want to use the other properties from the form, but these are not set. Example: ActionForm has the properties: - name (String) edited in a actionFormImpl.getName(), where ac

Re: enctype="multipart/form-data" gives null values for ActionForm properties

2006-11-23 Thread Morten Andersen
Sorry I rephrase the question and post as new topic. Mitchell James skrev: With most browsers, you cannot autopopulate a file upload field on a form. The reason for this is security. If such a thing was allowed, malicious web sites could have hidden frames that uploaded sensitive files.

Re: Regarding Compatability for Struts-2.0.1

2006-11-23 Thread Mitchell James
Struts 2 will not be backward compatible in the sense of allowing you to run things "as is". I would recommend taking a look at the migration guide. http://struts.apache.org/WW/migration-guide.html -- James Mitchell 678.910.8017 On Nov 23, 2006, at 5:55 AM, Jeevan Kumar Kade wrote:

Re: enctype="multipart/form-data" gives null values for ActionForm properties

2006-11-23 Thread Mitchell James
With most browsers, you cannot autopopulate a file upload field on a form. The reason for this is security. If such a thing was allowed, malicious web sites could have hidden frames that uploaded sensitive files. For the browsers that do allow it, they will prompt and warn the user when

struts2-portlet-2.0.1

2006-11-23 Thread Alex Andrushchak
Hello! I've tried to launch struts2 portlet application under jetspeed2 but unfortunatelly no luck. There are one tutorial on struts2 wiki but it is not fresh enough. I've looked inside war and found some starnges there: 1. there are no struts.xml but xwork.xml instead. 2. in xwork.xml there ar

Regarding Compatability for Struts-2.0.1

2006-11-23 Thread Jeevan Kumar Kade
Hi All, I worked on Struts 1.1 for around 1 year. With that experience and knowledge, when i was looking into Sturts-2.0.1 document and example i really just woundering and have few queries on them which i am listing below. Please, clarify these queries. Queries 1. Ar

Re: Indexed Properties

2006-11-23 Thread Puneet Lakhina
On 11/22/06, Adam K <[EMAIL PROTECTED]> wrote: If you might be able to provide a sample I would be very greatful. As it stands I have come up with the following : changing the JSP to : indexed="true" /> Hmm.. As i said try something like this

enctype="multipart/form-data" gives null values for ActionForm properties

2006-11-23 Thread Morten Andersen
I want to upload a file as a part of a form. This requires that the enctype of the form is set to: multipart/form-data. When that is set like that the autopopulate thing doesn't work. How can I make sure that the properties are autopopulated even though I use enctype="multipart/form-data".