You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joson Mandaro <jo...@gmail.com> on 2012/02/17 03:44:54 UTC

Map param in tag

Hi all,
I've written a new Interceptor. It requires a Map parameter named "parser".
private Map<String, String> parser;
// Getter and Setter
public void setParser(Map<String, String> parser) ...

How to parse a Map parameter to it?
Here is what I tried:
<interceptor-ref name="myInterceptorStack">
    <param name="myInterceptor.parser[2]">ABC</param>
    <param name="myInterceptor.parser[8]">EDF</param>
</interceptor>

But then "this.parser" was null in intercept().

Thanks in advanced.

Re: Map param in tag

Posted by Anjib Mulepati <an...@hotmail.com>.
http://struts.apache.org/mail.html

On 2/22/2012 3:02 PM, Brian Thompson wrote:
> http://lmgtfy.com/?q=struts+mailing+list+unsubscribe
>
>
>
> On Wed, Feb 22, 2012 at 1:56 PM, Yadav Khanal<ya...@yahoo.com>wrote:
>
>> Hi,
>> I would like to unsubscribe from the list because it flooded my email box.
>> Could anybody tell me how to unsubscribe?
>>
>> Thanks,
>> YK
>>
>>
>>
>> ________________________________
>>   From: Oscar Alvarez<oi...@gmail.com>
>> To: Struts Users Mailing List<us...@struts.apache.org>
>> Sent: Tuesday, February 21, 2012 9:00:35 AM
>> Subject: Re: Map param in<param>  tag
>>
>> Hi Ansari,
>>
>> Already tested the email in this URL?
>> http://struts.apache.org/1.x/faqs/validator.html
>>
>> Best regards,
>> Oscar.
>>
>> 2012/2/21 danish ansari<mo...@gmail.com>
>>
>>> Hello there ,
>>> I am working on struts 1.2 validation.
>>> I am having a requirement which i am unable to implement.
>>> I am having two fields username and email form resetting the password.
>>> user has to enter any one of them if user does not enter any field then a
>>> message must be pop up that enter at least one field.
>>> if user has entered username then email should not be validated.
>>> but if the user entered the email then email must be verified for valid
>>> email input.
>>> i have to implement this using XML only. I cant override the validate()
>>> Please provide me sample XML code.I have wasted a lot of time on it.
>>> Thank you
>>>
>>
>>
>> --
>> Atentamente
>> Óscar
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Map param in tag

Posted by Brian Thompson <el...@gmail.com>.
http://lmgtfy.com/?q=struts+mailing+list+unsubscribe



On Wed, Feb 22, 2012 at 1:56 PM, Yadav Khanal <ya...@yahoo.com>wrote:

> Hi,
> I would like to unsubscribe from the list because it flooded my email box.
> Could anybody tell me how to unsubscribe?
>
> Thanks,
> YK
>
>
>
> ________________________________
>  From: Oscar Alvarez <oi...@gmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Tuesday, February 21, 2012 9:00:35 AM
> Subject: Re: Map param in <param> tag
>
> Hi Ansari,
>
> Already tested the email in this URL?
> http://struts.apache.org/1.x/faqs/validator.html
>
> Best regards,
> Oscar.
>
> 2012/2/21 danish ansari <mo...@gmail.com>
>
> > Hello there ,
> > I am working on struts 1.2 validation.
> > I am having a requirement which i am unable to implement.
> > I am having two fields username and email form resetting the password.
> > user has to enter any one of them if user does not enter any field then a
> > message must be pop up that enter at least one field.
> > if user has entered username then email should not be validated.
> > but if the user entered the email then email must be verified for valid
> > email input.
> > i have to implement this using XML only. I cant override the validate()
> > Please provide me sample XML code.I have wasted a lot of time on it.
> > Thank you
> >
>
>
>
> --
> Atentamente
> Óscar
>

Re: Map param in tag

Posted by Yadav Khanal <ya...@yahoo.com>.
Hi,
I would like to unsubscribe from the list because it flooded my email box. Could anybody tell me how to unsubscribe?

Thanks,
YK



________________________________
 From: Oscar Alvarez <oi...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org> 
Sent: Tuesday, February 21, 2012 9:00:35 AM
Subject: Re: Map param in <param> tag
 
Hi Ansari,

Already tested the email in this URL?
http://struts.apache.org/1.x/faqs/validator.html

Best regards,
Oscar.

2012/2/21 danish ansari <mo...@gmail.com>

