Thanks,

The following worked. 

PropertyUtils.getSimpleProperty(bean,propertyName)

Neil

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: 07 April 2006 02:56 PM
To: Struts Users Mailing List
Subject: [OT] Re: Bean Question

One, or both, of these may help:

1. http://jakarta.apache.org/commons/beanutils/
2. http://cglib.sourceforge.net/

-Dennis




"Neil Meyer" <[EMAIL PROTECTED]> 
04/07/2006 01:31 AM
Please respond to
"Struts Users Mailing List" <user@struts.apache.org>


To
"Struts Users Mailing List" <user@struts.apache.org>
cc

Subject
Bean Question






Good day,

I have a bean something like this 


public class testBean implements Serializable {
    private String test1;
    private String test2;
    private String test3;
    private String test4;

    public String getTest1 () {
        return test1;
    }

    public void setTest1 (String test1_) {
        this.test1= test1_;
    }

    public String getTest2 () {
        return test2;
    }

    public void setTest2 (String test2_) {
        this.test2= test2_;
    }

    public String getTest3 () {
        return test3;
    }

    public void setTest3 (String test3_) {
        this.test3= test3_;
    }

    public String getTest4 () {
        return test4;
    }

    public void setTest4 (String test4_) {
        this.test4= test4_;
    }
}


I then have a list of properties file that I want to get the property out 
of
the bean specified in the properties file.

The properties file might have something like this

Value=test1,test2

So I want to dynamically tell the system to get 

testBean.getTest1
testBean.getTest2

I really hope there is somebody that can give me some pointers here.

Regards
Neil 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to