Re: String as Index

2001-08-03 Thread Gregor Rayman

Hi Fracois,

so I've hacked a bit in the beanutils package and now struts does work 
perfectly with your string based properties. No need to change struts,
it is enough to change beanutils.

What I dit was:

- I've renamed the original BeanUtils class to OriginalPropertyUtils.
- I replaced PropertyUtils with your BeanUtils and all delegation to 
  PropertyUtils with the delegation to OriginalPropertyUtils 

(better approch would be to merge the two calsses. I'll do it later if 
necessary)

- I've changed the StringKeyedPropertyDestrciptor to inherit from
  PropertyDescriptor
- made PropertyUtils getPropertyDescriptor to return it.
- changed the method BeanProperties.populate


Now I can use string keyed properties in Struts. The source code however
is quite messy now. 


--
gR




RE: Re[2]: String as Index

2001-08-03 Thread Rey Francois


Well, you won't be able to tell Struts how to use it without
changing/duplicating its code.
For example if you want to use it with a tag, you'll have to reimplement the
tag.

I would think that Struts should ultimately incorporate this 'string keyed
properties' feature, there as been several people asking for them already.
So my suggestion would be for a committer to the commons package to do this
on the actual commons PropertyUtils, then other people can start upgrading
the tags...

Fr.

-Original Message-
From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
Sent: 02 August 2001 13:07
To: [EMAIL PROTECTED]
Subject: Re: Re[2]: String as Index


"Rey Francois" <[EMAIL PROTECTED]> wrote:

> The zip file is here: http://www.husted.com/about/struts/mapper.zip.
> Check the com.capco.util package, it contains a PropertyUtils class.
> 
> Fr.

