You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Vijay Bala <fa...@yahoo.com> on 2004/06/03 21:34:53 UTC

Just a small issue...

Hi there!

When I work with velocity I find it so incredible and
I do really enjoy working with it. 

I just find the following issue while working with it.
Please clarify me what to do.

First, I declare 

#set ($attributeList = ["firstName", "dob"])
#set ($typeList = ["String","TimeStamp"] )

and then I try to create getters and setters for these
attributes like...


foreach($attribute in $attributeList)
set ($i = 0)
 public $typeList.get(i) get$attribute{
   	    return $(attribute);
	}
 }
set ($i = $i +1)
#end

When I get the output, I get like this....

public String getfirstName(){
    return firstName;
}

Well my issue is I do need to have the "getter" to be
named as "getFirstName()" instead of getfirstName.
Please explain me how to achive getting the first
letter Capital on the method name.(like
get(F)irstName)


Thanks in advance.
-Vijay


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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