Re: Observed slowness with upload progress bar on 1.4.4
Hi, We also have noticed slowness loading resources with 1.4.4, I don't think it is any resource in particular, but in our (not production thankfully) app we experienced waits of over 30 seconds. Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com igor.vaynberg wrote: no -igor On Tue, Dec 15, 2009 at 9:11 PM, Douglas Ferguson doug...@douglasferguson.us wrote: Oh dear.. Does this apply to 1.4.3? D/ On Dec 15, 2009, at 6:16 PM, Igor Vaynberg wrote: its probably related to this: https://issues.apache.org/jira/browse/WICKET-2613 we might have to put out 1.4.5 quickly -igor On Tue, Dec 15, 2009 at 3:36 PM, Douglas Ferguson doug...@douglasferguson.us wrote: I just upgraded to 1.4.4 and now when I load a page or a modal that uses upload projess bar I see an slowness when loading that page: In firebugs I see it waiting on these calls: http://staging.buzzstream.com:8089/resources/org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar/progressbar.js http://staging.buzzstream.com:8089/resources/org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar/UploadProgressBar.css D/ - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://old.nabble.com/Observed-slowness-with-upload-progress-bar-on-1.4.4-tp26803898p26808389.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: AjaxFallbackLink does not work on Windows Mobile Internet Explorer
Hi, You could implement your own IComponentInstantiationListener, and in it add some sort of behavior to modify the component which removes the onclick. Or you could try an remove the AjaxEventBehavior from the AjaxFallbackLink. This should work globally but will only require you to modify your code in one place. eg something like this in application init: if(simple mode){ addComponentInstantiationListener( new IComponentInstantiationListener(){ onInstantiation(Component component){ if(component instance of AjaxFallbackLink){ IBehaviour b = code to get behaviour component.removeBehaviour(b) } } } ) } not sure if that will work but it seems like it should. Richard Leszek Gawron-2 wrote: a it seems that Mobile IE understands onclick a little bit to start running it but not enough to actually process the request so no actual fallback is being made. As I would really like to keep my code as it is I thought I would introduce Simple HTML mode which would strip all onclick tags and leave the browser with the href= tags it understands. Is there any elegant way to do it globally? lg -- Leszek Gawron http://lgawron.blogspot.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://old.nabble.com/AjaxFallbackLink-does-not-work-on-Windows-Mobile-Internet-Explorer-tp26612035p26612857.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: wicketstuff-minis status?
Hi Doug, I originally wrote the prototip component, and the main reason why I never upgraded the prototip js version is because the library changed to having a commercial licence and I don't know exactly what the rules are about including commercial code into wicket-stuff. While I have no problem with you updating the code, I think that we should be clear on the rules before including the updated javascript files, if that is your intention. Maybe one solution is to not bundle the javascript files, so it is clear to the user that they are commercial files? Thanks, Richard Doug Leeper wrote: We are about to integrate wicketstuff-minis in our project. However, we noticed on Nabble that prototip is out of date based on some comments by the community. I have wicketstuff commit rights and more than willing to update to the latest. However, when I looked at the MVN repository for wicketstuff-minis (http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-minis/1.4.0-SNAPSHOT/), the timestamps are all in 2008. If I change/commit the necessary code, will the MVN repository be updated with the new version on the next build? or do I need to request a build to be placed out there? Or are there other options? Thanks - Doug - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://old.nabble.com/wicketstuff-minis-status--tp26394666p26406129.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 and JQuery
Hi Jeffery, I would be interested to know what put you off about wiquery, any feedback is always welcome. Anyway, for ajax communication, add an AbstractAajxBehaviour to your page / component, and use the url this generates to pass to your jquery ajax something like this: String callbackurl = ajaxBehaviour.getCallbackUrl(true).toString(). String ajaxJs = $.get(' + callbackurl +', function(data){alert('Data Loaded: ' + data);}); When you make an ajax request to this url the onRequest method is called, mine typically look like this: public void onRequest() { final RequestCycle requestCycle = RequestCycle.get(); final PageParameters pageParameters = new PageParameters(requestCycle.getRequest().getParameterMap()); } Using the page parameters object lets you get access to the request parameters easily. If you do not intend to return a result then you should add this line in: RequestCycle.get().setRequestTarget(EmptyRequestTarget.getInstance()); to stop a response being sent. As for ajax replacing of ui components, I usually find that re-running the javascript code to create the ui component works fine. Or another way to get round the problem is to have a element inside the main javascript ui container, and only replace that. Hope this helps Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com Jeffrey Schneller wrote: I am trying to determine how to use Wicket and JQuery. I would prefer not using wiQuery or similar. I would like to just include the jQuery libraries in my html and then use jQuery as javascript and not wrap everything in java on the server side to generate the client code. How would one go about doing this? I assume the basic jQuery functionality is straight forward. However how would you implement jQuery code that uses Ajax to communicate back to the server using Wicket on the server? Or would the recommendation be to let Wicket handle the Ajax communication and only use jQuery for the UI components such as Lightbox, Greybox, apple like sliders, etc. Any ideas? Thanks. - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Wicket-and-JQuery-tp26085243p26091993.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 and JQuery
Hi Jeffrey, AbstractAjaxBehaviour bit is nothing to do with wiquery, although it is the method I use when I want to use jquery ajax when writing wiquery components. Essentially, AbstractAjaxBehaviour is a behaviour that you add to the page or component and you can call getCallbackUrl(true).toString() on the instance of AbstractAjaxBehaviour which gives you the url which calls the AbstractAjaxBehaviour onRequest method (which you have to implement). You then use this url in your jquery ajax. This is only if you want to use jquery ajax though, and as someone already suggested, it is probably easier to use wicket ajax. Wiquery implements most of the core jQuery UI components, so you shouldn't have to implement those yourself. The demo application should give you a good idea of what is already available. If you want to implement code for another jQuery library, then you can do it by implementing IWiQueryPlugin, but this probably isn't the right place to discuss this in detail (wiquery mailing list would be better). I think that there are plans for there to be a 'wiquery-extras' project, which is made up of 3rd party jQuery components, but this has not been set up yet. Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com Jeffrey Schneller wrote: Richard, You lost me a bit with the AbstractAjaxBehaviour stuff. Was this to get wiquery to work or to not use wiquery. The problems I saw with wiquery when I first looked [a few weeks back] at were: 1) seemed a bit of a work-in-progress / proof of concept, 2) lack of samples + a good base of users, 3) how to integrate with the various plugins that are out there. I just took a second look at the wiquery site and it looks much better then when I first looked. There are now samples with code that actual work and the mailing list is getting more traffic. I still have a concern with integrating the various plugins available for jQuery. I don't want to re-invent the wheel and really don't want to spend time writing java code to get a jQuery plugin to be used with wiQuery. The point of the plugin is to not have to write additional code. How would I integrate the various plugins available into wiQuery? Thanks. -Original Message- From: richardwilko [mailto:richardjohnwilkin...@gmail.com] Sent: Wednesday, October 28, 2009 5:57 AM To: users@wicket.apache.org Subject: Re: Wicket and JQuery Hi Jeffery, I would be interested to know what put you off about wiquery, any feedback is always welcome. Anyway, for ajax communication, add an AbstractAajxBehaviour to your page / component, and use the url this generates to pass to your jquery ajax something like this: String callbackurl = ajaxBehaviour.getCallbackUrl(true).toString(). String ajaxJs = $.get(' + callbackurl +', function(data){alert('Data Loaded: ' + data);}); When you make an ajax request to this url the onRequest method is called, mine typically look like this: public void onRequest() { final RequestCycle requestCycle = RequestCycle.get(); final PageParameters pageParameters = new PageParameters(requestCycle.getRequest().getParameterMap()); } Using the page parameters object lets you get access to the request parameters easily. If you do not intend to return a result then you should add this line in: RequestCycle.get().setRequestTarget(EmptyRequestTarget.getInstance()); to stop a response being sent. As for ajax replacing of ui components, I usually find that re-running the javascript code to create the ui component works fine. Or another way to get round the problem is to have a element inside the main javascript ui container, and only replace that. Hope this helps Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com Jeffrey Schneller wrote: I am trying to determine how to use Wicket and JQuery. I would prefer not using wiQuery or similar. I would like to just include the jQuery libraries in my html and then use jQuery as javascript and not wrap everything in java on the server side to generate the client code. How would one go about doing this? I assume the basic jQuery functionality is straight forward. However how would you implement jQuery code that uses Ajax to communicate back to the server using Wicket on the server? Or would the recommendation be to let Wicket handle the Ajax communication and only use jQuery for the UI components such as Lightbox, Greybox, apple like sliders, etc. Any ideas? Thanks. - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Wicket-and-JQuery-tp26085243p26091993.html Sent from the Wicket - User mailing list archive at Nabble.com
Re: Which assertions are possible for wicket:message?
Hi, You could use tester.getServletResponse().getDocument() (where tester is your wicket tester instance) which returns the html of the processed page as a string. Then you could test if this string contains the required text. Hope that helps, Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com Newgro wrote: Hi, i would like to test availability of components added in markup by usage of wicket:message attribute. assertLabel is unusable. What else can i do? I didn't found a hint after searching list and google. Thanks Per -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Which-assertions-are-possible-for-wicket%3Amessage--tp26026074p26026854.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: Re: Google App Engine and Wicket
Hi, The Terracotta SecondLevelCacheSessionStore does not contain any Terracotta specific implementation or dependencies, and should work fine on AppEngine (I haven't tested it though). All it is is an implementation of IPageStore, where the pages are serialized to byte arrays (like the disk store), and then these byte arrays are stored in the http session, rather than on disk. I have attached the file in this thread so you dont need to dig around in the terracotta svn repo. to use it do this in your application class: @Override public ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new TerracottaPageStore(100)); } the 100 is the number of versions of pages you want to keep, and can be customized as you feel appropriate. http://www.nabble.com/file/p25973504/TerracottaPageStore.java TerracottaPageStore.java Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Google-App-Engine-and-Wicket-tp23001592p25973504.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: Google App Engine and Wicket
andr, From Wikipedia [1]: The Apache License does not require modified versions of the software to be distributed using the same license nor even that it be distributed as free/open-source software. The Apache license only requires that a notice is kept informing recipients that Apache licensed code has been used. Thus, in contrast to copyleft licenses, recipients of modified versions of Apache licensed code do not necessarily also get the above freedoms. Or considering the situation from the Apache licensees perspective, they receive the freedom to use the code in any way they want, including using it in closed source products (cf Paragraph 4). So basically you can do what you want with it, so long as you leave the notice intact. You can read more about the Apache 2 licence on the internet, I am by no means an expert. However, if you make any improvements to the code, and are in a position to do so, then contributing it back would be most welcome :) [1] http://en.wikipedia.org/wiki/Apache_License Thanks, Richard A. Maza wrote: On 20.10.2009 13:30, richardwilko wrote: Hi, The Terracotta SecondLevelCacheSessionStore does not contain any Terracotta specific implementation or dependencies, and should work fine on AppEngine (I haven't tested it though). All it is is an implementation of IPageStore, where the pages are serialized to byte arrays (like the disk store), and then these byte arrays are stored in the http session, rather than on disk. I have attached the file in this thread so you dont need to dig around in the terracotta svn repo. to use it do this in your application class: @Override public ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new TerracottaPageStore(100)); } the 100 is the number of versions of pages you want to keep, and can be customized as you feel appropriate. Richard, thanks a lot for providing the source to me. This is indeed a valuable starting point. I just want to make sure that there can't be any copyright issues when I modify the code due to the copyright statement in the header? regards, andr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Google-App-Engine-and-Wicket-tp23001592p25974145.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: Google App Engine and Wicket
Oh, sorry I just realized that it has the terracotta licence header on it, had I realized i would have removed it. That's because the version of the file i had to hand was from the terracotta forge svn repo, and code in there has to have their licence. Originally it was Apache 2 licensed and I would treat it as such. Sorry for the confusion, Richard A. MaOhza wrote: On 20.10.2009 13:30, richardwilko wrote: Hi, The Terracotta SecondLevelCacheSessionStore does not contain any Terracotta specific implementation or dependencies, and should work fine on AppEngine (I haven't tested it though). All it is is an implementation of IPageStore, where the pages are serialized to byte arrays (like the disk store), and then these byte arrays are stored in the http session, rather than on disk. I have attached the file in this thread so you dont need to dig around in the terracotta svn repo. to use it do this in your application class: @Override public ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new TerracottaPageStore(100)); } the 100 is the number of versions of pages you want to keep, and can be customized as you feel appropriate. Richard, thanks a lot for providing the source to me. This is indeed a valuable starting point. I just want to make sure that there can't be any copyright issues when I modify the code due to the copyright statement in the header? regards, andr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Google-App-Engine-and-Wicket-tp23001592p25974473.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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects
Hi, What version of maven are you using (you can find you with mvn -version) Can you try changing this bit of the command line: -DarchetypeCatalog=http://legup.googlecode.com/svn/repo/archetype-catalog.xml to this: -DarchetypeCatalog=http://legup.googlecode.com/svn/repo and see if that works. (btw are you the same guy who left the comment on my blog?) Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com danisevsky danisevsky wrote: Hello, I was trying it on Linux with no proxy and I got the same error. In text editor is see, that there is no line breaks. I do not know where is problem. 2009/10/9 Bert taser...@gmail.com Perhaps he is using a maven proxy repository and the archetype repository is not added to it? On Thu, Oct 8, 2009 at 21:49, jWeekend jweekend_for...@cabouge.com wrote: Danisevsky, This has been used by loads of people and on all sorts of OSs and versions. I also just successfully tried it on XP, Vista Ubuntu in case you had come across something that has been missed. Paste what you copy from Leg Up into a text editor to see what's causing that exception on your box and let us know what you find to help others that may hit a similar issue with copy 'n' paste or whatever else it turns out to be specific to your environment (possibly a proxy issue - ie you haven't told Maven about your proxy, but your browser is set up properly to use it). Regards - Cemal jWeekend OO Java Technologies, Wicket Training and Development http://jWeekend.com danisevsky danisevsky wrote: I can access this file in web browser and it seems that there is no break line. I will try it later in linux. thank you 2009/10/8 richardwilko richardjohnwilkin...@gmail.com hi, The error is saying that maven cannot find the archetype catalog file, please make sure you can access this file in a web browser [1], and ensure that you do not have any line breaks in your maven command (not sure if it is just how the command appears on nabble but it looks like there is a line break in the middle of the url) [1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml Hope this helps Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com danisevsky danisevsky wrote: Hello, I was trying generate Wicket - Spring - JPA project and I get following error: C:\projects\testmvn archetype:generate -B -DarchetypeCatalog= http://legup.googl ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa -archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.0 -DgroupId=co m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT -Dpackage=com.mycompan y [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] [INFO] Building Maven Default Project [INFO]task-segment: [archetype:generate] (aggregator-style) [INFO] [INFO] Preparing archetype:generate [INFO] No goals needed for project - skipping [INFO] Setting property: classpath.resource.loader.class = 'org.codehaus.plexus .velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on = 'false'. [INFO] Setting property: resource.loader = 'classpath'. [INFO] Setting property: resource.manager.logwhenfound = 'false'. [INFO] [archetype:generate] [INFO] Generating project in Batch mode [WARNING] Error reading archetype catalog http://legup.googlecode.com/svn/repo/a rchetype-catalog.xml org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate resource in repository at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD ata(LightweightHttpWagon.java:100) at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68) at org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74) at org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA rchetype.java:203) at org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB yCatalog(DefaultArchetypeSelector.java:249) at org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp e(DefaultArchetypeSelector.java:74) at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu te(CreateProjectFromArchetypeMojo.java:180) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:453
Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects
] [INFO] : java.lang.NullPointerException null [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 2 seconds [INFO] Finished at: Thu Oct 08 13:30:48 CEST 2009 [INFO] Final Memory: 8M/14M [INFO] C:\projects\test 2009/10/6 richardwilko richardjohnwilkin...@gmail.com Hi, Yes, you will need to bind every dao (and eveything you want to inject). However there are other ways to do it with guice, like the @ImplementedBy annotation (think its called that, check with the guice docs, sending this from my phone so can't check atm). Afaik you would need to make spring beans for every dao if using spring, so its not that bad. Glad you have it working now, Richard Jeffrey Schneller wrote: Here is the My Guice Module that I created. It looks like the one in the archetype. Do I need to bind every DAO? So that then I need to inject the DAO when it is needed? public class AppModule extends AbstractModule { /* (non-Javadoc) * @see com.google.inject.AbstractModule#configure() */ @Override protected void configure() { bind(Initializer.class).asEagerSingleton(); //warp persist stuff install(PersistenceService.usingHibernate() .across(UnitOfWork.REQUEST) .transactedWith(TransactionStrategy.LOCAL) .buildModule()); // hibernate stuff // default values from development String connectionUrl = the url; String username = the username; String password = the password; try { InitialContext context = new InitialContext(); connectionUrl = (String) context.lookup(java:comp/env/hibernate.connection.url); username = (String) context.lookup(java:comp/env/hibernate.connection.username); password = (String) context.lookup(java:comp/env/hibernate.connection.password); } catch (NamingException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } // annotation and xml final Configuration config = new Configuration().configure(); config.setProperty(hibernate.connection.url, connectionUrl); config.setProperty(hibernate.connection.username, username); config.setProperty(hibernate.connection.password, password); config.setProperty(hibernate.current_session_context_class, managed); bind(Configuration.class).toInstance(config); //dao stuff // DO I NEED TO DO THIS FOR EVERY DAO OBJECT? bind(AccountDao.class).to(HibernateAccountDao.class); bind(CountryDao.class).to(HibernateCountryDao.class); bind(LanguageDao.class).to(HibernateLanguageDao.class); bind(TerritorySalesCodesDao.class).to(HibernateTerritorySalesCodesDao.class); bind(RegionSalesCodesDao.class).to(HibernateRegionSalesCodesDao.class); bind(CountrySalesCodesDao.class).to(HibernateCountrySalesCodesDao.class); bind(AccountTypeDao.class).to(HibernateAccountTypeDao.class); bind(AccountAuditDao.class).to(HibernateAccountAuditDao.class); } @Singleton public static class Initializer { @Inject Initializer(com.wideplay.warp.persist.PersistenceService service) { service.start(); } } } -Original Message- From: richardwilko [mailto:richardjohnwilkin...@gmail.com] Sent: Tuesday, October 06, 2009 2:56 PM To: users@wicket.apache.org Subject: RE: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects Jeffrey, I expect the changes you made to the Guice Module are the reason why the session is null, could you paste in the contents of it. Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com Jeffrey Schneller wrote: Thanks for the idea but this didn't work either. Any other ideas? I would expect the archetype to work correctly. -Original Message- From: Erik Post [mailto:eriksen...@gmail.com] Sent: Tuesday, October 06, 2009 2:09 PM To: users@wicket.apache.org Subject: Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects Hi Jeffrey, I
Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects
Nino, We don't have a Guice 2.0 for that very reason; the warp persist guys don't have a final 2.0 release yet. Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com nino martinez wael wrote: Why dont you have a Guice 2.0 archetype? We could probably bump the warp persist guys to work on their 2.0 imp.. If thats whats stopping you? 2009/10/6 nino martinez wael nino.martinez.w...@gmail.com Looks cool :) 2009/10/6 jWeekend jweekend_for...@cabouge.com We have launched jWeekend's Leg Up page [1]. You can generate a command and run it at your console to create a simple project using one of our archetypes. The projects you will generate will include enough configuration, code and/or some tests to get you started, quickly. Our archetypes currently support various combinations of Spring, Guice, WarpPersist, JPA (with one or more implementation from EclipseLink, Hibernate, OpenJPA) and Wicket. Let us know if this is useful and if you'd like to see more combinations. Also feel free to raise any issues [2]. Regards - Cemal jWeekend OO Java Technologies, Wicket Training and Development http://jWeekend.com [1] http://jweekend.com/dev/LegUp [2] http://code.google.com/p/legup/issues/list - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25769655.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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects
Jeffrey, I expect the changes you made to the Guice Module are the reason why the session is null, could you paste in the contents of it. Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com Jeffrey Schneller wrote: Thanks for the idea but this didn't work either. Any other ideas? I would expect the archetype to work correctly. -Original Message- From: Erik Post [mailto:eriksen...@gmail.com] Sent: Tuesday, October 06, 2009 2:09 PM To: users@wicket.apache.org Subject: Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects Hi Jeffrey, I have *absolutely* no idea if this will help you, but I had the same with Spring. It started working when i put the injection annotation on the method instead of on the variable. Good luck, Erik On Tue, Oct 6, 2009 at 7:59 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I took the archetype for Guice, Warp, Hibernate and modified for my application. All my code looks similar to the code from the archetype. The only difference is I am not using the AnnotatinConfiguration but just the plain Configuration. I am also using c3po connection pooling with Oracle. However, I am still not able to inject the Hibernate Session into my DAO objects. Any ideas? I don't see any exceptions being thrown. �...@inject ProviderSession session; �...@transactional(type=TransactionType.READ_ONLY) public ListT findAll() { Criteria criteria = session.get().createCriteria(persistentClass); return criteria.list(); } The session in the findAll method is always coming back as null. What am I doing wrong? It doesn't seem to be that difficult to implement. Thanks. -Original Message- From: jWeekend [mailto:jweekend_for...@cabouge.com] Sent: Tuesday, October 06, 2009 9:48 AM To: users@wicket.apache.org Subject: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects We have launched jWeekend's Leg Up page [1]. You can generate a command and run it at your console to create a simple project using one of our archetypes. The projects you will generate will include enough configuration, code and/or some tests to get you started, quickly. Our archetypes currently support various combinations of Spring, Guice, WarpPersist, JPA (with one or more implementation from EclipseLink, Hibernate, OpenJPA) and Wicket. Let us know if this is useful and if you'd like to see more combinations. Also feel free to raise any issues [2]. Regards - Cemal jWeekend OO Java Technologies, Wicket Training and Development http://jWeekend.com [1] http://jweekend.com/dev/LegUp [2] http://code.google.com/p/legup/issues/list - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25774618.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: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects
Hi, Yes, you will need to bind every dao (and eveything you want to inject). However there are other ways to do it with guice, like the @ImplementedBy annotation (think its called that, check with the guice docs, sending this from my phone so can't check atm). Afaik you would need to make spring beans for every dao if using spring, so its not that bad. Glad you have it working now, Richard Jeffrey Schneller wrote: Here is the My Guice Module that I created. It looks like the one in the archetype. Do I need to bind every DAO? So that then I need to inject the DAO when it is needed? public class AppModule extends AbstractModule { /* (non-Javadoc) * @see com.google.inject.AbstractModule#configure() */ @Override protected void configure() { bind(Initializer.class).asEagerSingleton(); //warp persist stuff install(PersistenceService.usingHibernate() .across(UnitOfWork.REQUEST) .transactedWith(TransactionStrategy.LOCAL) .buildModule()); // hibernate stuff // default values from development String connectionUrl = the url; String username = the username; String password = the password; try { InitialContext context = new InitialContext(); connectionUrl = (String) context.lookup(java:comp/env/hibernate.connection.url); username = (String) context.lookup(java:comp/env/hibernate.connection.username); password = (String) context.lookup(java:comp/env/hibernate.connection.password); } catch (NamingException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } // annotation and xml final Configuration config = new Configuration().configure(); config.setProperty(hibernate.connection.url, connectionUrl); config.setProperty(hibernate.connection.username, username); config.setProperty(hibernate.connection.password, password); config.setProperty(hibernate.current_session_context_class, managed); bind(Configuration.class).toInstance(config); //dao stuff // DO I NEED TO DO THIS FOR EVERY DAO OBJECT? bind(AccountDao.class).to(HibernateAccountDao.class); bind(CountryDao.class).to(HibernateCountryDao.class); bind(LanguageDao.class).to(HibernateLanguageDao.class); bind(TerritorySalesCodesDao.class).to(HibernateTerritorySalesCodesDao.class); bind(RegionSalesCodesDao.class).to(HibernateRegionSalesCodesDao.class); bind(CountrySalesCodesDao.class).to(HibernateCountrySalesCodesDao.class); bind(AccountTypeDao.class).to(HibernateAccountTypeDao.class); bind(AccountAuditDao.class).to(HibernateAccountAuditDao.class); } @Singleton public static class Initializer { @Inject Initializer(com.wideplay.warp.persist.PersistenceService service) { service.start(); } } } -Original Message- From: richardwilko [mailto:richardjohnwilkin...@gmail.com] Sent: Tuesday, October 06, 2009 2:56 PM To: users@wicket.apache.org Subject: RE: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects Jeffrey, I expect the changes you made to the Guice Module are the reason why the session is null, could you paste in the contents of it. Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com Jeffrey Schneller wrote: Thanks for the idea but this didn't work either. Any other ideas? I would expect the archetype to work correctly. -Original Message- From: Erik Post [mailto:eriksen...@gmail.com] Sent: Tuesday, October 06, 2009 2:09 PM To: users@wicket.apache.org Subject: Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects Hi Jeffrey, I have *absolutely* no idea if this will help you, but I had the same with Spring. It started working when i put the injection annotation on the method instead of on the variable. Good luck, Erik On Tue, Oct 6, 2009 at 7:59 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I took the archetype for Guice, Warp, Hibernate and modified for my application. All my code looks similar to the code from the archetype. The only difference is I am not using the AnnotatinConfiguration but just the plain Configuration. I am also using c3po connection pooling with Oracle. However, I am still
Re: [WicketStuff] Iolite
Hi, We have been developing a few useful archetypes for our own client projects and courses. Amongst others, we have Wicket/Guice Wicket/Guice/Warp/Hibernate Wicket/Guice/Warp/JPA Wicket/Spring/JPA Spring/JPA/openJPA Spring/JPA/EclipseLink Spring/JDBC All include a running sample application with correct dependencies. We're currently deciding which jWeekend server to host these on (and their catalog) and probably the source Regards - Richard Wilkinson Developer, jWeekend OO Java Technologies, Wicket Training and Development http://jWeekend.com nino martinez wael wrote: Hi Guys I've been using Guice for a while together with warp persist and dynamic finders. Would it be of any interest to switch Iolite to Guice? Please say if it has interest then I might do it, but won't if nobody uses it. http://www.wideplay.com/guicewebextensions2 http://www.wideplay.com/dynamicfinders http://code.google.com/p/google-guice/ Regards Nino - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/-WicketStuff--Iolite-tp25652619p25659568.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, Ajax and JSON
Hi, Instead of using AbstractDefaultAjaxBehavior you can use its superclass AbstractAjaxBehavior as follows: AbstractAjaxBehavior behaviour = new AbstractAjaxBehavior() { private static final long serialVersionUID = 1L; @SuppressWarnings(unchecked) public void onRequest() { //get parameters final RequestCycle requestCycle = RequestCycle.get(); final PageParameters pageParameters = new PageParameters(requestCycle.getRequest().getParameterMap()); //do something using nice json library to produce a string of json String json = ... requestCycle.setRequestTarget(new StringRequestTarget(application/json, utf-8, data)); } }; add(behaviour); I can't see anything wrong with the servlet example, but this has the advantage of being in a Wicket component, so you can easily access your Wicket session, and the user wont have to remember to map extra servlets. I have also tried making a component out of flexigrid, but ran into issues (which they may have fixed now), for example, I was getting rendering issues in the grid when trying to resize the columns. I then moved onto another jQuery grid called jqGrid (http://www.trirand.com/blog/) which I felt had more features and was more robust. At jWeekend (http://www.jweekend.com) have almost completed the Wicket mapping of this grid and we hope to release this in the future when we are satisfied with our testing and API. This will be released as a plugin to the wiQuery project (http://code.google.com/p/wiquery/), which basically means it will depend on wiQuery. Regards - Richard Wilkinson Developer jWeekend: OO Java Technologies - Development and Training http://jWeekend.com Serban Balamaci wrote: Hello. I'm trying to create a wicket component out of FlexiGrid http://www.flexigrid.info/ . The javascript for the component requires an address from which it will receive data in the form of a JSON response. I'm not sure what is the best way to go about it. Simple and most ugly approach would be to have something of a Controller Page a page that takes parameters such as the entity that is being retrieved and also paging info, sort order, etc and returns the JSON response. I do not like this aproach as, most obvious reason is that it would not be obvious from the component what you need to do in order to get it to work. I would much more preffer to having a callback method that returns the json. So I have created a AbstractDefaultAjaxBehavior clientConnectBehavior = new AbstractDefaultAjaxBehavior() { protected void respond(AjaxRequestTarget ajaxRequestTarget) { ajaxRequestTarget.prependJavascript({page: 1, total: 239 }); } and used clientConnectBehavior.getCallbackUrl() as the url passed to the flexigrid. Unfortunately the problem is the response when invoked is wrapped in a ajax-responseevaluate encoding=wicket1 ?xml version=1.0 encoding=UTF-8? ajax-responseevaluate encoding=wicket1![CDATA[{page: 1,total: 239}]]/evaluate/ajax-response So my question is how to get only the JSON part without the ?xml version., ajax-response . and CDATA decoration. Can it be bypassed? Shoul I override something in AbstractDefaultAjaxBehavior? Or any other ideea to go about the problem. Thank you, Serban - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Wicket%2C-Ajax-and-JSON-tp24756591p24757846.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: jWicket -- jQuery with Wicket integration
Hi, What are the advantages of jWicket over other Wicket jQuery projects (specifically wiQuery)? It would be nice if we could all work together on a single project. wiQuery has already pooled the development resources of two other such projects. wiQuery has Wicket behaviours for the core jQuery events / actions and jQuery UI components. It also has a nice plugin mechanism for adding other jQuery widgets / behaviours and it is under active development. At jWeekend we have also just designed, developed and are testing a server side state mechanism for wiQuery components. Regards - Richard jWeekend OO, Wicket, Java Technologies - Training and Consultancy http://jWeekend.com Lionel Armanet wrote: Hi, Just to talk, there's another jQuery-Wicket integration project called WiQuery (http://code.google.com/p/wiquery/) and supported by jWeekend (http://www.jweekend.com/dev/LWUGReg/). Did you look at this project too ? Lionel tauren wrote: jWicket has now been released as a wicketstuff project. jWicket is an integration of Wicket and jQuery that was previously called WicketJQuery (by Stefan Lindner). I realize there are already a few Wicket/jQuery integrations, but I think that Stefan's WicketJQuery implementation has some advantages over the others. Stefan and I discussed how to best move the WicketJQuery project forward and decided it was best if it became a standard maven project to make it easy for others to use. We decided to host it at wicketstuff so that it would be available via a maven repository. We also decided to rename it since there were already wicketstuff projects with very similar names. So it will now be known as jWicket. At this point, the code committed to WicketStuff is essentially the same codebase available on the original WicketJQuery SVN server. I have refactored it with the org.wicketstuff.jwicket namespace and have structured the project in a standard maven manner. I also split the project into jwicket-parent, jwicket, and jwicket-examples. The demo app is now separate from jwicket itself so that it doesn't need to be imported into projects. The original WIcketJQuery project developed by Stefan Lindner can be found at: http://subversion.visionet.de/project/WicketJQuery/wiki Tauren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/jWicketjQuery-with-Wicket-integration-tp24584280p24611730.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: Terracotta integration and issue sharing pagemaps
If you open the terracotta admin console you should be able to see your shared roots. If you are just using terracotta for http session clustering then you should just see 1 root, which is the servlet http session. The admin console lets you explore the shared objects, and if you go into a single session, you will be able to see if it is sharing the pagemap. If you cant see the shared root, then there is some sort of problem with the terracotta config. - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Terracotta-integration-and-issue-sharing-pagemaps-tp20946423p20955787.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TextField inside a ModalWindow problems
Im at a loss then, the only other thing i could suggest is that you put the code directly into the page, rather than in the domready event. form ..form code.. script type=text/javascript !--/*--![CDATA[/*!--*/ Event.observe('peopleLocatorForm18', 'submit', function(event){ Event.stop(event); alert('success!!!'); }); /*--]]*//script /form Or maybe it has something to do with the modal window javascript code? Richard venuko wrote: Richard, I looked at the zoomf.com, the search worked in my browser, so I modified my JavaScript accordingly. Here is what you got on that page: script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, domready, function() { Event.observe('searchForm74', 'submit', function(event){ Event.stop(event); submitSearchForm(); });;}); /*--]]*//script Here is what I got: script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, domready, function() { Event.observe('peopleLocatorForm18', 'submit', function(event){ Event.stop(event); alert('success!!!'); });;}); /*--]]*//script I really can't see a difference. However mine still submits the form normally. And I am pretty sure it is the right form that I am attaching the observer to. As my son says, it just not fair :) --Victor richardwilko wrote: the page is www.zoomf.com/map if you want to see it for yourself. - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/TextField-inside-a-ModalWindow-problems-tp20363183p20524625.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TextField inside a ModalWindow problems
Victor, im not sure, try putting an alert in the code to make sure that the submit event is being observed, and dont bother with the wicket version at until you know the javascript on its own is working. alert('formId observe submit'); $('formId').observe('submit', function(e){ alert('form submit'); Event.stop(e); alert('form submit stopped');}); If you dont any alert then the observe code isnt getting called. If you see the first and not the others then either you are passing in the wrong form dom Id, or it may be something else entirely (sorry cant be more specific). maybe prototype isnt loaded correctly? hope that helps, Richard venuko wrote: Hi Richard, I am trying to use the code from your blog without any modifications, but the form is still being submitted normally. What could be a problem? --Victor richardwilko wrote: I wrote a piece on how to stop this on my blog (but it also makes the normal ajax submit button fire, which you might not want). http://richard-wilkinson.co.uk/2008/04/05/how-to-stop-non-ajax-form-submits-in-wicket/ http://richard-wilkinson.co.uk/2008/04/05/how-to-stop-non-ajax-form-submits-in-wicket/ - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/TextField-inside-a-ModalWindow-problems-tp20363183p20514735.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TextField inside a ModalWindow problems
Im just checking over the code which i wrote to do this in production. Its a little hard as i dont work at that company any more, but looking at the html source for the page the syntax i used there was Event.observe('formId', 'submit', function(event){ Event.stop(event); submitSearchForm(); });;} which should technically do the same as the version i have on my blog, from looking at the prototype api, but maybe there is a bug in prototype? the page is www.zoomf.com/map if you want to see it for yourself. venuko wrote: Richard, That's exactly how I tried to debug what's working and what's not :) I've added a few alerts to your getScript() method, and this is how Wicket rendered it on the page: script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, domready, function() { alert('at least the DOM is ready'); $('peopleLocatorFormf').observe('submit', function(e){alert('success!!!');Event.stop(e); $('submitLink10').onclick(null);});;}); /*--]]*//script The first alert is working, the second is not Do you see anything abnormal here? --Victor richardwilko wrote: im not sure, try putting an alert in the code to make sure that the submit event is being observed, and dont bother with the wicket version at until you know the javascript on its own is working. - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/TextField-inside-a-ModalWindow-problems-tp20363183p20517765.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket terracotta integration is out
Well the module also includes an terracotta xml config file so that terracotta knows which internal wicket classes could be clustered, but apart from that there is nothing else. I don't have any example applications but an normal application can be turned to a clustered one quite easily. I will have a look at modifying one of the wicket sample applications to use it as an example. If you are unfamiliar with terracotta then i recommend reading up on it on their website first, but its not that hard to get started. If you are using eclipse then they have a good eclipse plugin which can help you get started. Richard Nino.Martinez wrote: Interesting, are it really that simple as using the terracotta page map? And are there any example web applications using it? Are there any recommended settings for the tim-wicket with terracotta.. Im pretty unfamiliar with terracotta so im asking a bit in blind here. regards nino richardwilko wrote: Hi, Just a quick announcement that the long awaited updated wicket terracotta integration module (tim) is out. You can find it here: http://forge.terracotta.org/releases/projects/tim-wicket/ http://forge.terracotta.org/releases/projects/tim-wicket/ and further instructions on my blog here: http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/ http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/ . Feedback and bug reports would be appreciated, as i haven't had chance to test the code on a large scale system for a while now. Richard - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/wicket-terracotta-integration-is-out-tp20362761p20378881.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TextField inside a ModalWindow problems
It still seems as though the form is trying to submit in a non-ajax way, as this is the same as navigating to a different url, which is why your modal window is asking for confirmation. You still need prototype for the wicket version, as that is just the js code wrapped up in a wicket behavior. try something like this: $('formId').observe('submit', function(e){ Event.stop(e);}); in your modal window html, where formId is the dom id of the form causing the trouble. That should stop any non-ajax submits from the form, however a possibility is that the wicket code detects the submit before the other code has a chance to stop it, so this method may not work. I also found this which may help you http://www.arraystudio.com/as-workshop/disable-form-submit-on-enter-keypress.html http://www.arraystudio.com/as-workshop/disable-form-submit-on-enter-keypress.html Richard ulrik wrote: Hmm, it did not work for me.. I tried the wicket version, but it still askes me if I want to navigate away from the page when I hit enter in the TextField - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/TextField-inside-a-ModalWindow-problems-tp20363183p20379158.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicket terracotta integration is out
Hi, Just a quick announcement that the long awaited updated wicket terracotta integration module (tim) is out. You can find it here: http://forge.terracotta.org/releases/projects/tim-wicket/ http://forge.terracotta.org/releases/projects/tim-wicket/ and further instructions on my blog here: http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/ http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/ . Feedback and bug reports would be appreciated, as i haven't had chance to test the code on a large scale system for a while now. Richard - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/wicket-terracotta-integration-is-out-tp20362761p20362761.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TextField inside a ModalWindow problems
Its an automatic thing that if your form has an input box and you press enter it will try to submit it normally. I wrote a piece on how to stop this on my blog. http://richard-wilkinson.co.uk/2008/04/05/how-to-stop-non-ajax-form-submits-in-wicket/ http://richard-wilkinson.co.uk/2008/04/05/how-to-stop-non-ajax-form-submits-in-wicket/ That uses prototype, but you may be able to adapt it to use other js libraries. The general idea is, intercept the form submit event and stop it in javascript. Richard ulrik wrote: Hello! I have a problem. A have a ModalWindow with three components on it; a TextField and two AjaxSubmitLinks. The problem is that when I place the cursor on the TextField and press the Enter key, something bad happens. There is a popup dialog that askes me if Are you sure you want to navigate to another page... What I would like to do is somehow disable the enter press in the TextField, or make it so it doesn't generate an event that pops up that dialog. The HTML for the Modal window (WHich is a ModalWindow with a panel) head wicket:head style #ta { width:250px; height:100px; } #outer_local{ text-align:left; padding-left:10px; } /style /wicket:head /head wicket:panel form wicket:id=form div id=outer_local h1wicket:message key=header//h1 br wicket:message key=name/ input type=text wicket:id=draftName / br br div class=buttonpanel ul li # wicket:message key=saveDraft[Spara och stäng]/wicket:message /li li # wicket:message key=cancel[Avbryt]/wicket:message /li /ul /div /div /form /wicket:panel The corresponding java file is: public class SaveDraftDialog extends Panel { private TextField m_draftName; private WebInvoiceModel m_invoiceModel; private ModalWindow m_window; private InvoiceButtons m_buttonPanel; private Form m_form; public SaveDraftDialog(String s, InvoiceButtons buttonPanel) { super(s); m_buttonPanel = buttonPanel; m_window = buttonPanel.getSaveDraftModalWindow(); m_invoiceModel = ((PageroOnlineWebSession) Session.get()).getInvoiceModel(); m_form = new Form(form); add(m_form); String oldDraftName = ; if(m_invoiceModel.isReOpen()){ oldDraftName = m_invoiceModel.getDraftName(); } m_draftName = new TextField(draftName,new Model(oldDraftName)); m_form.add(m_draftName); m_form.add(new AjaxSubmitLink(saveButton,m_form){ protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, Form form) { String input = m_draftName.getModelObjectAsString(); m_buttonPanel.saveDraft(input); m_window.close(ajaxRequestTarget); ajaxRequestTarget.addComponent(m_buttonPanel.getFeedbackPanel()); } }); m_form.add(new AjaxSubmitLink(cancelButton,m_form){ protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, Form form) { m_window.close(ajaxRequestTarget); } }); } } And here is how I open the ModalWindow: m_saveDraftModalWindow = new ModalWindow(saveDraft); add(m_saveDraftModalWindow); m_saveDraftModalWindow.setContent(new SaveDraftDialog(m_saveDraftModalWindow.getContentId(),this)); m_saveDraftModalWindow.setTitle(BundleSupport.getMessageWicketTest(draft.saveDraft,WebSession.get().getLocale())); m_saveDraftModalWindow.setCookieName(save-modal); m_saveDraftModalWindow.setCssClassName(ModalWindow.CSS_CLASS_GRAY); m_saveDraftModalWindow.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() { public boolean onCloseButtonClicked(AjaxRequestTarget target) { return true; } }); Would be great if anyone could help me here - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/TextField-inside-a-ModalWindow-problems-tp20363183p20363455.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TextField inside a ModalWindow problems
Its an automatic thing that if your form has an input box and you press enter it will try to submit it normally. I wrote a piece on how to stop this on my blog (but it also makes the normal ajax submit button fire, which you might not want). http://richard-wilkinson.co.uk/2008/04/05/how-to-stop-non-ajax-form-submits-in-wicket/ http://richard-wilkinson.co.uk/2008/04/05/how-to-stop-non-ajax-form-submits-in-wicket/ That uses prototype, but you may be able to adapt it to use other js libraries. The general idea is, intercept the form submit event and stop it in javascript. Richard ulrik wrote: Hello! I have a problem. A have a ModalWindow with three components on it; a TextField and two AjaxSubmitLinks. The problem is that when I place the cursor on the TextField and press the Enter key, something bad happens. There is a popup dialog that askes me if Are you sure you want to navigate to another page... What I would like to do is somehow disable the enter press in the TextField, or make it so it doesn't generate an event that pops up that dialog. The HTML for the Modal window (WHich is a ModalWindow with a panel) head wicket:head style #ta { width:250px; height:100px; } #outer_local{ text-align:left; padding-left:10px; } /style /wicket:head /head wicket:panel form wicket:id=form div id=outer_local h1wicket:message key=header//h1 br wicket:message key=name/ input type=text wicket:id=draftName / br br div class=buttonpanel ul li # wicket:message key=saveDraft[Spara och stäng]/wicket:message /li li # wicket:message key=cancel[Avbryt]/wicket:message /li /ul /div /div /form /wicket:panel The corresponding java file is: public class SaveDraftDialog extends Panel { private TextField m_draftName; private WebInvoiceModel m_invoiceModel; private ModalWindow m_window; private InvoiceButtons m_buttonPanel; private Form m_form; public SaveDraftDialog(String s, InvoiceButtons buttonPanel) { super(s); m_buttonPanel = buttonPanel; m_window = buttonPanel.getSaveDraftModalWindow(); m_invoiceModel = ((PageroOnlineWebSession) Session.get()).getInvoiceModel(); m_form = new Form(form); add(m_form); String oldDraftName = ; if(m_invoiceModel.isReOpen()){ oldDraftName = m_invoiceModel.getDraftName(); } m_draftName = new TextField(draftName,new Model(oldDraftName)); m_form.add(m_draftName); m_form.add(new AjaxSubmitLink(saveButton,m_form){ protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, Form form) { String input = m_draftName.getModelObjectAsString(); m_buttonPanel.saveDraft(input); m_window.close(ajaxRequestTarget); ajaxRequestTarget.addComponent(m_buttonPanel.getFeedbackPanel()); } }); m_form.add(new AjaxSubmitLink(cancelButton,m_form){ protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, Form form) { m_window.close(ajaxRequestTarget); } }); } } And here is how I open the ModalWindow: m_saveDraftModalWindow = new ModalWindow(saveDraft); add(m_saveDraftModalWindow); m_saveDraftModalWindow.setContent(new SaveDraftDialog(m_saveDraftModalWindow.getContentId(),this)); m_saveDraftModalWindow.setTitle(BundleSupport.getMessageWicketTest(draft.saveDraft,WebSession.get().getLocale())); m_saveDraftModalWindow.setCookieName(save-modal); m_saveDraftModalWindow.setCssClassName(ModalWindow.CSS_CLASS_GRAY); m_saveDraftModalWindow.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() { public boolean onCloseButtonClicked(AjaxRequestTarget target) { return true; } }); Would be great if anyone could help me here - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/TextField-inside-a-ModalWindow-problems-tp20363183p20363526.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GuiceInjectorHolder inside WebApplication
Have you looked at the wicket guice integration? I think that does it already. Richard Edgar Merino wrote: Let me correct that last response: the problem is not solved yet. I thought it was but after redeploying my application again I got a serialization exception, why didn't the previously supplied solution didn't work? can anyone give me a hand on this? thanks in advance. Edgar Merino Edgar Merino escribió: Ok I re-read the javadoc for the GuiceInjectorHolder and found out I had to use it as a MetaDataKey, so I did that in my application: public void init() { //initialization code Injector injector = Guice.createInjector(); setMetaData(GuiceInjectorHolder.INJECTOR_KEY, new GuiceInjectorHolder(injector)); } public void someMethod() { Injector injector = ((GuiceInjectorHolder) getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector(); injector.getInstance(SomeClass.class); } I was thinking about adding a GuiceComponentInjector to my application, but I'm not using guice with wicket so I don't think I need that, any suggestion? Edgar Merino Edgar Merino escribió: Hello, I need to hold a reference to a Guice injector inside my WebApplication, however since the injector is not serializable I tried using a GuiceInjectorHolder and keeping a reference to it in my WebApplication, but I'm still getting serialization exceptions when redeploying my application. Why didn't it work? what should I do in this case to keep a reference to my Guice injector? Thanks in advance. Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/GuiceInjectorHolder-inside-WebApplication-tp19989539p19995217.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AbstractPageStore memory implementation instead of disk
I should say that the terracotta page map also does the page serialisation, but it does it all in memory. You could probably write out the serialisation bit quite easily, but it is required for terracotta. Ard Schrijvers-3 wrote: Thanks a lot Richard, I will take a look! Regards Ard The wicket integration with terracotta uses an in-memory page map. The code is here, but will soon be part of the terracotta wicket-tim. http://www.nabble.com/file/p19826206/TerracottaPageStore.java TerracottaPageStore.java Timo Rantalaiho wrote: On Fri, 03 Oct 2008, Igor Vaynberg wrote: do you have some statistics for us? or some profiler timing screenshots? While waiting for the reply from Ard... I remember hearing of a case where the pagemaps were stored to a directory that the virus scanner was monitoring, and the scanner hogged all cpu during load testing :) I suppose that this kind of stuff happens more easily on Windows than on unices. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/AbstractPageStore-memory-implementation- instead-of-disk-tp19797628p19826206.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/AbstractPageStore-memory-implementation-instead-of-disk-tp19797628p19859483.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AbstractPageStore memory implementation instead of disk
The HttpSessionStore is an in memory session store, so it has no disk writing bottleneck. It does however have some other problems, specifically with the back button i think. the terracotta page store works like this: protected ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new TerracottaPageStore(100)); } as it is just an implementation of the IPageStore interface as is the DiskPageStore, but where the DiskPageStore writes to disk the TerracottaPageStore writes to http session. The 100 is number of pages to keep in history as far as i remember, check the source to be sure. Ard Schrijvers-3 wrote: but serialization and writing to disk are 2 different things. Yes sorry for the confusion. I intertwine the serialization and disk performance (hence asking whether a memory page store exists) because AFAIU, it is the serialized pagemaps that are being written to filesystem. Indeed, when using a memory page store, still serialization to memory is needed, so you are indeed right to say that they are different. I should talk about the cpu bottleneck of writing the serialized pagemaps to disk and whether there is a pagestore using memory. As indicated by Richard, this one seems to exist in Terracotta. I will try and see whether this avoids my experienced cpu bottleneck. Also the virus scanner option I will look into By the way, using protected ISessionStore newSessionStore() { return new HttpSessionStore(this); } Instead of protected ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new DiskPageStore()); } Also avoids the disk writing bottleneck. Now, I am not sure whether HttpSessionStore can be used instead of SecondLevelCacheSessionStore. It does not seem to write to diks. Thanks for all the pointers and fast responses everybody Regards Ard On Tue, Oct 7, 2008 at 4:21 PM, Ard Schrijvers [EMAIL PROTECTED]wrote: Hello Igor and Timo, Sorry for my really way to late response, I was caught up entirely by some stressful tasks which needed to be finished. I currently do not have statistics, but I could have a cpu yourkit snapshot. I have seen up to 75% cpu in the serialization and deserialization. Recently I saw 25%. People working with Linux do not experience this cpu bottleneck though, so it might very well be an issue with how windows handles the filesystem. I will sort out the suggestion by Timo, would be great if that solved the issue. Thanks a lot, and again, sorry for my late response! -Ard On Fri, 03 Oct 2008, Igor Vaynberg wrote: do you have some statistics for us? or some profiler timing screenshots? While waiting for the reply from Ard... I remember hearing of a case where the pagemaps were stored to a directory that the virus scanner was monitoring, and the scanner hogged all cpu during load testing :) I suppose that this kind of stuff happens more easily on Windows than on unices. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/AbstractPageStore-memory-implementation-instead-of-disk-tp19797628p19860012.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AbstractPageStore memory implementation instead of disk
The wicket integration with terracotta uses an in-memory page map. The code is here, but will soon be part of the terracotta wicket-tim. http://www.nabble.com/file/p19826206/TerracottaPageStore.java TerracottaPageStore.java Timo Rantalaiho wrote: On Fri, 03 Oct 2008, Igor Vaynberg wrote: do you have some statistics for us? or some profiler timing screenshots? While waiting for the reply from Ard... I remember hearing of a case where the pagemaps were stored to a directory that the virus scanner was monitoring, and the scanner hogged all cpu during load testing :) I suppose that this kind of stuff happens more easily on Windows than on unices. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/AbstractPageStore-memory-implementation-instead-of-disk-tp19797628p19826206.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax-only-Form?
So if im understanding correctly your form is submitting in the non-ajax standard way when you press return on the input field? If so then this is my solution: http://www.richard-wilkinson.co.uk/2008/04/05/how-to-stop-non-ajax-form-submits-in-wicket/ Hope it helps, Richard Markus-66 wrote: Hi all, I have an issue with a Form I want only to be available to users with Javascript turned on, so I used a AjaxButton, and set DefaultButton to the AjaxButton. But the Form still submits using 'Return' - rendering the Body only also kills the AjaxButton. Can anyone help me how to achieve this? Hiding the Button and appending a onchange-event to the first input-field is in my opinion a very bad way of doing it. Also in-page javascripting seems not so nice. Regards Markus - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Ajax-only-Form--tp19569839p19571913.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax-only-Form?
In that case use an ajax submit link rather than a button (which uses a href and an onclick), with no button in the form. However I dont think this will stop the enter key from submitting the form... You could also try lazy loading the form with ajax, that way you can be sure that if they see the form they have javascript enabled, actually this is probably the best way of doing it. Cheers, Richard Markus-66 wrote: Hi Richard, thank you for your answer. But my Problem is, I want to cut out the people with JavaScript deactivated because they cannot use the GoogleMaps-functionality, what makes it kinda useless to submit the form. Your prototype-approach won´t work that way. Perhaps I only add a warning-div on the top and do nothing. Any further ideas would be appreaciated. Regards Markus -Ursprüngliche Nachricht- Von: richardwilko [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 19. September 2008 15:01 An: users@wicket.apache.org Betreff: Re: Ajax-only-Form? So if im understanding correctly your form is submitting in the non-ajax standard way when you press return on the input field? If so then this is my solution: http://www.richard-wilkinson.co.uk/2008/04/05/how-to-stop-non-ajax-form-subm its-in-wicket/ Hope it helps, Richard Markus-66 wrote: Hi all, I have an issue with a Form I want only to be available to users with Javascript turned on, so I used a AjaxButton, and set DefaultButton to the AjaxButton. But the Form still submits using 'Return' - rendering the Body only also kills the AjaxButton. Can anyone help me how to achieve this? Hiding the Button and appending a onchange-event to the first input-field is in my opinion a very bad way of doing it. Also in-page javascripting seems not so nice. Regards Markus - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Ajax-only-Form--tp19569839p19571913.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Ajax-only-Form--tp19569839p19572180.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Discussion on Wicket Interface Speed-Up
im not sure we could help in the cases where you have dynamic header contributors, like you say you would either have to specify them up front (ie add them into the page not the panel, breaking encapsulation) or just serve via the normal header contributor. But i dont see how this would result in many many large files. you would have a single file for the static stuff, and then each dynamic one would have its own file (assuming not specified up front). This would still bring down the total number. eg a page has 6 static js and 2 dynamic js which would get turned into 1 static js and the same 2 dynamic js. cases where a component and resulting header contributers are added via ajax wouldnt be important for the initial page load speed anyway, as they are added after the page has loaded. Richard igor.vaynberg wrote: problem with this is that pages can have dynamic components which dynamic header contributions. so either you have to somehow collect all possible header contributions from all possible component combinations - breaking encapsulation in the process, or you have to do what you do - ending up with many many possible and big javascript files to serve to the user. -igor On Tue, Sep 2, 2008 at 2:57 PM, richardwilko [EMAIL PROTECTED] wrote: The problem of breaking encapsulation: I did some work on this problem on my own a few months ago, my solution was to use a header contrib manager, and instead of adding files with a header contributer i add them to the manager, then get a single contributer per page from the manger. for example in a panel you would do @Override protected void onBeforeRender() { super.onBeforeRender(); ResourceReference rr = new ResourceReference(getClass(), test.js); WicketApplication.get().getHcm().add(rr, getPage().getClass()); } See how it uses getPage().getClass(), so the manager knows which class the panel is being added into then in the main page class @Override protected void onBeforeRender() { super.onBeforeRender(); add(WicketApplication.get().getHcm().getHeaderContributor(getClass())); } since the manager knows all of the resources added for the page at this point, it is easy to compress them all together and serve a single file, and you dont have to list the files up front. What do you think of this idea? My code is here: http://www.nabble.com/file/p19279269/HeaderContribManagerTest.zip HeaderContribManagerTest.zip It still has bugs etc in it, and doesnt really work cos ive messed up the registerResource method, but you should be able to get the idea from it Richard - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Discussion-on-%22Wicket-Interface-Speed-Up%22-tp19197540p19279269.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Discussion-on-%22Wicket-Interface-Speed-Up%22-tp19197540p19289766.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Discussion on Wicket Interface Speed-Up
I see your point, essentially we have 1 (relativity large) bundle file per page, and if you have 5 pages which use jquery, tinymce and ajax then you are worse off, since the normal way you would have already cached the 3 individual files (this is what you meant right?) Maybe there is some way to automatically work out the best bundles to create depending on usage, so dont create bundles based on page, but based on contents? I think the real answer is that everyones usage is different and what is good for one system isn't good for another. igor.vaynberg wrote: It's not the pages that have these files. Let's say I have a page that uses jquery and a textfield with a button that toggles tinymce. If we do what you say then there are two possible files: jquery and jquery+tinymce. Than let's say I add Ajax to the page, now there are 6 possibilities depending on which components are currently on the page. IMHO much cheaper to just cache jquery, tinymce, wicket-Ajax individually. -Igor On 9/3/08, richardwilko [EMAIL PROTECTED] wrote: im not sure we could help in the cases where you have dynamic header contributors, like you say you would either have to specify them up front (ie add them into the page not the panel, breaking encapsulation) or just serve via the normal header contributor. But i dont see how this would result in many many large files. you would have a single file for the static stuff, and then each dynamic one would have its own file (assuming not specified up front). This would still bring down the total number. eg a page has 6 static js and 2 dynamic js which would get turned into 1 static js and the same 2 dynamic js. cases where a component and resulting header contributers are added via ajax wouldnt be important for the initial page load speed anyway, as they are added after the page has loaded. Richard igor.vaynberg wrote: problem with this is that pages can have dynamic components which dynamic header contributions. so either you have to somehow collect all possible header contributions from all possible component combinations - breaking encapsulation in the process, or you have to do what you do - ending up with many many possible and big javascript files to serve to the user. -igor On Tue, Sep 2, 2008 at 2:57 PM, richardwilko [EMAIL PROTECTED] wrote: The problem of breaking encapsulation: I did some work on this problem on my own a few months ago, my solution was to use a header contrib manager, and instead of adding files with a header contributer i add them to the manager, then get a single contributer per page from the manger. for example in a panel you would do @Override protected void onBeforeRender() { super.onBeforeRender(); ResourceReference rr = new ResourceReference(getClass(), test.js); WicketApplication.get().getHcm().add(rr, getPage().getClass()); } See how it uses getPage().getClass(), so the manager knows which class the panel is being added into then in the main page class @Override protected void onBeforeRender() { super.onBeforeRender(); add(WicketApplication.get().getHcm().getHeaderContributor(getClass())); } since the manager knows all of the resources added for the page at this point, it is easy to compress them all together and serve a single file, and you dont have to list the files up front. What do you think of this idea? My code is here: http://www.nabble.com/file/p19279269/HeaderContribManagerTest.zip HeaderContribManagerTest.zip It still has bugs etc in it, and doesnt really work cos ive messed up the registerResource method, but you should be able to get the idea from it Richard - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Discussion-on-%22Wicket-Interface-Speed-Up%22-tp19197540p19279269.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Discussion-on-%22Wicket-Interface-Speed-Up%22-tp19197540p19289766.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: Discussion on Wicket Interface Speed-Up
The problem of breaking encapsulation: I did some work on this problem on my own a few months ago, my solution was to use a header contrib manager, and instead of adding files with a header contributer i add them to the manager, then get a single contributer per page from the manger. for example in a panel you would do @Override protected void onBeforeRender() { super.onBeforeRender(); ResourceReference rr = new ResourceReference(getClass(), test.js); WicketApplication.get().getHcm().add(rr, getPage().getClass()); } See how it uses getPage().getClass(), so the manager knows which class the panel is being added into then in the main page class @Override protected void onBeforeRender() { super.onBeforeRender(); add(WicketApplication.get().getHcm().getHeaderContributor(getClass())); } since the manager knows all of the resources added for the page at this point, it is easy to compress them all together and serve a single file, and you dont have to list the files up front. What do you think of this idea? My code is here: http://www.nabble.com/file/p19279269/HeaderContribManagerTest.zip HeaderContribManagerTest.zip It still has bugs etc in it, and doesnt really work cos ive messed up the registerResource method, but you should be able to get the idea from it Richard - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Discussion-on-%22Wicket-Interface-Speed-Up%22-tp19197540p19279269.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket resources (css, js and images)?
Hi, A few months back I started work on a slightly different method of adding resources to a page, where, it works out what resources are added on the page, combines them together with the yui javascript compressor, caches the result, and serves it. Unfortunately I haven't had any time to work on it as my new job has taken me away from wicket, but I am happy to share my rough code with anyone that wants it. resources are added like so: HeaderContribManager.add(new ResourceReference(...), getPage()); and in each page add HeaderContribManager.getHeaderContributor(this.class, localString, styleString); in both cases put in the onBeforeRender method (the panels and such need to be added to the page before you can use getPage() afaik) Like I said its very rough, but it does have the advantage of producing a js file for each page, hopefully taking into account local and style, and should work when a panel adds javascript, and you use that panel in multiple pages. http://www.nabble.com/file/p19170189/HeaderContribManager.java HeaderContribManager.java [EMAIL PROTECTED] wrote: I've been hearing some rants on how merging resources can up the performance, should wicket be able todo this? I mean merging several css's into one etc.. I know it wont work for dynamic css/js/images. But on static it could, even yslow recommends you merge your resources into one... Images might be stretching it too far? WDYT? http://workingwithrails.com/railsplugin/5317-asset-packager http://www.kaboomerang.com/blog/2007/11/29/getting-to-10-actiontastic-actionatr-gwt-and-automagic-rest/ - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Wicket-resources-%28css%2C-js-and-images%29--tp19160980p19170189.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ?xml tag, japanese and ie6
What is the encoding of your outputted pages (in firefox right click, view page info)? This will depend on what platform you are running on (os and webserver). if it is not utf-8 then you will need to change your setup so that it is. then it *should* work. its also possible that the page encoding is being forced to something else by the browser. you could also try adding this line to your html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / btw, I dont think this isnt really a wicket problem, more a server setup problem. Toscano wrote: Hello, We are developing a multilanguage application, so our standard is utf-8. We are making intensive use of Wicket's localization features, but recently we found a problem and we can't find a good solution for it. Basically is this: for not getting corrupted Japanese, we have to include the following line in the html file: ?xml version=1.0 encoding=UTF-8? But if we include that file, then all the layout in http://lists.xml.org/archives/xml-dev/200109/msg00182.html IE6 is a mess . We tried to change the ?XML declaration with metatags inside the head of the file, but it doesn't work, the Japanese only shows correctly if the tag is there. So if we leave the tag, we get Japanese but the layout is a mess in IE6. If we removed it, we get good layout but corrupted Japanese. Is there any tag or something to configure in Wicket for making the Japanese show correctly without the ?XML tag? As always, thank you for your time, Oskar -- View this message in context: http://www.nabble.com/%3C-xml-tag%2C-japanese-and-ie6-tp18400121p18400483.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ?xml tag, japanese and ie6
Ok, but what os are you using? on windows the default character encoding is not utf-8 and java uses the system default character encoding. Also check that the html files are saved in utf-8 tbh i think that meta tag only works for really old browsers, but doesn't hurt anything if it is there. Toscano wrote: Hello, Thank you for your answer. In every case, the encoding in the browser is utf-8. It doesn't work with the metatag you send to me, it is already added in all the pages. It only works if I add the ?xml tag. Even more, I have one page with three different panels. Two of them have the ?xml line in the markup and the Japanese shows correctly, the third one has not and the japanese is corrupted. So in the same page we have correct and incorrect japanese, because the ?xml is not there. Has to be something related with Wicket... Thank you again, Oskar richardwilko wrote: What is the encoding of your outputted pages (in firefox right click, view page info)? This will depend on what platform you are running on (os and webserver). if it is not utf-8 then you will need to change your setup so that it is. then it *should* work. its also possible that the page encoding is being forced to something else by the browser. you could also try adding this line to your html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / btw, I dont think this isnt really a wicket problem, more a server setup problem. Toscano wrote: Hello, We are developing a multilanguage application, so our standard is utf-8. We are making intensive use of Wicket's localization features, but recently we found a problem and we can't find a good solution for it. Basically is this: for not getting corrupted Japanese, we have to include the following line in the html file: ?xml version=1.0 encoding=UTF-8? But if we include that file, then all the layout in http://lists.xml.org/archives/xml-dev/200109/msg00182.html IE6 is a mess . We tried to change the ?XML declaration with metatags inside the head of the file, but it doesn't work, the Japanese only shows correctly if the tag is there. So if we leave the tag, we get Japanese but the layout is a mess in IE6. If we removed it, we get good layout but corrupted Japanese. Is there any tag or something to configure in Wicket for making the Japanese show correctly without the ?XML tag? As always, thank you for your time, Oskar -- View this message in context: http://www.nabble.com/%3C-xml-tag%2C-japanese-and-ie6-tp18400121p18401085.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ?xml tag, japanese and ie6
Ok, but first rule of debugging is check the simple stuff first so I did :) In my application I have added the ?xml to my page and panel markup and have added some non-ascii chars to my markup (not sure if they are Japanese but look like it) as a test. There is no xml declaration in the source of the page in the browser (wicket removes it) and the non-ascii chars show up correctly in both ie6 and firefox. I'm not sure what you are doing differently. Which version of wicket are you using? We are using wicket 1.3.4, linux, sun java 5 and tomcat 6. -- View this message in context: http://www.nabble.com/%3C-xml-tag%2C-japanese-and-ie6-tp18400121p18401656.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Enclosure + AjaxButton
There was a bug in enclosure in 1.3.3, where it wouldn't call isVisible after the first time (fixed in 1.3.4) which version are you using? nanotech wrote: The line below pojo.setSampleText(pojo.getSampleText()); should be ignored. Thanks, nanotech wrote: Hi All, I have a simple requirement in which I want to display two different messages on Form Submit depending on whether or not the text field is filled in . The way I thought it should work is if I use combination of AjaxButton, WebMarkupContainer,wicket:enclosure and by overriding isVisible(). The flow of sample application is. .. 1. When the Page Loads(first-time) it displays..Not found (which means nothing has been entered in textfield).[This is working as expected] 2. When I type in something to textfield and submit the form--it should display Found but its not displaying that message.[Not working as expected] 3. Also, When i clear the textfield and re-submit the form it should display Not found.But this also does not happen.[Not working as expected] In short, the state of the WebMarkupcontainer never gets updated after intial load. Can someone point out what am I missing? Here is the code. SamplePage.html body form wicket:id=myForm input type=text wicket:id=sampleText / input type=submit wicket:id=sampleSubmit / div wicket:id=resultContainer wicket:enclosure [YES] /wicket:enclosure wicket:enclosure [NO] /wicket:enclosure /div /form /body SamplePage.java public class SamplePage extends WebPage { public SamplePage() { add(new SampleForm(myForm)); } private class SampleForm extends Form { public SampleForm(String id) { super(id); final SimplePOJO pojo = new SimplePOJO(); setModel(new CompoundPropertyModel(pojo)); add(new TextField(sampleText, new PropertyModel(pojo, sampleText))); final WebMarkupContainer resultContainer = new WebMarkupContainer( resultContainer); resultContainer.setOutputMarkupId(true); resultContainer.add(new Label(gotResults, Found...) { public boolean isVisible() { return pojo.getSampleText() != null; } }); resultContainer.add(new Label(noResults, Not found...) { public boolean isVisible() { return pojo.getSampleText() == null; } }); add(new AjaxButton(sampleSubmit) { protected void onSubmit(AjaxRequestTarget target, Form f) { // If javascript is enabled on user's browser. pojo.setSampleText(pojo.getSampleText()); if (target != null) { // refresh the component. target.addComponent(resultContainer); } } }); add(resultContainer); } } } SimplePOJO.java public class SimplePOJO implements Serializable{ private String sampleText; /** * @return the sampleText */ public String getSampleText() { return sampleText; } /** * @param sampleText the sampleText to set */ public void setSampleText(String sampleText) { this.sampleText = sampleText; } } -- View this message in context: http://www.nabble.com/Enclosure-%2B-AjaxButton-tp18338994p18341266.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Functional testing tools comparison
hi, I've used selenium in the past and I do like it. However it uses domIds quite a bit, and as these are autogenerated by wicket they can prove troublesome. For example, you might get a test working, then add a new component to the page, which then changes all the dom ids on the page, breaking all your tests. I know that you can specify a static domId in the wicket code, but I would be interested to hear how other people have solved / got around this problem. I had thought about using wickettester at the same time as selenium and using this to get the correct domids, but that didnt seem like a very good way of doing things. Richard -- View this message in context: http://www.nabble.com/Functional-testing-tools-comparison-tp18241663p18257390.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebApplication-level styles?
We subclass Session and call set style in the constructor. Miguel Paraz wrote: Hi, Is it possible to set the style once, at the WebApplication, instead of getting the Session in every Page, and calling setStyle() ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/WebApplication-level-styles--tp18258729p18258871.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicketstuff-minis prototip generated javascript error
Hi, Its because you didnt escape the ' in Let's when I get chance I will put some code in to make sure that this cant happen Thanks. Richard Serkan Camurcuoglu-2 wrote: Hi all, I'm using wicketstuff-minis prototip PrototipBehaviour to add tooltip to my components. In the populateItem method of my listview, I add the prototip behaviour to a label object as follows: protected void populateItem(ListItem item) { ... ContentDisplayLink link = new ContentDisplayLink(detailLink, new Model(swd.summary.getName()), swd); Label label = new Label(name, swd.summary.getName()); link.add(label); PrototipBehaviour pb = new PrototipBehaviour(Let's see this tooltip.); label.add(pb); item.add(link); } However, the generated javascript gives the following error in firefox 2.0: missing ) after argument list and the generated javascript looks like : Wicket.Event.add(window, load, function() { new Tip($('namejs__6231'),'Let's see this tooltip.');;}); what's wrong with this javascript? How can I correct it? By the way, I'm using wicket 1.3.3, wicketstuff-minis-1.3.0-SNAPSHOT.jar and portlets in Jetspeed 2.1.3 environment.. Best regards, SerkanC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Wicketstuff-minis-prototip-generated-javascript-error-tp17985410p17986272.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Please check my fix to terracotta problem
Hi, Just a little background, i've been trying to get my application clustered with terracotta for a while and ran into a big problem. Basically wicket was producing more garbage objects than terracotta could handle, as such terracotta was using up loads of disk space (see my thread on terracotta forum for more info http://forums.terracotta.org/forums/posts/list/1144.page ) To solve this I have decided to try and stop the page object being stored 'as is' to avoid the number of objects being sent to the terracotta server. My solution has been to replace the default IPageMapEntry with one that only stores a serialized version of the page: public class NewPageMapEntry extends AbstractPageMapEntry { private transient Page page; private byte[] data; public NewPageMapEntry(final Page page) { this.page = page; data = Objects.objectToByteArray(page); setNumericId(page.getNumericId()); } @Override public Page getPage() { if(this.page == null) { page = (Page) Objects.byteArrayToObject(data); } return page; } } and use it in my base page (which all others extend) like this: @Override public IPageMapEntry getPageMapEntry() { return new NewPageMapEntry(this); } Does this seem like a reasonable approach? -- View this message in context: http://www.nabble.com/Please-check-my-fix-to-terracotta-problem-tp17864318p17864318.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
any terracotta users here?
Hi Is there anyone using terracotta for session clustering with about 2000 active sessions at any one time? If so are you experiencing any problems on your terracotta server as described here: http://forums.terracotta.org/forums/posts/list/1144.page Basically there is loads of garbage being created and the terracotta garbage collector cannot keep up, I'm curious to see if any other wicket users are using terracotta with the same sort of load and experiencing similar problems, or if everything is working fine. Thanks, Richard -- View this message in context: http://www.nabble.com/any-terracotta-users-here--tp17819194p17819194.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation message
If yo have a Required validator on a TextField with wicket:id=mytextfield in a form with wicket:id=myform in a Page called MyPage.java in a package called com.mypackage then create a file called MyPage.properties in the package com.mypackage in this properties file is where you override the validation messages for anything in the page, so in this example you would add the line myform.mytextfield.Required=My required message see how the hierarchies match and the Required is the same name as your validator class (so if you used an EmailAddressValidator you would put myform.mytextfield.EmailAddressValidator) If your form was in its own java file called MyForm.java then you would put the properties file in the same package as MyForm.java and you would call your properties file MyForm.properties and it would look like this mytextfield.Required=My required message note how you dont need the myform. bit. Also see this page: http://cwiki.apache.org/WICKET/form-validation-messages.html Hope that explains it Richard wenm wrote: I try to validate component by using setRequired(). and I would like to define the feedback messages in application level properties file. For example, the application structure is like myApplication -basePage -myPage extends basePage -myForm -myTextField I tried to overwrite the default message in myApplication.properties like: myPage.myForm.myTextField.Required = something is missing But it is not succeful. I don't know whether I do something wrong or I have to set up something in myApplication? Thanks. -- View this message in context: http://www.nabble.com/validation-message-tp17821088p17825892.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Modify model value before rendering
something like this might work (untested) PropertyModel pm = new PropertyModel(this,){ @Override public Object getObject() { return (Boolean) super.getObject() ? User enabled : User not enabled; } }; danielepiras wrote: Hi, I've an object with a boolean properties. I have mapped this object with a wicket's label using a PropertyModel. All work's fine but I read in the label true/false. Instead of this value, I want to see another message (for example User enabled and User not enabled. How can I do that? Thank you very much for any help.. Daniele -- View this message in context: http://www.nabble.com/Modify-model-value-before-rendering-tp17794855p17795114.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PageExpiredException when clicking an AjaxLink
Ok this may be a longshot but see if this makes sense. I had a similar problem, it was caused because i had some image links where the src attribute was actually pointing at the home page of my application. So instead of loading an image it would actually make a get request to the home page, which puts the home page into page map. If you have enough of these dodgy images then your current page gets pushed out of the page map, as it only holds a limited number of pages, so your ajax fails. What sort of session store are you using, the default (second level cache thing) or httpsession page map? Nili Adoram wrote: Hi all, I need a clue about a strange problem we're coming across in wicket 1.3.0-rc1. (I know wicket has made a huge progress since then but our tight schedule dos not allow any upgrade at the moment). I have an AjaxLink which replaces the default onclick behavior of AjaxLink with our own behavior. When the user clicks the AjaxLink we prompt for some user input via JavaScript. The user input is concatenated to the Ajax request URL as you can see in the generated markup: # Mark As Handled However, sometimes the the Ajax request fails due to a PageExpiredException. The WebRequestCycleProcessor fails to find the page in the page map and cannot resolve the request. This happens only occasionally which prevents me from proper debugging. When I tried to raise debug level of wicket, I failed to reproduce the problem. Can anyone provide me some clue where to start ? Thanks Nili -- Best, Nili === Nili Adoram GRM Team, RD, Qlusters Inc. [EMAIL PROTECTED] +972-3-6236636 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/PageExpiredException-when-clicking-an-AjaxLink-tp17776613p1359.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: forcing cookies to expire
Ive had the same problem. to delete a cookie do this: Cookie newCookie = new Cookie(my cookie name here!, null); newCookie.setMaxAge(0); newCookie.setPath(/); getWebRequestCycle().getWebResponse().addCookie(newCookie); i dont know why (i didnt really look into it) but u seem to have to create a new cookie with the same name and add it. maybe this is a wicket bug? Richard -- View this message in context: http://www.nabble.com/forcing-cookies-to-expire-tp17067292p17758907.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: users, please give us your opinion: what is your take on generics with Wicket
[ x ] Can best be done in a limited fashion, where we only generify IModel but not components. I care more about what generifying can do for API clarity (declaring a component to only accept certain models for instance) than static type checking. [ x ] Whatever choice ultimately made, I'll happily convert/ start using 1.4 and up. To be honest I don't see the advantage of generic components, all I want is to not have to do casting when I'm using models, .getModelObject() should return the type that I put in, in a list view, if I give it a list of strings I dont want to cast the listItem model object to a string. It would also be nice if the .add() and others methods on components could return the type of component it is rather than just a Component object. eg you cant do 'new TextArea(...).add(some behavior).setRequired(true) because the add behaviour method returns a Component not a TextArea and setRequired is not available on Components. Thanks -- View this message in context: http://www.nabble.com/users%2C-please-give-us-your-opinion%3A-what-is-your-take-on-generics-with-Wicket-tp17589984p17601296.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: users, please give us your opinion: what is your take on generics with Wicket
ok maybe i misread this : 'Can best be done in a limited fashion, where we only generify IModel but not components. I care more about what generifying can do for API clarity (declaring a component to only accept certain models for instance) than static type checking.' but those 2 sentences seem to contradict each other, the first says only generify IModel which I assumed ti mean that when you put a String into a model you would get a String out of it, the second seems to says generifiying components to make them only accept some model types. So just to clarify my position generic models which would do away with this type of casting: protected void onSubmit(AjaxRequestTarget target, Form form) { EmailFormModel emailFormModel = (EmailFormModel) form.getModelObject(); is what I would like to see. generic components im not bothered about. if using generics wont do away with the casting then I dont see any point to using them at all. Johan Compagner wrote: why are you contradicting yourself? To be honest I don't see the advantage of generic components, all I want is to not have to do casting when I'm using models, .getModelObject() should return the type that I put in, in a list view, if I give it a list of strings I dont want to cast the listItem model object to a string. if you have just IModel then you will have to cast.. getModelObject will always return just Object then. ok maybe i misread about: new TextArea(...).add(some behavior).setRequired(true) this can be done but then we have to override some methods of component and then return another type The problem is that this could result in us lifting a final where we dont want to.. But this is outside the scope of generics johan On Mon, Jun 2, 2008 at 3:26 PM, richardwilko [EMAIL PROTECTED] wrote: [ x ] Can best be done in a limited fashion, where we only generify IModel but not components. I care more about what generifying can do for API clarity (declaring a component to only accept certain models for instance) than static type checking. [ x ] Whatever choice ultimately made, I'll happily convert/ start using 1.4 and up. To be honest I don't see the advantage of generic components, all I want is to not have to do casting when I'm using models, .getModelObject() should return the type that I put in, in a list view, if I give it a list of strings I dont want to cast the listItem model object to a string. It would also be nice if the .add() and others methods on components could return the type of component it is rather than just a Component object. eg you cant do 'new TextArea(...).add(some behavior).setRequired(true) because the add behaviour method returns a Component not a TextArea and setRequired is not available on Components. Thanks -- View this message in context: http://www.nabble.com/users%2C-please-give-us-your-opinion%3A-what-is-your-take-on-generics-with-Wicket-tp17589984p17601296.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/users%2C-please-give-us-your-opinion%3A-what-is-your-take-on-generics-with-Wicket-tp17589984p17602507.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajaxed panel invisible in IE
I would make sure that you are outputting valid (x)html, but thats only a guess at the solution, IE debugging is a black art unfortunately. achu18 wrote: hi all, i have an ajax link that targets another panel. when i click that link, i see nothing in IE, works ok in FireFox. in the wicket ajax debug console got an Exception evaluating javascript INFO: ?xml version=1.0 encoding=UTF-8?ajax-responseevaluate![CDATA[animationManager.setupTransitionFade('infoPanel53');]]/evaluatecomponent id=infoPanel53 ![CDATA[div class=infopanel style=visibility: hidden; id=infoPanel53 div id=info__panel54 div class=helpPanel!-- -- div class=helpContent !-- -- Terms Of Usebr/br/ doda ka ppoooedbr/ /div this is the new shit! /div /div /div]]/componentevaluate![CDATA[ajaxBlocked = false; ]]/evaluateevaluate![CDATA[Wicket.Focus.setFocusOnId(null);]]/evaluateevaluate![CDATA[animationManager.doTransitionFade('infoPanel53', 400);]]/evaluate/ajax-response INFO: Response parsed. Now invoking steps... ERROR: Exception evaluating javascript: [object Error] after some more debugging i found that if i removed all the styles from my divs (commented class=title stuff), i could see the panel, but text was all pixelated. the wierd thing is if i do a page refresh, i see my panel and the text is not pixelated. Any help appreciated. Cheers... -- View this message in context: http://www.nabble.com/ajaxed-panel-invisible-in-IE-tp17550407p17555632.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajaxed panel invisible in IE
this isnt really a wicket thing, but for cross browser javascript I would use something like prototype, which has methods for setting opacity in a cross browser way. http://www.prototypejs.org/api/element#method-setopacity Richard achu18 wrote: hi richard, managed to fix that, had some trouble in my js. currently stuck with IE and alpha(opacity=... seems to work in Firefox, not in IE, any suggestions? richardwilko wrote: I would make sure that you are outputting valid (x)html, but thats only a guess at the solution, IE debugging is a black art unfortunately. achu18 wrote: hi all, i have an ajax link that targets another panel. when i click that link, i see nothing in IE, works ok in FireFox. in the wicket ajax debug console got an Exception evaluating javascript INFO: ?xml version=1.0 encoding=UTF-8?ajax-responseevaluate![CDATA[animationManager.setupTransitionFade('infoPanel53');]]/evaluatecomponent id=infoPanel53 ![CDATA[div class=infopanel style=visibility: hidden; id=infoPanel53 div id=info__panel54 div class=helpPanel!-- -- div class=helpContent !-- -- Terms Of Usebr/br/ doda ka ppoooedbr/ /div this is the new shit! /div /div /div]]/componentevaluate![CDATA[ajaxBlocked = false; ]]/evaluateevaluate![CDATA[Wicket.Focus.setFocusOnId(null);]]/evaluateevaluate![CDATA[animationManager.doTransitionFade('infoPanel53', 400);]]/evaluate/ajax-response INFO: Response parsed. Now invoking steps... ERROR: Exception evaluating javascript: [object Error] after some more debugging i found that if i removed all the styles from my divs (commented class=title stuff), i could see the panel, but text was all pixelated. the wierd thing is if i do a page refresh, i see my panel and the text is not pixelated. Any help appreciated. Cheers... -- View this message in context: http://www.nabble.com/ajaxed-panel-invisible-in-IE-tp17550407p17555749.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxLink not clickable in IE
I have found ie to be rubbish it comes to javascript, any error in any file can stop all the javascript on the page working. make sure you dont have other javascript on the page which causes problems. Also open up the wicket ajax debug window and see you anything happens in there when you click on the link. richard igor.vaynberg wrote: wow. we spoil our users too much when they complain about not getting a response after 3 hours... -igor On Wed, May 21, 2008 at 5:24 PM, Michael Mehrle [EMAIL PROTECTED] wrote: Anyone? Or are we only talking generics today? ;-) Seriously, could use a 2nd pair of eyes on this one... any input appreciated. -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 21, 2008 2:31 PM To: users@wicket.apache.org Subject: AjaxLink not clickable in IE I've got this AjaxLink: fooLink = new AjaxLink(fooLink) { @Override public void onClick(AjaxRequestTarget target) { Boolean selected = (Boolean) fooCheckBox.getModelObject(); if (!selected) { fooCheckBox.setModelObject((new Boolean(true))); } target.addComponent(fooCheckBox); // pop up the modal showRecurringFooModal(recurringFooModalWindow, target); } }; wicket:message key=fooLabel / Works fine in Safari and Firefox but in IE it's not clickable - looks like a link but the mouse pointer doesn't change and nothing happens when clicking. No error message either in IE's JS console or in AJAX. Any idea what I'm doing wrong here? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/AjaxLink-not-clickable-in-IE-tp17379705p17399591.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat discards content-type with StringRequestTarget
You could implement your own dynamic web resource. eg for a kml page on our site: public class KMLResource extends DynamicWebResource { Document kml; public KMLResource(Document kml) { this.kml = kml; } @Override protected ResourceState getResourceState() { final XMLOutputter out = new XMLOutputter(); KMLResourceState kmlResourceState = new KMLResourceState(); try { ByteArrayOutputStream byteout = new ByteArrayOutputStream(); out.output(kml, byteout); kmlResourceState.setData(byteout.toByteArray()); byteout.close(); } catch (IOException e) { e.printStackTrace(); } return kmlResourceState; } class KMLResourceState extends ResourceState { @Override public String getContentType() { return application/vnd.google-earth.kml+xml; } private byte[] data = new byte[0]; @Override public byte[] getData() { return data; } public void setData(byte[] data) { this.data = data; } @Override public int getLength() { return data.length; } } } then use it like this in your page final KMLResource kmlResource = new KMLResource(kml); getRequestCycle().setRequestTarget(new IRequestTarget() { public void detach(RequestCycle requestCycle) { } public void respond(RequestCycle requestCycle) { ResourceStreamRequestTarget target = new ResourceStreamRequestTarget(kmlResource.getResourceStream()); target.setFileName(name); getRequestCycle().setRequestTarget(target); } }); just alter it for text rather than a Document -- View this message in context: http://www.nabble.com/Tomcat-discards-content-type-with-StringRequestTarget-tp17380397p17399964.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Testing using WicketTester
WicketTester tester = new WicketTester(new MyApplication()); should do it Eyal Golan wrote: Hi, I want to create a small UnitTest for my login page: public void testLoginPageRender() { tester.startPage(Login.class); // Just to ensure that the request has not been // intercepted or redirected tester.assertRenderedPage(Login.class); // A page might render with an error message. // If the Login page does have an associated error message, the // following // method will result in a failed assertion. tester.assertNoErrorMessage(); } I get a ClassCastException: java.lang.ClassCastException: org.apache.wicket.protocol.http.WebSession at com.eurekify.web.Login.init(Login.java:101) And this is of course because I have this in my Login page: if(((PortalSession)getSession()).isUserLoggedIn()){ PageParameters pageParameters = new PageParameters(); pageParameters.put(pageId, ); PortalWebPage page = new PortalWebPage(pageParameters); setRedirect( true ); setResponsePage(page); } My question is, how do I set the WebSession in a testing environment? Thanks -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ -- View this message in context: http://www.nabble.com/Testing-using-WicketTester-tp17403637p17403686.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Page expired using LazyLoadPanel and clustering
Hi, I almost have clustering working now - thanks for all the help people have given me. However keep seeing page exprired errors, specifically on a page that has an ajax lazy load panel on it. the page will load fine, but when the lazy load code executes the app throws a page expired error, a bit of digging arround shows me that wicket cannot find the page it has just created in session. I am sure that its the ajax request from the lazy load panel as if I turn off javascript the page loads fine. This does not happen when I dont use terracotta clustering. We are using jetty 6.1.9, terracotta 2.5.4, wicket 1.3.3. Whats strange is that even after I get the page expired error and go back into my app I still have the same jsessionid and looking at the session data in terracotta I see that I still have the same session. Also this doesn't occur on every page with lazy loaded components, just one of them. Its like the session isnt updated before the ajax lazy load panel call is made. Can anyone shed any light on this? I've spent way too much time getting clustering to work already... Thanks, Richard -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17249134.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page expired using LazyLoadPanel and clustering
We are using the default session store, in that we haven't specified anything different. All the pages are serizable and are clusterable by terracotta. The only difference in the clustered and non clustered app is that you have to use the terracotta session manager in jetty for terracotta to work. I'm tempted to blame that for the problem, but i dont see the problem on other pages with lazy loaded components. Johan Compagner wrote: so it seems a terracotta problem or config problem... What kind of session store are you using? On Thu, May 15, 2008 at 11:15 AM, richardwilko [EMAIL PROTECTED] wrote: Hi, I almost have clustering working now - thanks for all the help people have given me. However keep seeing page exprired errors, specifically on a page that has an ajax lazy load panel on it. the page will load fine, but when the lazy load code executes the app throws a page expired error, a bit of digging arround shows me that wicket cannot find the page it has just created in session. I am sure that its the ajax request from the lazy load panel as if I turn off javascript the page loads fine. This does not happen when I dont use terracotta clustering. We are using jetty 6.1.9, terracotta 2.5.4, wicket 1.3.3. Whats strange is that even after I get the page expired error and go back into my app I still have the same jsessionid and looking at the session data in terracotta I see that I still have the same session. Also this doesn't occur on every page with lazy loaded components, just one of them. Its like the session isnt updated before the ajax lazy load panel call is made. Can anyone shed any light on this? I've spent way too much time getting clustering to work already... Thanks, Richard -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17249134.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17249333.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page expired using LazyLoadPanel and clustering
I still get the same behaviour with the httpsessionstore. the problem seems to be that the page isnt put in the page map, so when the ajax call is made to lazy load the panel it cant access the page its on. looking at the http session data in the terracotta admin console i see that the AccessStackPageMap has a page map name set to null, and i cant find the page i should be on in the httpsession. if you use terracotta you shouldnt use the default DiskPageStore i believe but revert back to the 1.2 httpsessionstore.. -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17250260.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page expired using LazyLoadPanel and clustering
Ok, I've been playing around a bit more, and it turns out that this is not limited to when I do clustering with terrracotta, but happens when i run jetty normally. The page expired exception fires with this message Cannot find the rendered page in session [pagemap=null,componentPath=60:yellAdTop,versionNumber=0] as i understand it pagemapname=null is just the default page map, so that shouldnt be a problem. Im still at a loss as to why this happens though. Johan Compagner wrote: look at setAttribute then for the store It should be but into the session in the detach of the request. On Thu, May 15, 2008 at 12:30 PM, richardwilko [EMAIL PROTECTED] wrote: I still get the same behaviour with the httpsessionstore. the problem seems to be that the page isnt put in the page map, so when the ajax call is made to lazy load the panel it cant access the page its on. looking at the http session data in the terracotta admin console i see that the AccessStackPageMap has a page map name set to null, and i cant find the page i should be on in the httpsession. if you use terracotta you shouldnt use the default DiskPageStore i believe but revert back to the 1.2 httpsessionstore.. -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17250260.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17253801.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page expired using LazyLoadPanel and clustering
right, non-clustered and httpsessionstore = exceptions non-clustered and default session store = no exceptions (as far as i can see) clustered and httpsessionstore = exceptions clustered and default session store = exceptions although our live site is running on a httpsessionstore (non clustered) and does not have these same problems. The only thing that's changes is that i upgraded from wicket 1.3.0 to 1.3.3 (for clustering support) and some slight changes to the page which breaks - but nothing that should be causing these errors, the lazy load panel is the same. ive also tried wicket 1.3.2 and get same errors. But I still cant work out why on one page all my ajax works fine regardless of session store or clustering and on a different page the ajax causes page expired exceptions. Johan Compagner wrote: if you dont use terra then you should use the DiskPageStore with that store getting page expires shouldnt happen as long as the http session is there. johan On Thu, May 15, 2008 at 3:55 PM, richardwilko [EMAIL PROTECTED] wrote: Ok, I've been playing around a bit more, and it turns out that this is not limited to when I do clustering with terrracotta, but happens when i run jetty normally. The page expired exception fires with this message Cannot find the rendered page in session [pagemap=null,componentPath=60:yellAdTop,versionNumber=0] as i understand it pagemapname=null is just the default page map, so that shouldnt be a problem. Im still at a loss as to why this happens though. Johan Compagner wrote: look at setAttribute then for the store It should be but into the session in the detach of the request. On Thu, May 15, 2008 at 12:30 PM, richardwilko [EMAIL PROTECTED] wrote: I still get the same behaviour with the httpsessionstore. the problem seems to be that the page isnt put in the page map, so when the ajax call is made to lazy load the panel it cant access the page its on. looking at the http session data in the terracotta admin console i see that the AccessStackPageMap has a page map name set to null, and i cant find the page i should be on in the httpsession. if you use terracotta you shouldnt use the default DiskPageStore i believe but revert back to the 1.2 httpsessionstore.. -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17250260.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17253801.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17255175.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page expired using LazyLoadPanel and clustering
SOLVED! turns out that there are some new images being added to the page, but the image url had been messed up, specifically, was '', so when the page loads, instead of loading the image it makes a call to the home page, so instead of 20 images we get 20 calls to mydomain.com, this then messes up everything and gives me a headache. Ive fixed it now Thanks for everyones help though Richard richardwilko wrote: right, non-clustered and httpsessionstore = exceptions non-clustered and default session store = no exceptions (as far as i can see) clustered and httpsessionstore = exceptions clustered and default session store = exceptions although our live site is running on a httpsessionstore (non clustered) and does not have these same problems. The only thing that's changes is that i upgraded from wicket 1.3.0 to 1.3.3 (for clustering support) and some slight changes to the page which breaks - but nothing that should be causing these errors, the lazy load panel is the same. ive also tried wicket 1.3.2 and get same errors. But I still cant work out why on one page all my ajax works fine regardless of session store or clustering and on a different page the ajax causes page expired exceptions. Johan Compagner wrote: if you dont use terra then you should use the DiskPageStore with that store getting page expires shouldnt happen as long as the http session is there. johan On Thu, May 15, 2008 at 3:55 PM, richardwilko [EMAIL PROTECTED] wrote: Ok, I've been playing around a bit more, and it turns out that this is not limited to when I do clustering with terrracotta, but happens when i run jetty normally. The page expired exception fires with this message Cannot find the rendered page in session [pagemap=null,componentPath=60:yellAdTop,versionNumber=0] as i understand it pagemapname=null is just the default page map, so that shouldnt be a problem. Im still at a loss as to why this happens though. Johan Compagner wrote: look at setAttribute then for the store It should be but into the session in the detach of the request. On Thu, May 15, 2008 at 12:30 PM, richardwilko [EMAIL PROTECTED] wrote: I still get the same behaviour with the httpsessionstore. the problem seems to be that the page isnt put in the page map, so when the ajax call is made to lazy load the panel it cant access the page its on. looking at the http session data in the terracotta admin console i see that the AccessStackPageMap has a page map name set to null, and i cant find the page i should be on in the httpsession. if you use terracotta you shouldnt use the default DiskPageStore i believe but revert back to the 1.2 httpsessionstore.. -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17250260.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17253801.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Page-expired-using-LazyLoadPanel-and-clustering-tp17249134p17258169.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AutoComplete enter key behavior
Hi, We have changed our auto complete so that when you press enter on one of the choices in the drop down we submit the form (default is to just populate the box), is this what you mean? unfortunatly to do this you need to hack the wicket-autocomplete.js at the point where the enter key is pressed and ad some manual javascript to do what you want. Richard Ricky-22 wrote: Hi, I am trying to add a behavior to my autoComplete text field, where if i press enter, it should be able to run a default search (with some text input) and display a list of possible choices); is it possible with autoComplete.add(new AjaxBehavior() { @Override public void onEvent() { } } ); or some other additional component ? Any help would be appreciable. Rick -- View this message in context: http://www.nabble.com/AutoComplete-%22enter%22-key-behavior-tp17234468p17235509.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AutoComplete enter key behavior
So you want the autocomplete behaviour, but only when you press the enter key, ie you press enter and you get the same drop down box as you get in normal autocomplete behaviour? I dont think you can do this without making your own javascript, or hacking at the original wicket-autocomplete.js You could probably do it with an ajaxbehaviour like you have, and then refresh a ListView, but this wouldnt be the same. Ricky-22 wrote: Hi, Thanks for reply. I meant right now, there is an onChange event behavior attached to the autocomplete, which allows me to type in the text box and the list of possible matched choices appear; but what i also want is that when i press enter on the text box, it should give me list of choices (taking in some input search string). Is that possible without adding any additional java script ? Rick On Wed, May 14, 2008 at 12:40 PM, richardwilko [EMAIL PROTECTED] wrote: Hi, We have changed our auto complete so that when you press enter on one of the choices in the drop down we submit the form (default is to just populate the box), is this what you mean? unfortunatly to do this you need to hack the wicket-autocomplete.js at the point where the enter key is pressed and ad some manual javascript to do what you want. Richard Ricky-22 wrote: Hi, I am trying to add a behavior to my autoComplete text field, where if i press enter, it should be able to run a default search (with some text input) and display a list of possible choices); is it possible with autoComplete.add(new AjaxBehavior() { @Override public void onEvent() { } } ); or some other additional component ? Any help would be appreciable. Rick -- View this message in context: http://www.nabble.com/AutoComplete-%22enter%22-key-behavior-tp17234468p17235509.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards Vyas, Anirudh || ॐ || -- View this message in context: http://www.nabble.com/AutoComplete-%22enter%22-key-behavior-tp17234468p17238242.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Terracotta and PatternValidator
Hi, I've come across a problem with the wicket-terracotta intergration. If you have a PatternValidator (like EmailAddressValidator) attached to an input then terracotta throws a non portable exception because java.util.regex.Pattern isnt in the additional-boot-jar-classes bit of the config xml. I tried to add this myself but it turns out that Pattern has loads of internal classes that it uses and so it is a pain. As PatternValidator is a wicket class it would seem that these changes should either go into the wicket-terracotta integration project's xml config or that the Pattern in PatternValidator should be made transient and the code adapted to take care of it. Has anyone else got round this problem? I'm thinking for now I should write my own Validator that does hold the Pattern object. Cheers Richard -- View this message in context: http://www.nabble.com/Terracotta-and-PatternValidator-tp17189868p17189868.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IActivePageBehaviorListener exception
In case anyone else has this problem, the solution I found was to manually register the IActivePageBehaviorListener in my application constructor: public WicketApplication() { IActivePageBehaviorListener.INTERFACE.register(); } richardwilko wrote: Hi, I have wicket running clustered and occasionally see this exception: WicketMessage: Attempt to access unknown request listener interface IActivePageBehaviorListener Root cause: org.apache.wicket.WicketRuntimeException: Attempt to access unknown request listener interface IActivePageBehaviorListener at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:397) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:461) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) I happens when I start up my wicket instances, go to a page and start typing in an autocomplete text box. I only see it if I haven't done anything else in the session, ie all I have done is open the page. Im using wicket 1.3.3, jetty 6 and wadi to cluster my jetty sessions. I presume that I get this error because the session state hasnt been propagated yet when i open my first page. Has anyone had a similar error or seen this problem before? Any help would be great, Richard -- View this message in context: http://www.nabble.com/IActivePageBehaviorListener-exception-tp17127279p17147767.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IActivePageBehaviorListener exception
Hi, I have wicket running clustered and occasionally see this exception: WicketMessage: Attempt to access unknown request listener interface IActivePageBehaviorListener Root cause: org.apache.wicket.WicketRuntimeException: Attempt to access unknown request listener interface IActivePageBehaviorListener at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:397) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:461) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) I happens when I start up my wicket instances, go to a page and start typing in an autocomplete text box. I only see it if I haven't done anything else in the session, ie all I have done is open the page. Im using wicket 1.3.3, jetty 6 and wadi to cluster my jetty sessions. I presume that I get this error because the session state hasnt been propagated yet when i open my first page. Has anyone had a similar error or seen this problem before? Any help would be great, Richard -- View this message in context: http://www.nabble.com/IActivePageBehaviorListener-exception-tp17127279p17127279.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A few clustering questions
Thanks for the feedback. You for anyone elses information, after following the instructions here: http://docs.codehaus.org/display/JETTY/Session+Clustering+with+Terracotta I found that I had to include the terracotta wicket module, as I was getting terracotta exceptions without it. But now clustering with terracotta seems to work, i can shut down the instance im running on and my session is still valid on the other instance. Matej Knopp-2 wrote: Hi, On Thu, May 1, 2008 at 12:38 PM, richardwilko [EMAIL PROTECTED] wrote: Hi, Im looking into clustering our wicket app and have a few questions. We are using jetty 6. 1) We have to use the SecondLevelCacheSessionStore (default in 1.3) for clustering to work correctly, is this correct or does it still work with a HttpSessionStore? It will work with httpsessionstore, but it's not really recommended to use. 2) Wicket just piggybacks whatever we use for session clustering in jetty, is this correct? So if we use Terracotta or WADI to cluster jetty, things will just work, is this right? Yes. But in order to leverage wicket clustering support you have to configure your container NOT to keep session attributes serialized after replication. This is default in tomcat, for other containers I'm not 100% sure. 3) I've seen a wicket-cluster project in the wicketstuff repo, can anyone give me any information on this? I'm struggling to find some documentation. Wicket-cluster is a simple session replication implementation for Jetty. It can be considered a simpler alternative to WADI. It also contains a special clustered diskpagestore, but that is irrelevate with the most recent wicket version (as the pagestore clustering support is built-in to wicket to work independently of containers). 4) If we use Terracotta, does this mean we have to follow the instructions here http://www.terracotta.org/confluence/display/integrations/Wicket too? Perhaps. But this clusters actual wicket calls, so you'll get lot of overhead. I've was curious and been profiling this and the result was that clustring wicket applications with terracotta was lot slower that simple http session replication. but I'm not a terracotta expert, my setup might have been flawed and I don't really have any numbers (been quite some time ago). Still, due to the way secondlevelcachesessionstore works, simple session replication is IMHO much better alternative for Wicket. DiskPageStore serializes pages anyway (clustered environment or not) and we cache the serialized data during session replication, so there is very little overhead in regards of pageserialization if you deploy a wicket application on a cluster. The only thing to consider, as I mentioned before, is to configure your container to deserialize session attributes immediately after being replicated to another cluster node. Wicket uses this to save the serialized page to target node's diskpagestore. -Matej Thanks for any help anyone can give me. Richard -- View this message in context: http://www.nabble.com/A-few-clustering-questions-tp16993201p16993201.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/A-few-clustering-questions-tp16993201p17010177.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
A few clustering questions
Hi, Im looking into clustering our wicket app and have a few questions. We are using jetty 6. 1) We have to use the SecondLevelCacheSessionStore (default in 1.3) for clustering to work correctly, is this correct or does it still work with a HttpSessionStore? 2) Wicket just piggybacks whatever we use for session clustering in jetty, is this correct? So if we use Terracotta or WADI to cluster jetty, things will just work, is this right? 3) I've seen a wicket-cluster project in the wicketstuff repo, can anyone give me any information on this? I'm struggling to find some documentation. 4) If we use Terracotta, does this mean we have to follow the instructions here http://www.terracotta.org/confluence/display/integrations/Wicket too? Thanks for any help anyone can give me. Richard -- View this message in context: http://www.nabble.com/A-few-clustering-questions-tp16993201p16993201.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Strange redirect page before actual page loads
Hi, I have a wicket page, mounted as a IndexedParamUrlCodingStrategy, and the first time i go to the page in a session, i see a blank page which says: 'If you see this, it means that both javascript and meta-refresh are not support by your browser configuration. Please click this link to continue to the original destination' for a few seconds, after which it automatically redirects to the correct page. you can see this for yourself here: www.zoomf.com/map Does any one know whats causing this or how to stop it appearing. None of the other pages in the application show this message. Thanks, Richard -- View this message in context: http://www.nabble.com/Strange-redirect-page-before-actual-page-loads-tp16938697p16938697.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checking for file
Your modal window could periodically poll the server to see if it is available yet, I think you can use AjaxSelfUpdatingTimerBehavior for this. Richard Mathias P.W Nilsson wrote: Hi! I'm generating files ( pdf ) in a server and I want to check for the file and when the file becomes available show it to the user 1. User clicks create preview 2. A modal window opens showing ( processing file ) 3. When the file is available show link in modal window. I don't know how to do step 3. Has anyone got a suggestion? -- View this message in context: http://www.nabble.com/Checking-for-file-tp16941623p16942085.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Customising Radio Buttons with JS and CSS
Instead of using RadioChoice use a RadioGroup, i think there are examples here: http://wicketstuff.org/wicket13/forminput/ This allows you to customise the ui of your radio's much more than a RadioGroup does and should aid you in your jazziness Richard Ballist1c wrote: Hey guys, I got a funky idea for the UI. I have a form that consists of set static radio choices and I am looking to add a bit of zing with it. Rather than having the radio button with text, i want to jazz it up with having a 100x100px tile with an image on it representing each of the radio choices. The functionality i want to capture is only one option can be selected at any one time, so clicking on another tile will de-select what is currently selected and select the new tile. I am a bit stuck with this one, I am attempting to re-write the radio choice object but im not having much luck with that so far. -- View this message in context: http://www.nabble.com/Customising-Radio-Buttons-with-JS-and-CSS-tp16015072p16024767.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Double submit problem
Inside your onSubmit method do this if(!submitted) { //normal submit code submitted = true; } and have boolean submitted = false; in your class that way no matter how many times someone clicks submit the submit code should only run once Thats one way anyway hillj2 wrote: That would require me to either implement markup inheritance or to place the hidden field in the markup of all my extended forms, wouldn't it? I was hoping to make all my form instances as ignorant of the base class as possible, but I guess if I have to implement one of these solutions, it's better than having it not work at all. I assume the input variable is the value of the hidden field? Also, if the validation fails, can I still send the user to a custom error page instead of just putting an error message in the feedback panel? Sorry, I haven't dealt much with validators. I usually just validate form data manually in onSubmit. I'll start working with this solution and see what I can come up with. OnUnload isn't working our for me so far. Partly because I can't attach the event to the page with the way my code is currently set up. Thanks for the suggestion. Joel -- View this message in context: http://www.nabble.com/Double-submit-problem-tp15957979p15976516.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Use a panel as login panel rather than a different page with wicket auth
Hi, We are using the wicket-auth stuff on our site. However rather than having a separate page for login we have a modal window in our page (not a wicket modal window, but a custom one, its basically a wicket panel in the page). Is there any way to make my code for popping up the modal execute when a login is needed rather than redirecting to a different page? I know we can do this by checking if the user is logged in when a link is clicked and then running our code, but that kind of defeats the purpose of using the wicket auth stuff. Thanks, Richard -- View this message in context: http://www.nabble.com/Use-a-panel-as-login-panel-rather-than-a-different-page-with-wicket-auth-tp15891186p15891186.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Use a panel as login panel rather than a different page with wicket auth
Yea, that would work, but its still having to manually intercept every link that might go to a login protected area. I was wondering if there was any way to automatically call the 'modal.show(target);' instead of redirecting to the login page. Warren Bell wrote: I used AbstractAjaxTimerBehavior as kind of a password protected screen saver and the following code to get a modal window to open when the page is loaded. Body is a WebMarkuContainer representing the body tag. I used the standard Wicket modal window with a Panel. body.add(new AjaxEventBehavior(onload) { protected void onEvent(AjaxRequestTarget target) { modal.show(target); } }); -Original Message- From: richardwilko [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 7:06 AM To: users@wicket.apache.org Subject: Use a panel as login panel rather than a different page with wicket auth Hi, We are using the wicket-auth stuff on our site. However rather than having a separate page for login we have a modal window in our page (not a wicket modal window, but a custom one, its basically a wicket panel in the page). Is there any way to make my code for popping up the modal execute when a login is needed rather than redirecting to a different page? I know we can do this by checking if the user is logged in when a link is clicked and then running our code, but that kind of defeats the purpose of using the wicket auth stuff. Thanks, Richard -- View this message in context: http://www.nabble.com/Use-a-panel-as-login-panel-rather-than-a-dif ferent-page-with-wicket-auth-tp15891186p15891186.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Use-a-panel-as-login-panel-rather-than-a-different-page-with-wicket-auth-tp15891186p15900036.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use a panel as login panel rather than a different page with wicket auth
Thats a good point, I can just subclass AjaxLink, and make sure that it does a check if the user is logged in before doing the main code, if not then show my login box, then i can continue on to what the link was actually supposed to do. I do agree it would be easier to just redirect to a different page, but thats not really an option. Thanks, Richard -- View this message in context: http://www.nabble.com/Use-a-panel-as-login-panel-rather-than-a-different-page-with-wicket-auth-tp15891186p15900951.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Markup Rendering issues
afaik you can set a static id using component.setMarkupId(some id); you can also get at the wicket markup id using component.getMarkupId() (so long as you set component.setOutputMarkupId(true) on your component), this is useful when you are writing your javascript in java as a string then outputting it. for removing the wicket tags you can look here http://cwiki.apache.org/confluence/display/WICKET/How+to+remove+wicket+markup+from+output Can't help with the form one, I dont know if that is possible. Richard Jörn Zaefferer-2 wrote: Hi, I've got a few rendering issues with wicket: I'd like to use IDs to select elements via jQuery on the clientside, eg. a form with wicket:id=commentForm should also have id=commentForm. Wicket generates id=commentForm4 or id=commentForm5 - I've got no idea where that number comes from. Specifying an id-attribute doesn't help, it gets overwritten. So far I was unable to select elements via jQuery using the wicket:id attribute, most likely the namespace and colon kills the attribute selector. In other words: How can I instruct Wicket to render and static id-attribute? Another, similar issue: Wicket renders stuff like wicket:child and wicket:panel into the HTML markup. While the browser ignores it, I don't know why Wicket doesn't filter out those instructional markups instead. Is that configurable? All in all, I'd like to use Wicket without making it obvious to someone reading the markup that Wicket is used to generate it. So not tags and attributes with the wicket namespace should appear in the markup - I'm not using Wickets Ajax stuff anyway. For completeness, the action attribute of my form must be modified, too. Currently the contain something like ../?wicket:interface=:1:loginForm::IFormSubmitListener::. How can I replace that, eg. mount a static URL for that form? I guess most of this is easy to resolve and I just don't know enough about Wicket, yet. Pointers or solutions are both highly appreciated. Thanks Jörn Zaefferer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Markup-Rendering-issues-tp15852773p15853077.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Confused about different session stores
Hi, Could someone please explain (or point me in the direction of a tutorial) the difference between HttpSessionStore and SecondLevelCacheSessionStore. We have to use a HttpSessionStore, because otherwise we get NotSerializableException's being thrown everywhere. Does using HttpSessionStore have any drawbacks? We do have some problems with illegal argument exceptions being thrown when I try to use ajax on some (but not all) panels, and get session expired errors more often than I would like. could this have anything to do with the type of session store? Thanks, Richard -- View this message in context: http://www.nabble.com/Confused-about-different-session-stores-tp15825950p15825950.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page title when using markup inheritance
The way I do it is; dont specify a title in your base page then just add the title in the subpage: base page.html html !-- anything shared in all the pages eg a base.css file -- head /head body wicket:child/ /body /html subpage.html: wicket:head titlehard code or use wicket label to add this/title /wicket:head wicket:extend !-- anything ... -- /wicket:extend subpage.java Richard hbf wrote: I am using markup inheritance (wicket:child and wicket:extend) and need to set the page title from my subpage. I currently add a label in the base class (BasePage.java) and make it use an abstract method getTitle(), which is overridden in the subclass (SubPage.java). Has anybody found a better way? Here's my solution: !-- BasePage.html -- html head title wicket:id=title[Page title]/title /head body wicket:child/ /body /html !-- SubPage.html -- wicket:extend !-- anything ... -- /wicket:extend public abstract class BasePage extends WebPage { // ... public BasePage(final PageParameters parameters) { add(new Label(title, new PropertyModel(this, title))); } public abstract String getTitle(); } public class SubPage extends BasePage { // ... public String getTitle() { return whatever title; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Page-title-when-using-markup-inheritance-tp15827853p15828280.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Illegal argument exception when using lazy load panel
hi, I am trying to use an ajax lazy load panel. However when it tries to render the content panel I get an IllegalArgumentException which is caused when wicket tries to resolve the url of a resource that the panel inside the lazy load panel. I have traced the error to inside some tomcat code (tomcat 4), it is this line: String requrl = request.getRequestURL().toString(); inside the toAbsolute method which is causing the problem. Strangely enough the same code on the homepage works fine, and the same code in a test wicket project i made works fine, also I only get this error if the component contains a form, remove the form and the everything works fine. If i remove all of my extra resource references then i get the same error, but for wicket-event.js. Part of my stack trace: 195495 [TP-Processor3] ERROR org.apache.wicket.RequestCycle - ../../../resources/com.XYZ/somecss.css java.lang.IllegalArgumentException: ../../../resources/com.XYZ/somecss.css at org.apache.coyote.tomcat4.CoyoteResponse.toAbsolute(CoyoteResponse.java:1265) at org.apache.coyote.tomcat4.CoyoteResponse.encodeURL(CoyoteResponse.java:925) at org.apache.coyote.tomcat4.CoyoteResponseFacade.encodeURL(CoyoteResponseFacade.java:239) at org.apache.wicket.protocol.http.WebResponse.encodeURL(WebResponse.java:146) at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.encode(WebRequestCodingStrategy.java:353) at org.apache.wicket.RequestCycle.encodeUrlFor(RequestCycle.java:744) at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:940) at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:909) at org.apache.wicket.markup.html.internal.HeaderResponse.renderCSSReference(HeaderResponse.java:87) at org.apache.wicket.ajax.AjaxRequestTarget$AjaxHeaderResponse.renderCSSReference(AjaxRequestTarget.java:747) Thanks, Richard -- View this message in context: http://www.nabble.com/Illegal-argument-exception-when-using-lazy-load-panel-tp15799951p15799951.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to make a Form work both Ajax and no Ajax?
You could use an AjaxFallbackButton on your form, eg: AjaxFallbackButton a = new AjaxFallbackButton(id, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form form) { //normal stuff if(target != null) { //ajax stuff } } }; form.add(a); which should work with and without ajax. Richard MYoung wrote: I have the Ajax stuff working in my form. I want to use the same form (placed on a WebPage) to handle when JS is off, I override the onSubmit() for when JS is off. But this must be wrong because the AjaxFormSubmitBehavior no longer gets call, only the onSubmit is called. Form f = new Form(f, new CompoundPropertyModel(this)) { @Override public void onSubmit() { handleRatingChanged(null); // good when JS if off, but how to make the Ajax stuff work // when JS is back on? } }; f.setOutputMarkupId(true); f.add(new TextField(rating, Integer.class)); add(f); // // Ajax stuff, after the onSubmit is overridden in the form, this is no longer work! // f.add(new AjaxFormSubmitBehavior(onsubmit) { @Override protected void onSubmit(AjaxRequestTarget target) { handleRatingChanged(target); } @Override protected void onError(AjaxRequestTarget target) { } @Override protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() { public CharSequence decorateScript(CharSequence script) { return script + return false;; } }; } }); -- View this message in context: http://www.nabble.com/How-to-make-a-Form-work-both-Ajax-and-no-Ajax--tp15628207p15630129.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket-auth-roles problem
A few questions: 1) does your session extend AuthenticatedWebSession 2) if so what does your getRoles() method in your web session look like 3) presumably you mean @AuthorizeInstantiation(Roles.USER) - without the stars? 4) do you manually set any of the options on getSecuritySettings() in your webapplication class (afaik you shouldn't, i don't) Richard Ted Roeloffzen-2 wrote: I've made a webapplication class that extends from AuthenticatedWebApplication in the wicket-auth-roles project version 1.3.1 I've implemented the needed methods, such as getHomePage, getSignInPageClass and getWebSessionClass. They all return the appropiate class. On the homepage i've added the annotation: @AuthorizeInstantiation(Roles.* USER*) but when i run the application and go to the URL, it goes directly to the homepage and the loginpage isn't called. This isn't supposed to happen, because you need the user rol to get there. Does anyone have an idea about what i'm doing wrong? -- View this message in context: http://www.nabble.com/Wicket-auth-roles-problem-tp15631688p15632086.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ant-based example project?
Hi, We dont use maven for wicket, and use ant, instead. However we are using an very uncommon app server so our project layout wouldn't really help you. I don't see why it should be a problem to use ant tho, just make sure you have the required wicket jars available and compile as normal, im pretty sure you could make it output a war file for you to deploy to your app server too, but i dont know much about ant. Having said that I found that using maven is an easy way to get up and running, this webcast might help you: http://herebebeasties.com/2007-10-07/wicket-quickstart/ richard palun wrote: Hi all, I just downloaded Wicket 1.3.1 and now I want to use Ant for building my app and deploying it to Tomcat. I thought it would be easy to find a good example of an Ant-based project. But no. Everything seems to be all Maven... My question is: Is there a good example of an ant-based wicket project for wicket-newbies? (If someone has such a project lying around, would you consider making it available?) Many thanks! /ulf PS. I love Wicket, it's excellent! But I am afraid many potential users are probably lost simply due to its tight connection to Maven, and that is a shame... The point is: Wicket is so easy to use that it is within reach also for less experienced programmers. -- Why ruin that with Maven? (Just look at all the threads about Maven-related problems. We should be talking Wicket here, not Maven. (Ohh, I know I'm in deep now...)) -- View this message in context: http://www.nabble.com/ant-based-example-project--tp15632894p15633221.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New tooltip component I have created
Ok, I didnt know that that was there. How often is that jar file produced? Nino.Martinez wrote: Whats wrong with the stuff in maven? http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-minis/1.3.0-SNAPSHOT/ -- View this message in context: http://www.nabble.com/New-tooltip-component-I-have-created-tp15391312p15407791.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New tooltip component I have created
Cool, can I please have commit access to wicket-stuff then. My sourceforge account is richardwilko Erik van Oosten-3 wrote: Nice! You can request commit access to wicket-stuff on this list. You'll need a sourceforge account. Regards, Erik. richardwilko wrote: Hi, Thanks to the London wicket user group that I attended the other day I have created a wicket behaviour to use the prototip javascript library (http://www.nickstakenburg.com/projects/prototip/). I have the code and a description of how to use it hosted on my blog here: http://www.richard-wilkinson.co.uk/2008/02/09/wicket-prototip-behaviour/ Any comments (or bugfixes) would be welcome. If people are interested in this I would rather host this somewhere like wicket stuff, how do I go about getting it on there? Thanks, Richard Wilkinson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/New-tooltip-component-I-have-created-tp15391312p15395850.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New tooltip component I have created
Ive been looking through some other posts, would I be right in thinking that I should add my code into the wicketstuff minis project rather than create a new one. It is only 3 Java files + some bundled javascript / css / images. -- View this message in context: http://www.nabble.com/New-tooltip-component-I-have-created-tp15391312p15399576.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with two FeedbackPanels on same page
Ive not tried it myself but this might help you http://cwiki.apache.org/WICKET/using-more-than-one-feedbackpanel-per-page.html Richard Java Programmer wrote: Hello, I have 2 classes which extends Panel, and both have forms on them eg: public class AddAdvertisementPanel extends Panel { public AddAdvertisementPanel(String id) { super(id); feedback = new FeedbackPanel(feedback_add_advert).setOutputMarkupId(true); Form form = new Form(add_advert_form) { @Override protected void onSubmit() { ... } }; form.add(new TextField(title, new PropertyModel(this, title)).setRequired(true)); add(feedback); add(form); } } the other one looks similar but have other names: feedback = new FeedbackPanel(feedback_register_user).setOutputMarkupId(true); Form form = new Form(register_user_form); Both classes are instantiated on same page as panels - problem is when I submit the one form errors appears on both FeedbackPanels, but they only consider one form eg: Add new advertisement: * Field 'title' is required. * Field 'body' is required. [first form here] Register new user: * Field 'title' is required. * Field 'body' is required. [second form here] Why such situation have place? As I read about wicket nesting components should have been wired to their panels, but in my case I appear as they are global, and I could not have 2 FeedbackPanels on one page? Anyone can explain me that? Best regards, Adr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Problem-with-two-FeedbackPanels-on-same-page-tp15400141p15400911.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New tooltip component I have created
Hi, I have added my code to the wicketstuff-minis (package called org.wicketstuff.minis.prototipbehaviour). It would be nice to be able to just download a jar file, rather than have to check out the source. Martijn Dashorst wrote: Should we create a wicket-minis-1.3 release? Martijn On 2/10/08, Igor Vaynberg [EMAIL PROTECTED] wrote: yep -igor On Feb 10, 2008 10:37 AM, richardwilko [EMAIL PROTECTED] wrote: Ive been looking through some other posts, would I be right in thinking that I should add my code into the wicketstuff minis project rather than create a new one. It is only 3 Java files + some bundled javascript / css / images. -- View this message in context: http://www.nabble.com/New-tooltip-component-I-have-created-tp15391312p15399576.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.1 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1 -- View this message in context: http://www.nabble.com/New-tooltip-component-I-have-created-tp15391312p15401474.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
New tooltip component I have created
Hi, Thanks to the London wicket user group that I attended the other day I have created a wicket behaviour to use the prototip javascript library (http://www.nickstakenburg.com/projects/prototip/). I have the code and a description of how to use it hosted on my blog here: http://www.richard-wilkinson.co.uk/2008/02/09/wicket-prototip-behaviour/ Any comments (or bugfixes) would be welcome. If people are interested in this I would rather host this somewhere like wicket stuff, how do I go about getting it on there? Thanks, Richard Wilkinson -- View this message in context: http://www.nabble.com/New-tooltip-component-I-have-created-tp15391312p15391312.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]