-->
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.  [ 8 posts ] 
Author Message
 Post subject: exists a jsp taglib for hibernate?
PostPosted: Tue Oct 07, 2003 2:01 pm 
Newbie

Joined: Tue Oct 07, 2003 1:58 pm
Posts: 2
Hi,

does anyone know about a jsp taglib for hibernate.

Thanks
G


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 07, 2003 7:08 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
No - though I suppose this is an area that ripe for a contribution.


Top
 Profile  
 
 Post subject: Functionality?
PostPosted: Tue Oct 07, 2003 8:24 pm 
Senior
Senior

Joined: Sun Aug 31, 2003 3:14 pm
Posts: 151
Location: Earth (at the moment)
Quote:
I suppose this is an area that ripe for a contribution

What kinds of functionality would you propose go into this Hibernate taglib?


Top
 Profile  
 
 Post subject: taglib
PostPosted: Tue Oct 07, 2003 11:50 pm 
Newbie

Joined: Wed Oct 01, 2003 8:03 pm
Posts: 6
Over here, we've written a straightforward taglib that operates much like a c:forEach given a hql query.

it's pretty full featured, being able to take a jdni context ( or generate from scratch ), let's you set start/max , and specify an iterate or a find ..


i'm not really sure that you'd need more than that for a hibernate tag ( though we've extended the core for our own purposes ),

but I'm sure my co wouldn't mind contributing back to the community.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 08, 2003 1:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Sounds great.


Top
 Profile  
 
 Post subject: Hibernate JSP tags
PostPosted: Wed Oct 08, 2003 2:26 am 
Newbie

Joined: Wed Oct 08, 2003 2:07 am
Posts: 3
Location: Jacksonville, FL USA
I wrote a few hibernate2.0 JSP tags a while back, I will update them for 2.1 and get them posted here by this weekend.

Here is the TLD. I got distracted before I ever got the criteria stuff working (it was very new at the time).

The session tag was a hack to get around a bug I was having in getting the Hibernate session servlet filter working.

Feedback is on this, more later...

<tag>
<name>session</name>
<tagclass>com.epacube.web.taglib.HibernateSessionTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>
Creates, opens, closes, and reconnects a Hibernate Session.
</info>
<attribute>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>action</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>query</name>
<tagclass>com.epacube.web.taglib.HibernateQueryTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>
List of the results of a query from a hibernate session and store them in
the request under the id attribute.
</info>
<attribute>
<name>session</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>query</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>criteria</name>
<tagclass>com.epacube.web.taglib.HibernateCriteriaTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>
List of the results from a hibernate criteria query and store them in
the request under the id attribute.
</info>
<attribute>
<name>session</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>type</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>expression</name>
<tagclass>com.epacube.web.taglib.HibernateExpressionTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>
Add an expression to Hibernate Criteria
</info>
<attribute>
<name>expression</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 16, 2003 2:55 am 
Newbie

Joined: Tue Oct 07, 2003 1:58 pm
Posts: 2
Cool, sounds great - but from where can we get the taglib?

Guenther


Top
 Profile  
 
 Post subject: Hibernate taglib available?
PostPosted: Mon Jan 12, 2004 7:20 am 
Regular
Regular

Joined: Mon Sep 08, 2003 10:05 am
Posts: 50
Location: Dublin, Ireland
I'm looking to pass a Collection of object ids to a JSP, and have the JSP retrieve the relevant objects from Hibernate (and then present them), preferably via a tag library (taglib), so that I don't have loads of non-presentation code in the JSP. I don't want to pass a collection of objects to the JSP, as more potential then exists for the data to go stale.

Is there a Hibernate Tag library out there that would allow me to do this? Perhaps there is another, more commonly used approach to this?

No?? Then its back to the grindstone! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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.