Re: using OpenJPA with wicket?
search this list for wicket and hibernate or wicket and jpa -igor On Thu, Apr 30, 2009 at 8:49 PM, Christopher L Merrill wrote: > I'm just getting my feet wet with Wicket and OpenJPA. I've got the > basics of both and have started prototyping parts of an upcoming > project in each and everything was going great. Then I tried to put > the two technologies together and hit a wall. I'd written the > OpenJPA pieces in a standalone application. Moving to a web container > (Tomcat), I saw a recommendation to annotate the servlet code with > something like: > �...@persistenceunit private EntityManagerFactory emf; > > Of course, with Wicket, we don't write a servlet...and now I'm > drawing a blank as to where I should go next?. I'm guessing I'm not > the first to get here...does anyone have a recommendation for what > direction I should be going next? > > TIA! > Chris > > > -- > - > Chris Merrill | Web Performance, Inc. > ch...@webperformance.com | http://webperformance.com > 919-433-1762 | 919-845-7601 > > Website Load Testing and Stress Testing Software & Services > - > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
using OpenJPA with wicket?
I'm just getting my feet wet with Wicket and OpenJPA. I've got the basics of both and have started prototyping parts of an upcoming project in each and everything was going great. Then I tried to put the two technologies together and hit a wall. I'd written the OpenJPA pieces in a standalone application. Moving to a web container (Tomcat), I saw a recommendation to annotate the servlet code with something like: @PersistenceUnit private EntityManagerFactory emf; Of course, with Wicket, we don't write a servlet...and now I'm drawing a blank as to where I should go next?. I'm guessing I'm not the first to get here...does anyone have a recommendation for what direction I should be going next? TIA! Chris -- - Chris Merrill | Web Performance, Inc. ch...@webperformance.com| http://webperformance.com 919-433-1762| 919-845-7601 Website Load Testing and Stress Testing Software & Services - - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Not a Wicket question but ...
> Hibernate forum is under upgrading right now. For like three weeks now. So frustrating when you want to check docs. >_< Remind me to mirror them when the site's back up again. On Thu, Apr 30, 2009 at 8:48 PM, HHB wrote: > > Hibernate forum is under upgrading right now. > Any way, by appending characterEncoding to the end of the URL connection, > things work correctly. > > > nino martinez wael wrote: >> >> I'd goto the spring forum or hibernate, depending if you use spring >> for wiring hibernate or not... It has nothing todo with C3P0 afaik. >> >> 2009/4/30 HHB : >>> Hey, >>> I understand this is not a Wicket question but I hope I can get some >>> help. >>> Our application uses c3p0 connection pooling. >>> How to set the character encoding for database connection? >>> Even if you aware of how to set the character encoding for Apache DBCP, I >>> will >>> be thankful. >>> The application is built on: Spring 2.5 / Hibernate 3 / Wicket 1.3.5 >>> Thanks. >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/Not-a-Wicket-question-but-...-tp23311586p23312035.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TreeTable and column issues
I ran into similar problems, and decided to take a different approach. See http://javathoughts.capesugarbird.com/2009/03/jquery-tree-table-for-wicket.html. Julian -- View this message in context: http://www.nabble.com/TreeTable-and-column-issues-tp23302841p23325974.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Analyzing Request Logger
Shouldn't this: long max = runtime.maxMemory() / 100; long total = runtime.totalMemory() / 100; long used = total - runtime.freeMemory() / 100; be this: long max = runtime.maxMemory() / 1048576; long total = runtime.totalMemory() / 1048576; long used = total - runtime.freeMemory() / 1048576; Douglas Ferguson mobile: 512.293.7279 office/fax: 512.462.0408 skype: stillrecording aim: DaAmericanRuse - http://www.linkedin.com/in/douglasferguson http://www.myspace.com/douglasferguson http://www.douglasferguson.us/ http://www.distilleryrecords.com/ http://www.stillrecording.com/ Join my mailing list: distilleryrecords-subscr...@yahoogroups.com From: Jeremy Thomerson [jer...@wickettraining.com] Sent: Thursday, April 30, 2009 2:43 PM To: users@wicket.apache.org Subject: Re: Analyzing Request Logger That's the great thing about open source - you have the source. You can view the source. And the source answers many of your questions. http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/RequestLogger.java?view=markup Use the source Luke! May the source be with you! After you take a look at that, let us know what questions you still have. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Apr 30, 2009 at 2:35 PM, Douglas Ferguson wrote: > Howdy, > > I turned on the request logger and now I'm trying to figure out what this is > telling me. > > Specifically... > > 1) What does sessionsize return? Is the size in bytes? > 2) total & used - is this for the entire VM? > 3) what is time vs. total time? > 4) is time in mili-seconds? > 5) I set the window size to 0 because I was worried about this effecting > performance? Is this wise? > 6) Does the request logger effect performance? Is it safe to run in > production? > > > Douglas > > Apr 30 14:33:37 INFO [TP-Processor8] http.RequestLogger - > time=191,event=Interface[target:MediaOutletAddOrEdit$MediaOutletForm$4(dataPanel:contentCenterBox:addMediaOutletForm:add), > page: com.conducive.ui.userPages.contacts.media.Media(3), interface: > IActivePageBehaviorListener.onRequest],response=PageRequest[com.conducive.ui.userPages.contacts.media.Media(3)],sessionid=FD21BB53EF7C09B81C5C50360D1CA670,sessionsize=82369,sessionstart=Thu > Apr 30 14:32:48 CDT > 2009,requests=31,totaltime=8799,activerequests=1,maxmem=133M,total=58M,used=52M > > > > Douglas Ferguson > > mobile: 512.293.7279 > office/fax: 512.462.0408 > skype: stillrecording > aim: DaAmericanRuse > > - > > http://www.linkedin.com/in/douglasferguson > http://www.myspace.com/douglasferguson > http://www.douglasferguson.us/ > http://www.distilleryrecords.com/ > http://www.stillrecording.com/ > > Join my mailing list: distilleryrecords-subscr...@yahoogroups.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Analyzing Request Logger
Fair Enough.. But, what's your advice on RequestWindowSize & running this in production? Douglas Ferguson mobile: 512.293.7279 office/fax: 512.462.0408 skype: stillrecording aim: DaAmericanRuse - http://www.linkedin.com/in/douglasferguson http://www.myspace.com/douglasferguson http://www.douglasferguson.us/ http://www.distilleryrecords.com/ http://www.stillrecording.com/ Join my mailing list: distilleryrecords-subscr...@yahoogroups.com From: Jeremy Thomerson [jer...@wickettraining.com] Sent: Thursday, April 30, 2009 2:43 PM To: users@wicket.apache.org Subject: Re: Analyzing Request Logger That's the great thing about open source - you have the source. You can view the source. And the source answers many of your questions. http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/RequestLogger.java?view=markup Use the source Luke! May the source be with you! After you take a look at that, let us know what questions you still have. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Apr 30, 2009 at 2:35 PM, Douglas Ferguson wrote: > Howdy, > > I turned on the request logger and now I'm trying to figure out what this is > telling me. > > Specifically... > > 1) What does sessionsize return? Is the size in bytes? > 2) total & used - is this for the entire VM? > 3) what is time vs. total time? > 4) is time in mili-seconds? > 5) I set the window size to 0 because I was worried about this effecting > performance? Is this wise? > 6) Does the request logger effect performance? Is it safe to run in > production? > > > Douglas > > Apr 30 14:33:37 INFO [TP-Processor8] http.RequestLogger - > time=191,event=Interface[target:MediaOutletAddOrEdit$MediaOutletForm$4(dataPanel:contentCenterBox:addMediaOutletForm:add), > page: com.conducive.ui.userPages.contacts.media.Media(3), interface: > IActivePageBehaviorListener.onRequest],response=PageRequest[com.conducive.ui.userPages.contacts.media.Media(3)],sessionid=FD21BB53EF7C09B81C5C50360D1CA670,sessionsize=82369,sessionstart=Thu > Apr 30 14:32:48 CDT > 2009,requests=31,totaltime=8799,activerequests=1,maxmem=133M,total=58M,used=52M > > > > Douglas Ferguson > > mobile: 512.293.7279 > office/fax: 512.462.0408 > skype: stillrecording > aim: DaAmericanRuse > > - > > http://www.linkedin.com/in/douglasferguson > http://www.myspace.com/douglasferguson > http://www.douglasferguson.us/ > http://www.distilleryrecords.com/ > http://www.stillrecording.com/ > > Join my mailing list: distilleryrecords-subscr...@yahoogroups.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Share Localization across many pages/componets
aaah, that makes sense... On Apr 30, 2009, at 4:29 PM, Jeremy Thomerson wrote: put it all in MyApp.properties or MyBasePage.properties. There's a very good section on this in WiA book, and I know that someone also did a good blog post about it around a year ago. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Apr 30, 2009 at 3:22 PM, Ryan McKinley wrote: I'm finally getting around to localizing my application -- the wicket tools for this are awesome, thank you! Everything works great when I follow the standard pattern: page.html page.properties page_es.properties This is all fine and good, but in practice, I have many strings that are duplicated across many pages/components and don't want to maintain duplicate translations etc. How do people generally solve this problem? I don't see any references on the wiki/web -- perhaps a custom ResourceStreamLocator? Is there a standard way to consolidate all my localization rather then sprinkled within my source tree? Thanks for any pointers Ryan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Share Localization across many pages/componets
put it all in MyApp.properties or MyBasePage.properties. There's a very good section on this in WiA book, and I know that someone also did a good blog post about it around a year ago. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Apr 30, 2009 at 3:22 PM, Ryan McKinley wrote: > I'm finally getting around to localizing my application -- the wicket tools > for this are awesome, thank you! > > Everything works great when I follow the standard pattern: > page.html > page.properties > page_es.properties > > This is all fine and good, but in practice, I have many strings that are > duplicated across many pages/components and don't want to maintain duplicate > translations etc. > > How do people generally solve this problem? I don't see any references on > the wiki/web -- perhaps a custom ResourceStreamLocator? Is there a standard > way to consolidate all my localization rather then sprinkled within my > source tree? > > Thanks for any pointers > > Ryan > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Share Localization across many pages/componets
I'm finally getting around to localizing my application -- the wicket tools for this are awesome, thank you! Everything works great when I follow the standard pattern: page.html page.properties page_es.properties This is all fine and good, but in practice, I have many strings that are duplicated across many pages/components and don't want to maintain duplicate translations etc. How do people generally solve this problem? I don't see any references on the wiki/web -- perhaps a custom ResourceStreamLocator? Is there a standard way to consolidate all my localization rather then sprinkled within my source tree? Thanks for any pointers Ryan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Analyzing Request Logger
That's the great thing about open source - you have the source. You can view the source. And the source answers many of your questions. http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/RequestLogger.java?view=markup Use the source Luke! May the source be with you! After you take a look at that, let us know what questions you still have. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Apr 30, 2009 at 2:35 PM, Douglas Ferguson wrote: > Howdy, > > I turned on the request logger and now I'm trying to figure out what this is > telling me. > > Specifically... > > 1) What does sessionsize return? Is the size in bytes? > 2) total & used - is this for the entire VM? > 3) what is time vs. total time? > 4) is time in mili-seconds? > 5) I set the window size to 0 because I was worried about this effecting > performance? Is this wise? > 6) Does the request logger effect performance? Is it safe to run in > production? > > > Douglas > > Apr 30 14:33:37 INFO [TP-Processor8] http.RequestLogger - > time=191,event=Interface[target:MediaOutletAddOrEdit$MediaOutletForm$4(dataPanel:contentCenterBox:addMediaOutletForm:add), > page: com.conducive.ui.userPages.contacts.media.Media(3), interface: > IActivePageBehaviorListener.onRequest],response=PageRequest[com.conducive.ui.userPages.contacts.media.Media(3)],sessionid=FD21BB53EF7C09B81C5C50360D1CA670,sessionsize=82369,sessionstart=Thu > Apr 30 14:32:48 CDT > 2009,requests=31,totaltime=8799,activerequests=1,maxmem=133M,total=58M,used=52M > > > > Douglas Ferguson > > mobile: 512.293.7279 > office/fax: 512.462.0408 > skype: stillrecording > aim: DaAmericanRuse > > - > > http://www.linkedin.com/in/douglasferguson > http://www.myspace.com/douglasferguson > http://www.douglasferguson.us/ > http://www.distilleryrecords.com/ > http://www.stillrecording.com/ > > Join my mailing list: distilleryrecords-subscr...@yahoogroups.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Analyzing Request Logger
Howdy, I turned on the request logger and now I'm trying to figure out what this is telling me. Specifically... 1) What does sessionsize return? Is the size in bytes? 2) total & used - is this for the entire VM? 3) what is time vs. total time? 4) is time in mili-seconds? 5) I set the window size to 0 because I was worried about this effecting performance? Is this wise? 6) Does the request logger effect performance? Is it safe to run in production? Douglas Apr 30 14:33:37 INFO [TP-Processor8] http.RequestLogger - time=191,event=Interface[target:MediaOutletAddOrEdit$MediaOutletForm$4(dataPanel:contentCenterBox:addMediaOutletForm:add), page: com.conducive.ui.userPages.contacts.media.Media(3), interface: IActivePageBehaviorListener.onRequest],response=PageRequest[com.conducive.ui.userPages.contacts.media.Media(3)],sessionid=FD21BB53EF7C09B81C5C50360D1CA670,sessionsize=82369,sessionstart=Thu Apr 30 14:32:48 CDT 2009,requests=31,totaltime=8799,activerequests=1,maxmem=133M,total=58M,used=52M Douglas Ferguson mobile: 512.293.7279 office/fax: 512.462.0408 skype: stillrecording aim: DaAmericanRuse - http://www.linkedin.com/in/douglasferguson http://www.myspace.com/douglasferguson http://www.douglasferguson.us/ http://www.distilleryrecords.com/ http://www.stillrecording.com/ Join my mailing list: distilleryrecords-subscr...@yahoogroups.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tools for Managing a Wicket Project
As long as you clear out things like nightlies and snapshots it's not too bad. Otherwise, things can get massive. On Thu, Apr 30, 2009 at 11:47 AM, Andrew Lombardi wrote: > Martijn, > > a local version of artifactory? doesn't that get ... large? > > or are you just talking about ~/.m2/repository? -- Nick Heudecker Professional Wicket Training & Consulting http://www.systemmobile.com
Re: Tools for Managing a Wicket Project
Martijn, a local version of artifactory? doesn't that get ... large? or are you just talking about ~/.m2/repository? On Apr 29, 2009, at 4:02 PM, Martijn Dashorst wrote: Our current stack: - maven - Java 6 - hibernate - spring - Wicket - svn - hudson - artifactory (though we might switch to another one) [ - sonar (icing on the cake) ] Wendy Smoak taught me an valuable lesson: use a company repository manager for maven, and a local one on your machine. This way you can run maven offline as well (after downloading the internet first). Martijn On Wed, Apr 29, 2009 at 5:13 PM, Dane Laverty wrote: My boss has asked me to manage development for a Java project. I'm going to be working with two other programmers and one designer. This is the first time that our organization has tried to formally coordinate several programmers on a project together, and it is also the first Java project we've done here (I'm the only programmer with extensive Java experience). I chose to use Wicket for this project because it seemed to be the most intuitive framework, and because I hope it will make it easy for the designer and programmers to work together without stepping on each others toes. At my previous job, we used CVS for managing code contribution and Ant for deployment. Is that still a good solution, or should I be looking at other tools? Also, how do you coordinate the designer's work with the programmers' work? My goal is to find a few tools that - work well with Wicket - make it easy for programmers to check code in and out - manage project dependencies - are easy to set up - are easy to use - are free I appreciate any and all suggestions. Thanks for your help! -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 949-528-6480 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.mysticcoders.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
Re: ModalWindows...
Thank you all. I havnt tried these yet, but I think I got what I was looking for. thanks Vidhya --- On Thu, 4/30/09, Vladimir K wrote: From: Vladimir K Subject: Re: ModalWindows... To: users@wicket.apache.org Date: Thursday, April 30, 2009, 3:16 AM https://issues.apache.org/jira/browse/WICKET-2249 vote for it nino martinez wael wrote: > > Very true > +1 for adding a overridable method > > 2009/4/30 Vladimir K : >> >> put the following into the section of your page: >> >> >> jQuery(document).ready(function(){ >> if (typeof Wicket != 'undefined' && >> Wicket.Window) >> Wicket.Window.unloadConfirmation = >> false; >> }); >> >> >> I don't like this approach because it violateds incapsulation. It should >> has >> been implemented as overridable method of ModalWindow. >> >> >> Vidhya Kailash wrote: >>> >>> 1. How do I disable the popup that comes on click inside the modal >>> window: >>> "Are you sure you want to navigate away from this page"? >>> >> >> -- >> View this message in context: >> http://www.nabble.com/ModalWindows...-tp23300556p23309702.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/ModalWindows...-tp23300556p23311160.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-Guice: Inject into Session
i dont know of any myself. re elephas, i also dont know, i dont really work on it. -igor On Thu, Apr 30, 2009 at 12:58 AM, Maarten Bosteels wrote: > Hello Igor, > > I really like the idea behind Salve. > Are there any open source applications using it, except elephas [1] ? > > I already got a lot of inspiration from the elephas source code, but > that project seems to have stalled a bit, right ? > > [1] http://code.google.com/p/elephas/ > > Thanks, > Maarten > > On Wed, Apr 29, 2009 at 6:39 PM, Igor Vaynberg > wrote: >> i dont know how fdiotalevi works. >> >> you can do it however you want as long as you either dont add a >> serializable field to the session or you do add a field but it >> contains some sort of serialization-safe proxy. >> >> -igor >> >> On Wed, Apr 29, 2009 at 1:18 AM, wrote: >>> This sounds good, Igor. >>> >>> But I have a question. >>> >>> If I only use EJB 3.0/JPA with http://code.google.com/p/fdiotalevi/ >>> (no Spring, no Guice, no Salve), then how would I let a session object >>> hold on to references to services and yet remain lightweight? >>> >>> Is there any information about best Wicket practices, patterns for >>> session objects and pages that need EJB references? >>> >>> What would be in your opinion the most robust approach to this >>> starting with the technologies that I am already using? >>> >>> Would it be better to use look-ups like >>> InitialContext#lookup("java:comp/env/.");instead of @EJB >>> injection? >>> >>> I thought Wicket and EJB 3.0 makes a fairly robust and compact and >>> easy to learn set of technologies, but I understand your concerns, and >>> I have been looking for an answer in this area for a while. >>> >>> I use @EJB session bean injection in pages but I wonder what happens >>> to the references as these are pooled resources that have a price. >>> >>> Many thanks, >>> Bernard >>> >>> On Tue, 28 Apr 2009 23:42:02 -0700, you wrote: >>> there is absolutely nothing wrong with having authenticate() on session. this kind of thinking is exactly what is wrong with the current state of java technology. session is an object in wicket, why should it fall prey to the anemic data model antipattern? why should it contain data only and no behavior? what looks better? session.setuserid(long id); session.getuserid(); or session.authenticate(credentials cred); session.getuserid(); the former has absolutely no encapsulation or protection of data, anyone can set whatever id they want via a simple call to setuserid(). the latter properly encapsulates the user id and protects against code abuse. there are a number of technologies that allow you to break out of the anemic data model mold by allowing, in this case the session, objects to hold on to references to services and yet remain lightweight. wicket provides the lightweight serializable proxies which can be used inside any object. class mysession extends websession { @SpringBean/@Inject private SessionFactory sf; private long id; <== id is private with no direct setter public mysession(webrequest req) { super(req); injectionholder.getinjector().inject(this); <== injects sf var } public void authenticate(credentials creds) throws AuthException { user u=sf.getnamedquery("auth").. id=u.getid(); } salve.googlecode.com removes the reference field altogether and rewrites field access with a lookup. class mysession extends websession { @Dependency private SessionFactory sf; <== field will be removed via bytecode instrumentation leaving the session object lightweight and serializable private long id; <== id is private with no direct setter public mysession(webrequest req) { super(req); } public void authenticate(credentials creds) throws AuthException { user u=sf.getnamedquery("auth") <== this access to the removed sf field will be rewritten as a lookup from configured ioc container ... id=u.getid(); } -igor On Tue, Apr 28, 2009 at 9:49 PM, Marc Ende wrote: > Hmm... I'm not sure why it's done this way in the > AuthenticatedWebSession but > nevertheless it's the only task of a session object to keep informations > between > two requests. From this point of view a authenticate(String,String) > doesnt' really > make sense in the Class. May be there is someone here who can explain this > point. I wouldn't say that this is wrong, but unusual... :) > > May be you can get the database connection from inside the method for > authentication purposes, > Then you haven't got any private or public members which should be > serialized and contains a database connection. > > m. > > > Jan Torben Heuer
Re: GWT-like
i did not say it was a bad idea to embed js components, i said it was a bad idea to try and build a gwt-like fat-client using wicket. for that there is gwt. -igor On Wed, Apr 29, 2009 at 10:47 PM, Vladimir K wrote: > > Igor, I believe it is not so bad idea to embed third-party JS components with > ease (those who are capable to wrap existing div tag). > > 1. Wicket applications can be leveraged by many well designed and tested JS > components > 2. It reduces hardware requirements and imroves scalability due to smaller > number of client-server roundtrips > 3. There are the cases where it is better to design component is JS instead > of Java, for instance imagine full calendar component (like MS outlook has), > dynamic charts (including Gantt), rich text editor and so on. Even any > drill-down component (menu, panel) is better to design in JS. > > Probably wicket should be capable of transferring js-component's client > state to backing server-side component when handling the client event. > Creating a hidden text input and serializing js-component state to it before > submit will work. Just for synchronization. Concerning events it seems we > just can use exising behaviors. > > I believe wicket ui in most cases is as fast as ajaxy js ui because in both > cases we have to exchange some packages of data and access the database. And > there should be the cases where wicket is faster because it can just apply > innerHtml. JS has to parse the response and do something with dom. > But there are the cases like tab control as mentioned, where we don't need > server roundtrip to switch tabs. From the other hand we probably just need > to optimize existing AjaxTabbedPanel to allow the settings on tab > (ajax/static). Depending on this setting the appropriate links will be > rendered on the tab captions. > > Concerning GWT ... just have a look at response times of Compiere 3.0 on > latest Google Chrome. On my 2.4Ghz desktop it takes about 7 seconds between > click on radio-button and see that selection is changed. GWT is out of the > scope. > > > igor.vaynberg wrote: >> >> dont try to make wicket into gwt. if you want a fat client then use >> gwt, if you want a server-side app then use wicket. >> >> -igor >> >> On Wed, Apr 29, 2009 at 8:06 AM, kan wrote: >>> Is there any easy way to make wicket applications like GWT? I mean to >>> make a "heavy client side", so it will allow easy manage data >>> pre-loading and requests (AJAX too) caching. The aim is to minimize >>> amount of web-server requests. >>> Say, I have several tabs on a page. Some tabs should have all data >>> pre-loaded and switched immediately (no requests to server). Some tabs >>> are "big", so they do an AJAX request for data, but only if a tab is >>> opened first time. >>> >>> -- >>> WBR, kan. >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/GWT-like-tp23299279p23310287.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tools for Managing a Wicket Project
Dane Laverty wrote: > My boss has asked me to manage development for a Java project. I'm going to > be working with two other programmers and one designer. > > This is the first time that our organization has tried to formally > coordinate several programmers on a project together, and it is also the > first Java project we've done here (I'm the only programmer with extensive > Java experience). I chose to use Wicket for this project because it seemed > to be the most intuitive framework, and because I hope it will make it easy > for the designer and programmers to work together without stepping on each > others toes. > > At my previous job, we used CVS for managing code contribution and Ant for > deployment. Is that still a good solution, or should I be looking at other > tools? Also, how do you coordinate the designer's work with the programmers' > work? > > My goal is to find a few tools that > - work well with Wicket > - make it easy for programmers to check code in and out > - manage project dependencies > - are easy to set up > - are easy to use > - are free > > I appreciate any and all suggestions. Thanks for your help! > > Go to http://www.pragprog.com/titles/prj/ship-it and at least buy the eBook. It's $20 and will save you at least 10 times that in headaches. Confidential/Privileged information may be contained in this email. If you are not the intended recipient, please do not copy, distribute or use it for any purpose, nor disclose its contents to any other person. Please notify the sender immediately if you receive this in error. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Weird DatePicker / DateTextField off by one hour
https://issues.apache.org/jira/browse/WICKET-1314 Ryan Gravener http://isithotinhereorisitjust.me | http://twitter.com/ryangravener On Thu, Apr 30, 2009 at 11:28 AM, Ryan Gravener wrote: > What version of wicket, what timezone? >
Chrome and Ajax
I know this topic has been discussed before but I don't see any answers. I use wicket 1.4-rc2 and have some problems with Chrome and Ajax. It sometimes work and sometimes not. The same code workes in Firefox 2,3 Mac & Pc, IE6, IE7, Opera, safari but not in chrome. Anyone clues?
Re: Weird DatePicker / DateTextField off by one hour
What version of wicket, what timezone? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket URL rewrite in Opera
I have tried the QueryStringUrlCodingStrategy and it workes but I want to use an version of HybridUrlCodingStrategy -- View this message in context: http://www.nabble.com/wicket-URL-rewrite-in-Opera-tp23315100p23316582.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-push project
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core Am 30.04.2009 um 15:15 schrieb Eman Nollase: Hello, As I browse to wicketstuff repository the wicket-push project is already gone? Thanks. Cheers. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket-push project
Hello, As I browse to wicketstuff repository the wicket-push project is already gone? Thanks. Cheers.
Re: How to remove a row from DataTable?
Actually is the wicket coders that uses this style in amost every component. -- View this message in context: http://www.nabble.com/How-to-remove-a-row-from-DataTable--tp23312849p23315231.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket URL rewrite in Opera
Hi, My wicket site works in IE6, IE7, Safari, Firefox 2,3 but not in Opera. When first visiting the site everything works fine but when requesting an item opera gives me an error message. The message is in swedish but this is a free translation ( "URL is redirected to .Click on the link to visit the page." ) Here are some links to the webpage. www.eddyemery.com www.eddyemery.com/items/brand/17 the first time I visit the link it works but if I refresh the page it does not. I use NonVersionedHybridUrlCodingStrategy that I have copied from a user from this forum ( can not remeber from who ) public final class NonVersionedHybridUrlCodingStrategy extends HybridUrlCodingStrategy { public NonVersionedHybridUrlCodingStrategy(String mountPath, Class pageClass) { super(mountPath, pageClass); } @Override protected String addPageInfo(String url, PageInfo pageInfo) { // Do not add the version number as super.addPageInfo would do. return url.replace( ".", "" ); } }
Re: How to remove a row from DataTable?
Thanks, your suggestion works like a charm. I like the technique of using abstract method, you have a Swing development background, right? Thanks again. Mathias P.W Nilsson wrote: > > I don't know if you can remove one row and just update the row as you can > with TreeTable but maybe some here could guide you. > > If it is good enough to update the whole table then maybe somthing like > this. this is typed from my head so there may be errors. > > public abstract DeleteContactPanel extends Panel{ > public DeleteContactPanel(String id, final Contact contact) { > super(id); > setOutputMarkupId(true); > final Form form = new Form("form"); > form.add(new AjaxSubmitLink("delete") { > @Override > protected void onSubmit(AjaxRequestTarget target, Form form) { > service.deleteContact(contact); > onDelete( target ); > System.out.println("OK Deleted"); > } > }); > add(form); > } > public abstract void onDelete( AjaxrequestTarget target ); > } > > > final List columns = new ArrayList(); > columns.add(new AbstractColumn(new Model("Delete")) { > public void populateItem(Item cellItem, String componentId, IModel > rowModel) { > Contact contact = ((Contact) rowModel.getObject()); > cellItem.add(new DeleteContactPanel(componentId, contact){ > public void onDelete( AjaxRequestTarget target ){ > // Add table here and show flashmessage > info( "Row deleted" ); > target.addComponent( feedback ); > target.addComponent( datatable ); > } > }); > } > }); > > > -- View this message in context: http://www.nabble.com/How-to-remove-a-row-from-DataTable--tp23312849p23314945.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Weird DatePicker / DateTextField off by one hour
Hi Ryan, this should be a timezone issue. The date is timezone sensitive, so take a look at java.util.TimeZone and especially at what timezone your datepicker / datefield is set to use. You might have to override that. Have a look to the Timezone of the Date object in your debugger before persisting to DB, and afterwards. I bet there's a TZ conversion happening somwhere that subtracts that one hour you are missing. Also check for Daylight Savings time, that might explain why it only happens with certain dates. BR, Stephan Ryan LaHue wrote: > I have a DateTextField to which I am adding a DatePicker. The Display works > fine: if I select 4/1/2009 using the DatePicker and I save the form data to > my database, then populate the form again from values in the database, I am > seeing 4/1/2009. > > But when I look at my database I see that the stored date is actually > 3/31/2009 23:00:00, which is 1 hour before 4/1/2009. > > This does not seem to be a Locale issue (that I can tell), as I am running > everything on my local machine. Also, the odd thing is that when I select > 4/1/2009 through 4/5/2009 I get a date stored in my database which is 1 hour > before the selected date. But when I select anything from 4/6/2009 through > 4/30/2009 the date is stored correctly. > > I added log statements when the info is loaded from the database and before > it is persisted, and the issue is within the web application. When I print > the dates before persisting them to the database they are wrong by 1 hour, > for 4/1/2009 through 4/5/2009. > > I had the same issue with yui.DateField, but I'm not sure if this is a YUI > DatePicker issue or something else I am not considering or doing correctly. > > Here's a snippet of my code: > > DateTextField appointmentPickerTextField = new > DateTextField("dayOfYear", new PropertyModel(appointment, "dayOfYear"), new > StyleDateConverter(false)) { > @Override > public boolean isVisible() { > return appointment.getScheduledDate() != null; > } > }; > appointmentPickerTextField .setRequired(true); > appointmentPickerTextField .add(new DatePicker()); > > Any thoughts? > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tools for Managing a Wicket Project
No tools require an internet connection all the time. The repositories Nexus, Archiva etc are local to your site. They only download from the internet when you ask for something the first time. That is one reason for having a local repository manager. Then you have your personal repository as always with Maven. If you are offline, but have a class library on some media, e.g. a USB stick, you can deploy that to your local repository. Hope this helps. /Per On Thu, Apr 30, 2009 at 12:47 PM, Geeta Madhavi wrote: > Hi... > > U can use Maven,Eclipse latest version for development..Server as Tomcat or > any other you wish..but use Maven instead of ant. And for reference you can > check the Wicket in Action book > > > > On Wed, Apr 29, 2009 at 8:43 PM, Dane Laverty wrote: > >> My boss has asked me to manage development for a Java project. I'm going to >> be working with two other programmers and one designer. >> >> This is the first time that our organization has tried to formally >> coordinate several programmers on a project together, and it is also the >> first Java project we've done here (I'm the only programmer with extensive >> Java experience). I chose to use Wicket for this project because it seemed >> to be the most intuitive framework, and because I hope it will make it easy >> for the designer and programmers to work together without stepping on each >> others toes. >> >> At my previous job, we used CVS for managing code contribution and Ant for >> deployment. Is that still a good solution, or should I be looking at other >> tools? Also, how do you coordinate the designer's work with the >> programmers' >> work? >> >> My goal is to find a few tools that >> - work well with Wicket >> - make it easy for programmers to check code in and out >> - manage project dependencies >> - are easy to set up >> - are easy to use >> - are free >> >> I appreciate any and all suggestions. Thanks for your help! >> > > > > -- > Regards. > Geeta Madhavi. K > -- Varning! E-post till och från Sverige, eller som passerar servrar i Sverige, avlyssnas av Försvarets Radioanstalt, FRA. WARNING! E-mail to and from Sweden, or via servers in Sweden, is monitored by the National Defence Radio Establishment. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tools for Managing a Wicket Project
Hi... U can use Maven,Eclipse latest version for development..Server as Tomcat or any other you wish..but use Maven instead of ant. And for reference you can check the Wicket in Action book On Wed, Apr 29, 2009 at 8:43 PM, Dane Laverty wrote: > My boss has asked me to manage development for a Java project. I'm going to > be working with two other programmers and one designer. > > This is the first time that our organization has tried to formally > coordinate several programmers on a project together, and it is also the > first Java project we've done here (I'm the only programmer with extensive > Java experience). I chose to use Wicket for this project because it seemed > to be the most intuitive framework, and because I hope it will make it easy > for the designer and programmers to work together without stepping on each > others toes. > > At my previous job, we used CVS for managing code contribution and Ant for > deployment. Is that still a good solution, or should I be looking at other > tools? Also, how do you coordinate the designer's work with the > programmers' > work? > > My goal is to find a few tools that > - work well with Wicket > - make it easy for programmers to check code in and out > - manage project dependencies > - are easy to set up > - are easy to use > - are free > > I appreciate any and all suggestions. Thanks for your help! > -- Regards. Geeta Madhavi. K
Re: How to remove a row from DataTable?
I don't know if you can remove one row and just update the row as you can with TreeTable but maybe some here could guide you. If it is good enough to update the whole table then maybe somthing like this. this is typed from my head so there may be errors. public abstract DeleteContactPanel extends Panel{ public DeleteContactPanel(String id, final Contact contact) { super(id); setOutputMarkupId(true); final Form form = new Form("form"); form.add(new AjaxSubmitLink("delete") { @Override protected void onSubmit(AjaxRequestTarget target, Form form) { service.deleteContact(contact); onDelete( target ); System.out.println("OK Deleted"); } }); add(form); } public abstract void onDelete( AjaxrequestTarget target ); } final List columns = new ArrayList(); columns.add(new AbstractColumn(new Model("Delete")) { public void populateItem(Item cellItem, String componentId, IModel rowModel) { Contact contact = ((Contact) rowModel.getObject()); cellItem.add(new DeleteContactPanel(componentId, contact){ public void onDelete( AjaxRequestTarget target ){ // Add table here and show flashmessage info( "Row deleted" ); target.addComponent( feedback ); target.addComponent( datatable ); } }); } }); -- View this message in context: http://www.nabble.com/How-to-remove-a-row-from-DataTable--tp23312849p23313786.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tools for Managing a Wicket Project
What does sonar do? Where can I get "effective java"? That's one of our problems actually. When we go on site in clients we have a hard time going to our centralized tools. I have been looking for an offline bugzilla or trac of some sort. Similar to offline gmail. I'm looking to also setup a distributed maven repository. Per our experience, all our tools become useless when there is no internet connection available, and sadly, most of our clients don't provide on. On Thu, Apr 30, 2009 at 7:02 AM, Martijn Dashorst < martijn.dasho...@gmail.com> wrote: > Our current stack: > - maven > - Java 6 > - hibernate > - spring > - Wicket > - svn > - hudson > - artifactory (though we might switch to another one) > [ - sonar (icing on the cake) ] > > Wendy Smoak taught me an valuable lesson: use a company repository > manager for maven, and a local one on your machine. This way you can > run maven offline as well (after downloading the internet first). > > Martijn > > On Wed, Apr 29, 2009 at 5:13 PM, Dane Laverty > wrote: > > My boss has asked me to manage development for a Java project. I'm going > to > > be working with two other programmers and one designer. > > > > This is the first time that our organization has tried to formally > > coordinate several programmers on a project together, and it is also the > > first Java project we've done here (I'm the only programmer with > extensive > > Java experience). I chose to use Wicket for this project because it > seemed > > to be the most intuitive framework, and because I hope it will make it > easy > > for the designer and programmers to work together without stepping on > each > > others toes. > > > > At my previous job, we used CVS for managing code contribution and Ant > for > > deployment. Is that still a good solution, or should I be looking at > other > > tools? Also, how do you coordinate the designer's work with the > programmers' > > work? > > > > My goal is to find a few tools that > > - work well with Wicket > > - make it easy for programmers to check code in and out > > - manage project dependencies > > - are easy to set up > > - are easy to use > > - are free > > > > I appreciate any and all suggestions. Thanks for your help! > > > > > > -- > Become a Wicket expert, learn from the best: http://wicketinaction.com > Apache Wicket 1.3.5 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: confirm leave page when a page contains unsaved data
I think the approach similar to one used in CheckGroup would work. I just wondered if it has already been implemented. Newgro wrote: > > Vladimir Kovalyuk schrieb: >> Do wicket has a generic approach to handling the following scenario? >> >> 1. user opens a page with details of some entity, for instance a user. >> 2. user starts to type in fields >> 3. user clicks some link, then she is informed that the form contains >> unsaved data and asked to press "discard and proceed", "save and proceed" >> or >> "cancel". >> >> > Nope. How should wicket decide on that? It's business logic. And so you > have to present the dialog > (modal window?) yourself. Alternatively you could an javascript alert. > > Cheers > Per > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/confirm-leave-page-when-a-page-contains-unsaved-data-tp23312432p23313202.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Exceptions after Tomcat restart
Thanks a lot, Igor! Your hint was very helpful! Am Freitag, den 24.04.2009, 10:03 -0700 schrieb Igor Vaynberg: > turn off session persistence in tomcat across restarts. > > -igor > > On Fri, Apr 24, 2009 at 4:28 AM, Liz Huber wrote: > > Hi everybody, > > > > our wicket application behaves in a strange way. After restarting Tomcat > > server in Eclipse everything works fine. But after restarting Tomcat > > server in Eclipse for the second time, Page Expired is shown. Several > > Exceptions appear in log file, but I don't know, how to get rid of them. > > After the next restart everything is fine again. The problem does not > > just appear in combination with Eclipse. > > > > I found an issue (https://issues.apache.org/jira/browse/WICKET-2022), > > which looks quite similar. > > @Igor: Is my problem the same and fixed in rc3? > > > > Hope, anybody can help. > > Liz > > > > These exceptions occur the most: > > _ > > > > 2009-04-09 09:28:17,262 > > [ContainerBackgroundProcessor[StandardEngine[Catalina]]] > > org.apache.catalina.session.StandardManager::start ERROR Exception > > loading sessions from persistent storage > > java.lang.ExceptionInInitializerError > >at sun.misc.Unsafe.ensureClassInitialized(Native Method) > >at > > sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25) > >at > > sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122) > >at java.lang.reflect.Field.acquireFieldAccessor(Field.java:917) > >at java.lang.reflect.Field.getFieldAccessor(Field.java:898) > >at java.lang.reflect.Field.getLong(Field.java:527) > >at > > java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1586) > >at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52) > >at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:408) > >at java.security.AccessController.doPrivileged(Native Method) > >at java.io.ObjectStreamClass.(ObjectStreamClass.java:400) > >at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297) > >at > > java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:531) > >at > > java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552) > >at > > java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) > >at > > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699) > >at > > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) > >at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) > >at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore > > $SecondLevelCachePageMap.readObject(SecondLevelCacheSessionStore.java:403) > >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > >at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > >at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > >at java.lang.reflect.Method.invoke(Method.java:585) > >at > > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) > >at > > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) > >at > > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) > >at > > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) > >at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) > >at > > org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1402) > >at > > org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:931) > >at > > org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:394) > >at > > org.apache.catalina.session.StandardManager.load(StandardManager.java:321) > >at > > org.apache.catalina.session.StandardManager.start(StandardManager.java:637) > >at > > org.apache.catalina.core.StandardContext.start(StandardContext.java:4166) > >at > > org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025) > >at > > org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432) > >at > > org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278) > >at org.apache.catalina.core.ContainerBase > > $ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570) > >at org.apache.catalina.core.ContainerBase > > $ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) > >at org.apache.catalina.core.ContainerBase > > $ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) > >at org.apache.catalina.core.ContainerBase > > $ContainerBackgroundProcessor.run(ContainerBase.java:1559) > >at java.lang.Thread.run(Thread.java:595) > > Caused by: org.apache.wicket.WicketRuntimeException: There is no > > application attached to current thread > > ContainerBackgroundProcessor[StandardEngine[C
How to remove a row from DataTable?
Hey, I employed AjaxFallbackDefaultDataTable to list contacts. The last column contains a delete link that I created it this way: final List columns = new ArrayList(); columns.add(new AbstractColumn(new Model("Delete")) { public void populateItem(Item cellItem, String componentId, IModel rowModel) { Contact contact = ((Contact) rowModel.getObject()); cellItem.add(new DeleteContactPanel(componentId, contact)); } }); public DeleteContactPanel(String id, final Contact contact) { super(id); setOutputMarkupId(true); final Form form = new Form("form"); form.add(new AjaxSubmitLink("delete") { @Override protected void onSubmit(AjaxRequestTarget target, Form form) { service.deleteContact(contact); System.out.println("OK Deleted"); } }); add(form); } When deleting the contact from the database, I want to remove its row also from AjaxFallbackDefaultDataTable and display a message. But I'm not sure how to accomplish this? I mean how to communicate between DeleteActionPanel and the DataTable? Would you please help me? Thanks for help and time. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: confirm leave page when a page contains unsaved data
Vladimir Kovalyuk schrieb: Do wicket has a generic approach to handling the following scenario? 1. user opens a page with details of some entity, for instance a user. 2. user starts to type in fields 3. user clicks some link, then she is informed that the form contains unsaved data and asked to press "discard and proceed", "save and proceed" or "cancel". Nope. How should wicket decide on that? It's business logic. And so you have to present the dialog (modal window?) yourself. Alternatively you could an javascript alert. Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
confirm leave page when a page contains unsaved data
Do wicket has a generic approach to handling the following scenario? 1. user opens a page with details of some entity, for instance a user. 2. user starts to type in fields 3. user clicks some link, then she is informed that the form contains unsaved data and asked to press "discard and proceed", "save and proceed" or "cancel".
Re: Not a Wicket question but ...
Hibernate forum is under upgrading right now. Any way, by appending characterEncoding to the end of the URL connection, things work correctly. nino martinez wael wrote: > > I'd goto the spring forum or hibernate, depending if you use spring > for wiring hibernate or not... It has nothing todo with C3P0 afaik. > > 2009/4/30 HHB : >> Hey, >> I understand this is not a Wicket question but I hope I can get some >> help. >> Our application uses c3p0 connection pooling. >> How to set the character encoding for database connection? >> Even if you aware of how to set the character encoding for Apache DBCP, I >> will >> be thankful. >> The application is built on: Spring 2.5 / Hibernate 3 / Wicket 1.3.5 >> Thanks. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/Not-a-Wicket-question-but-...-tp23311586p23312035.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why I'm getting NPE?
What is the stacktrace when group is null? On 29/04/2009, HHB wrote: > Hey, > I'm trying to employ DataTable in our application. > * > public class SortableContactDataProvider > extends SortableDataProvider { > > @SpringBean > private Service service; > > private Group group; > > public SortableContactDataProvider(Group group) { > if (group == null) > throw new IllegalStateException("Group is null"); > InjectorHolder.getInjector().inject(this); > setSort("gsm", true); > this.group = group; > } > > public Iterator iterator(int first, int max) { > return service.list(group, first, max, > getSort().getProperty(), > getSort().isAscending()).iterator(); > } > > public int size() { > return service.listContactsSize(group); > } > > public IModel model(Object object) { > Contact contact = (Contact) object; > return new DomainEntityModel >(Contact.class, contact.getId()); > } > > public void setGroup(Group group) { > if (group == null) >throw new IllegalStateException("Group is null"); > this.group = group; > } > > } > * > And I use it this way (inside the panel constructor): > * > Group group = new Group();group.setId(1L); > SortableContactDataProvider scdp = new >SortableContactDataProvider(group); > scdp.setGroup(group); > final List columns = new ArrayList(); > columns.add(new PropertyColumn(new Model("GSM"), "gsm", "gsm")); > AjaxFallbackDefaultDataTable contacts = new > AjaxFallbackDefaultDataTable("table", columns, scdp, 10); > final WebMarkupContainer wmc = new WebMarkupContainer("contactsTable"); > wmc.setOutputMarkupId(true); > wmc.add(contacts); > add(wmc); > * > When running the application, I got NullPointerException > from the method size() of the provider, the group object is null. > Why the object is null? > and if it is null, why IllegalStateException is not being thrown? > I'm using Wicket 1.3.5 > Thanks for help. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Not a Wicket question but ...
I'd goto the spring forum or hibernate, depending if you use spring for wiring hibernate or not... It has nothing todo with C3P0 afaik. 2009/4/30 HHB : > Hey, > I understand this is not a Wicket question but I hope I can get some help. > Our application uses c3p0 connection pooling. > How to set the character encoding for database connection? > Even if you aware of how to set the character encoding for Apache DBCP, I will > be thankful. > The application is built on: Spring 2.5 / Hibernate 3 / Wicket 1.3.5 > Thanks. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-Guice: Inject into Session
Hello Igor, I really like the idea behind Salve. Are there any open source applications using it, except elephas [1] ? I already got a lot of inspiration from the elephas source code, but that project seems to have stalled a bit, right ? [1] http://code.google.com/p/elephas/ Thanks, Maarten On Wed, Apr 29, 2009 at 6:39 PM, Igor Vaynberg wrote: > i dont know how fdiotalevi works. > > you can do it however you want as long as you either dont add a > serializable field to the session or you do add a field but it > contains some sort of serialization-safe proxy. > > -igor > > On Wed, Apr 29, 2009 at 1:18 AM, wrote: >> This sounds good, Igor. >> >> But I have a question. >> >> If I only use EJB 3.0/JPA with http://code.google.com/p/fdiotalevi/ >> (no Spring, no Guice, no Salve), then how would I let a session object >> hold on to references to services and yet remain lightweight? >> >> Is there any information about best Wicket practices, patterns for >> session objects and pages that need EJB references? >> >> What would be in your opinion the most robust approach to this >> starting with the technologies that I am already using? >> >> Would it be better to use look-ups like >> InitialContext#lookup("java:comp/env/.");instead of @EJB >> injection? >> >> I thought Wicket and EJB 3.0 makes a fairly robust and compact and >> easy to learn set of technologies, but I understand your concerns, and >> I have been looking for an answer in this area for a while. >> >> I use @EJB session bean injection in pages but I wonder what happens >> to the references as these are pooled resources that have a price. >> >> Many thanks, >> Bernard >> >> On Tue, 28 Apr 2009 23:42:02 -0700, you wrote: >> >>>there is absolutely nothing wrong with having authenticate() on >>>session. this kind of thinking is exactly what is wrong with the >>>current state of java technology. >>> >>>session is an object in wicket, why should it fall prey to the anemic >>>data model antipattern? why should it contain data only and no >>>behavior? >>> >>>what looks better? >>> >>>session.setuserid(long id); >>>session.getuserid(); >>> >>>or >>> >>>session.authenticate(credentials cred); >>>session.getuserid(); >>> >>>the former has absolutely no encapsulation or protection of data, >>>anyone can set whatever id they want via a simple call to setuserid(). >>>the latter properly encapsulates the user id and protects against code >>>abuse. >>> >>>there are a number of technologies that allow you to break out of the >>>anemic data model mold by allowing, in this case the session, objects >>>to hold on to references to services and yet remain lightweight. >>> >>>wicket provides the lightweight serializable proxies which can be used >>>inside any object. >>> >>>class mysession extends websession { >>> @SpringBean/@Inject >>> private SessionFactory sf; >>> private long id; <== id is private with no direct setter >>> public mysession(webrequest req) { >>> super(req); >>> injectionholder.getinjector().inject(this); <== injects sf var >>> } >>> public void authenticate(credentials creds) throws AuthException { >>> user u=sf.getnamedquery("auth").. >>> id=u.getid(); >>> } >>> >>>salve.googlecode.com removes the reference field altogether and >>>rewrites field access with a lookup. >>> >>>class mysession extends websession { >>> @Dependency >>> private SessionFactory sf; <== field will be removed via bytecode >>>instrumentation leaving the session object lightweight and >>>serializable >>> private long id; <== id is private with no direct setter >>> public mysession(webrequest req) { >>> super(req); >>> } >>> public void authenticate(credentials creds) throws AuthException { >>> user u=sf.getnamedquery("auth") <== this access to the removed sf >>>field will be rewritten as a lookup from configured ioc container >>> ... >>> id=u.getid(); >>> } >>> >>>-igor >>> >>>On Tue, Apr 28, 2009 at 9:49 PM, Marc Ende wrote: Hmm... I'm not sure why it's done this way in the AuthenticatedWebSession but nevertheless it's the only task of a session object to keep informations between two requests. From this point of view a authenticate(String,String) doesnt' really make sense in the Class. May be there is someone here who can explain this point. I wouldn't say that this is wrong, but unusual... :) May be you can get the database connection from inside the method for authentication purposes, Then you haven't got any private or public members which should be serialized and contains a database connection. m. Jan Torben Heuer schrieb: > Marc Ende wrote: > > >> webapps do. In this case you've got to serialize the connection. I don't >> think that's easy/possible to seralize a database connection. >> I would go another approach which uses the session only as a >> information-container and get
Not a Wicket question but ...
Hey, I understand this is not a Wicket question but I hope I can get some help. Our application uses c3p0 connection pooling. How to set the character encoding for database connection? Even if you aware of how to set the character encoding for Apache DBCP, I will be thankful. The application is built on: Spring 2.5 / Hibernate 3 / Wicket 1.3.5 Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindows...
https://issues.apache.org/jira/browse/WICKET-2249 vote for it nino martinez wael wrote: > > Very true > +1 for adding a overridable method > > 2009/4/30 Vladimir K : >> >> put the following into the section of your page: >> >> >> jQuery(document).ready(function(){ >> if (typeof Wicket != 'undefined' && >> Wicket.Window) >> Wicket.Window.unloadConfirmation = >> false; >> }); >> >> >> I don't like this approach because it violateds incapsulation. It should >> has >> been implemented as overridable method of ModalWindow. >> >> >> Vidhya Kailash wrote: >>> >>> 1. How do I disable the popup that comes on click inside the modal >>> window: >>> "Are you sure you want to navigate away from this page"? >>> >> >> -- >> View this message in context: >> http://www.nabble.com/ModalWindows...-tp23300556p23309702.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/ModalWindows...-tp23300556p23311160.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax + DropDownChoice + ModalWindow
And this one aswell, grabbed from the other thread: jQuery(document).ready(function(){ if (typeof Wicket != 'undefined' && Wicket.Window) Wicket.Window.unloadConfirmation = false; }); 2009/4/29 TahitianGabriel : > > With Ajax you should use (instead of onSelectionChanged) : > > myDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange") { > protected void onUpdate(final AjaxRequestTarget varTarget) { > /* do you stuff here... */ > > if (varTarget != null) { > /* update your components */ > varTarget.addComponent(componenToUpdate); > } > } > } > > Regards, > > Gabriel. > > > Steve Flasby wrote: >> >> >> So, to handle a selection change I would normally use: >> >> DropDownChoice::onSelectionChanged(){ return true; } >> >> > > -- > View this message in context: > http://www.nabble.com/Ajax-%2B-DropDownChoice-%2B-ModalWindow-tp23292894p23298704.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindows...
Very true +1 for adding a overridable method 2009/4/30 Vladimir K : > > put the following into the section of your page: > > > jQuery(document).ready(function(){ > if (typeof Wicket != 'undefined' && > Wicket.Window) > Wicket.Window.unloadConfirmation = > false; > }); > > > I don't like this approach because it violateds incapsulation. It should has > been implemented as overridable method of ModalWindow. > > > Vidhya Kailash wrote: >> >> 1. How do I disable the popup that comes on click inside the modal window: >> "Are you sure you want to navigate away from this page"? >> > > -- > View this message in context: > http://www.nabble.com/ModalWindows...-tp23300556p23309702.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need to Understand CheckGroup and Check
The selection variable is a collection or a wicket model with an object of collection. You can preselect you values by using the same classes there. Consider this Form form = new Form( "form" ); String[] someStrings = new String[]{ "Wicket" , "Hibernate", "Maven", "Spring" }; String[] other = new String[]{ "Wicket" , "Hibernate", "Maven", "Spring", "C#", "NHibernate" }; CheckGroup group = new CheckGroup( "group", Arrays.asList( someStrings ) ); ListView stringView = new ListView( "stringView" , Arrays.asList( other ) ){ private static final long serialVersionUID = 1L; @Override protected void populateItem(ListItem item) { item.add( new Check( "item", item.getModel() )); } }; group.add( stringView ); form.add( group ); add( form ); Here the someStrings will be checked, that is ( "Wicket" , "Hibernate", "Maven", "Spring" ). NHibernate and C# will not be checked. Hope this helps. -- View this message in context: http://www.nabble.com/Need-to-Understand-CheckGroup-and-Check-tp23307190p23311015.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Processing.js
No integration from me, but take a look at the artwork package in wicketstuff or the input events , thats how I integrate stuff. It's usually a very smooth process. 2009/4/29 Paul Logasa Bogen II : > I've been looking at a really slick visualization library called > Processing.js (http://processingjs.org) and I'm thinking about writing a > Wicket component the embeds it. > > Before I go stumble off blindly in that direction, I wanted to check if > anyone else was already working on one or if anyone had some good pointers > for started a new component. > > Thanks, > plb > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org