Transactions with RuntimeException

2009-11-05 Thread Steve Lowery
We have a filter that runs in our context before the wicket filter that starts a hibernate transaction, does a chain.doFilter() and then commits the transaction. The problem we are running into is that if a RuntimeException is thrown, Wicket catches it, logs it and figures out which page to

autocomplete text field with dropdown style functionality

2009-11-05 Thread Jason Novotny
Hi, I'm using the autocomplete text field with great success. However, I'm looking for a way where a user can start to move down the list and once they are at the last choice, it will continue to pull new items back from the server. If this seems confusing let me explain with my use-case:

Re: Transactions with RuntimeException

2009-11-05 Thread Pedro Santos
Here at work we abandon this strategy, and create the transaction for service. On Thu, Nov 5, 2009 at 5:20 PM, Steve Lowery slow...@gatessolutions.comwrote: We have a filter that runs in our context before the wicket filter that starts a hibernate transaction, does a chain.doFilter() and then

Re: Transactions with RuntimeException

2009-11-05 Thread Pedro Santos
(...)transaction per service. On Thu, Nov 5, 2009 at 5:33 PM, Pedro Santos pedros...@gmail.com wrote: Here at work we abandon this strategy, and create the transaction for service. On Thu, Nov 5, 2009 at 5:20 PM, Steve Lowery slow...@gatessolutions.comwrote: We have a filter that runs

Re: Transactions with RuntimeException

2009-11-05 Thread Igor Vaynberg
another common approach is to do this have your txn filter put a transaction handle into a threadlocal, then in requestcycle.onruntimeexception() you can do : transactionholder.gettransaction().setrollbackonly(true); -igor On Thu, Nov 5, 2009 at 11:59 AM, Igor Vaynberg igor.vaynb...@gmail.com

Re: Transactions with RuntimeException

2009-11-05 Thread Igor Vaynberg
check the http response code? -igor On Thu, Nov 5, 2009 at 11:20 AM, Steve Lowery slow...@gatessolutions.com wrote: We have a filter that runs in our context before the wicket filter that starts a hibernate transaction, does a chain.doFilter() and then commits the transaction.  The problem we

LDAP Authentication

2009-11-05 Thread Benjamin Pack
We’re working on an application that requires authentication against Active Directory and authorization based on Roles. I wanted to ask the community what they would recommend for a out-of-the-box Wicket 1.4 plus LDAP integration with the least amount of headaches (that will be our starting

Re: LDAP Authentication

2009-11-05 Thread Ryan McKinley
take a look at Apache Shiro http://incubator.apache.org/shiro/ I found it much easier to work with... There is a basic example with: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/shiro-security/ I have it working with JDBC or ActiveDirectory, using LDAP

Re: LDAP Authentication

2009-11-05 Thread Major Péter
Hi, You should check JAAS, AFAIK it has ldap-integration too, but if you need to create an edit profile page, then I recommend you Spring-LDAP, it's very easy to use (but I'm not sure, that the roles would work). Regards, Peter 2009-11-05 21:16 keltezéssel, Benjamin Pack írta: We’re working on

Urgent: Repeating Markup that contains a Wicket Border

2009-11-05 Thread Corbin, James
Hi, I have some markup I am trying to repeat using a RepeatingView and if the markup that I'm repeating binds to a Wicket Border, I get GPEs. This seems like a bug to me. Is it a bug or am I potentially doing something incorrect. Here is the pertinent markup that is being

Re: LDAP Authentication

2009-11-05 Thread T Ames
I am using simple AuthenticatedWebApplication and AuthenticatedWebSession which through that you can assign roles. There are examples in wicket-examples. I wrote my own classes to verify credentials using javax.naming against AD. Although I don't use roles much, you could assign a role based on

Serializable check

2009-11-05 Thread bht
Hi, I am trying to prevent the leaking of business objects into the session. Michael made a good comment in http://www.mail-archive.com/users@wicket.apache.org/msg31187.html ... you could e.g. temporarily remove the Serializable from your model-classes and go spotting nonserializable

Re: Serializable check

2009-11-05 Thread Igor Vaynberg
you have to override listdataprovider#model and return a detachable model. -igor On Thu, Nov 5, 2009 at 2:19 PM, b...@actrix.gen.nz wrote: Hi, I am trying to prevent the leaking of business objects into the session. Michael made a good comment in

Re: LDAP Authentication

2009-11-05 Thread Filippo De Luca
Do You know Spring-ldap? Take a look at this presentation: http://www.slideshare.net/PiergiorgioLucidi/spring-ldap. I think it is easy integrate spring-ldap with spring-security and so unsing swarm. 2009/11/5 Benjamin Pack ben.p...@gmail.com We’re working on an application that requires

Re: Serializable check

