Hibernate and Tables: Unexpected Snag: DirectLink prevents access to requestCycle?
"Luke Galea" <[email protected]>
| Newsgroups | gmane.comp.java.tapestry.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello all.. I am nearly done the development of a HibernateTableModel (and corresponding SessionStateManagers, DataSource, etc ) for the MindBridge contrib Table component. It's looking great.. but I am having a problem: The default column component uses a DirectLink for the column header links that make the table sort by that particular column. I have extended BasePage and created DataStoreAccessingPage that can provide Hibernate sessions... It works by setting an attribute in the request cycle with the open session so future requests will use the open session. During page detach the session is closed. The problem is, when the DirectLink is called "getRequestCycle" returns null.. can work around this by creating a session purely for the purpose of completing the directLink.. but that isn't very elegant. Is there some way around this? I could change the code to not use DirectLink.. but other than this problem, DirectLink is ideal. Thanks in advance Luke Galea Software Development BlueCat <http://www.bluecatnetworks.com/> Networks 905-762-5225