You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Etienne Bernard <eb...@fullsix.com> on 2002/05/21 18:20:11 UTC

[beanutils] An indexed and mapped property?

Hello,

I am trying to use struts 1.1 into my project and I need to access
properties that are both mapped and indexed. I tried to use

  <html:text property="property(name)[0]"/>

But it calls getProperty("name") and not getProperty("name", 0).

I had a look at the code and what I saw suggests that this syntax is not
supported. I'd like to know if you are planning to support such syntax
or if you are willing to accept patches (provided that I manage to code
the feature) ?

Regards,
-- 
Etienne Bernard <eb...@fullsix.com>
Senior Software Engineer - FullSIX - http://www.fullsix.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [beanutils] An indexed and mapped property?

Posted by Arron Bates <ar...@keyboardmonkey.com>.
It's not capable of accepting more than the one value per property.

Why don't you simply nest the calls in a couple of beans?...
Example...
    <html:text property="namedProperty(name).indexedProperty[0]" />

It would get a bean from your name argument, and then you could use the 
index on a property of the bean it returns.

Arron.

Etienne Bernard wrote:

>Hello,
>
>I am trying to use struts 1.1 into my project and I need to access
>properties that are both mapped and indexed. I tried to use
>
>  <html:text property="property(name)[0]"/>
>
>But it calls getProperty("name") and not getProperty("name", 0).
>
>I had a look at the code and what I saw suggests that this syntax is not
>supported. I'd like to know if you are planning to support such syntax
>or if you are willing to accept patches (provided that I manage to code
>the feature) ?
>
>Regards,
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>