velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Bala <fastfo...@yahoo.com>
Subject Just a small issue...
Date Thu, 03 Jun 2004 19:34:53 GMT
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


Mime
View raw message