Hi, I can see how to use the PropertyUtils, but I cannot find out,
how to tell struts, how to use it. :-((

--
gR


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




Re: String as Index

2001-08-03 Thread Gregor Rayman

"Rey Francois" <[EMAIL PROTECTED]>


> If you only need the string keyed properties, then don't worry about the
> mapper, just use the class com.capco.util.PropertyUtils.
>
> Fr.

I still don't get it. Do I have to change RequestUtils.java and
BeanUtils.java?

--
gR




RE: Re[2]: String as Index

2001-08-02 Thread Rey Francois


The zip file is here: http://www.husted.com/about/struts/mapper.zip.
Check the com.capco.util package, it contains a PropertyUtils class.

Fr.

-Original Message-
From: Oleg V Alexeev [mailto:[EMAIL PROTECTED]]
Sent: 01 August 2001 14:55
To: [EMAIL PROTECTED]
Subject: Re[2]: String as Index


Hello Rey,

Rey, I search page but can not found anything about your string keyed
proeprties. Can you send URL to the archive with sources?

Wednesday, August 01, 2001, 3:59:51 PM, you wrote:


RF> You can use the PropertyUtils that I have created (reusing the Struts
one)
RF> within the Mapper framework
RF> (http://www.husted.com/about/struts/resources.htm#extensions). It
supports
RF> "string keyed properties", using the notation
RF> 'simple.nested.indexed[1].stringKeyed("key")'.
RF> See this posting about this topic.
RF> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10858.html

RF> Fr.

RF> -Original Message-
RF> From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
RF> Sent: 01 August 2001 13:55
RF> To: [EMAIL PROTECTED]
RF> Subject: String as Index


RF> Hi,

RF> as far as I can remember, there was a topic about String as index in
RF> property getters/setters here some time ago.


RF> I'd like somethigh like this:

RF> 

RF> and aaa{bbb} should be converted to getAaa("bbb") and setAaa("bbb",
value).

RF> Is there something implemented in this direction already? Can I use the
RF> results? Can I help?

RF> --
RF> gR

RF> 
RF> The information in this email is confidential and is intended solely
RF> for the addressee(s).
RF> Access to this email by anyone else is unauthorised. If you are not
RF> an intended recipient, you must not read, use or disseminate the
RF> information contained in the email.
RF> Any views expressed in this message are those of the individual
RF> sender, except where the sender specifically states them to be
RF> the views of Capco.

RF> http://www.capco.com
RF> ***



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]



The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




Re: String as Index

2001-08-01 Thread Gregor Rayman

"Rey Francois" <[EMAIL PROTECTED]> wrote:

> You can use the PropertyUtils that I have created (reusing the Struts one)
> within the Mapper framework
> (http://www.husted.com/about/struts/resources.htm#extensions). It supports
> "string keyed properties", using the notation
> 'simple.nested.indexed[1].stringKeyed("key")'.
> See this posting about this topic.
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10858.html
> 
> Fr.


Sorry to bother you again, before I have to read the whole documentation 
to the Mapper, could you please write, what do I have to do, to be able
to use this notation in struts? 

Thanks in advance

--
gR




Re[2]: String as Index

2001-08-01 Thread Oleg V Alexeev

Hello Rey,

Rey, I search page but can not found anything about your string keyed
proeprties. Can you send URL to the archive with sources?

Wednesday, August 01, 2001, 3:59:51 PM, you wrote:


RF> You can use the PropertyUtils that I have created (reusing the Struts one)
RF> within the Mapper framework
RF> (http://www.husted.com/about/struts/resources.htm#extensions). It supports
RF> "string keyed properties", using the notation
RF> 'simple.nested.indexed[1].stringKeyed("key")'.
RF> See this posting about this topic.
RF> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10858.html

RF> Fr.

RF> -Original Message-
RF> From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
RF> Sent: 01 August 2001 13:55
RF> To: [EMAIL PROTECTED]
RF> Subject: String as Index


RF> Hi,

RF> as far as I can remember, there was a topic about String as index in
RF> property getters/setters here some time ago.


RF> I'd like somethigh like this:

RF> 

RF> and aaa{bbb} should be converted to getAaa("bbb") and setAaa("bbb", value).

RF> Is there something implemented in this direction already? Can I use the
RF> results? Can I help?

RF> --
RF> gR

RF> 
RF> The information in this email is confidential and is intended solely
RF> for the addressee(s).
RF> Access to this email by anyone else is unauthorised. If you are not
RF> an intended recipient, you must not read, use or disseminate the
RF> information contained in the email.
RF> Any views expressed in this message are those of the individual
RF> sender, except where the sender specifically states them to be
RF> the views of Capco.

RF> http://www.capco.com
RF> ***



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: String as Index

2001-08-01 Thread Gregor Rayman

"Oleg V Alexeev" <[EMAIL PROTECTED]> wrote:

> Now indexed properties can be used only. All properties are processed
> by utilites from beanutils package at jakarta-commons. It can parse
> indexed properties only. Named properties is great addition, of
> course. And of course, you can refactor beanutils package to implement
> named properties. It will be great help. 8)
> 
> -- 
> Best regards,
>  Olegmailto:[EMAIL PROTECTED]


And 

"Rey Francois" <[EMAIL PROTECTED]> wrote:
 
> You can use the PropertyUtils that I have created (reusing the Struts one)
> within the Mapper framework
> (http://www.husted.com/about/struts/resources.htm#extensions). It supports
> "string keyed properties", using the notation
> 'simple.nested.indexed[1].stringKeyed("key")'.
> See this posting about this topic.
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10858.html
> 
> Fr.


I will evaluate it. It seems, Francois has already implemented exactly
what I need. Anyway, if there is something to be done (like bringing this
to beanutils) I'd help if there is need.

--
gR








Re: String as Index

2001-08-01 Thread Oleg V Alexeev

Hello Gregor,

Wednesday, August 01, 2001, 3:55:04 PM, you wrote:

GR> as far as I can remember, there was a topic about String as index in
GR> property getters/setters here some time ago.


GR> I'd like somethigh like this:

GR> 

GR> and aaa{bbb} should be converted to getAaa("bbb") and setAaa("bbb", value).

GR> Is there something implemented in this direction already? Can I use the
GR> results? Can I help?

Now indexed properties can be used only. All properties are processed
by utilites from beanutils package at jakarta-commons. It can parse
indexed properties only. Named properties is great addition, of
course. And of course, you can refactor beanutils package to implement
named properties. It will be great help. 8)

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





RE: String as Index

2001-08-01 Thread Rey Francois


You can use the PropertyUtils that I have created (reusing the Struts one)
within the Mapper framework
(http://www.husted.com/about/struts/resources.htm#extensions). It supports
"string keyed properties", using the notation
'simple.nested.indexed[1].stringKeyed("key")'.
See this posting about this topic.
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10858.html

Fr.

-Original Message-
From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
Sent: 01 August 2001 13:55
To: [EMAIL PROTECTED]
Subject: String as Index


Hi,

as far as I can remember, there was a topic about String as index in
property getters/setters here some time ago.


I'd like somethigh like this:



and aaa{bbb} should be converted to getAaa("bbb") and setAaa("bbb", value).

Is there something implemented in this direction already? Can I use the
results? Can I help?

--
gR


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




String as Index

2001-08-01 Thread Gregor Rayman

Hi,

as far as I can remember, there was a topic about String as index in
property getters/setters here some time ago.


I'd like somethigh like this:



and aaa{bbb} should be converted to getAaa("bbb") and setAaa("bbb", value).

Is there something implemented in this direction already? Can I use the
results? Can I help?

--
gR