Re: [Wicket-user] Hibernate transactions

2005-12-19 Thread Maurice Marrink
Actually, transactions are either committed automaticly within there method call dao.save(someObject) or if i need to batch several operations in 1 transaction i let the onclick event commit the transaction for me. public void onclick() { Object obj=dao.batchLoad(id); dao.batchDelete(obj);

Re: [Wicket-user] Hibernate transactions

2005-12-19 Thread Maurice Marrink
imho, your transactions should only be concerned with what happens in event handlers (onclick/onsubmit) and not through the enitire request cycle because anything outside the handlers should be read-only access and thus not require a transaction. That would indeed be desirable, however as of the

Re: [Wicket-user] How to render part of page (with ajax maybe)

2005-12-19 Thread Ari Suutari
Hi, I can now report that things mostly work. But there are still some cases where the page renders ok, but some components don't when trying to render just a component. My application is already rather complex (I'm still digging deeper in this), but it looks like that there are cases where

Re: [Wicket-user] Help required for defining where wicket-strutsnested demo should be put in wicket-stuff

2005-12-19 Thread Laurent PETIT
ok so I'll put it in contrib-examples. On 12/19/05, Eelco Hillenius [EMAIL PROTECTED] wrote: +1 on either. Eelco On 12/16/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: +1 contrib-examples Juergen On 12/16/05, Igor Vaynberg [EMAIL PROTECTED] wrote: i would add it to the

Re: [Wicket-user] How to render part of page (with ajax maybe)

2005-12-19 Thread Ari Suutari
Ok, I have now reproduced the problem with simple page. If I have a page, which has a panel (with it's own html template) which contains some tags it is not possible to render those panel's tags via ajax handler from phonebook example. The difference with full page render and partial render

[Wicket-user] Behaviour and header contribution

2005-12-19 Thread sven
Hello, I'm using custom Behaviours that need to contribute some javascript to the HTML header. They implement IHeaderContributor and it works great. However these behaviours share some javascript code that should be included only once per page, even if used mulitple times on that page. Does

Re: [Wicket-user] How to render part of page (with ajax maybe)

2005-12-19 Thread Juergen Donnerstag
It might that Panel is the problem, but I'm not sure you explanation is right. Panel.java protected void onRender() { // Render the tag that included this html compoment final MarkupStream markupStream = findMarkupStream(); validateMarkupStream(markupStream);

Re: [Wicket-user] Behaviour and header contribution

2005-12-19 Thread Eelco Hillenius
Look at how Ajax handler is implemented. That's the same as what you need. Uses a threadlocal to track whether or not a contribution was made during this request. Eelco On 12/19/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I'm using custom Behaviours that need to contribute some

Re: [Wicket-user] Hibernate one-to-many Collections ListView

2005-12-19 Thread Eelco Hillenius
And of course, the easiest way to transform a Set to a List is to do new ArrayList(mySet). Be careful not to keep to much lingering in memory though. Use detachable models (like LoadableDetachableModel as Ralf said) for heavy objects if possible. Eelco On 12/17/05, John Shields [EMAIL

Re: [Wicket-user] Hibernate transactions

2005-12-19 Thread Eelco Hillenius
On 12/18/05, John Patterson [EMAIL PROTECTED] wrote: On Saturday 17 Dec 2005 23:10, John Patterson wrote: I have checked it out and it looks to me like the method HibernateApplication.onRuntimeException() is never used so transactions will never be rolled back. Despite this missing

Re: [Wicket-user] Hibernate transactions

2005-12-19 Thread Eelco Hillenius
No need for that anymore, it's 'fixed' now (though I don't entirely agree as I stated in another thread). Eelco On 12/18/05, Igor Vaynberg [EMAIL PROTECTED] wrote: if application.onRuntimeException() is not being called then its a bug. if you verify that it is indeed the case please file a

Re: [Wicket-user] How to render part of page (with ajax maybe)

2005-12-19 Thread Ari Suutari
Hi, It might that Panel is the problem, but I'm not sure you explanation is right. Well, I'm almost sure that my explanation is not right :-) The test code is available at http://www.suutari.iki.fi/tmp/simpletest.zip (it shows a simple page, with a link. Click the link to launch the

Re: [Wicket-user] Behaviour and header contribution

2005-12-19 Thread Juergen Donnerstag
yes, please see AjjaxHandler.renderHeadInitContribution() Juergen On 12/19/05, Eelco Hillenius [EMAIL PROTECTED] wrote: Look at how Ajax handler is implemented. That's the same as what you need. Uses a threadlocal to track whether or not a contribution was made during this request. Eelco

Re: [Wicket-user] How to render part of page (with ajax maybe)

2005-12-19 Thread Ari Suutari
Hi again, SimplePageTest contains a test to rerender the Panel, but not a component inside a Panel, correct? Is that the test you added? Sorry, I missed this, but yes, this is specifically the case that seems to fail. My code is not a junit test case, it is more like a very much

Re: [Wicket-user] How to render part of page (with ajax maybe)

2005-12-19 Thread Juergen Donnerstag
I extended the junit with such a case. And yes, it fails as well. Juergen On 12/19/05, Ari Suutari [EMAIL PROTECTED] wrote: Hi again, SimplePageTest contains a test to rerender the Panel, but not a component inside a Panel, correct? Is that the test you added? Sorry, I missed this,