Thank you. But A have so many method, so I can't do that.

On Tue, Sep 8, 2009 at 7:01 PM, Thiago H. de Paula Figueiredo <
[email protected]> wrote:

> Em Tue, 08 Sep 2009 01:39:41 -0300, Xuan Tran Le <[email protected]>
> escreveu:
>
>  ----------------- A.java ----------------------
>> public class A {
>>
>>    private static String name;
>>
>>    public static String getName() {
>>        return name;
>>    }
>>
>>    /*some method here*/
>>
>> }
>> --------------------------------------------------
>>
>> And from B.tml I want to get "name" value from getName() method. What
>> should I do now?
>>
>
> Easy:
>
> public class B {
>        public String getName() {
>                return A.getName();
>        }
> }
>
> Then use ${name} in your template.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to