struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcelo Salhab Brogliato <msbro...@vialink.com.br>
Subject Re: Exception using ParametersInterceptor to fill a Set<String>
Date Thu, 22 Oct 2009 04:38:18 GMT
I made some tests in a very simple application now and I got this  
results:

<input type="text" name="cliente.email" />
<input type="text" name="cliente.email" />
<input type="text" name="cliente.email" />

Will add these emails to my set.
But how can I access the first one?
I'm trying this:

<s:textfield label="Email" name="mystringset" value="toArray()[0]" />

But this is not evaluating attribute value. Why?
I tried: mystringset.toArray()[0] but it also didn't work.

thanks!
msbrogli

On Oct 22, 2009, at 12:46 AM, Marcelo Salhab Brogliato wrote:

> Hi,
>
> in my action I have a client object that has a Set<String> email.
> In my http request, I have these data:
> client.email[0] = 'abc@def.com'
> client.email[1] = 'a1@b2.com'
> client.email[2] = 'a2@b2.com'
>
> But I'm getting an error in ParametersInteceptor.
>
> I created these setters:
>
> public void setEmail(int index, String email)
> public void setEmail(String[] email)
> public void setEmail(Set<String> email)
>
> But I'm already getting an exception.
>
> What is the right way to do this?
> Or this interceptor never fills a Set?
>
> thanks in advice,
> msbrogli
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


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


Mime
View raw message