if you have public class UserData {
private Address address; public Address getAddress() { return address; } } public class Address { private String line1; public String getLine1() { return line1; } } In your template ... $userData.address.line1 or $userData.getAddress().getLine1() On 9 October 2011 13:07, Andrew Ducker <and...@ducker.org.uk> wrote: > Can I have a sub-class? > > i.e. > in addition to > $userData.emailAddress > can I have > $userData.Address.Line1 ? > > Or do I need to completely flatten my object structure for Velocity to cope > with it? > > At the moment I get: > > Couldn't instantiate instance of tool for: Unusable Tool 'userdata' => > feedthistothat.UserData with 1 properties [key -auto-> userdata; > ](java.lang.IllegalArgumentException: No class > 'feedthistothat.DataTypes.FeedParameters' was registered) > > if I add a property userData.getFeedParameters to my class > Do I need to register this class somewhere? Or is there a best practice to > deal with this situation? > > Thanks, > > Andy > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org > For additional commands, e-mail: user-h...@velocity.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org