2009-11-05 Thread bht
Igor, Thanks very much for your suggestion which I followed. I have overridden it and that is an improvement but still not good. ListDataProvider dataProvider = new ListDataProvider(myList){ @Override public IModelMyEntity model(Object object) { return new

Re: Serializable check

2009-11-05 Thread Igor Vaynberg
no, you should not be using listdataprovider, it is only for static lists of things. if you want best practice look at the phonebook example in wicket-stuff. -igor On Thu, Nov 5, 2009 at 5:52 PM, b...@actrix.gen.nz wrote: Igor, Thanks very much for your suggestion which I followed. I have

panel session time

2009-11-05 Thread Joe
I  have a panel in the top part of my page. This panel  contain  a login form. But, I don't login with the panel  because I have  been on the page for too long(session timeout) also i have a login page , the page contain a login form .But when session timeout , it can login  the two State's 

Re: Serializable check

2009-11-05 Thread bht
Thanks again Igor. I have switched to plain IDataProvider as suggested, although I have to admit that I still have to look at the phonebook example. Again, IDataProvider is an improvement, but still not good. It appears that SerializableChecker is complaining about a volatile field not being

Re: Serializable check

2009-11-05 Thread Igor Vaynberg
you should create the list of entities inside iterator() call, not hold on to it in a field. see the phonebook example. -igor On Thu, Nov 5, 2009 at 7:06 PM, b...@actrix.gen.nz wrote: Thanks again Igor. I have switched to plain IDataProvider as suggested, although I have to admit that I

Re: panel session time

2009-11-05 Thread Igor Vaynberg
the panel is in a page, the page is in session. if the session timed out the panel no longer exists. you should use a StatelessForm for things like login panels. -igor On Thu, Nov 5, 2009 at 6:36 PM, Joe huanghu...@yahoo.cn wrote: I have a panel in the top part of my page. This panel contain

Re: Serializable check

2009-11-05 Thread bht
Igor, Creating the list of entities exclusively inside iterator() requires two database calls for retrieving a list for a single request, the additional call being required for the size() method that is called prior to iterator(). That is an unfortunate side effect of this API. I don't have a

Re: Serializable check

2009-11-05 Thread James Carman
Are you always retrieving the entire list? On Thu, Nov 5, 2009 at 11:25 PM, b...@actrix.gen.nz wrote: Igor, Creating the list of entities exclusively inside iterator() requires two database calls for retrieving a list for a single request, the additional call being required for the size()

Re: Serializable check

2009-11-05 Thread bht
Hi James, Thanks for the question. In this case, yes. In other cases where I use IDataProvider, no. I know that IDataProvider provides functionality for pagination which I don't use here, that is why I ignored it. I must admit I have a few issues with IDataProvider but I don't want to distract

Re: inmethod datagrid and row additions and filtering

2009-11-05 Thread Deren
I ended up making the following changes to the inmethod datagrid in order to get the correct behavior: AbstractPageableView.java: + public void reset() { + realItemCount = UNKOWN_COUNT; + maxFirstItemReached = 0; + queryResult = null; +

Re: Serializable check

2009-11-05 Thread mbrictson
I think the problem is that you are using the volatile keyword when you should be using transient. bht wrote: So I wonder, what is the situation with SerializableChecker complaining about that volatile field not being Serializable. Is this a bug or do I miss anything? -- View this

Re: Serializable check

2009-11-05 Thread Igor Vaynberg
class mydataprovider implements idataprovider { private transient list cache; private list getresult() { if (cache==null) { // load the list from db; cache=list; } return cache; } public iterator iterator() { return getresult().iterator(); }

Re: Serializable check

2009-11-05 Thread bht
Thanks very much! As pointed out, I was incorrectly using the keyword volatile instead of transient. All is well now with IDataProvider and SerializableChecker. SerializableChecker is great! Bernard On Thu, 5 Nov 2009 22:30:59 -0800, you wrote: class mydataprovider implements idataprovider {

Reading localization properties from Page Subclass .properties file

2009-11-05 Thread Leo . Erlandsson
Hi, We are in the process of moving our applications from JSP to Wicket. Right now we're writing a framework with BasePages and base components to build on and are learning Wicket on the fly. The BasePage contains a HeaderPanel which renders the Headline of the page: !-- BasePage.java --

Re: Asynchronous construction of page

2009-11-05 Thread Pieter Degraeuwe
Why don't you use the AjaxLazyLoadPanel for each part the the screen that takes some time to load? (see also at http://www.roseindia.net/tutorials/wicket/lazy-load.shtml) Pieter On Thu, Nov 5, 2009 at 6:00 PM, Kaspar Fischer kaspar.fisc...@dreizak.comwrote: On 05.11.2009, at 03:06, jpswain