> Hello there ,
> I am working on struts 1.2 validation.
> I am having a requirement which i am unable to implement.
> I am having two fields username and email form resetting the password.
> user has to enter any one of them if user does not enter any field then a
> message must be pop up that enter at least one field.
> if user has entered username then email should not be validated.
> but if the user entered the email then email must be verified for valid
> email input.
> i have to implement this using XML only. I cant override the validate()
> Please provide me sample XML code.I have wasted a lot of time on it.
> Thank you
>



-- 
Atentamente
Óscar

Re: Map param in tag

Posted by Oscar Alvarez <oi...@gmail.com>.
Hi Ansari,

Already tested the email in this URL?
http://struts.apache.org/1.x/faqs/validator.html

Best regards,
Oscar.

2012/2/21 danish ansari <mo...@gmail.com>

> Hello there ,
> I am working on struts 1.2 validation.
> I am having a requirement which i am unable to implement.
> I am having two fields username and email form resetting the password.
> user has to enter any one of them if user does not enter any field then a
> message must be pop up that enter at least one field.
> if user has entered username then email should not be validated.
> but if the user entered the email then email must be verified for valid
> email input.
> i have to implement this using XML only. I cant override the validate()
> Please provide me sample XML code.I have wasted a lot of time on it.
> Thank you
>



-- 
Atentamente
Óscar

Re: Map param in tag

Posted by danish ansari <mo...@gmail.com>.
Hello there ,
I am working on struts 1.2 validation.
I am having a requirement which i am unable to implement.
I am having two fields username and email form resetting the password.
user has to enter any one of them if user does not enter any field then a
message must be pop up that enter at least one field.
if user has entered username then email should not be validated.
but if the user entered the email then email must be verified for valid
email input.
i have to implement this using XML only. I cant override the validate()
Please provide me sample XML code.I have wasted a lot of time on it.
Thank you

Re: Map param in tag

Posted by Dave Newton <da...@gmail.com>.
By sending an email to the list, as you just did.

(pardon brevity and typos, on cell)
On Feb 20, 2012 8:32 AM, "danish ansari" <mo...@gmail.com> wrote:

> hey buddy,,
> i have just subscribed to the mailing list.
> can you tell me how can i ask question as you have asked.
> thank you
>
> On Fri, Feb 17, 2012 at 8:14 AM, Joson Mandaro <jo...@gmail.com>
> wrote:
>
> > Hi all,
> > I've written a new Interceptor. It requires a Map parameter named
> "parser".
> > private Map<String, String> parser;
> > // Getter and Setter
> > public void setParser(Map<String, String> parser) ...
> >
> > How to parse a Map parameter to it?
> > Here is what I tried:
> > <interceptor-ref name="myInterceptorStack">
> >    <param name="myInterceptor.parser[2]">ABC</param>
> >    <param name="myInterceptor.parser[8]">EDF</param>
> > </interceptor>
> >
> > But then "this.parser" was null in intercept().
> >
> > Thanks in advanced.
> >
>

Re: Map param in tag

Posted by danish ansari <mo...@gmail.com>.
hey buddy,,
i have just subscribed to the mailing list.
can you tell me how can i ask question as you have asked.
thank you

On Fri, Feb 17, 2012 at 8:14 AM, Joson Mandaro <jo...@gmail.com> wrote:

> Hi all,
> I've written a new Interceptor. It requires a Map parameter named "parser".
> private Map<String, String> parser;
> // Getter and Setter
> public void setParser(Map<String, String> parser) ...
>
> How to parse a Map parameter to it?
> Here is what I tried:
> <interceptor-ref name="myInterceptorStack">
>    <param name="myInterceptor.parser[2]">ABC</param>
>    <param name="myInterceptor.parser[8]">EDF</param>
> </interceptor>
>
> But then "this.parser" was null in intercept().
>
> Thanks in advanced.
>

Re: Map param in tag

Posted by Łukasz Lenart <lu...@googlemail.com>.
2012/2/17 Joson Mandaro <jo...@gmail.com>:
> <interceptor-ref name="myInterceptorStack">
>    <param name="myInterceptor.parser[2]">ABC</param>
>    <param name="myInterceptor.parser[8]">EDF</param>
> </interceptor>

Did you try to use:
<param name="parser[8]">EDF</param>


Regards
-- 
Łukasz
Mobile +48 606 323 122
Office +27 11 0838747
http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org