-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: FTL template modification - HOWTO
PostPosted: Tue Jul 22, 2008 4:06 pm 
Beginner
Beginner

Joined: Mon Mar 17, 2008 2:50 pm
Posts: 24
I need to modify freemarker templates and I am having problems understanding the logic of existing templates.
DITTO - I am not a freemarker expert but I read the reference guide.
What is puzzling me - all these pojo.someMethod() that are used in existing templates. Where they are defined? What if I want to change the logic of their behavior? Where can I define my own method?
If some kind soul can give me tips on template creation/editing I would appreciate it greatly.
Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 29, 2008 8:45 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
they are defined in hibernatetools.jar in the PojoClass which hides the sometimes ugly traversal logic in Configuration API.

Use the "toolclass" trick from the hibernate tools doc to get your own instances.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: how to create instance of pojo class?
PostPosted: Mon Sep 15, 2008 3:24 am 
Newbie

Joined: Mon Sep 15, 2008 3:13 am
Posts: 1
When you say " use tool class trick from the hibernate tools doc to get your own instances" what exactly do you mean? Is it possible to get the "pojo" object with all properties set, so that I can use it further to add my own functionality? Please mention the exact link on this..


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2008 11:08 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Goto http://docs.jboss.org/tools/2.1.0.Beta1 ... index.html search for "toolclass" and you should find: http://docs.jboss.org/tools/2.1.0.Beta1 ... ml#d0e3308

This does not allow you to override what $pojo does (maybe we should allow for that) but it allows you to add your own java logic.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.