How to do setResponsePage after alert message pressed ok?
Hi, After doing insert or update,I'd like to show some alert message,such as insert succeed. or update succeed.,and then do setResponsePage() to data listing page. But I wonder how to do it under wicket. Would anyone give me some hint? Thank you! use case: insert or update--alert message--auto redirect to data listing page. Roland. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-do-setResponsePage-after-alert-message-pressed-ok-tp3225482p3225482.html Sent from the Users forum 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: session size
Hi guys! I resolved the problem. Here is what I was doing: - I have a page, let's say HomePage which extends WebPage. - This HomePage add a MenuPanel which extends Panel (add(new MenuPanel()). - This MenuPanel add a SubmenuPanel like this menuPanel.add(new SubmenuPanel(MenuPanel.this)). Because of this reference the whole page was kept in session and the session grows very fast. You can say that I can access the MenuPanel from SubmenuPanel using getParent() but let's omit this thing. Is it normal for wicket to keep these pages in session if you have this type of reference? Thanks! -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Monday, January 17, 2011 5:33 PM To: users@wicket.apache.org Subject: Re: session size Okay, so you are storing *every* page in your page map in session. So, here's your next path (already partially explained by others): 1 - Consider: must you use http session store? why? A lot of folks *think* that they must, and they switch to it, but they don't really need to. Some honestly need to. 2 - run a profiler or memory analyzer and see what's actually being held in memory. Probably large domain objects, or sometimes even services. The reason you're holding these big objects is almost always one or both of the following: 1 - improper use of models. Not using detachable models. Putting things into new Model(someDomainObject). Or holding fields references to domain objects, or other large objects (even services). 2 - using final variables that are declared outside of an anonymous inner class from within it (which creates a field variable in the anon-inn-class for that object). -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* On Mon, Jan 17, 2011 at 9:27 AM, Mihai Toma mihai.t...@asf.ro wrote: Yes, I use HttpSessionStore. -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Monday, January 17, 2011 5:20 PM To: users@wicket.apache.org Subject: Re: session size Are you using HttpSessionStore (this is not the default - which means you would have to explicitly set this up in your application class)? On Mon, Jan 17, 2011 at 8:41 AM, Martin Grigorov mgrigo...@apache.orgwrote: Try to find what is stored actually. Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/ http://www.eclipse.org/mat/I expect that you store some bigger collections with your data with some of your components. On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote: Hi! I have an application build with wicket and I have a session problem. If one user browse the application the session (the object WebSession) becomes bigger and bigger, so if I browse 20 pages the session size has around 16 Mb. When I start browsing the session has something less than 100 Kb. I read some things about the pages which are stored in session in pageMaps and versions and I make different settings in Application class (getSessionSettings().setMaxPageMaps(10); getSessionSettings().setPageMapEvictionStrategy(new LeastRecentlyAccessedEvictionStrategy(10)); ) but seems not to resolv my problem. Do you have any idea how can I limit the session size or how can I limit the number of pages stored in session? I use wicket 1.4.8. Thanks! -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.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
[1.5 m3] SerializableChecker nullpointer?
Hi im wondering why this happens? Im using Guice and have a these in my page: @Inject private WallBoardDataProvider wallBoardDataProvider; @Inject private CoreService coreService; @Inject private CoreDaoService coreDaoService; @Inject private LicenseProvider licenseProvider; @Inject private Injector injector; 2011-01-20 10:16:44,833 ERROR [org.apache.wicket.util.lang.WicketObjects] - Error serializing object class com.netdesign.wallboard.page.DriverSetupPage [object=[Page class = com.netdesign.wallboard.page.DriverSetupPage, id = 3, render count = 2]] java.lang.NullPointerException at $Proxy39.equals(Unknown Source) at java.util.Vector.indexOf(Vector.java:361) at java.util.Vector.contains(Vector.java:320) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:343) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:418) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.java:710) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322) at org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:129) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322) at org.apache.wicket.util.lang.WicketObjects.objectToByteArray(WicketObjects.java:477) at org.apache.wicket.pageStore.DefaultPageStore.serializePage(DefaultPageStore.java:364) at org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:153) at org.apache.wicket.page.PersistentPageManager$PersitentRequestAdapter.storeTouchedPages(PersistentPageManager.java:335) at org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:185) at org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:98) at org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:68) at org.apache.wicket.page.PageAccessSynchronizer$1.commitRequest(PageAccessSynchronizer.java:204) at org.apache.wicket.Application$3.onDetach(Application.java:1233) at org.apache.wicket.request.cycle.RequestCycleListenerCollection$4.notify(RequestCycleListenerCollection.java:71) at org.apache.wicket.request.cycle.RequestCycleListenerCollection$4.notify(RequestCycleListenerCollection.java:67) at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:78) at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:65) at org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:502) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:252) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:131) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:184) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141) at com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29) at com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at
Re: [1.5 m3] SerializableChecker nullpointer?
One guess would be that the injected WallBoardDataProvider's equals method does not handle null arguments? Peter 2011-01-20 10:20 keltezéssel, nino martinez wael írta: Hi im wondering why this happens? Im using Guice and have a these in my page: @Inject private WallBoardDataProvider wallBoardDataProvider; @Inject private CoreService coreService; @Inject private CoreDaoService coreDaoService; @Inject private LicenseProvider licenseProvider; @Inject private Injector injector; 2011-01-20 10:16:44,833 ERROR [org.apache.wicket.util.lang.WicketObjects] - Error serializing object class com.netdesign.wallboard.page.DriverSetupPage [object=[Page class = com.netdesign.wallboard.page.DriverSetupPage, id = 3, render count = 2]] java.lang.NullPointerException at $Proxy39.equals(Unknown Source) at java.util.Vector.indexOf(Vector.java:361) at java.util.Vector.contains(Vector.java:320) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:343) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:418) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.java:710) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322) at org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:129) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322) at org.apache.wicket.util.lang.WicketObjects.objectToByteArray(WicketObjects.java:477) at org.apache.wicket.pageStore.DefaultPageStore.serializePage(DefaultPageStore.java:364) at org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:153) at org.apache.wicket.page.PersistentPageManager$PersitentRequestAdapter.storeTouchedPages(PersistentPageManager.java:335) at org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:185) at org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:98) at org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:68) at org.apache.wicket.page.PageAccessSynchronizer$1.commitRequest(PageAccessSynchronizer.java:204) at org.apache.wicket.Application$3.onDetach(Application.java:1233) at org.apache.wicket.request.cycle.RequestCycleListenerCollection$4.notify(RequestCycleListenerCollection.java:71) at org.apache.wicket.request.cycle.RequestCycleListenerCollection$4.notify(RequestCycleListenerCollection.java:67) at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:78) at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:65) at org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:502) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:252) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:131) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:184) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141) at com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29) at com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at
Re: [announce] wicketstuff-core 1.4.10 released
PLease where do I download stable releases on Wicket Stuff compatible with Wicket 1.4.x? thanks On Fri, Aug 13, 2010 at 4:33 AM, Michael O'Cleirigh michael.ocleir...@rivulet.ca wrote: Hello, Since wicket 1.4.10 was released this week it follows that a wicketstuff-core release is due as well. The branch for 1.4.10.1-SNAPSHOT is located here: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicketstuff-core-1.4.10 And the release tag: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.10 The artifacts have been promoted and are available via maven central like this: dependency groupIdorg.wicketstuff/groupId artifactIdjasperreports/artifactId version1.4.10/version /dependency Java 5 compatible projects: [INFO] Java 5 Modules - Parent ... SUCCESS [18.006s] [INFO] Wicket-Scala Parent ... SUCCESS [3.541s] [INFO] Wicket-Scala .. SUCCESS [12.034s] [INFO] Wicket-Scala Samples .. SUCCESS [8.617s] [INFO] Wicket-Scala Archetype SUCCESS [4.006s] [INFO] Wicket Annotations SUCCESS [11.665s] [INFO] JSLibraries ... SUCCESS [18.933s] [INFO] CalendarViews - Parent SUCCESS [2.356s] [INFO] CalendarViews . SUCCESS [13.149s] [INFO] CalendarViews - Examples .. SUCCESS [13.064s] [INFO] Client and Server Validation .. SUCCESS [8.854s] [INFO] Datatable Autocomplete - Parent ... SUCCESS [1.834s] [INFO] Datatable Autocomplete Common . SUCCESS [11.969s] [INFO] Datatable Autocomplete SUCCESS [22.470s] [INFO] Datatable Autocomplete Examples ... SUCCESS [11.275s] [INFO] DataTable Autocomplete Test ... SUCCESS [9.553s] [INFO] GMap2 - Parent SUCCESS [1.629s] [INFO] GMap2 . SUCCESS [13.844s] [INFO] GMap2 - Examples .. SUCCESS [23.301s] [INFO] Google Charts - Parent SUCCESS [1.321s] [INFO] Google Charts . SUCCESS [10.642s] [INFO] Google Charts - Examples .. SUCCESS [9.498s] [INFO] InMethod Grid Parent .. SUCCESS [2.787s] [INFO] InMethod Grid . SUCCESS [21.048s] [INFO] InMethod Grid Examples SUCCESS [19.089s] [INFO] Input Events - Parent . SUCCESS [2.222s] [INFO] Input Events .. SUCCESS [11.158s] [INFO] Input Events - Examples ... SUCCESS [10.052s] [INFO] Misc .. SUCCESS [9.961s] [INFO] JQuery Integration - Parent ... SUCCESS [1.782s] [INFO] JQuery Integration SUCCESS [27.317s] [INFO] JQuery Integration - Examples . SUCCESS [23.535s] [INFO] JSR303 - Parent ... SUCCESS [1.489s] [INFO] JSR303 SUCCESS [8.803s] [INFO] JSR303 - Examples . SUCCESS [13.364s] [INFO] Minis - Parent SUCCESS [1.277s] [INFO] Minis . SUCCESS [14.971s] [INFO] Minis - Examples .. SUCCESS [11.559s] [INFO] ObjectAutoComplete - Parent ... SUCCESS [1.526s] [INFO] ObjectAutoComplete SUCCESS [9.847s] [INFO] ObjectAutoComplete - Examples . SUCCESS [15.946s] [INFO] Openlayers Integration - Parent ... SUCCESS [1.292s] [INFO] Openlayers SUCCESS [15.991s] [INFO] Openlayers - Proxy SUCCESS [7.649s] [INFO] Openlayers - Examples . SUCCESS [17.784s] [INFO] Wicket Phonebook Example .. SUCCESS [22.908s] [INFO] Prototype Integration . SUCCESS [6.988s] [INFO] Scriptaculous Integration - Parent SUCCESS [1.758s] [INFO] Scriptaculous Integration . SUCCESS [17.392s] [INFO] Scriptaculous Integration - Examples .. SUCCESS [11.109s] [INFO] Simile Timeline - Parent .. SUCCESS
FormComponentPanel and CompoundPropertyModels
Hi, After searching unsuccessfully through the ML archive, I come here to seek some advice on FormComponentPanels (FCP). What I want to do is build a small, reusable form component that lets me edit an Address (address, zipCode, city, country). I know that FCP are usually used as a bridge between an external model and a set of individual components ; but in my case, the internal and external models are the same. Below is my current code (adapted from Wicket In Action) ; as you can see, it is very verbose and redundant. public class AddressField extends FormComponentPanelAddress { private Address address = new Address(); private TextFieldString address1; private TextFieldString address2; private TextFieldString zipCode; private TextFieldString city; private CountryCodeDropDownChoice countryCode; public AddressField(String id) { super(id); } public AddressField(String id, IModelAddress model) { super(id, model); } // Constructor block { add(address1 = new TextFieldString(address1, new PropertyModelString(address,address1))); add(address2 = new TextFieldString(address2, new PropertyModelString(address, address2))); add(zipCode = new TextFieldString(zipCode, new PropertyModelString(address, zipCode))); add(city = new TextFieldString(city, new PropertyModelString(address, city))); add((countryCode = new CountryCodeDropDownChoice(countryCode, new PropertyModelString(address, countryCode))).setRequired(true)); } @Override protected void onBeforeRender() { Address modelAddress = getModelObject(); if (modelAddress != null) { address.setAddress1(modelAddress.getAddress1()); address.setAddress2(modelAddress.getAddress2()); address.setZipCode(modelAddress.getZipCode()); address.setCity(modelAddress.getCity()); address.setCountryCode(modelAddress.getCountryCode()); } if (address.getCountryCode() == null) { address.setCountryCode(CountryUtils.CODE_FRANCE); } super.onBeforeRender(); } @Override protected void convertInput() { address.setAddress1(address1.getConvertedInput()); address.setAddress2(address2.getConvertedInput()); address.setZipCode(zipCode.getConvertedInput()); address.setCity(city.getConvertedInput()); address.setCountryCode(countryCode.getConvertedInput()); setConvertedInput(address); } } What I would like to achieve is something like this, using a CompoundPropertyModel : public class AddressField extends FormComponentPanelAddress { public AddressField(String id) { this(id, null); } public AddressField(String id, IModelAddress model) { super(id, new *CompoundPropertyModel*Address(model)); } // Constructor block { add(new TextFieldString(address1)); add(new TextFieldString(address2)); add(new TextFieldString(zipCode)); add(new TextFieldString(city)); add(new CountryCodeDropDownChoice(countryCode).setRequired(true)); } } But I cannot figure out how to make it work properly (sometimes Wicket tells me that it cannot find a getter, sometimes that it cannot bind to a null model...). I must have missed something obvious ? Thank you for you help ! Olivier
Re: [announce] wicketstuff-core 1.4.10 released
http://repo2.maven.org/maven2/org/wicketstuff/ Regards, Peter 2011-01-20 12:43 keltezéssel, Ayodeji Aladejebi írta: PLease where do I download stable releases on Wicket Stuff compatible with Wicket 1.4.x? thanks On Fri, Aug 13, 2010 at 4:33 AM, Michael O'Cleirigh michael.ocleir...@rivulet.ca wrote: Hello, Since wicket 1.4.10 was released this week it follows that a wicketstuff-core release is due as well. The branch for 1.4.10.1-SNAPSHOT is located here: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicketstuff-core-1.4.10 And the release tag: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.10 The artifacts have been promoted and are available via maven central like this: dependency groupIdorg.wicketstuff/groupId artifactIdjasperreports/artifactId version1.4.10/version /dependency Java 5 compatible projects: [INFO] Java 5 Modules - Parent ... SUCCESS [18.006s] [INFO] Wicket-Scala Parent ... SUCCESS [3.541s] [INFO] Wicket-Scala .. SUCCESS [12.034s] [INFO] Wicket-Scala Samples .. SUCCESS [8.617s] [INFO] Wicket-Scala Archetype SUCCESS [4.006s] [INFO] Wicket Annotations SUCCESS [11.665s] [INFO] JSLibraries ... SUCCESS [18.933s] [INFO] CalendarViews - Parent SUCCESS [2.356s] [INFO] CalendarViews . SUCCESS [13.149s] [INFO] CalendarViews - Examples .. SUCCESS [13.064s] [INFO] Client and Server Validation .. SUCCESS [8.854s] [INFO] Datatable Autocomplete - Parent ... SUCCESS [1.834s] [INFO] Datatable Autocomplete Common . SUCCESS [11.969s] [INFO] Datatable Autocomplete SUCCESS [22.470s] [INFO] Datatable Autocomplete Examples ... SUCCESS [11.275s] [INFO] DataTable Autocomplete Test ... SUCCESS [9.553s] [INFO] GMap2 - Parent SUCCESS [1.629s] [INFO] GMap2 . SUCCESS [13.844s] [INFO] GMap2 - Examples .. SUCCESS [23.301s] [INFO] Google Charts - Parent SUCCESS [1.321s] [INFO] Google Charts . SUCCESS [10.642s] [INFO] Google Charts - Examples .. SUCCESS [9.498s] [INFO] InMethod Grid Parent .. SUCCESS [2.787s] [INFO] InMethod Grid . SUCCESS [21.048s] [INFO] InMethod Grid Examples SUCCESS [19.089s] [INFO] Input Events - Parent . SUCCESS [2.222s] [INFO] Input Events .. SUCCESS [11.158s] [INFO] Input Events - Examples ... SUCCESS [10.052s] [INFO] Misc .. SUCCESS [9.961s] [INFO] JQuery Integration - Parent ... SUCCESS [1.782s] [INFO] JQuery Integration SUCCESS [27.317s] [INFO] JQuery Integration - Examples . SUCCESS [23.535s] [INFO] JSR303 - Parent ... SUCCESS [1.489s] [INFO] JSR303 SUCCESS [8.803s] [INFO] JSR303 - Examples . SUCCESS [13.364s] [INFO] Minis - Parent SUCCESS [1.277s] [INFO] Minis . SUCCESS [14.971s] [INFO] Minis - Examples .. SUCCESS [11.559s] [INFO] ObjectAutoComplete - Parent ... SUCCESS [1.526s] [INFO] ObjectAutoComplete SUCCESS [9.847s] [INFO] ObjectAutoComplete - Examples . SUCCESS [15.946s] [INFO] Openlayers Integration - Parent ... SUCCESS [1.292s] [INFO] Openlayers SUCCESS [15.991s] [INFO] Openlayers - Proxy SUCCESS [7.649s] [INFO] Openlayers - Examples . SUCCESS [17.784s] [INFO] Wicket Phonebook Example .. SUCCESS [22.908s] [INFO] Prototype Integration . SUCCESS [6.988s] [INFO] Scriptaculous Integration - Parent SUCCESS [1.758s] [INFO] Scriptaculous Integration . SUCCESS [17.392s] [INFO] Scriptaculous Integration - Examples .. SUCCESS [11.109s] [INFO] Simile Timeline - Parent .. SUCCESS
Re: [1.5 m3] SerializableChecker nullpointer?
Probably there are an non serializable object somewhere, but SerializableChecker stop searching for it due this proxy equals method NPE. IMO the checker would do better continuing to search the source of serialization problem, can you confirm that testing the patch at https://issues.apache.org/jira/browse/WICKET-3354 ? https://issues.apache.org/jira/browse/WICKET-3354thank u On Thu, Jan 20, 2011 at 7:20 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi im wondering why this happens? Im using Guice and have a these in my page: @Inject private WallBoardDataProvider wallBoardDataProvider; @Inject private CoreService coreService; @Inject private CoreDaoService coreDaoService; @Inject private LicenseProvider licenseProvider; @Inject private Injector injector; 2011-01-20 10:16:44,833 ERROR [org.apache.wicket.util.lang.WicketObjects] - Error serializing object class com.netdesign.wallboard.page.DriverSetupPage [object=[Page class = com.netdesign.wallboard.page.DriverSetupPage, id = 3, render count = 2]] java.lang.NullPointerException at $Proxy39.equals(Unknown Source) at java.util.Vector.indexOf(Vector.java:361) at java.util.Vector.contains(Vector.java:320) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:343) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:418) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:641) at org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:564) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:351) at org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.java:710) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322) at org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:129) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322) at org.apache.wicket.util.lang.WicketObjects.objectToByteArray(WicketObjects.java:477) at org.apache.wicket.pageStore.DefaultPageStore.serializePage(DefaultPageStore.java:364) at org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:153) at org.apache.wicket.page.PersistentPageManager$PersitentRequestAdapter.storeTouchedPages(PersistentPageManager.java:335) at org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:185) at org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:98) at org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:68) at org.apache.wicket.page.PageAccessSynchronizer$1.commitRequest(PageAccessSynchronizer.java:204) at org.apache.wicket.Application$3.onDetach(Application.java:1233) at org.apache.wicket.request.cycle.RequestCycleListenerCollection$4.notify(RequestCycleListenerCollection.java:71) at org.apache.wicket.request.cycle.RequestCycleListenerCollection$4.notify(RequestCycleListenerCollection.java:67) at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:78) at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:65) at org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:502) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:252) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:131) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:184) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141) at com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29) at com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155) at
Re: [announce] wicketstuff-core 1.4.10 released
Better use http://oss.sonatype.org 2011/1/20 Major Péter majorpe...@sch.bme.hu http://repo2.maven.org/maven2/org/wicketstuff/ Regards, Peter 2011-01-20 12:43 keltezéssel, Ayodeji Aladejebi írta: PLease where do I download stable releases on Wicket Stuff compatible with Wicket 1.4.x? thanks On Fri, Aug 13, 2010 at 4:33 AM, Michael O'Cleirigh michael.ocleir...@rivulet.ca wrote: Hello, Since wicket 1.4.10 was released this week it follows that a wicketstuff-core release is due as well. The branch for 1.4.10.1-SNAPSHOT is located here: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicketstuff-core-1.4.10 And the release tag: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.10 The artifacts have been promoted and are available via maven central like this: dependency groupIdorg.wicketstuff/groupId artifactIdjasperreports/artifactId version1.4.10/version /dependency Java 5 compatible projects: [INFO] Java 5 Modules - Parent ... SUCCESS [18.006s] [INFO] Wicket-Scala Parent ... SUCCESS [3.541s] [INFO] Wicket-Scala .. SUCCESS [12.034s] [INFO] Wicket-Scala Samples .. SUCCESS [8.617s] [INFO] Wicket-Scala Archetype SUCCESS [4.006s] [INFO] Wicket Annotations SUCCESS [11.665s] [INFO] JSLibraries ... SUCCESS [18.933s] [INFO] CalendarViews - Parent SUCCESS [2.356s] [INFO] CalendarViews . SUCCESS [13.149s] [INFO] CalendarViews - Examples .. SUCCESS [13.064s] [INFO] Client and Server Validation .. SUCCESS [8.854s] [INFO] Datatable Autocomplete - Parent ... SUCCESS [1.834s] [INFO] Datatable Autocomplete Common . SUCCESS [11.969s] [INFO] Datatable Autocomplete SUCCESS [22.470s] [INFO] Datatable Autocomplete Examples ... SUCCESS [11.275s] [INFO] DataTable Autocomplete Test ... SUCCESS [9.553s] [INFO] GMap2 - Parent SUCCESS [1.629s] [INFO] GMap2 . SUCCESS [13.844s] [INFO] GMap2 - Examples .. SUCCESS [23.301s] [INFO] Google Charts - Parent SUCCESS [1.321s] [INFO] Google Charts . SUCCESS [10.642s] [INFO] Google Charts - Examples .. SUCCESS [9.498s] [INFO] InMethod Grid Parent .. SUCCESS [2.787s] [INFO] InMethod Grid . SUCCESS [21.048s] [INFO] InMethod Grid Examples SUCCESS [19.089s] [INFO] Input Events - Parent . SUCCESS [2.222s] [INFO] Input Events .. SUCCESS [11.158s] [INFO] Input Events - Examples ... SUCCESS [10.052s] [INFO] Misc .. SUCCESS [9.961s] [INFO] JQuery Integration - Parent ... SUCCESS [1.782s] [INFO] JQuery Integration SUCCESS [27.317s] [INFO] JQuery Integration - Examples . SUCCESS [23.535s] [INFO] JSR303 - Parent ... SUCCESS [1.489s] [INFO] JSR303 SUCCESS [8.803s] [INFO] JSR303 - Examples . SUCCESS [13.364s] [INFO] Minis - Parent SUCCESS [1.277s] [INFO] Minis . SUCCESS [14.971s] [INFO] Minis - Examples .. SUCCESS [11.559s] [INFO] ObjectAutoComplete - Parent ... SUCCESS [1.526s] [INFO] ObjectAutoComplete SUCCESS [9.847s] [INFO] ObjectAutoComplete - Examples . SUCCESS [15.946s] [INFO] Openlayers Integration - Parent ... SUCCESS [1.292s] [INFO] Openlayers SUCCESS [15.991s] [INFO] Openlayers - Proxy SUCCESS [7.649s] [INFO] Openlayers - Examples . SUCCESS [17.784s] [INFO] Wicket Phonebook Example .. SUCCESS [22.908s] [INFO] Prototype Integration . SUCCESS [6.988s] [INFO] Scriptaculous Integration - Parent SUCCESS [1.758s] [INFO] Scriptaculous
Re: FormComponentPanel and CompoundPropertyModels
Hi, id of your TextFields should match name of property in Address model. something like that.. public class Address { private String address1; private String address2; private String city; //getters public String getAddress1(){} ... } Jan Ferko On 01/20/2011 12:45 PM, Olivier Croisier wrote: Hi, After searching unsuccessfully through the ML archive, I come here to seek some advice on FormComponentPanels (FCP). What I want to do is build a small, reusable form component that lets me edit an Address (address, zipCode, city, country). I know that FCP are usually used as a bridge between an external model and a set of individual components ; but in my case, the internal and external models are the same. Below is my current code (adapted from Wicket In Action) ; as you can see, it is very verbose and redundant. public class AddressField extends FormComponentPanelAddress { private Address address = new Address(); private TextFieldString address1; private TextFieldString address2; private TextFieldString zipCode; private TextFieldString city; private CountryCodeDropDownChoice countryCode; public AddressField(String id) { super(id); } public AddressField(String id, IModelAddress model) { super(id, model); } // Constructor block { add(address1 = new TextFieldString(address1, new PropertyModelString(address,address1))); add(address2 = new TextFieldString(address2, new PropertyModelString(address, address2))); add(zipCode = new TextFieldString(zipCode, new PropertyModelString(address, zipCode))); add(city = new TextFieldString(city, new PropertyModelString(address, city))); add((countryCode = new CountryCodeDropDownChoice(countryCode, new PropertyModelString(address, countryCode))).setRequired(true)); } @Override protected void onBeforeRender() { Address modelAddress = getModelObject(); if (modelAddress != null) { address.setAddress1(modelAddress.getAddress1()); address.setAddress2(modelAddress.getAddress2()); address.setZipCode(modelAddress.getZipCode()); address.setCity(modelAddress.getCity()); address.setCountryCode(modelAddress.getCountryCode()); } if (address.getCountryCode() == null) { address.setCountryCode(CountryUtils.CODE_FRANCE); } super.onBeforeRender(); } @Override protected void convertInput() { address.setAddress1(address1.getConvertedInput()); address.setAddress2(address2.getConvertedInput()); address.setZipCode(zipCode.getConvertedInput()); address.setCity(city.getConvertedInput()); address.setCountryCode(countryCode.getConvertedInput()); setConvertedInput(address); } } What I would like to achieve is something like this, using a CompoundPropertyModel : public class AddressField extends FormComponentPanelAddress { public AddressField(String id) { this(id, null); } public AddressField(String id, IModelAddress model) { super(id, new *CompoundPropertyModel*Address(model)); } // Constructor block { add(new TextFieldString(address1)); add(new TextFieldString(address2)); add(new TextFieldString(zipCode)); add(new TextFieldString(city)); add(new CountryCodeDropDownChoice(countryCode).setRequired(true)); } } But I cannot figure out how to make it work properly (sometimes Wicket tells me that it cannot find a getter, sometimes that it cannot bind to a null model...). I must have missed something obvious ? Thank you for you help ! Olivier - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Question regarding AjaxFormSubmitBehavior
Have a small question regarding using AjaxFormSubmitBehavoir with nested forms. Would like to use it to submit a smaller nested form within a bigger parent form. Even though I passed a nested form as a *form that will be submitted* while calling the following constructor of AjaxFormSubmitBehavoir : /** * Construct. * * @param form * * form that will be submitted* * @param event *javascript event this behavior is attached to, like onclick */ public AjaxFormSubmitBehavior(Form? form, String event) - passing nested form here { super(event); __form = form; if (form != null) { form.setOutputMarkupId(true); } } I noticed that the AjaxFormSubmitBehavior#onEvent(AjaxRequestTarget target) executes the following line first: getForm().getRootForm().onFormSubmitted(); Why does it still delegate to the root form? Shouldn't the line be getForm().onFormSubmitted(); so that the nested form and possibly its children get processed only. Many thanks! Daniel
Re: FormComponentPanel and CompoundPropertyModels
When I use the second solution I gave above, the data I enter in the form is not saved to the model, and I don't understand why... I also tried to override convertInput() - still does not work protected void convertInput() { setConvertedInput(getModelObject()); } For info, here is how the AddressField is used : private class CompanyForm extends FormCompany { public CompanyForm(String wicketId, IModelCompany model) { super(wicketId, new CompoundPropertyModelCompany(model)); add(new TextFieldString(name)); add(new AddressField(address)); ... } } With : public class Company { private Address address = new Address(); } public class Address { private String address1; private String address2; private String zipCode; private String city; private String countryCode; }
Re: Submit form from other form onClick
you can submit any form with pure javascript: document.getElementById('myform').submit(); this will call the respective myForm.onSubmit() method at the server side at server side you may call directly your methods e.g. new Form() {onSubmit() { myService.do(); }} new AjaxLink() {onClick() { myService.do(); }} no need to call Wicket methods On Thu, Jan 20, 2011 at 2:49 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is there a way to manually submit a form. E.g. normally we would have action handler methods onSubmit (on a button or a form). E.g. new AjaxLink() { onClick() { someOtherForm.submit(); } } Berlin Brown
Re: Free wicket from component hierarchy hell
1.5 port https://github.com/koutsoub/wicket/tree/component_queuing_1.5 https://github.com/koutsoub/wicket/tree/component_queuing_1.5 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Free-wicket-from-component-hierarchy-hell-tp3027705p3226581.html Sent from the Users forum 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: Resource.getResourceStream() called twice in 1.4.15
To follow-up it appears getResourceStream is being called multiple times per request for other shared resources like generated images (even under 1.4.12). This can be extremely inefficient depending on the amount of work done. I'm wondering if there's something wrong with my configuration. Any thoughts? I'm basically extending Resource and overriding getResourceStream to return either a generated image (via AbstractResourceStream) or text information (via StringResourceStream). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Resource-getResourceStream-called-twice-in-1-4-15-tp3225454p3227876.html Sent from the Users forum 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: export to excel AjaxFallbackDefaultDataTable
Thanks for your reply , I tried using apache poi call the data provider get data and create excel . It works fine no problems.To download this excel I am using fileresource,the file I provide to this is a temp file my excel util creates this temp file, after download I want to clear the temp file , please suggest me how to clean up the temp file? . -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/export-to-excel-AjaxFallbackDefaultDataTable-tp3225458p3227903.html Sent from the Users forum 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: export to excel AjaxFallbackDefaultDataTable
Are you using a DownloadLink? http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/link/DownloadLink.html#setDeleteAfterDownload%28boolean%29 On Thu, Jan 20, 2011 at 11:26 AM, fachhoch fachh...@gmail.com wrote: Thanks for your reply , I tried using apache poi call the data provider get data and create excel . It works fine no problems.To download this excel I am using fileresource,the file I provide to this is a temp file my excel util creates this temp file, after download I want to clear the temp file , please suggest me how to clean up the temp file? . -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/export-to-excel-AjaxFallbackDefaultDataTable-tp3225458p3227903.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Resource.getResourceStream() called twice in 1.4.15
we fixed something similar in 1.5 - UrlResourceStream was opening the underlying connection twice but your seems to be something else create a quickstart and attach to Jira thanks! On Thu, Jan 20, 2011 at 5:13 PM, Brad Grier brad.gr...@salusnovus.comwrote: To follow-up it appears getResourceStream is being called multiple times per request for other shared resources like generated images (even under 1.4.12). This can be extremely inefficient depending on the amount of work done. I'm wondering if there's something wrong with my configuration. Any thoughts? I'm basically extending Resource and overriding getResourceStream to return either a generated image (via AbstractResourceStream) or text information (via StringResourceStream). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Resource-getResourceStream-called-twice-in-1-4-15-tp3225454p3227876.html Sent from the Users forum 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: Free wicket from component hierarchy hell
On Wed, Jan 19, 2011 at 3:55 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Can we bargain about this? Say, also wicket auto ajax enclosure and both into 1.4-x This made me laugh. What is the other side of the bargain? What does the giving party get in return? :) Apache is all about consensus. If the project management committee (who ultimately has to lead and guide the project) agrees that something is useful, beneficial, and not detrimental, they allow it to be added by the committers. In the case of Wicket, each committer is also on the PMC. So, with several committers against this feature being added to 1.4.x (myself included) and possibly even 1.5, you must persuade them (us) as to why it is needed. That being said, this has already been a really long thread (over 100 messages), so you're up against bad odds. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: Wicket at FOSDEM 2011
Any plan to host in US or Canada? On Jan 20, 2011, at 10:42 AM, jowen.gsb [via Apache Wicket]ml-node+3226705-1948444894-208...@n4.nabble.com wrote: I wish I could! A trip to Brussels is outside my training budget. ;) -Original Message- From: Martijn Dashorst [mailto:[hidden email]] Sent: Wednesday, January 19, 2011 3:44 AM To: [hidden email] Subject: Wicket at FOSDEM 2011 All, I'll be giving a talk about Wicket (and Wicket 1.5) at FOSDEM next february (http://fosdem.org). The conference is free to attend. Anyone attending the conference? Martijn -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] - To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Wicket-at-FOSDEM-2011-tp3224868p3226705.html To start a new topic under Users forum, email ml-node+1842947-1796608331-208...@n4.nabble.com To unsubscribe from Users forum, click here. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-at-FOSDEM-2011-tp3224868p3227995.html Sent from the Users forum 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: Free wicket from component hierarchy hell
http://farm5.static.flickr.com/4089/4968160827_b742a7448a_z.jpg ..hrm.. putting that aside, did you give it a test drive? ** Martin 2011/1/20 Jeremy Thomerson jer...@wickettraining.com: On Wed, Jan 19, 2011 at 3:55 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Can we bargain about this? Say, also wicket auto ajax enclosure and both into 1.4-x This made me laugh. What is the other side of the bargain? What does the giving party get in return? :) Apache is all about consensus. If the project management committee (who ultimately has to lead and guide the project) agrees that something is useful, beneficial, and not detrimental, they allow it to be added by the committers. In the case of Wicket, each committer is also on the PMC. So, with several committers against this feature being added to 1.4.x (myself included) and possibly even 1.5, you must persuade them (us) as to why it is needed. That being said, this has already been a really long thread (over 100 messages), so you're up against bad odds. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Automatic ajax feedback panel
Wicketopia has something similar called autofeedback. It's not as robust, but I believe Igor and I discussed this a while back, so I decided to make it reusable. On Thu, Jan 20, 2011 at 12:21 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Referring to http://apache-wicket.1842946.n4.nabble.com/HowTo-inject-FeedbackPanel-td2295430.html Here is an initial attempt at a listener solution which will automatically add a feedback panel in component hierarchy. it will seek for the topmost feedback panel... might not fit for all purposes but that is easy to change. /** * @see org.apache.wicket.protocol.http.WebApplication#newAjaxRequestTarget(org.apache.wicket.Page) */ @Override public AjaxRequestTarget newAjaxRequestTarget(Page page) { AjaxRequestTarget ajaxRequestTarget = super.newAjaxRequestTarget(page); ajaxRequestTarget.addListener(new ErrorComponentAndNearestFeedbackPanelAjaxAutoAdderListener()); return ajaxRequestTarget; } public static class TopMostVisibleFeedbackPanelAjaxAutoAdderListener implements IListener { private IFeedbackMessageFilter feedbackMessageFilter; /** * @see org.apache.wicket.ajax.AjaxRequestTarget.IListener#onBeforeRespond(java.util.Map, org.apache.wicket.ajax.AjaxRequestTarget) */ @Override public void onBeforeRespond(MapString, Component map, AjaxRequestTarget target) { FeedbackMessages feedbackMessages = Session.get().getFeedbackMessages(); for (FeedbackMessage feedbackMessage : feedbackMessages.messages(feedbackMessageFilter)) { if (feedbackMessage.getReporter() != null) { Object feedbackPanel = new VisitTopMostMarkupContainerPageOrModalWindowHavingVisibleChild(feedbackMessage.getReporter(), IFeedback.class).getFoundChild(); if (feedbackPanel instanceof Component) { target.addComponent((Component) feedbackPanel); // Add feedbackPanel to the ajax request target } } } } /** * @param feedbackMessageFilter the feedbackMessageFilter to set * @return NearestFeedbackPanelAjaxAutoAdderListener */ public TopMostVisibleFeedbackPanelAjaxAutoAdderListener setFeedbackMessageFilter(IFeedbackMessageFilter feedbackMessageFilter) { this.feedbackMessageFilter = feedbackMessageFilter; return this; } /** * @return the feedbackMessageFilter */ public IFeedbackMessageFilter getFeedbackMessageFilter() { return feedbackMessageFilter; } /** * @see org.apache.wicket.ajax.AjaxRequestTarget.IListener#onAfterRespond(java.util.Map, org.apache.wicket.ajax.AjaxRequestTarget.IJavascriptResponse) */ @Override public void onAfterRespond(MapString, Component map, org.apache.wicket.ajax.AjaxRequestTarget.IJavascriptResponse response) { // Override if necessary } } public class VisitTopMostMarkupContainerPageOrModalWindowHavingVisibleChild implements Component.IVisitorComponent { /** */ private final Class? childCriteria; private Object foundChild; /** * @param component * @param childCriteria */ public VisitTopMostMarkupContainerPageOrModalWindowHavingVisibleChild(Component component, Class? childCriteria) { this.childCriteria = childCriteria; component.visitParents(MarkupContainer.class, this); } /** * @param component * @return Object */ public Object component(Component component) { MarkupContainer markupContainer = (MarkupContainer) component; Object foundChildComponent = markupContainer.visitChildren(childCriteria, new Component.IVisitorComponent() { /** * @param childComponent * @return Object */ public Object component(Component childComponent) { if (true||childComponent.isVisible()) { return childComponent; } return CONTINUE_TRAVERSAL; } }); if (childCriteria.isInstance(foundChildComponent)) { foundChild = foundChildComponent; // Find topmost } if (component instanceof ModalWindow) { return STOP_TRAVERSAL; // Don't go deeper than ModalWindow } return CONTINUE_TRAVERSAL; } /** * @return the foundChild */ public Object getFoundChild() { return foundChild; } } ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Automatic ajax feedback panel
Note minor typo or residual code at true|| at if (true||childComponent.isVisible()) { 2011/1/20 Martin Makundi martin.maku...@koodaripalvelut.com: public Object component(Component childComponent) { if (true||childComponent.isVisible()) { return childComponent; } return CONTINUE_TRAVERSAL; } }); if (childCriteria.isInstance(foundChildComponent)) { foundChild = foundChildComponent; // Find topmost } if (component instanceof ModalWindow) { return STOP_TRAVERSAL; // Don't go deeper than ModalWindow } return CONTINUE_TRAVERSAL; } /** * @return the foundChild */ public Object getFoundChild() { return foundChild; } } ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Added parameters on the end of requests with wicket 1.5
I've been converting mysticpaste.com to using Wicket 1.5 with the help of Martin Grigorov :) - the source is available here - https://github.com/kinabalu/mysticpaste 99% of the way there, and the only remaining issue is that when you paste a URL with previous versions of Wicket, I properly get /view/[paste-id] and that's it With Wicket 1.5 however, it's appending the pagemap number? So I get instead /view/[paste-id]?1 -- the page is not stateless, has some ajax components on it. But it is important that the URL the users get is just /view/[paste-id] Here's how I move the user to the view page right now: params.add(0, Long.toString(pasteItem.getId())); setResponsePage(ViewPublicPage.class, params); And here's the mount in Application: mountPage(/view/${0}/${1}, ViewPublicPage.class); the ${1} here is for highlighting specific lines Thanks! To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com ofc: 714-352-0298 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: @kinabalu facebook: http://www.facebook.com/lombardi fan mystic: http://www.facebook.com/mysticcoders flickr: http://www.flickr.com/photos/kinabalu Eco-Tip: Printing e-mails is usually a waste. -- If this message wasn't addressed to you, don't use, disclose, distribute, print or copy any part of this message
Re: Free wicket from component hierarchy hell
On Thu, Jan 20, 2011 at 11:24 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: ..hrm.. putting that aside, did you give it a test drive? No, I haven't. Because keeping the two hierarchies in sync has never been a problem on any project that I worked on. Typically, the hierarchies are very shallow anyway because of breaking things into panels and reusable components. So, with shallow hierarchies, it really doesn't bring much benefit to the table. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: Free wicket from component hierarchy hell
I'm not a committer, just a normal 1.5 user concerned about bloat. For what it's worth, I took a few minutes to actually look at the change (MarkupContainer as you'd expect) and I can see that if you don't use the new queue methods, the only a memory overhead is the *static* QUEUE (nothing extra per component!) so I appreciate that performance-wise anyway, it's a low impact feature you can ignore without penalty. I'm not thrilled about the conceptual impact of adding a new concern to an already large class, but the implementation looks quite nice actually, so my first concern that it might break existing behavior is satisfied. I still don't think it's necessary, and wonder if it might actually be counter-productive to have more than one way to learn for new adopters. If it goes forward, I don't suppose there's much precedent for taking something back out, is there? What a difficult discussion to have over email - I'm in the -1 camp on this overall, but I think I do appreciate the admirable motive to innovate, so I hope the committers will give this serious consideration and then chuck it in the bin where it ... no, just kidding, ;) and then make a fair decision. Thanks, --Jim Pinkham. On Thu, Jan 20, 2011 at 12:24 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: http://farm5.static.flickr.com/4089/4968160827_b742a7448a_z.jpg ..hrm.. putting that aside, did you give it a test drive? ** Martin 2011/1/20 Jeremy Thomerson jer...@wickettraining.com: On Wed, Jan 19, 2011 at 3:55 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Can we bargain about this? Say, also wicket auto ajax enclosure and both into 1.4-x This made me laugh. What is the other side of the bargain? What does the giving party get in return? :) Apache is all about consensus. If the project management committee (who ultimately has to lead and guide the project) agrees that something is useful, beneficial, and not detrimental, they allow it to be added by the committers. In the case of Wicket, each committer is also on the PMC. So, with several committers against this feature being added to 1.4.x (myself included) and possibly even 1.5, you must persuade them (us) as to why it is needed. That being said, this has already been a really long thread (over 100 messages), so you're up against bad odds. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: session size
On Thu, Jan 20, 2011 at 2:42 AM, Mihai Toma mihai.t...@asf.ro wrote: Hi guys! I resolved the problem. Here is what I was doing: - I have a page, let's say HomePage which extends WebPage. - This HomePage add a MenuPanel which extends Panel (add(new MenuPanel()). - This MenuPanel add a SubmenuPanel like this menuPanel.add(new SubmenuPanel(MenuPanel.this)). Because of this reference the whole page was kept in session and the session grows very fast. You can say that I can access the MenuPanel from SubmenuPanel using getParent() but let's omit this thing. Is it normal for wicket to keep these pages in session if you have this type of reference? Every component has a reference to its page. So, what you described above should not be a problem. And since you're using HttpSessionStore, all pages will be serialized into session anyway. But pages and components themselves are not very large. You need to run a memory analyzer and look for: 1 - references to pages or components from another page hierarchy (don't pass one component to another page) 2 - (more likely) references to domain objects or, worse yet, services / daos that are being serialized -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: Automatic ajax feedback panel
Another minor issue, it seems that this was not eager enough when no components have actual errors (just session.info for example). To make it more eager: public static class TopMostVisibleFeedbackPanelAjaxAutoAdderListener implements IListener { private IFeedbackMessageFilter feedbackMessageFilter; /** * @see org.apache.wicket.ajax.AjaxRequestTarget.IListener#onBeforeRespond(java.util.Map, org.apache.wicket.ajax.AjaxRequestTarget) */ @Override public void onBeforeRespond(MapString, Component map, AjaxRequestTarget target) { FeedbackMessages feedbackMessages = Session.get().getFeedbackMessages(); ListFeedbackMessage messages = feedbackMessages.messages(feedbackMessageFilter); if (!messages.isEmpty()) { Object feedbackPanel = null; for (FeedbackMessage feedbackMessage : messages) { Component component = feedbackMessage.getReporter(); if (component != null) { feedbackPanel = addFeedbackPanel(target, component); } } if (feedbackPanel == null) { // Some messages still want to become visible, try finding feedbackpanel from page addFeedbackPanel(target, target.getPage()); } } } /** * @param target * @param component * @return */ private Object addFeedbackPanel(AjaxRequestTarget target, Component component) { Object feedbackPanel = new VisitTopMostMarkupContainerPageOrModalWindowHavingVisibleChild(component, IFeedback.class).getFoundChild(); if (feedbackPanel instanceof Component) { target.addComponent((Component) feedbackPanel); // Add feedbackPanel to the ajax request target return feedbackPanel; } return null; } . Also public VisitTopMostMarkupContainerPageOrModalWindowHavingVisibleChild(Component component, Class? childCriteria) { this.childCriteria = childCriteria; if ((component.getParent() == null) (component instanceof MarkupContainer)) { component(component); } else { component.visitParents(MarkupContainer.class, this); } } ** Martin 2011/1/20 Martin Makundi martin.maku...@koodaripalvelut.com: Note minor typo or residual code at true|| at if (true||childComponent.isVisible()) { 2011/1/20 Martin Makundi martin.maku...@koodaripalvelut.com: public Object component(Component childComponent) { if (true||childComponent.isVisible()) { return childComponent; } return CONTINUE_TRAVERSAL; } }); if (childCriteria.isInstance(foundChildComponent)) { foundChild = foundChildComponent; // Find topmost } if (component instanceof ModalWindow) { return STOP_TRAVERSAL; // Don't go deeper than ModalWindow } return CONTINUE_TRAVERSAL; } /** * @return the foundChild */ public Object getFoundChild() { return foundChild; } } ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Free wicket from component hierarchy hell
On Thu, Jan 20, 2011 at 11:50 AM, Jim Pinkham pinkh...@gmail.com wrote: I still don't think it's necessary, and wonder if it might actually be counter-productive to have more than one way to learn for new adopters. If it goes forward, I don't suppose there's much precedent for taking something back out, is there? This is the key for me. I make my living off of teaching Wicket classes. New people to Wicket always make mistakes with models and a few other things. But after the first morning of class, they almost *never* have a problem with component hierarchies. BUT - if we add two ways of building a hierarchy, and one of them is a little magical, then it gets difficult. It's too bad we don't have mixins in Java - it would be nice to be able to have this feature as an entirely separate jar that could be added. I guess you could do it now, but rather than calling #queue(compToBeQueued) on your component, you'd have to use something like ComponentQueue#queue(component, compToBeQueued). That could store it in metadata like the current implementation (if it hasn't changed since the last time I looked at the code), and then an onbeforerender listener might be able to de-queue everything. I'd have no problem with it being an add-on that isn't in the core Component. What a difficult discussion to have over email - I'm in the -1 camp on this overall, but I think I do appreciate the admirable motive to innovate, so I hope the committers will give this serious consideration and then chuck it in the bin where it ... no, just kidding, ;) and then make a fair decision. We never dismiss things off-hand, and will give it consideration. But we have to consider both new and advanced users. I just don't think there's enough of a use-case requirement for it to justify the confusion that I *know* it will cause. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: Free wicket from component hierarchy hell
On Thu, Jan 20, 2011 at 4:41 PM, Giannis Koutsoubos kouts...@gmail.comwrote: 1.5 port https://github.com/koutsoub/wicket/tree/component_queuing_1.5 https://github.com/koutsoub/wicket/tree/component_queuing_1.5 Thanks, Giannis! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Free-wicket-from-component-hierarchy-hell-tp3027705p3226581.html Sent from the Users forum 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: Question regarding AjaxFormSubmitBehavior
the bigger form needs to be processed because what is submitted is the root form's formtag. however, validation, etc, will probably be delegated only to the inner form. -igor On Thu, Jan 20, 2011 at 4:14 AM, Daniel Bartl d.ba...@comsysto.com wrote: Have a small question regarding using AjaxFormSubmitBehavoir with nested forms. Would like to use it to submit a smaller nested form within a bigger parent form. Even though I passed a nested form as a *form that will be submitted* while calling the following constructor of AjaxFormSubmitBehavoir : /** * Construct. * * @param form * * form that will be submitted* * @param event * javascript event this behavior is attached to, like onclick */ public AjaxFormSubmitBehavior(Form? form, String event) - passing nested form here { super(event); __form = form; if (form != null) { form.setOutputMarkupId(true); } } I noticed that the AjaxFormSubmitBehavior#onEvent(AjaxRequestTarget target) executes the following line first: getForm().getRootForm().onFormSubmitted(); Why does it still delegate to the root form? Shouldn't the line be getForm().onFormSubmitted(); so that the nested form and possibly its children get processed only. Many thanks! Daniel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Free wicket from component hierarchy hell
On Thu, Jan 20, 2011 at 6:24 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: http://farm5.static.flickr.com/4089/4968160827_b742a7448a_z.jpg ..hrm.. putting that aside, did you give it a test drive? Martin, I know you started the thread about this idea last time. I'm wondering do you work together with Giannis and do you use the 1.4 in production ? In the beginning I was also against this idea but then I saw Igor's work and I started believing in it. Once we release 1.5 final I think we can introduce this in 1.5.{1,2}. ** Martin 2011/1/20 Jeremy Thomerson jer...@wickettraining.com: On Wed, Jan 19, 2011 at 3:55 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Can we bargain about this? Say, also wicket auto ajax enclosure and both into 1.4-x This made me laugh. What is the other side of the bargain? What does the giving party get in return? :) Apache is all about consensus. If the project management committee (who ultimately has to lead and guide the project) agrees that something is useful, beneficial, and not detrimental, they allow it to be added by the committers. In the case of Wicket, each committer is also on the PMC. So, with several committers against this feature being added to 1.4.x (myself included) and possibly even 1.5, you must persuade them (us) as to why it is needed. That being said, this has already been a really long thread (over 100 messages), so you're up against bad odds. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SwramWebApplication and session
Hi, My application extends SwramWebApplication. Session doesn't accpet that for paramater. I need to use session for ShoppingCart. How to solve it? Regards Jussi
DropDown options with labels and checkboxes
Hello, Is there a way to build a DropDown list each option of which has a label and a checkbox. The idea is that the user will use this component to assign tags. Very similar to what Google labels dropdown. It would be even better if somebody could point an existing component that does this :) Thanks, Alec
Re: Free wicket from component hierarchy hell
Quote from Igor http://apache-wicket.1842946.n4.nabble.com/Free-wicket-from-component-hierarchy-hell-td3027705i160.html If in doubt, there is always getMarkupSettings().setAllowComponentAutoHierarchy(false); there will be no such method. +1 for not making this part of core. ..hrm.. putting that aside, did you give it a test drive? Martin, I know you started the thread about this idea last time. I'm wondering do you work together with Giannis and do you use the 1.4 in production ? Giannis is in our team yes but Giannis forked this mostly with help from Igor. Yes, we use 1.4 in production. In the beginning I was also against this idea but then I saw Igor's work and I started believing in it. Once we release 1.5 final I think we can introduce this in 1.5.{1,2}. Meanwhile we can test-drive it in 1.4. ** Martin 2011/1/20 Jeremy Thomerson jer...@wickettraining.com: On Wed, Jan 19, 2011 at 3:55 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Can we bargain about this? Say, also wicket auto ajax enclosure and both into 1.4-x This made me laugh. What is the other side of the bargain? What does the giving party get in return? :) Apache is all about consensus. If the project management committee (who ultimately has to lead and guide the project) agrees that something is useful, beneficial, and not detrimental, they allow it to be added by the committers. In the case of Wicket, each committer is also on the PMC. So, with several committers against this feature being added to 1.4.x (myself included) and possibly even 1.5, you must persuade them (us) as to why it is needed. That being said, this has already been a really long thread (over 100 messages), so you're up against bad odds. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DropDown options with labels and checkboxes
sure, just use javascript :) -igor On Thu, Jan 20, 2011 at 12:12 PM, Alec Swan alecs...@gmail.com wrote: Hello, Is there a way to build a DropDown list each option of which has a label and a checkbox. The idea is that the user will use this component to assign tags. Very similar to what Google labels dropdown. It would be even better if somebody could point an existing component that does this :) Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Added parameters on the end of requests with wicket 1.5
On Thu, Jan 20, 2011 at 6:32 PM, Andrew Lombardi and...@mysticcoders.comwrote: I've been converting mysticpaste.com to using Wicket 1.5 with the help of Martin Grigorov :) - the source is available here - https://github.com/kinabalu/mysticpaste 99% of the way there, and the only remaining issue is that when you paste a URL with previous versions of Wicket, I properly get /view/[paste-id] and that's it With Wicket 1.5 however, it's appending the pagemap number? So I get instead /view/[paste-id]?1 -- the page is not stateless, has some ajax components on it. But it is important that the URL the users get is just /view/[paste-id] Here's how I move the user to the view page right now: params.add(0, Long.toString(pasteItem.getId())); setResponsePage(ViewPublicPage.class, params); And here's the mount in Application: mountPage(/view/${0}/${1}, ViewPublicPage.class); the ${1} here is for highlighting specific lines Thanks! A brief conversation in IRC: (09:05:43 PM) ivaynberg: no way to get rid of ?1 for now (09:05:49 PM) ivaynberg: thats the page id i think (09:06:04 PM) martin-g: it is (09:06:07 PM) ivaynberg: urls work like hybrid ones in 1.4 (09:06:19 PM) ivaynberg: its not pretty, but its safe to paste around (09:06:46 PM) ivaynberg: we do that so ajax works properly (09:06:53 PM) ivaynberg: (doesnt lose state when user presses refresh) To have the clean URL your page has to be stateless. In ViewPastePage you have two stateful components: Form and AjaxLink Replacing them with their stateless versions: StatessForm and StatelessLink leads to the following link when the user clicks Mark as Spam link: http://localhost:18081/view/4/?0-1.ILinkListener-markAbuseLink Choose which one you like better ;-) To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com ofc: 714-352-0298 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: @kinabalu facebook: http://www.facebook.com/lombardi fan mystic: http://www.facebook.com/mysticcoders flickr: http://www.flickr.com/photos/kinabalu Eco-Tip: Printing e-mails is usually a waste. -- If this message wasn't addressed to you, don't use, disclose, distribute, print or copy any part of this message
Re: Free wicket from component hierarchy hell
On Thu, Jan 20, 2011 at 9:14 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Quote from Igor http://apache-wicket.1842946.n4.nabble.com/Free-wicket-from-component-hierarchy-hell-td3027705i160.html If in doubt, there is always getMarkupSettings().setAllowComponentAutoHierarchy(false); there will be no such method. +1 for not making this part of core. ..hrm.. putting that aside, did you give it a test drive? Martin, I know you started the thread about this idea last time. I'm wondering do you work together with Giannis and do you use the 1.4 in production ? Giannis is in our team yes but Giannis forked this mostly with help from Igor. Yes, we use 1.4 in production. I meant: do you use 1.4 + the patch in production ? In the beginning I was also against this idea but then I saw Igor's work and I started believing in it. Once we release 1.5 final I think we can introduce this in 1.5.{1,2}. Meanwhile we can test-drive it in 1.4. Please do and report ;-) ** Martin 2011/1/20 Jeremy Thomerson jer...@wickettraining.com: On Wed, Jan 19, 2011 at 3:55 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Can we bargain about this? Say, also wicket auto ajax enclosure and both into 1.4-x This made me laugh. What is the other side of the bargain? What does the giving party get in return? :) Apache is all about consensus. If the project management committee (who ultimately has to lead and guide the project) agrees that something is useful, beneficial, and not detrimental, they allow it to be added by the committers. In the case of Wicket, each committer is also on the PMC. So, with several committers against this feature being added to 1.4.x (myself included) and possibly even 1.5, you must persuade them (us) as to why it is needed. That being said, this has already been a really long thread (over 100 messages), so you're up against bad odds. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Free wicket from component hierarchy hell
http://apache-wicket.1842946.n4.nabble.com/Free-wicket-from-component-hierarchy-hell-td3027705i160.html If in doubt, there is always getMarkupSettings().setAllowComponentAutoHierarchy(false); there will be no such method. +1 for not making this part of core. I mean for yes making part of core ;) Duh.. it' s getting too late. Giannis is in our team yes but Giannis forked this mostly with help from Igor. Yes, we use 1.4 in production. I meant: do you use 1.4 + the patch in production ? We have various projects, some yes some no. The largest production I am responsible for is stuck with wicket.version1.4.9/wicket.version because some of the later releases have not been monotonically improving. So we are stuck with some patches etc. and we haven't had time to refactor to 1.4.x I am having nightmares about future refactorings to 1.5 or 1.6 so I am investing as much as I can on 1.4 ;) Meanwhile we can test-drive it in 1.4. Please do and report ;-) Until now, only happy news :) ** Martin 2011/1/20 Jeremy Thomerson jer...@wickettraining.com: On Wed, Jan 19, 2011 at 3:55 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Can we bargain about this? Say, also wicket auto ajax enclosure and both into 1.4-x This made me laugh. What is the other side of the bargain? What does the giving party get in return? :) Apache is all about consensus. If the project management committee (who ultimately has to lead and guide the project) agrees that something is useful, beneficial, and not detrimental, they allow it to be added by the committers. In the case of Wicket, each committer is also on the PMC. So, with several committers against this feature being added to 1.4.x (myself included) and possibly even 1.5, you must persuade them (us) as to why it is needed. That being said, this has already been a really long thread (over 100 messages), so you're up against bad odds. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.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
Re: How to do setResponsePage after alert message pressed ok?
On Thu, Jan 20, 2011 at 2:42 AM, rolandpeng rolandp...@cht.com.tw wrote: Hi, After doing insert or update,I'd like to show some alert message,such as insert succeed. or update succeed.,and then do setResponsePage() to data listing page. But I wonder how to do it under wicket. Would anyone give me some hint? Thank you! use case: insert or update--alert message--auto redirect to data listing page. Roland. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-do-setResponsePage-after-alert-message-pressed-ok-tp3225482p3225482.html Sent from the Users forum 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 An alert is client side. A setResponsePage is server side. So, you can: 1 - create a response that is JS - it alerts, then does a client side redirect 2 - not use an alert (which is generally a bad UI decision), and instead use a feedback panel to show the message on the next page. As a tip, you can add a feedback panel to the top of your base page so that it automatically is present in all pages. then use getSession().info(Your foo was completed) and call setResponsePage(YourNextPageClass.class) and it will appear in the FBP -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
RE: Submit form from other form onClick
This works, thanks. Another similar question based on your question. Can I use an ajax form submit, maybe using a wicket javascript utility. I guess I could use jquery but does wicket have something available. E.g. as opposed to document.forms[xxx].submit(). Is there some generic ajax submit I could use. ... this.add(new AjaxLinkObject(nextLink) { @Override public void onClick(final AjaxRequestTarget target) { // Find the dynamic form on the page. final Object objAtStopTraversal = HomePage.this.visitChildren(new FindFormVisitor()); if (objAtStopTraversal instanceof Form?) { // Form found, invoke javascript submit final Form? form = (Form?) objAtStopTraversal; target.appendJavascript(String.format(try { document.forms['%s'].submit(); } catch(err) { if (window.console != undefined) { console.log(err); } }, form.getMarkupId())); } } } ); -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, January 20, 2011 9:01 AM To: users@wicket.apache.org Subject: Re: Submit form from other form onClick you can submit any form with pure javascript: document.getElementById('myform').submit(); this will call the respective myForm.onSubmit() method at the server side at server side you may call directly your methods e.g. new Form() {onSubmit() { myService.do(); }} new AjaxLink() {onClick() { myService.do(); }} no need to call Wicket methods On Thu, Jan 20, 2011 at 2:49 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is there a way to manually submit a form. E.g. normally we would have action handler methods onSubmit (on a button or a form). E.g. new AjaxLink() { onClick() { someOtherForm.submit(); } } Berlin Brown - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Added parameters on the end of requests with wicket 1.5
the onclick of the stateless link can redirect back to the bookmarkable version, which will clean up the url -igor On Thu, Jan 20, 2011 at 12:22 PM, Martin Grigorov mgrigo...@apache.org wrote: On Thu, Jan 20, 2011 at 6:32 PM, Andrew Lombardi and...@mysticcoders.comwrote: I've been converting mysticpaste.com to using Wicket 1.5 with the help of Martin Grigorov :) - the source is available here - https://github.com/kinabalu/mysticpaste 99% of the way there, and the only remaining issue is that when you paste a URL with previous versions of Wicket, I properly get /view/[paste-id] and that's it With Wicket 1.5 however, it's appending the pagemap number? So I get instead /view/[paste-id]?1 -- the page is not stateless, has some ajax components on it. But it is important that the URL the users get is just /view/[paste-id] Here's how I move the user to the view page right now: params.add(0, Long.toString(pasteItem.getId())); setResponsePage(ViewPublicPage.class, params); And here's the mount in Application: mountPage(/view/${0}/${1}, ViewPublicPage.class); the ${1} here is for highlighting specific lines Thanks! A brief conversation in IRC: (09:05:43 PM) ivaynberg: no way to get rid of ?1 for now (09:05:49 PM) ivaynberg: thats the page id i think (09:06:04 PM) martin-g: it is (09:06:07 PM) ivaynberg: urls work like hybrid ones in 1.4 (09:06:19 PM) ivaynberg: its not pretty, but its safe to paste around (09:06:46 PM) ivaynberg: we do that so ajax works properly (09:06:53 PM) ivaynberg: (doesnt lose state when user presses refresh) To have the clean URL your page has to be stateless. In ViewPastePage you have two stateful components: Form and AjaxLink Replacing them with their stateless versions: StatessForm and StatelessLink leads to the following link when the user clicks Mark as Spam link: http://localhost:18081/view/4/?0-1.ILinkListener-markAbuseLink Choose which one you like better ;-) To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com ofc: 714-352-0298 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: @kinabalu facebook: http://www.facebook.com/lombardi fan mystic: http://www.facebook.com/mysticcoders flickr: http://www.flickr.com/photos/kinabalu Eco-Tip: Printing e-mails is usually a waste. -- If this message wasn't addressed to you, don't use, disclose, distribute, print or copy any part of this message - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Resource.getResourceStream() called twice in 1.4.15
Thanks. I submitted an issue in Jira with a quickstart . https://issues.apache.org/jira/browse/WICKET-3357 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Resource-getResourceStream-called-twice-in-1-4-15-tp3225454p3228511.html Sent from the Users forum 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: Added parameters on the end of requests with wicket 1.5
Okay, got it. I'll dump the ajax on that page, and convert it over. Thanks! On Jan 20, 2011, at 1:00 PM, Igor Vaynberg wrote: the onclick of the stateless link can redirect back to the bookmarkable version, which will clean up the url -igor On Thu, Jan 20, 2011 at 12:22 PM, Martin Grigorov mgrigo...@apache.org wrote: On Thu, Jan 20, 2011 at 6:32 PM, Andrew Lombardi and...@mysticcoders.comwrote: I've been converting mysticpaste.com to using Wicket 1.5 with the help of Martin Grigorov :) - the source is available here - https://github.com/kinabalu/mysticpaste 99% of the way there, and the only remaining issue is that when you paste a URL with previous versions of Wicket, I properly get /view/[paste-id] and that's it With Wicket 1.5 however, it's appending the pagemap number? So I get instead /view/[paste-id]?1 -- the page is not stateless, has some ajax components on it. But it is important that the URL the users get is just /view/[paste-id] Here's how I move the user to the view page right now: params.add(0, Long.toString(pasteItem.getId())); setResponsePage(ViewPublicPage.class, params); And here's the mount in Application: mountPage(/view/${0}/${1}, ViewPublicPage.class); the ${1} here is for highlighting specific lines Thanks! A brief conversation in IRC: (09:05:43 PM) ivaynberg: no way to get rid of ?1 for now (09:05:49 PM) ivaynberg: thats the page id i think (09:06:04 PM) martin-g: it is (09:06:07 PM) ivaynberg: urls work like hybrid ones in 1.4 (09:06:19 PM) ivaynberg: its not pretty, but its safe to paste around (09:06:46 PM) ivaynberg: we do that so ajax works properly (09:06:53 PM) ivaynberg: (doesnt lose state when user presses refresh) To have the clean URL your page has to be stateless. In ViewPastePage you have two stateful components: Form and AjaxLink Replacing them with their stateless versions: StatessForm and StatelessLink leads to the following link when the user clicks Mark as Spam link: http://localhost:18081/view/4/?0-1.ILinkListener-markAbuseLink Choose which one you like better ;-) To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com ofc: 714-352-0298 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: @kinabalu facebook: http://www.facebook.com/lombardi fan mystic: http://www.facebook.com/mysticcoders flickr: http://www.flickr.com/photos/kinabalu Eco-Tip: Printing e-mails is usually a waste. -- If this message wasn't addressed to you, don't use, disclose, distribute, print or copy any part of this message - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com ofc: 714-352-0298 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: @kinabalu facebook: http://www.facebook.com/lombardi fan mystic: http://www.facebook.com/mysticcoders flickr: http://www.flickr.com/photos/kinabalu Eco-Tip: Printing e-mails is usually a waste. -- If this message wasn't addressed to you, don't use, disclose, distribute, print or copy any part of this message
Re: Free wicket from component hierarchy hell
On Thu, Jan 20, 2011 at 3:34 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: The largest production I am responsible for is stuck with wicket.version1.4.9/wicket.version because some of the later releases have not been monotonically improving. So we are stuck with some patches etc. and we haven't had time to refactor to 1.4.x We're stuck on 1.4.9, too, because the markup and hierarchy changed for DataTable and we're using that everywhere with a custom subclass with its own markup. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Added parameters on the end of requests with wicket 1.5
Url's look great now /view/[paste-id] Next issue. We have 2 links, one for Raw and the other for Download which suffix the URL with /text and /download respectively like so: /view/[paste-id]/text /view/[paste-id]/download in 1.4 I redirected to the SharedResourceReference and all worked dandy. martin-g helped convert this to the 1.5 way, and the links don't seem to do anything anymore, and if you go to the URL directly, it tries to render the page instead of redirect to the resource straight away. Here's the code at the top of the ctor: if (params.get(1).toString().equals(text)) { getRequestCycle().scheduleRequestHandlerAfterCurrent(new ResourceReferenceRequestHandler(new SharedResourceReference(textPasteResource))); return; } else if (params.get(1).toString().equals(download)) { getRequestCycle().scheduleRequestHandlerAfterCurrent(new ResourceReferenceRequestHandler(new SharedResourceReference(downloadAsTextPasteResource))); return; } I understand why Wicket is trying to render the page since I'm effectively redirecting there, even if in 1.4 it worked. Is there a way to register a handler for URL's that suffix /text and /download to be served by the resources directly? On Jan 20, 2011, at 1:19 PM, Andrew Lombardi wrote: Okay, got it. I'll dump the ajax on that page, and convert it over. Thanks! On Jan 20, 2011, at 1:00 PM, Igor Vaynberg wrote: the onclick of the stateless link can redirect back to the bookmarkable version, which will clean up the url -igor On Thu, Jan 20, 2011 at 12:22 PM, Martin Grigorov mgrigo...@apache.org wrote: On Thu, Jan 20, 2011 at 6:32 PM, Andrew Lombardi and...@mysticcoders.comwrote: I've been converting mysticpaste.com to using Wicket 1.5 with the help of Martin Grigorov :) - the source is available here - https://github.com/kinabalu/mysticpaste 99% of the way there, and the only remaining issue is that when you paste a URL with previous versions of Wicket, I properly get /view/[paste-id] and that's it With Wicket 1.5 however, it's appending the pagemap number? So I get instead /view/[paste-id]?1 -- the page is not stateless, has some ajax components on it. But it is important that the URL the users get is just /view/[paste-id] Here's how I move the user to the view page right now: params.add(0, Long.toString(pasteItem.getId())); setResponsePage(ViewPublicPage.class, params); And here's the mount in Application: mountPage(/view/${0}/${1}, ViewPublicPage.class); the ${1} here is for highlighting specific lines Thanks! A brief conversation in IRC: (09:05:43 PM) ivaynberg: no way to get rid of ?1 for now (09:05:49 PM) ivaynberg: thats the page id i think (09:06:04 PM) martin-g: it is (09:06:07 PM) ivaynberg: urls work like hybrid ones in 1.4 (09:06:19 PM) ivaynberg: its not pretty, but its safe to paste around (09:06:46 PM) ivaynberg: we do that so ajax works properly (09:06:53 PM) ivaynberg: (doesnt lose state when user presses refresh) To have the clean URL your page has to be stateless. In ViewPastePage you have two stateful components: Form and AjaxLink Replacing them with their stateless versions: StatessForm and StatelessLink leads to the following link when the user clicks Mark as Spam link: http://localhost:18081/view/4/?0-1.ILinkListener-markAbuseLink Choose which one you like better ;-) To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com ofc: 714-352-0298 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: @kinabalu facebook: http://www.facebook.com/lombardi fan mystic: http://www.facebook.com/mysticcoders flickr: http://www.flickr.com/photos/kinabalu Eco-Tip: Printing e-mails is usually a waste. -- If this message wasn't addressed to you, don't use, disclose, distribute, print or copy any part of this message - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com ofc: 714-352-0298 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: @kinabalu facebook: http://www.facebook.com/lombardi fan mystic: http://www.facebook.com/mysticcoders flickr: http://www.flickr.com/photos/kinabalu Eco-Tip: Printing e-mails is usually a waste. -- If this message wasn't addressed to you, don't use, disclose, distribute, print or copy any part of this message To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com ofc:
Re: Free wicket from component hierarchy hell
so you only have one place to fix it in -igor On Thu, Jan 20, 2011 at 1:43 PM, James Carman ja...@carmanconsulting.com wrote: On Thu, Jan 20, 2011 at 3:34 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: The largest production I am responsible for is stuck with wicket.version1.4.9/wicket.version because some of the later releases have not been monotonically improving. So we are stuck with some patches etc. and we haven't had time to refactor to 1.4.x We're stuck on 1.4.9, too, because the markup and hierarchy changed for DataTable and we're using that everywhere with a custom subclass with its own markup. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Added parameters on the end of requests with wicket 1.5
you should use replacehandler() instead of scheduleaftercurrent, since current will render the page. but to do it in 1.5 way you would mount a handler on /view/${pasteid}/download and one on /view/${pasteid}/text and implement streaming there instead of using the page as a switchboard. -igor On Thu, Jan 20, 2011 at 1:55 PM, Andrew Lombardi and...@mysticcoders.com wrote: Url's look great now /view/[paste-id] Next issue. We have 2 links, one for Raw and the other for Download which suffix the URL with /text and /download respectively like so: /view/[paste-id]/text /view/[paste-id]/download in 1.4 I redirected to the SharedResourceReference and all worked dandy. martin-g helped convert this to the 1.5 way, and the links don't seem to do anything anymore, and if you go to the URL directly, it tries to render the page instead of redirect to the resource straight away. Here's the code at the top of the ctor: if (params.get(1).toString().equals(text)) { getRequestCycle().scheduleRequestHandlerAfterCurrent(new ResourceReferenceRequestHandler(new SharedResourceReference(textPasteResource))); return; } else if (params.get(1).toString().equals(download)) { getRequestCycle().scheduleRequestHandlerAfterCurrent(new ResourceReferenceRequestHandler(new SharedResourceReference(downloadAsTextPasteResource))); return; } I understand why Wicket is trying to render the page since I'm effectively redirecting there, even if in 1.4 it worked. Is there a way to register a handler for URL's that suffix /text and /download to be served by the resources directly? On Jan 20, 2011, at 1:19 PM, Andrew Lombardi wrote: Okay, got it. I'll dump the ajax on that page, and convert it over. Thanks! On Jan 20, 2011, at 1:00 PM, Igor Vaynberg wrote: the onclick of the stateless link can redirect back to the bookmarkable version, which will clean up the url -igor On Thu, Jan 20, 2011 at 12:22 PM, Martin Grigorov mgrigo...@apache.org wrote: On Thu, Jan 20, 2011 at 6:32 PM, Andrew Lombardi and...@mysticcoders.comwrote: I've been converting mysticpaste.com to using Wicket 1.5 with the help of Martin Grigorov :) - the source is available here - https://github.com/kinabalu/mysticpaste 99% of the way there, and the only remaining issue is that when you paste a URL with previous versions of Wicket, I properly get /view/[paste-id] and that's it With Wicket 1.5 however, it's appending the pagemap number? So I get instead /view/[paste-id]?1 -- the page is not stateless, has some ajax components on it. But it is important that the URL the users get is just /view/[paste-id] Here's how I move the user to the view page right now: params.add(0, Long.toString(pasteItem.getId())); setResponsePage(ViewPublicPage.class, params); And here's the mount in Application: mountPage(/view/${0}/${1}, ViewPublicPage.class); the ${1} here is for highlighting specific lines Thanks! A brief conversation in IRC: (09:05:43 PM) ivaynberg: no way to get rid of ?1 for now (09:05:49 PM) ivaynberg: thats the page id i think (09:06:04 PM) martin-g: it is (09:06:07 PM) ivaynberg: urls work like hybrid ones in 1.4 (09:06:19 PM) ivaynberg: its not pretty, but its safe to paste around (09:06:46 PM) ivaynberg: we do that so ajax works properly (09:06:53 PM) ivaynberg: (doesnt lose state when user presses refresh) To have the clean URL your page has to be stateless. In ViewPastePage you have two stateful components: Form and AjaxLink Replacing them with their stateless versions: StatessForm and StatelessLink leads to the following link when the user clicks Mark as Spam link: http://localhost:18081/view/4/?0-1.ILinkListener-markAbuseLink Choose which one you like better ;-) To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com ofc: 714-352-0298 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: @kinabalu facebook: http://www.facebook.com/lombardi fan mystic: http://www.facebook.com/mysticcoders flickr: http://www.flickr.com/photos/kinabalu Eco-Tip: Printing e-mails is usually a waste. -- If this message wasn't addressed to you, don't use, disclose, distribute, print or copy any part of this message - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com ofc: 714-352-0298 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: @kinabalu facebook: http://www.facebook.com/lombardi fan mystic:
Re: Free wicket from component hierarchy hell
I'm actually looking at it now. The markup changed between 1.4.5 and 1.4.6, so there must be some other reason that I stayed with 1.4.9 (assuming laziness wasn't it). :) On Thu, Jan 20, 2011 at 5:12 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: so you only have one place to fix it in -igor On Thu, Jan 20, 2011 at 1:43 PM, James Carman ja...@carmanconsulting.com wrote: On Thu, Jan 20, 2011 at 3:34 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: The largest production I am responsible for is stuck with wicket.version1.4.9/wicket.version because some of the later releases have not been monotonically improving. So we are stuck with some patches etc. and we haven't had time to refactor to 1.4.x We're stuck on 1.4.9, too, because the markup and hierarchy changed for DataTable and we're using that everywhere with a custom subclass with its own markup. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Question regarding AjaxFormSubmitBehavior
Adding to Igor's comment, remember that nested form is not allow in HTML spec per se, so what wicket is doing a trick where the root form is submit but only elements of nested form (which get transform in DIV tag) are processed On Thu, Jan 20, 2011 at 4:47 PM, Igor Vaynberg-2 [via Apache Wicket] ml-node+3228304-1818027643-65...@n4.nabble.comml-node%2b3228304-1818027643-65...@n4.nabble.com wrote: the bigger form needs to be processed because what is submitted is the root form's formtag. however, validation, etc, will probably be delegated only to the inner form. -igor On Thu, Jan 20, 2011 at 4:14 AM, Daniel Bartl [hidden email]http://user/SendEmail.jtp?type=nodenode=3228304i=0 wrote: Have a small question regarding using AjaxFormSubmitBehavoir with nested forms. Would like to use it to submit a smaller nested form within a bigger parent form. Even though I passed a nested form as a *form that will be submitted* while calling the following constructor of AjaxFormSubmitBehavoir : /** * Construct. * * @param form * * form that will be submitted* * @param event *javascript event this behavior is attached to, like onclick */ public AjaxFormSubmitBehavior(Form? form, String event) - passing nested form here { super(event); __form = form; if (form != null) { form.setOutputMarkupId(true); } } I noticed that the AjaxFormSubmitBehavior#onEvent(AjaxRequestTarget target) executes the following line first: getForm().getRootForm().onFormSubmitted(); Why does it still delegate to the root form? Shouldn't the line be getForm().onFormSubmitted(); so that the nested form and possibly its children get processed only. Many thanks! Daniel - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3228304i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3228304i=2 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Question-regarding-AjaxFormSubmitBehavior-tp3227451p3228304.html To start a new topic under Apache Wicket, email ml-node+1842946-398011874-65...@n4.nabble.comml-node%2b1842946-398011874-65...@n4.nabble.com To unsubscribe from Apache Wicket, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=. -- Sincerely, JC (http://www.linkedin.com/in/jcgarciam) --Anyone who has never made a mistake has never tried anything new.-- -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Question-regarding-AjaxFormSubmitBehavior-tp3227451p3228728.html Sent from the Users forum 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: Added parameters on the end of requests with wicket 1.5
Awesome thanks Igor. On Thu, Jan 20, 2011 at 2:13 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: you should use replacehandler() instead of scheduleaftercurrent, since current will render the page. but to do it in 1.5 way you would mount a handler on /view/${pasteid}/download and one on /view/${pasteid}/text and implement streaming there instead of using the page as a switchboard. -igor On Thu, Jan 20, 2011 at 1:55 PM, Andrew Lombardi and...@mysticcoders.com wrote: Url's look great now /view/[paste-id] Next issue. We have 2 links, one for Raw and the other for Download which suffix the URL with /text and /download respectively like so: /view/[paste-id]/text /view/[paste-id]/download in 1.4 I redirected to the SharedResourceReference and all worked dandy. martin-g helped convert this to the 1.5 way, and the links don't seem to do anything anymore, and if you go to the URL directly, it tries to render the page instead of redirect to the resource straight away. Here's the code at the top of the ctor: if (params.get(1).toString().equals(text)) { getRequestCycle().scheduleRequestHandlerAfterCurrent(new ResourceReferenceRequestHandler(new SharedResourceReference(textPasteResource))); return; } else if (params.get(1).toString().equals(download)) { getRequestCycle().scheduleRequestHandlerAfterCurrent(new ResourceReferenceRequestHandler(new SharedResourceReference(downloadAsTextPasteResource))); return; } I understand why Wicket is trying to render the page since I'm effectively redirecting there, even if in 1.4 it worked. Is there a way to register a handler for URL's that suffix /text and /download to be served by the resources directly? On Jan 20, 2011, at 1:19 PM, Andrew Lombardi wrote: Okay, got it. I'll dump the ajax on that page, and convert it over. Thanks! On Jan 20, 2011, at 1:00 PM, Igor Vaynberg wrote: the onclick of the stateless link can redirect back to the bookmarkable version, which will clean up the url -igor On Thu, Jan 20, 2011 at 12:22 PM, Martin Grigorov mgrigo...@apache.org wrote: On Thu, Jan 20, 2011 at 6:32 PM, Andrew Lombardi and...@mysticcoders.comwrote: I've been converting mysticpaste.com to using Wicket 1.5 with the help of Martin Grigorov :) - the source is available here - https://github.com/kinabalu/mysticpaste 99% of the way there, and the only remaining issue is that when you paste a URL with previous versions of Wicket, I properly get /view/[paste-id] and that's it With Wicket 1.5 however, it's appending the pagemap number? So I get instead /view/[paste-id]?1 -- the page is not stateless, has some ajax components on it. But it is important that the URL the users get is just /view/[paste-id] Here's how I move the user to the view page right now: params.add(0, Long.toString(pasteItem.getId())); setResponsePage(ViewPublicPage.class, params); And here's the mount in Application: mountPage(/view/${0}/${1}, ViewPublicPage.class); the ${1} here is for highlighting specific lines Thanks! A brief conversation in IRC: (09:05:43 PM) ivaynberg: no way to get rid of ?1 for now (09:05:49 PM) ivaynberg: thats the page id i think (09:06:04 PM) martin-g: it is (09:06:07 PM) ivaynberg: urls work like hybrid ones in 1.4 (09:06:19 PM) ivaynberg: its not pretty, but its safe to paste around (09:06:46 PM) ivaynberg: we do that so ajax works properly (09:06:53 PM) ivaynberg: (doesnt lose state when user presses refresh) To have the clean URL your page has to be stateless. In ViewPastePage you have two stateful components: Form and AjaxLink Replacing them with their stateless versions: StatessForm and StatelessLink leads to the following link when the user clicks Mark as Spam link: http://localhost:18081/view/4/?0-1.ILinkListener-markAbuseLink Choose which one you like better ;-) To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com ofc: 714-352-0298 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: @kinabalu facebook: http://www.facebook.com/lombardi fan mystic: http://www.facebook.com/mysticcoders flickr: http://www.flickr.com/photos/kinabalu Eco-Tip: Printing e-mails is usually a waste. -- If this message wasn't addressed to you, don't use, disclose, distribute, print or copy any part of this message - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI |
Re: Calling wicket modal popup from non-wicket
That sounds like a good solution. Thanks! -nelson On Wed, Jan 19, 2011 at 3:53 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: your best bet is to use a non-wicket modal and iframe a wicket page into it. -igor On Wed, Jan 19, 2011 at 3:12 PM, Nelson Segura nsegu...@gmail.com wrote: We are slowly migrating a JSP app to wicket. Parts of our app are written in Wicket, but most of it is still JSP. We need to integrate some of the new wicket functionality into old JSP pages, as fragments or modal popups. There is a lot of functionality in that page using JSP, so rewriting everything in wicket is not feasible. I would like to know if it is possible to call a wicket modal popup window from the JSP (using the windows that map to a page), and how to do it. I did look at the herebebeasties site already, and did not get much from there regarding integrating wicket into JSP. -Nelson - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Free wicket from component hierarchy hell
(assuming laziness wasn't it). :) We are not lazy, we are just very busy ;) ** Martin On Thu, Jan 20, 2011 at 5:12 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: so you only have one place to fix it in -igor On Thu, Jan 20, 2011 at 1:43 PM, James Carman ja...@carmanconsulting.com wrote: On Thu, Jan 20, 2011 at 3:34 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: The largest production I am responsible for is stuck with wicket.version1.4.9/wicket.version because some of the later releases have not been monotonically improving. So we are stuck with some patches etc. and we haven't had time to refactor to 1.4.x We're stuck on 1.4.9, too, because the markup and hierarchy changed for DataTable and we're using that everywhere with a custom subclass with its own markup. - 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
Re: How can i change lang attribute in html markup tag?
With further investigation i found a hint on using an IMarkupFilter. Is there an example with this for my problem? Thanks Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org