AW: How to render any Component
Hi Martin, this would be very helpful. Until then I will use a workaround and check the type of Component. Stefan. -Ursprüngliche Nachricht- Von: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Gesendet: Montag, 29. März 2010 22:05 An: users@wicket.apache.org Betreff: Re: How to render any Component Well, I hope one day (1.5?) it will be part of wicket ;) We are trying to invent some nifty behavior that allows a panel to digest markupless components. ** Martin 2010/3/29 Stefan Lindner lind...@visionet.de: Hi Martin, ok, no easy way, no wicket-builtin tools. Thanks for the proposal. Stefan -Ursprüngliche Nachricht- Von: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Gesendet: Montag, 29. März 2010 20:13 An: users@wicket.apache.org Betreff: Re: How to render any Component Hi! Here: http://code.google.com/p/wicket-mashup/ ** Martin 2010/3/29 Stefan Lindner lind...@visionet.de: How can I implement a Loop or ListView that can display any wicket component? Let's have a HTML lik this div wicket:id=loopdiv wicket:id=item//div How can I write a Loop like add(new Loop(loop, 10) { protected void populateItem(LoopItem item) { item.add( new AnyWicketComponentE.G.Image(item) ); } ); An Image will always throw an Exception like ...must be applied to a tag of type 'img', not How can I write my HTML so that I can display an Image, a Label or anything else, just on demand? Of course, I can place a Panel there but this means I must construct a panel with markup etc. I playes around with wicket:fragment but this also did not work. Or is this impossible? The background: I want to create a list of Links where the visual part of the link can be a Label, an Image or somthing else. Stefan - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket Session Lifecycle Methods????
Hey, I'm trying to store user application configuration in the session: things like prefered style, prefered locale, etc... Basically i store these things in a DB table for each user. When a user logs in i load his settings into the WebSession, the problem is when i have to persist the changes the user made as i can't find any onSessionExpired, onLogout handlers. The only thing i have is sessionDestroyed ... but its not enough since at that moment the session does not exist anymore. Any ideeas guys? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Session Lifecycle Methods????
Why don't you persist when do user actually does the change (on the interface)? Regards, Istvan On Tue, Mar 30, 2010 at 9:56 AM, corneliu.petrescu corneliu.petre...@theredpoint.ro wrote: Hey, I'm trying to store user application configuration in the session: things like prefered style, prefered locale, etc... Basically i store these things in a DB table for each user. When a user logs in i load his settings into the WebSession, the problem is when i have to persist the changes the user made as i can't find any onSessionExpired, onLogout handlers. The only thing i have is sessionDestroyed ... but its not enough since at that moment the session does not exist anymore. Any ideeas guys? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Session Lifecycle Methods????
That was my first ideea but i can't since Session.getStyle, Session.setStyle are final. :( On Tue, 2010-03-30 at 10:06 +0200, Istvan Soos wrote: Why don't you persist when do user actually does the change (on the interface)? Regards, Istvan On Tue, Mar 30, 2010 at 9:56 AM, corneliu.petrescu corneliu.petre...@theredpoint.ro wrote: Hey, I'm trying to store user application configuration in the session: things like prefered style, prefered locale, etc... Basically i store these things in a DB table for each user. When a user logs in i load his settings into the WebSession, the problem is when i have to persist the changes the user made as i can't find any onSessionExpired, onLogout handlers. The only thing i have is sessionDestroyed ... but its not enough since at that moment the session does not exist anymore. Any ideeas guys? - 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: Wicket Session Lifecycle Methods????
I meant that you probably have some forms in the application where you change these. Persist at that point, before/after calling the session's setters... Regards, Istvan On Tue, Mar 30, 2010 at 10:18 AM, corneliu.petrescu corneliu.petre...@theredpoint.ro wrote: That was my first ideea but i can't since Session.getStyle, Session.setStyle are final. :( On Tue, 2010-03-30 at 10:06 +0200, Istvan Soos wrote: Why don't you persist when do user actually does the change (on the interface)? Regards, Istvan On Tue, Mar 30, 2010 at 9:56 AM, corneliu.petrescu corneliu.petre...@theredpoint.ro wrote: Hey, I'm trying to store user application configuration in the session: things like prefered style, prefered locale, etc... Basically i store these things in a DB table for each user. When a user logs in i load his settings into the WebSession, the problem is when i have to persist the changes the user made as i can't find any onSessionExpired, onLogout handlers. The only thing i have is sessionDestroyed ... but its not enough since at that moment the session does not exist anymore. Any ideeas guys? - 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: change tr background color when ListView iterate....
Grrr, I had the SimpleAttribute to the Label of my Item not to my item directly ... I didn't know that the item was attached to the tr... thanks for help Arnaud 2010/3/29 Martijn Dashorst martijn.dasho...@gmail.com each list item is attached to the tr tag. Therefore the OddEvenItem solution just works. Did you try it? Martijn On Mon, Mar 29, 2010 at 9:24 AM, Arnaud Garcia arn...@imagemed-87.com wrote: Hi, Defenitively it is more elegant to use the OddEvenItem object instead of using my boolean... but it doesn't change my problem... Changing the class of the items can be done easily (see my code, or you can use OddEventItem etc..) But the problem is to change the class at the upper level in the tr ? I am certainely not clear, so I can reformulate like this: how can you create a table where lines are blue then white and so on when you iterate over a ListView... thanks for help, Arnaud 2010/3/28 Mauro Ciancio maurocian...@gmail.com Take a look at: ListItem#newItem(final int index) and: org.apache.wicket.markup.repeater.OddEvenItem. Cheers. On Sun, Mar 28, 2010 at 11:40 AM, Arnaud Garcia arn...@imagemed-87.com wrote: Hello, Using a ListView on a tr html markup, I would like to alternate the background color of each new tr when the list iterate... I just find how to do this on the label inside the td... not on the tr level..., so just the background color of the title is changed and not the full line ! here is an example of my code html: table tr wicket:id=cdList tdspan wicket:id=title//td /tr /table java: -- ListViewCD aList = new ListViewCD(cdList,CDList) { private boolean alternateLine = true; // to switch css class attribute at each new item... @Override protected void populateItem(ListItemCD item) { Label title = new Label(title, new PropertyModelString(item.getModelObject(), title)); if (alternateLine) { title.add(new SimpleAttributeModifier(class, line1)); // change the color ! } else { title.add(new SimpleAttributeModifier(class, line2)); } alternateLine = !alternateLine; item.add(title) } } thanks, Arnaud -- Mauro Ciancio maurociancio at gmail dot com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and JEE6
I do also think that it's because Wicket is not a managed framework : everything is simple unmanaged POJOs except for your classes extending WebPage which are managed. I've juste had a quick look at JSF 2.0 and never worked with it - but I worked with Wicket - so I did not expected Wicket JEE6 integration to be a drop in replacement for JSF. I do think Wicket is an alternative framework for JEE6, not a replacement of the reference framework. On one hand JSF2 assumes that you are running a JEE6 AS, so it is tightly integrated with CDI, and you got all the cool stuff like injection, scopes, bean validation, etc. On the other hand, Wicket doesn't assume anything except a web container implementing the servlet spec, so it can't have all the cool stuff of CDI because it's not built around CDI. I think the next step to make Wicket JEE6 integration going further is to provide some Maven quickstart archetypes, the Weld team is looking for contributors : http://in.relation.to/Bloggers/WeldArchetypesInTheSpotlight Now that I have something working, and when I will have some spare time, my next step is to create an archetype for Glassfish. And if some people on this list have some time, their help is of course welcome :)
Catch Wicket.Error with FireBug
Hi Folks, have everyone of you any experience in catching the wicket-ajax and js-errors with the Firebug? Easily we just need to overwrite WicketAjaxDebug.logError... but how? Thanks for any advice!
Re: Support for back button and new windows?
Hi, thanks for the reply :) Some comments: - very hacky way is not appropriate (I think) as it'll break clustering, session persistence (server restart), etc. - less hacky: that's something I've been thinking about. But I'd need more specific information to go that way -- how to determine exactly what to expire from the page store, how to distinguish page expired vs. session expired situations, how to redirect user back to the 'last valid page' they were on (before they tried to (ab)use browser's back button)? Any particular suggestions? - even less hacky: I'm not 100% positive what exactly is that you're suggesting, but I do have a question -- could it possibly work? In my experiments with Wicket and browser's back button, Wicket seems to demonstrate a miraculous capability of restoring state as it was at the point of time when that particular page was rendered -- that's including both stuff that is in the model and also in instance variables in page instances. I really need to somehow understand how this back support works -- I'm rather scared that my lack of understanding will lead to some rather unexpected and unpleasant failures in production. Any suggestions as to where to look for info? Martijn Dashorst wrote: A couple of thoughts come to mind: - very hacky: ensure the wizard pages are not serializable - they won't end up in the pagestore so any back button activity will result in pageexpired messages - less hacky: remove the wizard pages after the final submission from the pagestore (I believe you can evict them) - even less hacky: in onsubmit of your final step mark the form submitted (create a field 'submitted' and set it to true) and add a validator that fails when the flag is true Martijn On Fri, Mar 26, 2010 at 4:48 PM, Sergey Olefir solf.li...@gmail.com wrote: Also on this subject -- if I want to prevent users from submitting wizard (multi-page form) again via back button after they've submitted it once (or in other conditions), what would be the best way to approach this problem? And similarly -- if I want to prevent users from using back button at all (e.g. show them the last 'normally' generated page if they submit anything from the 'old' page), what would be the best way to achieve this? -- View this message in context: http://old.nabble.com/Support-for-back-button-and-new-windows--tp28028525p28080646.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: A web site developed with Wicket
Erdinç, Skype ID'in varsa konusalım. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 17 March 2010 19:52, voltron kocam...@yahoo.com wrote: Hello, http://www.nofailtime.com/appmonitor is a web application developed with wicket framework. It basically checks the web site downtime and notifies the users about the failure. It uses wicket, yahoo library(YUI), Spring and Cayenne as ORM. I used modal windows heavily to implement single page interface. YUI used for feedback panels and menu. I would be happy if you try the site and give feedback. You can login the site with account; username = demo password = demo Thanks, - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and JEE6
Olivier, I got Jame's stuff [1] up and running (thanks James) with just a few small changes to the POMs - maybe he has stuff already in his local Maven repo that is no longer on the main public repos) working with little effort. If you'd like to make (and maintain ;-) an archetype out of those (based on Apache implementations), or a Galssfish based one, we would be happy to include those on our LegUp page [2][3]. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com [1] http://svn.carmanconsulting.com/public/wicket-cdi/trunk [2] http://jweekend.com/dev/LegUp [3] http://code.google.com/p/legup/ On 30 March 2010 10:24, Olivier Bourgeois olivier.bourgeois@gmail.com wrote: I do also think that it's because Wicket is not a managed framework : everything is simple unmanaged POJOs except for your classes extending WebPage which are managed. I've juste had a quick look at JSF 2.0 and never worked with it - but I worked with Wicket - so I did not expected Wicket JEE6 integration to be a drop in replacement for JSF. I do think Wicket is an alternative framework for JEE6, not a replacement of the reference framework. On one hand JSF2 assumes that you are running a JEE6 AS, so it is tightly integrated with CDI, and you got all the cool stuff like injection, scopes, bean validation, etc. On the other hand, Wicket doesn't assume anything except a web container implementing the servlet spec, so it can't have all the cool stuff of CDI because it's not built around CDI. I think the next step to make Wicket JEE6 integration going further is to provide some Maven quickstart archetypes, the Weld team is looking for contributors : http://in.relation.to/Bloggers/WeldArchetypesInTheSpotlight Now that I have something working, and when I will have some spare time, my next step is to create an archetype for Glassfish. And if some people on this list have some time, their help is of course welcome :) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and JEE6
Cemal, Please feel free to send me a patch if anything looks crazy. I have had a heck of a time getting all this stuff working. It's a delicate balance (like herding cats)! :) The OWB folks have checked in my patch to fix one of the issues, but we're still hammering out another. Thanks, James On Tue, Mar 30, 2010 at 7:05 AM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: Olivier, I got Jame's stuff [1] up and running (thanks James) with just a few small changes to the POMs - maybe he has stuff already in his local Maven repo that is no longer on the main public repos) working with little effort. If you'd like to make (and maintain ;-) an archetype out of those (based on Apache implementations), or a Galssfish based one, we would be happy to include those on our LegUp page [2][3]. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com [1] http://svn.carmanconsulting.com/public/wicket-cdi/trunk [2] http://jweekend.com/dev/LegUp [3] http://code.google.com/p/legup/ On 30 March 2010 10:24, Olivier Bourgeois olivier.bourgeois@gmail.com wrote: I do also think that it's because Wicket is not a managed framework : everything is simple unmanaged POJOs except for your classes extending WebPage which are managed. I've juste had a quick look at JSF 2.0 and never worked with it - but I worked with Wicket - so I did not expected Wicket JEE6 integration to be a drop in replacement for JSF. I do think Wicket is an alternative framework for JEE6, not a replacement of the reference framework. On one hand JSF2 assumes that you are running a JEE6 AS, so it is tightly integrated with CDI, and you got all the cool stuff like injection, scopes, bean validation, etc. On the other hand, Wicket doesn't assume anything except a web container implementing the servlet spec, so it can't have all the cool stuff of CDI because it's not built around CDI. I think the next step to make Wicket JEE6 integration going further is to provide some Maven quickstart archetypes, the Weld team is looking for contributors : http://in.relation.to/Bloggers/WeldArchetypesInTheSpotlight Now that I have something working, and when I will have some spare time, my next step is to create an archetype for Glassfish. And if some people on this list have some time, their help is of course welcome :) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and JEE6
James, See the patch below; please double-check but it should be still valid if you haven't updated your POMs since Sunday AM your time. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com == PATCH STARTS BELOW = Index: pom.xml === --- pom.xml (revision 78) +++ pom.xml (working copy) @@ -36,4 +36,22 @@ /plugin /plugins /build + + repositories +repository +idJBoss Repo/id +urlhttp://repository.jboss.com/maven2/url +/repository + + repository + idgeronimo-snapshots/id + nameApache Nexus Snapshots/name + urlhttps://repository.apache.org/content/groups/snapshots-group/url + snapshots + enabledtrue/enabled + /snapshots + /repository + +/repositories + /project \ No newline at end of file Index: owb/pom.xml === --- owb/pom.xml (revision 78) +++ owb/pom.xml (working copy) @@ -16,11 +16,12 @@ artifactIdwicket-cdi/artifactId version${project.version}/version /dependency -dependency -groupIdorg.apache.openwebbeans/groupId -artifactIdopenwebbeans-impl/artifactId -version1.0.0-SNAPSHOT/version -/dependency +dependency +groupIdorg.apache.openwebbeans/groupId +artifactIdopenwebbeans-impl/artifactId +version1.0.0-M4/version +/dependency + dependency groupIdorg.apache.geronimo.specs/groupId artifactIdgeronimo-jcdi_1.0_spec/artifactId Index: owb-example/pom.xml === --- owb-example/pom.xml (revision 78) +++ owb-example/pom.xml (working copy) @@ -62,15 +62,11 @@ artifactIdwicket-cdi-owb/artifactId version${project.version}/version /dependency -dependency -groupIdorg.apache.openwebbeans/groupId -artifactIdopenwebbeans-web/artifactId -version1.0.0-SNAPSHOT/version -/dependency + dependency groupIdorg.apache.openwebbeans/groupId artifactIdopenwebbeans-spi/artifactId -version1.0.0-SNAPSHOT/version +version1.0.0-M4/version /dependency dependency groupIdorg.apache.geronimo.specs/groupId == END OF PATCH ABOVE On 30 March 2010 12:09, James Carman jcar...@carmanconsulting.com wrote: Cemal, Please feel free to send me a patch if anything looks crazy. I have had a heck of a time getting all this stuff working. It's a delicate balance (like herding cats)! :) The OWB folks have checked in my patch to fix one of the issues, but we're still hammering out another. Thanks, James On Tue, Mar 30, 2010 at 7:05 AM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: Olivier, I got Jame's stuff [1] up and running (thanks James) with just a few small changes to the POMs - maybe he has stuff already in his local Maven repo that is no longer on the main public repos) working with little effort. If you'd like to make (and maintain ;-) an archetype out of those (based on Apache implementations), or a Galssfish based one, we would be happy to include those on our LegUp page [2][3]. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com [1] http://svn.carmanconsulting.com/public/wicket-cdi/trunk [2] http://jweekend.com/dev/LegUp [3] http://code.google.com/p/legup/ On 30 March 2010 10:24, Olivier Bourgeois olivier.bourgeois@gmail.com wrote: I do also think that it's because Wicket is not a managed framework : everything is simple unmanaged POJOs except for your classes extending WebPage which are managed. I've juste had a quick look at JSF 2.0 and never worked with it - but I worked with Wicket - so I did not expected Wicket JEE6 integration to be a drop in replacement for JSF. I do think Wicket is an alternative framework for JEE6, not a replacement of the reference framework. On one hand JSF2 assumes that you are running a JEE6 AS, so it is tightly integrated with CDI, and you got all the cool stuff like injection, scopes, bean validation, etc. On the other hand, Wicket doesn't assume anything except a web container implementing the servlet spec, so it can't have all the cool stuff of CDI because it's not built around CDI. I think the next step to make Wicket JEE6 integration going further is to provide some Maven quickstart archetypes, the Weld team is looking for contributors : http://in.relation.to/Bloggers/WeldArchetypesInTheSpotlight Now that I have something working, and when I will have some
Re: Wicket and JEE6
I was using M4 of OWB, but I had to patch it. Are you sure it works for you? I was getting a NPE. On Tue, Mar 30, 2010 at 7:22 AM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: James, See the patch below; please double-check but it should be still valid if you haven't updated your POMs since Sunday AM your time. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com == PATCH STARTS BELOW = Index: pom.xml === --- pom.xml (revision 78) +++ pom.xml (working copy) @@ -36,4 +36,22 @@ /plugin /plugins /build + + repositories +repository +idJBoss Repo/id +urlhttp://repository.jboss.com/maven2/url +/repository + + repository + idgeronimo-snapshots/id + nameApache Nexus Snapshots/name + urlhttps://repository.apache.org/content/groups/snapshots-group/url + snapshots + enabledtrue/enabled + /snapshots + /repository + +/repositories + /project \ No newline at end of file Index: owb/pom.xml === --- owb/pom.xml (revision 78) +++ owb/pom.xml (working copy) @@ -16,11 +16,12 @@ artifactIdwicket-cdi/artifactId version${project.version}/version /dependency -dependency -groupIdorg.apache.openwebbeans/groupId -artifactIdopenwebbeans-impl/artifactId -version1.0.0-SNAPSHOT/version -/dependency +dependency +groupIdorg.apache.openwebbeans/groupId +artifactIdopenwebbeans-impl/artifactId +version1.0.0-M4/version +/dependency + dependency groupIdorg.apache.geronimo.specs/groupId artifactIdgeronimo-jcdi_1.0_spec/artifactId Index: owb-example/pom.xml === --- owb-example/pom.xml (revision 78) +++ owb-example/pom.xml (working copy) @@ -62,15 +62,11 @@ artifactIdwicket-cdi-owb/artifactId version${project.version}/version /dependency -dependency -groupIdorg.apache.openwebbeans/groupId -artifactIdopenwebbeans-web/artifactId -version1.0.0-SNAPSHOT/version -/dependency + dependency groupIdorg.apache.openwebbeans/groupId artifactIdopenwebbeans-spi/artifactId -version1.0.0-SNAPSHOT/version +version1.0.0-M4/version /dependency dependency groupIdorg.apache.geronimo.specs/groupId == END OF PATCH ABOVE On 30 March 2010 12:09, James Carman jcar...@carmanconsulting.com wrote: Cemal, Please feel free to send me a patch if anything looks crazy. I have had a heck of a time getting all this stuff working. It's a delicate balance (like herding cats)! :) The OWB folks have checked in my patch to fix one of the issues, but we're still hammering out another. Thanks, James On Tue, Mar 30, 2010 at 7:05 AM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: Olivier, I got Jame's stuff [1] up and running (thanks James) with just a few small changes to the POMs - maybe he has stuff already in his local Maven repo that is no longer on the main public repos) working with little effort. If you'd like to make (and maintain ;-) an archetype out of those (based on Apache implementations), or a Galssfish based one, we would be happy to include those on our LegUp page [2][3]. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com [1] http://svn.carmanconsulting.com/public/wicket-cdi/trunk [2] http://jweekend.com/dev/LegUp [3] http://code.google.com/p/legup/ On 30 March 2010 10:24, Olivier Bourgeois olivier.bourgeois@gmail.com wrote: I do also think that it's because Wicket is not a managed framework : everything is simple unmanaged POJOs except for your classes extending WebPage which are managed. I've juste had a quick look at JSF 2.0 and never worked with it - but I worked with Wicket - so I did not expected Wicket JEE6 integration to be a drop in replacement for JSF. I do think Wicket is an alternative framework for JEE6, not a replacement of the reference framework. On one hand JSF2 assumes that you are running a JEE6 AS, so it is tightly integrated with CDI, and you got all the cool stuff like injection, scopes, bean validation, etc. On the other hand, Wicket doesn't assume anything except a web container implementing the servlet spec, so it can't have all the cool stuff of CDI because it's
Re: Wicket and JEE6
James, I'm pretty sure mvn test ran successfully on all your projects once I patched the POMs. I ran some (maybe not all) of the demo apps too. Send me your patches if you like too (they must not have been deployed yet on Sunday) and I may be able to take another look this evening or tomorrow PM. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 30 March 2010 12:30, James Carman jcar...@carmanconsulting.com wrote: I was using M4 of OWB, but I had to patch it. Are you sure it works for you? I was getting a NPE. On Tue, Mar 30, 2010 at 7:22 AM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: James, See the patch below; please double-check but it should be still valid if you haven't updated your POMs since Sunday AM your time. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com == PATCH STARTS BELOW = Index: pom.xml === --- pom.xml (revision 78) +++ pom.xml (working copy) @@ -36,4 +36,22 @@ /plugin /plugins /build + + repositories + repository + idJBoss Repo/id + urlhttp://repository.jboss.com/maven2/url + /repository + + repository + idgeronimo-snapshots/id + nameApache Nexus Snapshots/name + urlhttps://repository.apache.org/content/groups/snapshots-group/url + snapshots + enabledtrue/enabled + /snapshots + /repository + + /repositories + /project \ No newline at end of file Index: owb/pom.xml === --- owb/pom.xml (revision 78) +++ owb/pom.xml (working copy) @@ -16,11 +16,12 @@ artifactIdwicket-cdi/artifactId version${project.version}/version /dependency - dependency - groupIdorg.apache.openwebbeans/groupId - artifactIdopenwebbeans-impl/artifactId - version1.0.0-SNAPSHOT/version - /dependency +dependency + groupIdorg.apache.openwebbeans/groupId + artifactIdopenwebbeans-impl/artifactId + version1.0.0-M4/version +/dependency + dependency groupIdorg.apache.geronimo.specs/groupId artifactIdgeronimo-jcdi_1.0_spec/artifactId Index: owb-example/pom.xml === --- owb-example/pom.xml (revision 78) +++ owb-example/pom.xml (working copy) @@ -62,15 +62,11 @@ artifactIdwicket-cdi-owb/artifactId version${project.version}/version /dependency - dependency - groupIdorg.apache.openwebbeans/groupId - artifactIdopenwebbeans-web/artifactId - version1.0.0-SNAPSHOT/version - /dependency + dependency groupIdorg.apache.openwebbeans/groupId artifactIdopenwebbeans-spi/artifactId - version1.0.0-SNAPSHOT/version + version1.0.0-M4/version /dependency dependency groupIdorg.apache.geronimo.specs/groupId == END OF PATCH ABOVE On 30 March 2010 12:09, James Carman jcar...@carmanconsulting.com wrote: Cemal, Please feel free to send me a patch if anything looks crazy. I have had a heck of a time getting all this stuff working. It's a delicate balance (like herding cats)! :) The OWB folks have checked in my patch to fix one of the issues, but we're still hammering out another. Thanks, James On Tue, Mar 30, 2010 at 7:05 AM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: Olivier, I got Jame's stuff [1] up and running (thanks James) with just a few small changes to the POMs - maybe he has stuff already in his local Maven repo that is no longer on the main public repos) working with little effort. If you'd like to make (and maintain ;-) an archetype out of those (based on Apache implementations), or a Galssfish based one, we would be happy to include those on our LegUp page [2][3]. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com [1] http://svn.carmanconsulting.com/public/wicket-cdi/trunk [2] http://jweekend.com/dev/LegUp [3] http://code.google.com/p/legup/ On 30 March 2010 10:24, Olivier Bourgeois olivier.bourgeois@gmail.com wrote: I do also think that it's because Wicket is not a managed framework : everything is simple unmanaged POJOs except for your classes extending WebPage which are managed. I've juste had a quick look at JSF 2.0 and never worked with it - but I worked with Wicket - so I did not expected Wicket JEE6 integration to be a drop in
Re: better way setting up ID for a Wicket compone nt?
There's a good reason that markup ID doesn't match wicket ID. If I have a panel with a few form components, and then put 2 of those panels on the same page, then your approach would break things like document.getElementId(...) because there would be more than 1 element w/ same ID. Craig _ From: David Chang [mailto:david_q_zh...@yahoo.com] To: users@wicket.apache.org Sent: Mon, 29 Mar 2010 21:03:46 -0400 Subject: Re: better way setting up ID for a Wicket component? Not sure whether the help method will do the trick of one-liner code. I feel that it would be much nice if Wicket could have the following additional method for a Componment: Component setMarkupIdToWicketId(). Re-using a Wicket Id as markup id as convention should be best practice. Am I right? I am new in wicket and sorry if I am wrong. Best. --- On Mon, 3/29/10, James Carman jcar...@carmanconsulting.com wrote: From: James Carman jcar...@carmanconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Monday, March 29, 2010, 7:16 PM helper method? protected T extends Component T setMarkupId(T component, String markupId) { component.setMarkupId(markupId); return component; } On Mon, Mar 29, 2010 at 7:00 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I am using the follow pattern to set up ID for a wicket component: Label abc = new Label(abcd, abcdedfg); abc.setOutputMarkupId(true).setMarkupId(abc.getId()); It takes two lines to do this. Can I do something like Label abc = new Label(abcd, abcdedfg).setOutputMarkupId(true).setMarkupId(???); Is this doable? If yes, then what should go to replace ??? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
My first WiQuery app does not work
Here is what I have: JDK 1.6, Wicket 1.4.7, WiQuery 1.0, Tomcat 6.0.24 I downloaded wiquery and put its jar on the classpath. I copied the Hello World sample from http://code.google.com/p/wiquery/wiki/QuickStart Here is my code: HTML:- html head titleWiQuery Quickstart Archetype Homepage/title /head body button wicket:id=open-dialogOpen dialog !/button p wicket:id=dialog Hello world, yes we can ! /p /body /html Java: import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Button; import org.odlabs.wiquery.core.events.Event; import org.odlabs.wiquery.core.events.MouseEvent; import org.odlabs.wiquery.core.events.WiQueryEventBehavior; import org.odlabs.wiquery.core.javascript.JsScope; import org.odlabs.wiquery.ui.dialog.Dialog; public class WiqueryDialog extends WebPage { public WiqueryDialog() { final Dialog dialog = new Dialog(dialog); add(dialog); Button button = new Button(open-dialog); button.add(new WiQueryEventBehavior(new Event(MouseEvent.DBLCLICK) { @Override public JsScope callback() { return JsScope.quickScope(dialog.open().render()); } })); add(button); } } -- I did not get any compiler error and I can run the wicket app and see the html in the browser. However, I did not get any respone when clicking the button. What I did is wrong? Thanks. -- here is generated html -- html head titleWiQuery Quickstart Archetype Homepage/title script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.CoreJavaScriptResourceReference/jquery/jquery-1.3.2.js/script script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.WiqueryGeneratedJavaScriptResourceReference/1269950176687wiquery-gen.js/script /head body button name=open-dialog id=open_dialog1Open dialog !/button p id=dialog2 Hello world, yes we can ! /p /body /html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: My first WiQuery app does not work
Hi, Have you enable wiquery in your Wicket application ? This link is an implementation of the WebApplication with the linked with Wiquery: http://code.google.com/p/wiquery/source/browse/branches/1.0.1/src/main/java/org/odlabs/wiquery/utils/WiQueryWebApplication.java Hope that helped you Julien Roche On Tue, Mar 30, 2010 at 1:56 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I have: JDK 1.6, Wicket 1.4.7, WiQuery 1.0, Tomcat 6.0.24 I downloaded wiquery and put its jar on the classpath. I copied the Hello World sample from http://code.google.com/p/wiquery/wiki/QuickStart Here is my code: HTML:- html head titleWiQuery Quickstart Archetype Homepage/title /head body button wicket:id=open-dialogOpen dialog !/button p wicket:id=dialog Hello world, yes we can ! /p /body /html Java: import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Button; import org.odlabs.wiquery.core.events.Event; import org.odlabs.wiquery.core.events.MouseEvent; import org.odlabs.wiquery.core.events.WiQueryEventBehavior; import org.odlabs.wiquery.core.javascript.JsScope; import org.odlabs.wiquery.ui.dialog.Dialog; public class WiqueryDialog extends WebPage { public WiqueryDialog() { final Dialog dialog = new Dialog(dialog); add(dialog); Button button = new Button(open-dialog); button.add(new WiQueryEventBehavior(new Event(MouseEvent.DBLCLICK) { @Override public JsScope callback() { return JsScope.quickScope(dialog.open().render()); } })); add(button); } } -- I did not get any compiler error and I can run the wicket app and see the html in the browser. However, I did not get any respone when clicking the button. What I did is wrong? Thanks. -- here is generated html -- html head titleWiQuery Quickstart Archetype Homepage/title script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.CoreJavaScriptResourceReference/jquery/jquery-1.3.2.js/script script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.WiqueryGeneratedJavaScriptResourceReference/1269950176687wiquery-gen.js/script /head body button name=open-dialog id=open_dialog1Open dialog !/button p id=dialog2 Hello world, yes we can ! /p /body /html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Catch Wicket.Error with FireBug
Could you elaborate on your problem a little more? What precisely do you want to do? If the Application is started in develompment mode the 'WICKET_AJAX_DEBUG window should be available on any Page containing Wicket-Ajax components. (The link in the right bottom corner) mf 2010/3/30 Martin U ufer.mar...@googlemail.com Hi Folks, have everyone of you any experience in catching the wicket-ajax and js-errors with the Firebug? Easily we just need to overwrite WicketAjaxDebug.logError... but how? Thanks for any advice!
Re: Wicket and JEE6
I think everything I've done is checked in currently. I'll take a look at your patches later and see how things shake out. One thing I noticed was that my beans weren't being picked up from my local project if I didn't include a src/main/resources/META-INF/beans.xml file in there. I guess the classpath scanning looks for all of those resources and scans those locations only or something. Again, thanks for taking a look at what I put together. I plan on doing the conversation stuff very soon, so stay tuned. On Tue, Mar 30, 2010 at 7:43 AM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: James, I'm pretty sure mvn test ran successfully on all your projects once I patched the POMs. I ran some (maybe not all) of the demo apps too. Send me your patches if you like too (they must not have been deployed yet on Sunday) and I may be able to take another look this evening or tomorrow PM. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 30 March 2010 12:30, James Carman jcar...@carmanconsulting.com wrote: I was using M4 of OWB, but I had to patch it. Are you sure it works for you? I was getting a NPE. On Tue, Mar 30, 2010 at 7:22 AM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: James, See the patch below; please double-check but it should be still valid if you haven't updated your POMs since Sunday AM your time. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com == PATCH STARTS BELOW = Index: pom.xml === --- pom.xml (revision 78) +++ pom.xml (working copy) @@ -36,4 +36,22 @@ /plugin /plugins /build + + repositories +repository +idJBoss Repo/id +urlhttp://repository.jboss.com/maven2/url +/repository + + repository + idgeronimo-snapshots/id + nameApache Nexus Snapshots/name + urlhttps://repository.apache.org/content/groups/snapshots-group/url + snapshots + enabledtrue/enabled + /snapshots + /repository + +/repositories + /project \ No newline at end of file Index: owb/pom.xml === --- owb/pom.xml (revision 78) +++ owb/pom.xml (working copy) @@ -16,11 +16,12 @@ artifactIdwicket-cdi/artifactId version${project.version}/version /dependency -dependency -groupIdorg.apache.openwebbeans/groupId -artifactIdopenwebbeans-impl/artifactId -version1.0.0-SNAPSHOT/version -/dependency +dependency +groupIdorg.apache.openwebbeans/groupId +artifactIdopenwebbeans-impl/artifactId +version1.0.0-M4/version +/dependency + dependency groupIdorg.apache.geronimo.specs/groupId artifactIdgeronimo-jcdi_1.0_spec/artifactId Index: owb-example/pom.xml === --- owb-example/pom.xml (revision 78) +++ owb-example/pom.xml (working copy) @@ -62,15 +62,11 @@ artifactIdwicket-cdi-owb/artifactId version${project.version}/version /dependency -dependency -groupIdorg.apache.openwebbeans/groupId -artifactIdopenwebbeans-web/artifactId -version1.0.0-SNAPSHOT/version -/dependency + dependency groupIdorg.apache.openwebbeans/groupId artifactIdopenwebbeans-spi/artifactId -version1.0.0-SNAPSHOT/version +version1.0.0-M4/version /dependency dependency groupIdorg.apache.geronimo.specs/groupId == END OF PATCH ABOVE On 30 March 2010 12:09, James Carman jcar...@carmanconsulting.com wrote: Cemal, Please feel free to send me a patch if anything looks crazy. I have had a heck of a time getting all this stuff working. It's a delicate balance (like herding cats)! :) The OWB folks have checked in my patch to fix one of the issues, but we're still hammering out another. Thanks, James On Tue, Mar 30, 2010 at 7:05 AM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: Olivier, I got Jame's stuff [1] up and running (thanks James) with just a few small changes to the POMs - maybe he has stuff already in his local Maven repo that is no longer on the main public repos) working with little effort. If you'd like to make (and maintain ;-) an archetype out of those (based on Apache implementations), or a Galssfish based one, we would
Re: Catch Wicket.Error with FireBug
Yeah i know this window. But there are all INFO outputs too and you could oversee an error very easy... And for instance if i evaluate some overlay functionality on my page, i cant open the debug window, cause any mouseclicks are catched by a overlaying layer ... Martin Funk-3 wrote: Could you elaborate on your problem a little more? What precisely do you want to do? If the Application is started in develompment mode the 'WICKET_AJAX_DEBUG window should be available on any Page containing Wicket-Ajax components. (The link in the right bottom corner) mf 2010/3/30 Martin U ufer.mar...@googlemail.com Hi Folks, have everyone of you any experience in catching the wicket-ajax and js-errors with the Firebug? Easily we just need to overwrite WicketAjaxDebug.logError... but how? Thanks for any advice! -- View this message in context: http://old.nabble.com/Catch-Wicket.Error-with-FireBug-tp28080433p28082310.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Pagination AjaxFallBackDataTable without charging all rows on memory
Hi Igor, thanks for your answer! Yesterday I was trying to reinvent the nose, finally I realized that the framework does the work that I need. :D 2010/3/29 Igor Vaynberg igor.vaynb...@gmail.com see IDataProvider -igor On Mon, Mar 29, 2010 at 1:17 PM, Daniela Valero danielavalero...@gmail.com wrote: I'm looking into wicket classes, and i've thinking in override one of them to provide to the ajax data table the data to be displayed on the current page. I mean, i want provide only the data of the current page. Can you tell me wich class do i have to override to do this? 2010/3/29 Daniela Valero danielavalero...@gmail.com Good Morning, I am doing a big application, it will have lot of users conected at same time, thats the reason becouse I need to do the pagination of my tables manually. I will have a list with all fields to be shown in my data table, i need to send the content to each page acording as user request to the next page. Do you have any ideas to do this? -- | Daniela Valero No hay vientos favorables para quien no sabe a donde quiere ir! -- | Daniela Valero No hay vientos favorables para quien no sabe a donde quiere ir! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- | Daniela Valero No hay vientos favorables para quien no sabe a donde quiere ir!
Public Wicket Training: London, Amsterdam, other cities
The next batch of scheduled, public dates for intensive 2-day Wicket training [1] are: London [1]: Apr 10-11(Sat-Sun), Apr 12-13(Mon-Tue), May 8-9(Sat-Sun), May 10-11(Mon-Tue), Jun 3-4(Thu-Fri), Jun 5-6(Sat-Sun) Amsterdam [2]: May 27-28(Thu-Fri) Munich, Brussels: a few dates are still possible at the end of May or early June subject to demand. Book online [3] or contact us about these or private/custom/on-site training via our site [4]. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com [1] http://jweekend.com/dev/JW703 [2] http://www.jteam.nl/training/apache-wicket-training.html [3] http://jweekend.com/dev/BookingPage [4] http://jweekend.com/dev/ContactUs - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: drop down problem
thanks martin it worked On Sat, Mar 27, 2010 at 3:24 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: ajax link does not submit form.. use submitlink or ajaxbutton ** Martin 2010/3/27 chinedu efoagui chinedub...@gmail.com: Hello all, I have this dropdown that shows up a list of employee see code below code public EmployeeDropDownChoice(String id,IModel model,IModel model2){ super(id,model,model2); final ChoiceRenderer renderer = new ChoiceRenderer(fullname, id); setChoiceRenderer(renderer); ListPersonnelrecordsEmployee emps=Collections.EMPTY_LIST; try { emps = dao.getPersonnelrecordsEmployeeList(); } catch (GenericBusinessException ex) { Logger.getLogger(EmployeeDropDownChoice.class.getName()).log(Level.SEVERE, null, ex); } setChoices(emps); } /code Now in the panel/form when i call it since the form uses a CompoundPropertyModel I declare the dropdown like this final EmployeeDropDownChoice forwardofficer=new EmployeeDropDownChoice(forwardofficer,new Model(),new Model()); to avoid compoundpropertymodel issues is the EmployeeDropdown is not a member of the backing object of the form. NOw this is the problem when i try to get the defaultmodelobject from the Employeedropdown it give me null. How do i retrieve the selected choice from the Employeedropdown?? code final AjaxFallbackLink forwardbutton=new AjaxFallbackLink(forwardbutton) { �...@override public void onClick(AjaxRequestTarget art) { final LeaveappEmpleaveApprovalOfficers leaveappOfficerss=new LeaveappEmpleaveApprovalOfficers(); leaveappOfficerss.setEmpleaveIdLeaveappEmpleave(selected); //PersonnelrecordsEmployee zaemployeee=(PersonnelrecordsEmployee)forwardofficer.getDefaultModelObject(); //System.out.println(personnel id:+zaemployeee.getFullname() ); System.out.println(personnel id:+forwardofficer.getDefaultModelObject()); try { dao.addLeaveappEmpleaveApprovalOfficers(leaveappOfficerss); /code - 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: My first WiQuery app does not work
Julien, Thanks for your reply and it works now. Strangely, I copied the example on that page, which does not ask me to extend WiQueryWebApplication. Something wrong with that Hello World example? Two quick questions: 1. My environment is JDK 1.6 and Wicket 1.4.7. WiQuery 1.0 should have no problem with it. Correct? 2. Why the example requires double-click? Regards. -David --- On Tue, 3/30/10, julien roche AKA indiana_jules roche@gmail.com wrote: From: julien roche AKA indiana_jules roche@gmail.com Subject: Re: My first WiQuery app does not work To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 8:02 AM Hi, Have you enable wiquery in your Wicket application ? This link is an implementation of the WebApplication with the linked with Wiquery: http://code.google.com/p/wiquery/source/browse/branches/1.0.1/src/main/java/org/odlabs/wiquery/utils/WiQueryWebApplication.java Hope that helped you Julien Roche On Tue, Mar 30, 2010 at 1:56 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I have: JDK 1.6, Wicket 1.4.7, WiQuery 1.0, Tomcat 6.0.24 I downloaded wiquery and put its jar on the classpath. I copied the Hello World sample from http://code.google.com/p/wiquery/wiki/QuickStart Here is my code: HTML:- html head titleWiQuery Quickstart Archetype Homepage/title /head body button wicket:id=open-dialogOpen dialog !/button p wicket:id=dialog Hello world, yes we can ! /p /body /html Java: import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Button; import org.odlabs.wiquery.core.events.Event; import org.odlabs.wiquery.core.events.MouseEvent; import org.odlabs.wiquery.core.events.WiQueryEventBehavior; import org.odlabs.wiquery.core.javascript.JsScope; import org.odlabs.wiquery.ui.dialog.Dialog; public class WiqueryDialog extends WebPage { public WiqueryDialog() { final Dialog dialog = new Dialog(dialog); add(dialog); Button button = new Button(open-dialog); button.add(new WiQueryEventBehavior(new Event(MouseEvent.DBLCLICK) { @Override public JsScope callback() { return JsScope.quickScope(dialog.open().render()); } })); add(button); } } -- I did not get any compiler error and I can run the wicket app and see the html in the browser. However, I did not get any respone when clicking the button. What I did is wrong? Thanks. -- here is generated html -- html head titleWiQuery Quickstart Archetype Homepage/title script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.CoreJavaScriptResourceReference/jquery/jquery-1.3.2.js/script script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.WiqueryGeneratedJavaScriptResourceReference/1269950176687wiquery-gen.js/script /head body button name=open-dialog id=open_dialog1Open dialog !/button p id=dialog2 Hello world, yes we can ! /p /body /html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and JEE6
2010/3/30 Cemal Bayramoglu jweekend_for...@cabouge.com Olivier, I got Jame's stuff [1] up and running (thanks James) with just a few small changes to the POMs - maybe he has stuff already in his local Maven repo that is no longer on the main public repos) working with little effort. If you'd like to make (and maintain ;-) an archetype out of those (based on Apache implementations), or a Galssfish based one, we would be happy to include those on our LegUp page [2][3]. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com [1] http://svn.carmanconsulting.com/public/wicket-cdi/trunk [2] http://jweekend.com/dev/LegUp [3] http://code.google.com/p/legup/ Cemal, thanks for the offer I'll keep this in mind. James, you need an empty beans.xml file to let Weld know what to scan, this is explained much further in this blog entry : http://relation.to/Bloggers/WhyIsBeansxmlRequiredInCDI And if you plan to build a Weld extension, you must know that you have to create a file named : META-INF/services/javax.enterprise.inject.spi.Extension containing the full qualified name of your class implementing Extension.
Re: My first WiQuery app does not work
David, Adding the component instantiation listener is more flexible than extending WiQueryWebApplication. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 30 March 2010 15:18, David Chang david_q_zh...@yahoo.com wrote: Julien, Thanks for your reply and it works now. Strangely, I copied the example on that page, which does not ask me to extend WiQueryWebApplication. Something wrong with that Hello World example? Two quick questions: 1. My environment is JDK 1.6 and Wicket 1.4.7. WiQuery 1.0 should have no problem with it. Correct? 2. Why the example requires double-click? Regards. -David --- On Tue, 3/30/10, julien roche AKA indiana_jules roche@gmail.com wrote: From: julien roche AKA indiana_jules roche@gmail.com Subject: Re: My first WiQuery app does not work To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 8:02 AM Hi, Have you enable wiquery in your Wicket application ? This link is an implementation of the WebApplication with the linked with Wiquery: http://code.google.com/p/wiquery/source/browse/branches/1.0.1/src/main/java/org/odlabs/wiquery/utils/WiQueryWebApplication.java Hope that helped you Julien Roche On Tue, Mar 30, 2010 at 1:56 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I have: JDK 1.6, Wicket 1.4.7, WiQuery 1.0, Tomcat 6.0.24 I downloaded wiquery and put its jar on the classpath. I copied the Hello World sample from http://code.google.com/p/wiquery/wiki/QuickStart Here is my code: HTML:- html head titleWiQuery Quickstart Archetype Homepage/title /head body button wicket:id=open-dialogOpen dialog !/button p wicket:id=dialog Hello world, yes we can ! /p /body /html Java: import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Button; import org.odlabs.wiquery.core.events.Event; import org.odlabs.wiquery.core.events.MouseEvent; import org.odlabs.wiquery.core.events.WiQueryEventBehavior; import org.odlabs.wiquery.core.javascript.JsScope; import org.odlabs.wiquery.ui.dialog.Dialog; public class WiqueryDialog extends WebPage { public WiqueryDialog() { final Dialog dialog = new Dialog(dialog); add(dialog); Button button = new Button(open-dialog); button.add(new WiQueryEventBehavior(new Event(MouseEvent.DBLCLICK) { @Override public JsScope callback() { return JsScope.quickScope(dialog.open().render()); } })); add(button); } } -- I did not get any compiler error and I can run the wicket app and see the html in the browser. However, I did not get any respone when clicking the button. What I did is wrong? Thanks. -- here is generated html -- html head titleWiQuery Quickstart Archetype Homepage/title script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.CoreJavaScriptResourceReference/jquery/jquery-1.3.2.js/script script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.WiqueryGeneratedJavaScriptResourceReference/1269950176687wiquery-gen.js/script /head body button name=open-dialog id=open_dialog1Open dialog !/button p id=dialog2 Hello world, yes we can ! /p /body /html - 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: My first WiQuery app does not work
Hi, The dialog display on dbclick because we bind the event on it : MouseEvent.DBLCLICK If you want to display on a simple click, use MouseEvent.CLICK Regards Julien Roche On Tue, Mar 30, 2010 at 4:29 PM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: David, Adding the component instantiation listener is more flexible than extending WiQueryWebApplication. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 30 March 2010 15:18, David Chang david_q_zh...@yahoo.com wrote: Julien, Thanks for your reply and it works now. Strangely, I copied the example on that page, which does not ask me to extend WiQueryWebApplication. Something wrong with that Hello World example? Two quick questions: 1. My environment is JDK 1.6 and Wicket 1.4.7. WiQuery 1.0 should have no problem with it. Correct? 2. Why the example requires double-click? Regards. -David --- On Tue, 3/30/10, julien roche AKA indiana_jules roche@gmail.com wrote: From: julien roche AKA indiana_jules roche@gmail.com Subject: Re: My first WiQuery app does not work To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 8:02 AM Hi, Have you enable wiquery in your Wicket application ? This link is an implementation of the WebApplication with the linked with Wiquery: http://code.google.com/p/wiquery/source/browse/branches/1.0.1/src/main/java/org/odlabs/wiquery/utils/WiQueryWebApplication.java Hope that helped you Julien Roche On Tue, Mar 30, 2010 at 1:56 PM, David Chang david_q_zh...@yahoo.com wrote: Here is what I have: JDK 1.6, Wicket 1.4.7, WiQuery 1.0, Tomcat 6.0.24 I downloaded wiquery and put its jar on the classpath. I copied the Hello World sample from http://code.google.com/p/wiquery/wiki/QuickStart Here is my code: HTML:- html head titleWiQuery Quickstart Archetype Homepage/title /head body button wicket:id=open-dialogOpen dialog !/button p wicket:id=dialog Hello world, yes we can ! /p /body /html Java: import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Button; import org.odlabs.wiquery.core.events.Event; import org.odlabs.wiquery.core.events.MouseEvent; import org.odlabs.wiquery.core.events.WiQueryEventBehavior; import org.odlabs.wiquery.core.javascript.JsScope; import org.odlabs.wiquery.ui.dialog.Dialog; public class WiqueryDialog extends WebPage { public WiqueryDialog() { final Dialog dialog = new Dialog(dialog); add(dialog); Button button = new Button(open-dialog); button.add(new WiQueryEventBehavior(new Event(MouseEvent.DBLCLICK) { @Override public JsScope callback() { return JsScope.quickScope(dialog.open().render()); } })); add(button); } } -- I did not get any compiler error and I can run the wicket app and see the html in the browser. However, I did not get any respone when clicking the button. What I did is wrong? Thanks. -- here is generated html -- html head titleWiQuery Quickstart Archetype Homepage/title script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.CoreJavaScriptResourceReference/jquery/jquery-1.3.2.js/script script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.WiqueryGeneratedJavaScriptResourceReference/1269950176687wiquery-gen.js/script /head body button name=open-dialog id=open_dialog1Open dialog !/button p id=dialog2 Hello world, yes we can ! /p /body /html - 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: Wicket and JEE6
On Tue, Mar 30, 2010 at 10:21 AM, Olivier Bourgeois olivier.bourgeois@gmail.com wrote: James, you need an empty beans.xml file to let Weld know what to scan, this is explained much further in this blog entry : http://relation.to/Bloggers/WhyIsBeansxmlRequiredInCDI Yeah, I guess I figured that out the hard way! :) I believe OWB works the same way. I found a JIRA issue or something that clued me in. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: My first WiQuery app does not work
Julien, thanks for reply. Silly me. I should have looked at the sample code. I was too excited seeing the first app works. Best, David --- On Tue, 3/30/10, julien roche AKA indiana_jules roche@gmail.com wrote: From: julien roche AKA indiana_jules roche@gmail.com Subject: Re: My first WiQuery app does not work To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 11:41 AM Hi, The dialog display on dbclick because we bind the event on it : MouseEvent.DBLCLICK If you want to display on a simple click, use MouseEvent.CLICK Regards Julien Roche On Tue, Mar 30, 2010 at 4:29 PM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: David, Adding the component instantiation listener is more flexible than extending WiQueryWebApplication. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 30 March 2010 15:18, David Chang david_q_zh...@yahoo.com wrote: Julien, Thanks for your reply and it works now. Strangely, I copied the example on that page, which does not ask me to extend WiQueryWebApplication. Something wrong with that Hello World example? Two quick questions: 1. My environment is JDK 1.6 and Wicket 1.4.7. WiQuery 1.0 should have no problem with it. Correct? 2. Why the example requires double-click? Regards. -David --- On Tue, 3/30/10, julien roche AKA indiana_jules roche@gmail.com wrote: From: julien roche AKA indiana_jules roche@gmail.com Subject: Re: My first WiQuery app does not work To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 8:02 AM Hi, Have you enable wiquery in your Wicket application ? This link is an implementation of the WebApplication with the linked with Wiquery: http://code.google.com/p/wiquery/source/browse/branches/1.0.1/src/main/java/org/odlabs/wiquery/utils/WiQueryWebApplication.java Hope that helped you Julien Roche On Tue, Mar 30, 2010 at 1:56 PM, David Chang david_q_zh...@yahoo.com wrote: Here is what I have: JDK 1.6, Wicket 1.4.7, WiQuery 1.0, Tomcat 6.0.24 I downloaded wiquery and put its jar on the classpath. I copied the Hello World sample from http://code.google.com/p/wiquery/wiki/QuickStart Here is my code: HTML:- html head titleWiQuery Quickstart Archetype Homepage/title /head body button wicket:id=open-dialogOpen dialog !/button p wicket:id=dialog Hello world, yes we can ! /p /body /html Java: import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Button; import org.odlabs.wiquery.core.events.Event; import org.odlabs.wiquery.core.events.MouseEvent; import org.odlabs.wiquery.core.events.WiQueryEventBehavior; import org.odlabs.wiquery.core.javascript.JsScope; import org.odlabs.wiquery.ui.dialog.Dialog; public class WiqueryDialog extends WebPage { public WiqueryDialog() { final Dialog dialog = new Dialog(dialog); add(dialog); Button button = new Button(open-dialog); button.add(new WiQueryEventBehavior(new Event(MouseEvent.DBLCLICK) { @Override public JsScope callback() { return JsScope.quickScope(dialog.open().render()); } })); add(button); } } -- I did not get any compiler error and I can run the wicket app and see the html in the browser. However, I did not get any respone when clicking the button. What I did is wrong? Thanks. -- here is generated html -- html head titleWiQuery Quickstart Archetype Homepage/title script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.CoreJavaScriptResourceReference/jquery/jquery-1.3.2.js/script script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.WiqueryGeneratedJavaScriptResourceReference/1269950176687wiquery-gen.js/script /head body button name=open-dialog id=open_dialog1Open dialog !/button p id=dialog2 Hello world, yes we can ! /p /body /html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -
Re: My first WiQuery app does not work
In my experiment, the app does not work without extending WiQueryWebApplication. Is extending WiQueryWebApplication a must? The Hello World example does not extend WiQueryWebApplication and I copied the example code but it does not work. Best, David --- On Tue, 3/30/10, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: From: Cemal Bayramoglu jweekend_for...@cabouge.com Subject: Re: My first WiQuery app does not work To: users users@wicket.apache.org Date: Tuesday, March 30, 2010, 10:29 AM David, Adding the component instantiation listener is more flexible than extending WiQueryWebApplication. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 30 March 2010 15:18, David Chang david_q_zh...@yahoo.com wrote: Julien, Thanks for your reply and it works now. Strangely, I copied the example on that page, which does not ask me to extend WiQueryWebApplication. Something wrong with that Hello World example? Two quick questions: 1. My environment is JDK 1.6 and Wicket 1.4.7. WiQuery 1.0 should have no problem with it. Correct? 2. Why the example requires double-click? Regards. -David --- On Tue, 3/30/10, julien roche AKA indiana_jules roche@gmail.com wrote: From: julien roche AKA indiana_jules roche@gmail.com Subject: Re: My first WiQuery app does not work To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 8:02 AM Hi, Have you enable wiquery in your Wicket application ? This link is an implementation of the WebApplication with the linked with Wiquery: http://code.google.com/p/wiquery/source/browse/branches/1.0.1/src/main/java/org/odlabs/wiquery/utils/WiQueryWebApplication.java Hope that helped you Julien Roche On Tue, Mar 30, 2010 at 1:56 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I have: JDK 1.6, Wicket 1.4.7, WiQuery 1.0, Tomcat 6.0.24 I downloaded wiquery and put its jar on the classpath. I copied the Hello World sample from http://code.google.com/p/wiquery/wiki/QuickStart Here is my code: HTML:- html head titleWiQuery Quickstart Archetype Homepage/title /head body button wicket:id=open-dialogOpen dialog !/button p wicket:id=dialog Hello world, yes we can ! /p /body /html Java: import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Button; import org.odlabs.wiquery.core.events.Event; import org.odlabs.wiquery.core.events.MouseEvent; import org.odlabs.wiquery.core.events.WiQueryEventBehavior; import org.odlabs.wiquery.core.javascript.JsScope; import org.odlabs.wiquery.ui.dialog.Dialog; public class WiqueryDialog extends WebPage { public WiqueryDialog() { final Dialog dialog = new Dialog(dialog); add(dialog); Button button = new Button(open-dialog); button.add(new WiQueryEventBehavior(new Event(MouseEvent.DBLCLICK) { @Override public JsScope callback() { return JsScope.quickScope(dialog.open().render()); } })); add(button); } } -- I did not get any compiler error and I can run the wicket app and see the html in the browser. However, I did not get any respone when clicking the button. What I did is wrong? Thanks. -- here is generated html -- html head titleWiQuery Quickstart Archetype Homepage/title script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.CoreJavaScriptResourceReference/jquery/jquery-1.3.2.js/script script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.WiqueryGeneratedJavaScriptResourceReference/1269950176687wiquery-gen.js/script /head body button name=open-dialog id=open_dialog1Open dialog !/button p id=dialog2 Hello world, yes we can ! /p /body /html - 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: better way setting up ID for a Wicket component?
Martin and Jeremy, thanks for chiming. The suggested solutions work but IMHO none of them seem ideal in terms of less code, error-less, and refactoring. The best is to have that convenience method or use Wickt 1.5 where HTMLElement's id will be kept. All the best, David --- On Tue, 3/30/10, Martin Makundi martin.maku...@koodaripalvelut.com wrote: From: Martin Makundi martin.maku...@koodaripalvelut.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 12:32 AM Hi! Actually one line that he wants is more like: { Label label; add(label = new Label(abc, abcdef).setOutputMarkupId(true).setMarkupId(label.getId())); } ;) ** Martin 2010/3/30 Jeremy Thomerson jer...@wickettraining.com: You can still do this in one line: add(new Label(abc, abcdef).setOutputMarkupId(true).setMarkupId(foo)); -- Jeremy Thomerson http://www.wickettraining.com On Mon, Mar 29, 2010 at 10:32 PM, David Chang david_q_zh...@yahoo.comwrote: Well, it is not bad to tell people what you believe is right:) We are wicket programmers, aren't we? :) Feel good to say what I wanted to say and thanks for the initial JIRA idea --- On Mon, 3/29/10, James Carman jcar...@carmanconsulting.com wrote: From: James Carman jcar...@carmanconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Monday, March 29, 2010, 11:06 PM See...told you. :) On Mon, Mar 29, 2010 at 10:32 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: im letting you know. we dont need to litter the public api with such trivial methods, the api has a large surface area as it is. i am sure as you code more with wicket you will find another 30 such trivial methods that will be useful to you, this is what static imports are for. -igor On Mon, Mar 29, 2010 at 6:18 PM, James Carman jcar...@carmanconsulting.com wrote: Perhaps. File a JIRA report ( https://issues.apache.org/jira/browse/WICKET) and ask for it as a New Feature. If the core developers don't like the idea, I'm sure they'll let you know. :) On Mon, Mar 29, 2010 at 9:13 PM, David Chang david_q_zh...@yahoo.com wrote: Using an external helper should do the trick, but it feels not so natural as a convenince method as mentioned in my previous email. Would it be possible for such a method make its way into a future release? Regards. --- On Mon, 3/29/10, James Carman jcar...@carmanconsulting.com wrote: From: James Carman jcar...@carmanconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Monday, March 29, 2010, 9:07 PM You could make your own helper method that sets both to the same thing and returns the component. Just modify what I sent earlier. On Mon, Mar 29, 2010 at 9:03 PM, David Chang david_q_zh...@yahoo.com wrote: Not sure whether the help method will do the trick of one-liner code. I feel that it would be much nice if Wicket could have the following additional method for a Componment: Component setMarkupIdToWicketId(). Re-using a Wicket Id as markup id as convention should be best practice. Am I right? I am new in wicket and sorry if I am wrong. Best. --- On Mon, 3/29/10, James Carman jcar...@carmanconsulting.com wrote: From: James Carman jcar...@carmanconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Monday, March 29, 2010, 7:16 PM helper method? protected T extends Component T setMarkupId(T component, String markupId) { component.setMarkupId(markupId); return component; } On Mon, Mar 29, 2010 at 7:00 PM, David Chang david_q_zh...@yahoo.com wrote: Here is what I am using the follow pattern to set up ID for a wicket component: Label abc = new Label(abcd, abcdedfg); abc.setOutputMarkupId(true).setMarkupId(abc.getId()); It takes two lines to do this. Can I do something like Label abc = new Label(abcd, abcdedfg).setOutputMarkupId(true).setMarkupId(???); Is this doable? If yes, then what should go to replace ??? Thanks!
Re: better way setting up ID for a Wicket component?
Craig, I really appreciate your input. If a panel is reused more than one time on the same page, then the panel's components should not use IDs in the first place. It would always violate valid HTML. Correct? Regards. --- On Tue, 3/30/10, McIlwee, Craig craig.mcil...@openroadsconsulting.com wrote: From: McIlwee, Craig craig.mcil...@openroadsconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 7:49 AM There's a good reason that markup ID doesn't match wicket ID. If I have a panel with a few form components, and then put 2 of those panels on the same page, then your approach would break things like document.getElementId(...) because there would be more than 1 element w/ same ID. Craig _ From: David Chang [mailto:david_q_zh...@yahoo.com] To: users@wicket.apache.org Sent: Mon, 29 Mar 2010 21:03:46 -0400 Subject: Re: better way setting up ID for a Wicket component? Not sure whether the help method will do the trick of one-liner code. I feel that it would be much nice if Wicket could have the following additional method for a Componment: Component setMarkupIdToWicketId(). Re-using a Wicket Id as markup id as convention should be best practice. Am I right? I am new in wicket and sorry if I am wrong. Best. --- On Mon, 3/29/10, James Carman jcar...@carmanconsulting.com wrote: From: James Carman jcar...@carmanconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Monday, March 29, 2010, 7:16 PM helper method? protected T extends Component T setMarkupId(T component, String markupId) { component.setMarkupId(markupId); return component; } On Mon, Mar 29, 2010 at 7:00 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I am using the follow pattern to set up ID for a wicket component: Label abc = new Label(abcd, abcdedfg); abc.setOutputMarkupId(true).setMarkupId(abc.getId()); It takes two lines to do this. Can I do something like Label abc = new Label(abcd, abcdedfg).setOutputMarkupId(true).setMarkupId(???); Is this doable? If yes, then what should go to replace ??? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Missing markup files
All, I am getting an error message saying I am missing the Base markup for my webpages. Before I was using the PathStripperLocator function (linkhttp://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3). To try and debug I moved all the html files into their associated packages but I am still getting an error message stating that I am missing my markup files. The only thing that I changed in my application is I added spring (which I don't think this would affect where the html files are loaded from but I could be wrong). In my log4j file I enabled logging for the org.apache.wicket.util.resource and it is scanning through the packages where my html files are located. Has anyone seen this problem before? Thank you, -- Eric Reagan
Re: My first WiQuery app does not work
Hi, That's really odd. Can we see your code ? Thanks Julien Roche On Tue, Mar 30, 2010 at 6:31 PM, David Chang david_q_zh...@yahoo.comwrote: In my experiment, the app does not work without extending WiQueryWebApplication. Is extending WiQueryWebApplication a must? The Hello World example does not extend WiQueryWebApplication and I copied the example code but it does not work. Best, David --- On Tue, 3/30/10, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: From: Cemal Bayramoglu jweekend_for...@cabouge.com Subject: Re: My first WiQuery app does not work To: users users@wicket.apache.org Date: Tuesday, March 30, 2010, 10:29 AM David, Adding the component instantiation listener is more flexible than extending WiQueryWebApplication. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 30 March 2010 15:18, David Chang david_q_zh...@yahoo.com wrote: Julien, Thanks for your reply and it works now. Strangely, I copied the example on that page, which does not ask me to extend WiQueryWebApplication. Something wrong with that Hello World example? Two quick questions: 1. My environment is JDK 1.6 and Wicket 1.4.7. WiQuery 1.0 should have no problem with it. Correct? 2. Why the example requires double-click? Regards. -David --- On Tue, 3/30/10, julien roche AKA indiana_jules roche@gmail.com wrote: From: julien roche AKA indiana_jules roche@gmail.com Subject: Re: My first WiQuery app does not work To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 8:02 AM Hi, Have you enable wiquery in your Wicket application ? This link is an implementation of the WebApplication with the linked with Wiquery: http://code.google.com/p/wiquery/source/browse/branches/1.0.1/src/main/java/org/odlabs/wiquery/utils/WiQueryWebApplication.java Hope that helped you Julien Roche On Tue, Mar 30, 2010 at 1:56 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I have: JDK 1.6, Wicket 1.4.7, WiQuery 1.0, Tomcat 6.0.24 I downloaded wiquery and put its jar on the classpath. I copied the Hello World sample from http://code.google.com/p/wiquery/wiki/QuickStart Here is my code: HTML:- html head titleWiQuery Quickstart Archetype Homepage/title /head body button wicket:id=open-dialogOpen dialog !/button p wicket:id=dialog Hello world, yes we can ! /p /body /html Java: import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Button; import org.odlabs.wiquery.core.events.Event; import org.odlabs.wiquery.core.events.MouseEvent; import org.odlabs.wiquery.core.events.WiQueryEventBehavior; import org.odlabs.wiquery.core.javascript.JsScope; import org.odlabs.wiquery.ui.dialog.Dialog; public class WiqueryDialog extends WebPage { public WiqueryDialog() { final Dialog dialog = new Dialog(dialog); add(dialog); Button button = new Button(open-dialog); button.add(new WiQueryEventBehavior(new Event(MouseEvent.DBLCLICK) { @Override public JsScope callback() { return JsScope.quickScope(dialog.open().render()); } })); add(button); } } -- I did not get any compiler error and I can run the wicket app and see the html in the browser. However, I did not get any respone when clicking the button. What I did is wrong? Thanks. -- here is generated html -- html head titleWiQuery Quickstart Archetype Homepage/title script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.CoreJavaScriptResourceReference/jquery/jquery-1.3.2.js/script script type=text/javascript src=resources/org.odlabs.wiquery.core.commons.WiqueryGeneratedJavaScriptResourceReference/1269950176687wiquery-gen.js/script /head body button name=open-dialog id=open_dialog1Open dialog !/button p id=dialog2 Hello world, yes we can ! /p /body /html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe,
Re: My first WiQuery app does not work
Julie, Thanks for asking. The code is in the beggining of this thread. For that, I copied the Hello World example from wiquery site. If I make my wicket application extend WiQueryWebApplication, then everything is working fine. Thanks, David --- On Tue, 3/30/10, julien roche AKA indiana_jules roche@gmail.com wrote: From: julien roche AKA indiana_jules roche@gmail.com Subject: Re: My first WiQuery app does not work To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 2:50 PM Hi, That's really odd. Can we see your code ? Thanks Julien Roche On Tue, Mar 30, 2010 at 6:31 PM, David Chang david_q_zh...@yahoo.comwrote: In my experiment, the app does not work without extending WiQueryWebApplication. Is extending WiQueryWebApplication a must? The Hello World example does not extend WiQueryWebApplication and I copied the example code but it does not work. Best, David --- On Tue, 3/30/10, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: From: Cemal Bayramoglu jweekend_for...@cabouge.com Subject: Re: My first WiQuery app does not work To: users users@wicket.apache.org Date: Tuesday, March 30, 2010, 10:29 AM David, Adding the component instantiation listener is more flexible than extending WiQueryWebApplication. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 30 March 2010 15:18, David Chang david_q_zh...@yahoo.com wrote: Julien, Thanks for your reply and it works now. Strangely, I copied the example on that page, which does not ask me to extend WiQueryWebApplication. Something wrong with that Hello World example? Two quick questions: 1. My environment is JDK 1.6 and Wicket 1.4.7. WiQuery 1.0 should have no problem with it. Correct? 2. Why the example requires double-click? Regards. -David --- On Tue, 3/30/10, julien roche AKA indiana_jules roche@gmail.com wrote: From: julien roche AKA indiana_jules roche@gmail.com Subject: Re: My first WiQuery app does not work To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 8:02 AM Hi, Have you enable wiquery in your Wicket application ? This link is an implementation of the WebApplication with the linked with Wiquery: http://code.google.com/p/wiquery/source/browse/branches/1.0.1/src/main/java/org/odlabs/wiquery/utils/WiQueryWebApplication.java Hope that helped you Julien Roche On Tue, Mar 30, 2010 at 1:56 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I have: JDK 1.6, Wicket 1.4.7, WiQuery 1.0, Tomcat 6.0.24 I downloaded wiquery and put its jar on the classpath. I copied the Hello World sample from http://code.google.com/p/wiquery/wiki/QuickStart Here is my code: HTML:- html head titleWiQuery Quickstart Archetype Homepage/title /head body button wicket:id=open-dialogOpen dialog !/button p wicket:id=dialog Hello world, yes we can ! /p /body /html Java: import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Button; import org.odlabs.wiquery.core.events.Event; import org.odlabs.wiquery.core.events.MouseEvent; import org.odlabs.wiquery.core.events.WiQueryEventBehavior; import org.odlabs.wiquery.core.javascript.JsScope; import org.odlabs.wiquery.ui.dialog.Dialog; public class WiqueryDialog extends WebPage { public WiqueryDialog() { final Dialog dialog = new Dialog(dialog); add(dialog); Button button = new Button(open-dialog); button.add(new WiQueryEventBehavior(new Event(MouseEvent.DBLCLICK) { @Override public JsScope callback() { return JsScope.quickScope(dialog.open().render()); } })); add(button); } } -- I did not get any compiler error and I can run the wicket app and see the html in the browser. However, I did not get any respone when clicking the button. What I did is wrong? Thanks. -- here is generated html -- html head titleWiQuery Quickstart Archetype Homepage/title script type=text/javascript
About WiQueryWebApplication
IMHO, I am not quite sure this class (another indirection) is really necessary. All this class does is having a member variable: private WiQueryInstantiationListener wiqueryPluginInstantiationListener; and insert the following two lines into init(). wiqueryPluginInstantiationListener = new WiQueryInstantiationListener(); addComponentInstantiationListener(wiqueryPluginInstantiationListener); If this class is really necessary in terms of design, then we could have a similar request for another class just for Spring Annotation to work. This list may go on and on. It may feel more beautiful to have ALL your wicket applications simply extend WicketApplication. Just my 2 cents. All the best. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
jWicket 0.5.7
jWicket 0.5.7 is comitted to wicktstuff core's trunk. It shows an implementation of a simple drop down menu. The menu uses jQuery only for IE6 issues. Take a look at the example TestPage. As always: if someone needs jar files... let me know. Teh jQuery-ui-menu implemenatiion is in a very early stats. It's not even worth looking at it, so please don't report any issues for it. Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Catch Wicket.Error with FireBug
WicketAjaxDebug.original = WicketAjaxDebug.logError; WicketAjaxDebug.logError = function(msg){WicketAjaxDebug.original(msg);console.log(msg);}; On Tue, Mar 30, 2010 at 7:11 AM, Martin U ufer.mar...@googlemail.comwrote: Hi Folks, have everyone of you any experience in catching the wicket-ajax and js-errors with the Firebug? Easily we just need to overwrite WicketAjaxDebug.logError... but how? Thanks for any advice! -- Pedro Henrique Oliveira dos Santos
Re: better way setting up ID for a Wicket component?
IDs are needed for e.g. AJAX functionality. The default Wicket implementation of markup IDs will create them smartly, never creating duplicate ids even in the case of multiple instances of panels, repeaters, etc. As I understand Wicket best practice, it is never to call setMarkupId() at all, and just let the smart default thing happen. If you *must* call it because you have some special requirement for particular IDs, then you take on the responsibility for making sure your IDs are unique yourself. In this light, a setMarkupIdToWicketId() method is a dangerous thing. Bng David Chang wrote: Craig, I really appreciate your input. If a panel is reused more than one time on the same page, then the panel's components should not use IDs in the first place. It would always violate valid HTML. Correct? Regards. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: My first WiQuery app does not work
Did you use component instantiation listener as suggested or just stop extending WiQueryWebApplication? Ed. Typed by thumb On Mar 30, 2010 3:05 PM, David Chang david_q_zh...@yahoo.com wrote: Julie, Thanks for asking. The code is in the beggining of this thread. For that, I copied the Hello World example from wiquery site. If I make my wicket application extend WiQueryWebApplication, then everything is working fine. Thanks, David --- On Tue, 3/30/10, julien roche AKA indiana_jules roche@gmail.com wrote: From: julien r... Date: Tuesday, March 30, 2010, 2:50 PM Hi, That's really odd. Can we see your code ? Thanks Julien Roche On Tue, M...
RE: better way setting up ID for a Wicket component?
Yes! Von: Boris Goldowsky [mailto:bgoldow...@cast.org] Gesendet: Di 30.03.2010 23:06 An: users@wicket.apache.org Betreff: Re: better way setting up ID for a Wicket component? IDs are needed for e.g. AJAX functionality. The default Wicket implementation of markup IDs will create them smartly, never creating duplicate ids even in the case of multiple instances of panels, repeaters, etc. As I understand Wicket best practice, it is never to call setMarkupId() at all, and just let the smart default thing happen. If you *must* call it because you have some special requirement for particular IDs, then you take on the responsibility for making sure your IDs are unique yourself. In this light, a setMarkupIdToWicketId() method is a dangerous thing. Bng David Chang wrote: Craig, I really appreciate your input. If a panel is reused more than one time on the same page, then the panel's components should not use IDs in the first place. It would always violate valid HTML. Correct? Regards. - 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: better way setting up ID for a Wicket component?
That's the point of what he's saying. It's easy to say that, but in practice, you may create a component that you don't think will ever be used on the same page twice, and then it is. That's why Wicket defaults to the safest practice of generating an ID for you. I typically avoid programmatically setting the markup ID for this very reason. There's (almost) always a way around it. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 30, 2010 at 12:06 PM, David Chang david_q_zh...@yahoo.comwrote: Craig, I really appreciate your input. If a panel is reused more than one time on the same page, then the panel's components should not use IDs in the first place. It would always violate valid HTML. Correct? Regards. --- On Tue, 3/30/10, McIlwee, Craig craig.mcil...@openroadsconsulting.com wrote: From: McIlwee, Craig craig.mcil...@openroadsconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 7:49 AM There's a good reason that markup ID doesn't match wicket ID. If I have a panel with a few form components, and then put 2 of those panels on the same page, then your approach would break things like document.getElementId(...) because there would be more than 1 element w/ same ID. Craig _ From: David Chang [mailto:david_q_zh...@yahoo.com] To: users@wicket.apache.org Sent: Mon, 29 Mar 2010 21:03:46 -0400 Subject: Re: better way setting up ID for a Wicket component? Not sure whether the help method will do the trick of one-liner code. I feel that it would be much nice if Wicket could have the following additional method for a Componment: Component setMarkupIdToWicketId(). Re-using a Wicket Id as markup id as convention should be best practice. Am I right? I am new in wicket and sorry if I am wrong. Best. --- On Mon, 3/29/10, James Carman jcar...@carmanconsulting.com wrote: From: James Carman jcar...@carmanconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Monday, March 29, 2010, 7:16 PM helper method? protected T extends Component T setMarkupId(T component, String markupId) { component.setMarkupId(markupId); return component; } On Mon, Mar 29, 2010 at 7:00 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I am using the follow pattern to set up ID for a wicket component: Label abc = new Label(abcd, abcdedfg); abc.setOutputMarkupId(true).setMarkupId(abc.getId()); It takes two lines to do this. Can I do something like Label abc = new Label(abcd, abcdedfg).setOutputMarkupId(true).setMarkupId(???); Is this doable? If yes, then what should go to replace ??? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: About WiQueryWebApplication
This thread should have been on the wiQuery list. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 30, 2010 at 2:12 PM, David Chang david_q_zh...@yahoo.comwrote: IMHO, I am not quite sure this class (another indirection) is really necessary. All this class does is having a member variable: private WiQueryInstantiationListener wiqueryPluginInstantiationListener; and insert the following two lines into init(). wiqueryPluginInstantiationListener = new WiQueryInstantiationListener(); addComponentInstantiationListener(wiqueryPluginInstantiationListener); If this class is really necessary in terms of design, then we could have a similar request for another class just for Spring Annotation to work. This list may go on and on. It may feel more beautiful to have ALL your wicket applications simply extend WicketApplication. Just my 2 cents. All the best. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Missing markup files
if it specifically says for your base page, then the other pages may not be the source of your problem, but just the single html file for your application's base page (assuming all others extend from this). make sure there are no typoes - that everything is spelled exactly like the class name. Also verify that your resources are being copied to your compiled directory (i.e. - you should see .class and .html with same name in the same output folder) -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 30, 2010 at 1:12 PM, Eric Reagan reaga...@gmail.com wrote: All, I am getting an error message saying I am missing the Base markup for my webpages. Before I was using the PathStripperLocator function (link http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3 ). To try and debug I moved all the html files into their associated packages but I am still getting an error message stating that I am missing my markup files. The only thing that I changed in my application is I added spring (which I don't think this would affect where the html files are loaded from but I could be wrong). In my log4j file I enabled logging for the org.apache.wicket.util.resource and it is scanning through the packages where my html files are located. Has anyone seen this problem before? Thank you, -- Eric Reagan
Re: better way setting up ID for a Wicket component?
I feel there is some misunderstanding on this thread now. Two things need to clear: 1. There is no need to call this convenience method on each wicket component. Nobody asks for that. 2. The method is there simply for the programmer to decide to use it or not and use it right. Without this method, it is still equally likely to have duplicate wicket ids due multiple use of the same panel. Just my 2 cents. Best. --- On Tue, 3/30/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 5:28 PM That's the point of what he's saying. It's easy to say that, but in practice, you may create a component that you don't think will ever be used on the same page twice, and then it is. That's why Wicket defaults to the safest practice of generating an ID for you. I typically avoid programmatically setting the markup ID for this very reason. There's (almost) always a way around it. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 30, 2010 at 12:06 PM, David Chang david_q_zh...@yahoo.comwrote: Craig, I really appreciate your input. If a panel is reused more than one time on the same page, then the panel's components should not use IDs in the first place. It would always violate valid HTML. Correct? Regards. --- On Tue, 3/30/10, McIlwee, Craig craig.mcil...@openroadsconsulting.com wrote: From: McIlwee, Craig craig.mcil...@openroadsconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 7:49 AM There's a good reason that markup ID doesn't match wicket ID. If I have a panel with a few form components, and then put 2 of those panels on the same page, then your approach would break things like document.getElementId(...) because there would be more than 1 element w/ same ID. Craig _ From: David Chang [mailto:david_q_zh...@yahoo.com] To: users@wicket.apache.org Sent: Mon, 29 Mar 2010 21:03:46 -0400 Subject: Re: better way setting up ID for a Wicket component? Not sure whether the help method will do the trick of one-liner code. I feel that it would be much nice if Wicket could have the following additional method for a Componment: Component setMarkupIdToWicketId(). Re-using a Wicket Id as markup id as convention should be best practice. Am I right? I am new in wicket and sorry if I am wrong. Best. --- On Mon, 3/29/10, James Carman jcar...@carmanconsulting.com wrote: From: James Carman jcar...@carmanconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Monday, March 29, 2010, 7:16 PM helper method? protected T extends Component T setMarkupId(T component, String markupId) { component.setMarkupId(markupId); return component; } On Mon, Mar 29, 2010 at 7:00 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I am using the follow pattern to set up ID for a wicket component: Label abc = new Label(abcd, abcdedfg); abc.setOutputMarkupId(true).setMarkupId(abc.getId()); It takes two lines to do this. Can I do something like Label abc = new Label(abcd, abcdedfg).setOutputMarkupId(true).setMarkupId(???); Is this doable? If yes, then what should go to replace ??? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - 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: better way setting up ID for a Wicket component?
And, I think one good reason not to do it is that you're making it easier to do something that isn't really recommended anyway (there are almost always workarounds for these situations). On Tue, Mar 30, 2010 at 8:50 PM, David Chang david_q_zh...@yahoo.com wrote: I feel there is some misunderstanding on this thread now. Two things need to clear: 1. There is no need to call this convenience method on each wicket component. Nobody asks for that. 2. The method is there simply for the programmer to decide to use it or not and use it right. Without this method, it is still equally likely to have duplicate wicket ids due multiple use of the same panel. Just my 2 cents. Best. --- On Tue, 3/30/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 5:28 PM That's the point of what he's saying. It's easy to say that, but in practice, you may create a component that you don't think will ever be used on the same page twice, and then it is. That's why Wicket defaults to the safest practice of generating an ID for you. I typically avoid programmatically setting the markup ID for this very reason. There's (almost) always a way around it. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 30, 2010 at 12:06 PM, David Chang david_q_zh...@yahoo.comwrote: Craig, I really appreciate your input. If a panel is reused more than one time on the same page, then the panel's components should not use IDs in the first place. It would always violate valid HTML. Correct? Regards. --- On Tue, 3/30/10, McIlwee, Craig craig.mcil...@openroadsconsulting.com wrote: From: McIlwee, Craig craig.mcil...@openroadsconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 7:49 AM There's a good reason that markup ID doesn't match wicket ID. If I have a panel with a few form components, and then put 2 of those panels on the same page, then your approach would break things like document.getElementId(...) because there would be more than 1 element w/ same ID. Craig _ From: David Chang [mailto:david_q_zh...@yahoo.com] To: users@wicket.apache.org Sent: Mon, 29 Mar 2010 21:03:46 -0400 Subject: Re: better way setting up ID for a Wicket component? Not sure whether the help method will do the trick of one-liner code. I feel that it would be much nice if Wicket could have the following additional method for a Componment: Component setMarkupIdToWicketId(). Re-using a Wicket Id as markup id as convention should be best practice. Am I right? I am new in wicket and sorry if I am wrong. Best. --- On Mon, 3/29/10, James Carman jcar...@carmanconsulting.com wrote: From: James Carman jcar...@carmanconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Monday, March 29, 2010, 7:16 PM helper method? protected T extends Component T setMarkupId(T component, String markupId) { component.setMarkupId(markupId); return component; } On Mon, Mar 29, 2010 at 7:00 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I am using the follow pattern to set up ID for a wicket component: Label abc = new Label(abcd, abcdedfg); abc.setOutputMarkupId(true).setMarkupId(abc.getId()); It takes two lines to do this. Can I do something like Label abc = new Label(abcd, abcdedfg).setOutputMarkupId(true).setMarkupId(???); Is this doable? If yes, then what should go to replace ??? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - 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: better way setting up ID for a Wicket component?
Boris, thanks for sharing your thoughts: IDs are needed for e.g. AJAX functionality. I cannot agree on this. In the context of wicket for the web framework, you actually dont need to create ID. Let Wicket to create whatever ID wicket deems right. In my understanding, and actually in my case that initiated this thread, is to style certain elements and I hope to have meaningful markup IDs. I have meaningful wicket IDs in my case, and I simply want to do the same for markup IDs. Thanks, David --- On Tue, 3/30/10, Boris Goldowsky bgoldow...@cast.org wrote: From: Boris Goldowsky bgoldow...@cast.org Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 5:06 PM IDs are needed for e.g. AJAX functionality. The default Wicket implementation of markup IDs will create them smartly, never creating duplicate ids even in the case of multiple instances of panels, repeaters, etc. As I understand Wicket best practice, it is never to call setMarkupId() at all, and just let the smart default thing happen. If you *must* call it because you have some special requirement for particular IDs, then you take on the responsibility for making sure your IDs are unique yourself. In this light, a setMarkupIdToWicketId() method is a dangerous thing. Bng David Chang wrote: Craig, I really appreciate your input. If a panel is reused more than one time on the same page, then the panel's components should not use IDs in the first place. It would always violate valid HTML. Correct? Regards. - 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
Can I prevent Wicket from overwriting my markup IDs?
I am new in wicket. Just wanted to verify my understanding is right or not. If I have the following HTML: span id=hello wicket:id=helloworldsample text/span Does Wicket (as of version 1.4.7) always overwrite my markup ID? If not, what is the way of stoping Wicket doing that (i.e., keep my original markup id)? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: better way setting up ID for a Wicket component?
If you just want to do this so you can style your markup, use the class attribute in your markup and convert your CSS #id's to .classes, if that's possible. cheers, Steve On 31/03/2010, at 12:03 PM, David Chang wrote: Boris, thanks for sharing your thoughts: IDs are needed for e.g. AJAX functionality. I cannot agree on this. In the context of wicket for the web framework, you actually dont need to create ID. Let Wicket to create whatever ID wicket deems right. In my understanding, and actually in my case that initiated this thread, is to style certain elements and I hope to have meaningful markup IDs. I have meaningful wicket IDs in my case, and I simply want to do the same for markup IDs. Thanks, David --- On Tue, 3/30/10, Boris Goldowsky bgoldow...@cast.org wrote: From: Boris Goldowsky bgoldow...@cast.org Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 5:06 PM IDs are needed for e.g. AJAX functionality. The default Wicket implementation of markup IDs will create them smartly, never creating duplicate ids even in the case of multiple instances of panels, repeaters, etc. As I understand Wicket best practice, it is never to call setMarkupId() at all, and just let the smart default thing happen. If you *must* call it because you have some special requirement for particular IDs, then you take on the responsibility for making sure your IDs are unique yourself. In this light, a setMarkupIdToWicketId() method is a dangerous thing. Bng David Chang wrote: Craig, I really appreciate your input. If a panel is reused more than one time on the same page, then the panel's components should not use IDs in the first place. It would always violate valid HTML. Correct? Regards. - 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 smime.p7s Description: S/MIME cryptographic signature
Re: AJAXIFY Palette: Can't get to the Recorder
Hi i tried doing this it doesn't like adding AjaxFormComponentUpdatingBehavior . I thought when you meant AjaxFormComponentUpdatingBehavior by whateverbehaviour. i even added onupdate method that didn't help too. still getting null when doing pallet.getRecorderComponent. Please help new PropertyModel(model,allSids), renderer, 12, false){ protected RecorderLeadSid newRecorderComponent() { Recorder r=super.newRecorderComponent(); r.add(new AjaxFormComponentUpdatingBehavior(onchange)); return r; } }; Edvin Syse wrote: Thanks! Will you update the javadoc as well? -- Edvin Den 28. juli. 2008 kl. 16.37 skrev Igor Vaynberg igor.vaynb...@gmail.com : override newrecorder() { recorder r=super.newrecorder(); r.add(new whateverbehavior()); return r; } -igor On Mon, Jul 28, 2008 at 12:33 AM, Edvin Syse ed...@sysedata.no wrote: The javadocs for the Palette says to add AjaxFormComponentUpdatingBehaviour to the Recorder like this: Form form=new Form(...); Palette palette=new Palette(...); palette.getRecorderComponent().add(new AjaxFormComponentUpdatingBehavior(onchange) {...}); getRecorderComponent() is null, because it isn't populated in the Palette's constructor, it is populated in the private initFactories() method, which is called from onBeforeRender. How am I supposed to get to the Recorder-component from the constructor of my pageclass? :) -- Edvin - 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 -- View this message in context: http://old.nabble.com/AJAXIFY-Palette%3A-Can%27t-get-to-the-Recorder-tp18685475p28090539.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and JEE6
Olivier Bourgeois-2 wrote: ... everything is simple unmanaged POJOs except for your classes extending WebPage which are managed Not to be picky but a minor correction :) everything is simple unmanaged POJOs except for your classes extending [Component] which are managed -- View this message in context: http://old.nabble.com/Wicket-and-JEE6-tp28045129p28091022.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: better way setting up ID for a Wicket component?
But why should we add something that makes it easier for a programmer to fall into a mistake that is not a recommended practice? It just causes us to have more traffic on this list with people needing help because they messed something up. We don't want to make it easier to mess up and generate help requests. Smaller interfaces are better. convenience methods are not always better (in fact, are generally not better). If you want that convenience, create a utility class. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 30, 2010 at 7:50 PM, David Chang david_q_zh...@yahoo.comwrote: I feel there is some misunderstanding on this thread now. Two things need to clear: 1. There is no need to call this convenience method on each wicket component. Nobody asks for that. 2. The method is there simply for the programmer to decide to use it or not and use it right. Without this method, it is still equally likely to have duplicate wicket ids due multiple use of the same panel. Just my 2 cents. Best. --- On Tue, 3/30/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 5:28 PM That's the point of what he's saying. It's easy to say that, but in practice, you may create a component that you don't think will ever be used on the same page twice, and then it is. That's why Wicket defaults to the safest practice of generating an ID for you. I typically avoid programmatically setting the markup ID for this very reason. There's (almost) always a way around it. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 30, 2010 at 12:06 PM, David Chang david_q_zh...@yahoo.com wrote: Craig, I really appreciate your input. If a panel is reused more than one time on the same page, then the panel's components should not use IDs in the first place. It would always violate valid HTML. Correct? Regards. --- On Tue, 3/30/10, McIlwee, Craig craig.mcil...@openroadsconsulting.com wrote: From: McIlwee, Craig craig.mcil...@openroadsconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Tuesday, March 30, 2010, 7:49 AM There's a good reason that markup ID doesn't match wicket ID. If I have a panel with a few form components, and then put 2 of those panels on the same page, then your approach would break things like document.getElementId(...) because there would be more than 1 element w/ same ID. Craig _ From: David Chang [mailto:david_q_zh...@yahoo.com] To: users@wicket.apache.org Sent: Mon, 29 Mar 2010 21:03:46 -0400 Subject: Re: better way setting up ID for a Wicket component? Not sure whether the help method will do the trick of one-liner code. I feel that it would be much nice if Wicket could have the following additional method for a Componment: Component setMarkupIdToWicketId(). Re-using a Wicket Id as markup id as convention should be best practice. Am I right? I am new in wicket and sorry if I am wrong. Best. --- On Mon, 3/29/10, James Carman jcar...@carmanconsulting.com wrote: From: James Carman jcar...@carmanconsulting.com Subject: Re: better way setting up ID for a Wicket component? To: users@wicket.apache.org Date: Monday, March 29, 2010, 7:16 PM helper method? protected T extends Component T setMarkupId(T component, String markupId) { component.setMarkupId(markupId); return component; } On Mon, Mar 29, 2010 at 7:00 PM, David Chang david_q_zh...@yahoo.comwrote: Here is what I am using the follow pattern to set up ID for a wicket component: Label abc = new Label(abcd, abcdedfg); abc.setOutputMarkupId(true).setMarkupId(abc.getId()); It takes two lines to do this. Can I do something like Label abc = new Label(abcd, abcdedfg).setOutputMarkupId(true).setMarkupId(???); Is this doable? If yes, then what should go to replace ??? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail:
Re: Can I prevent Wicket from overwriting my markup IDs?
setMarkupId(foo) - but this is not a recommended practice - see the other thread that you're on :) -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 30, 2010 at 8:09 PM, David Chang david_q_zh...@yahoo.comwrote: I am new in wicket. Just wanted to verify my understanding is right or not. If I have the following HTML: span id=hello wicket:id=helloworldsample text/span Does Wicket (as of version 1.4.7) always overwrite my markup ID? If not, what is the way of stoping Wicket doing that (i.e., keep my original markup id)? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Fading Content Updates Into a Ajax Refreshing ListView
Yes, this can be done with javascript. First of all you must decide which javascript library you want to use (scriptaculous/jQuery/etc.) Then you need to load it in your head section (use some HeaderContributor class for this). Now when you repaint yout list items with target.addComponent(item); you may alo append some custom javascript code like this target.prependJavascript(item.getMarkupId() + ...fadeout/hide/etc.); target.addComponent(item); target.appendJavascript(item.getMarkupId() + ...fadein/show/etc.); Perhaps you need to set the items visibility to (style=display:none) and then in the appendHJavascript delete the display:none. Stefan -Ursprüngliche Nachricht- Von: Ayodeji Aladejebi [mailto:aladej...@gmail.com] Gesendet: Mittwoch, 31. März 2010 00:32 An: users@wicket.apache.org Betreff: Fading Content Updates Into a Ajax Refreshing ListView I am trying to auto refresh a list but also allow the new list updates to fade in one-by-one similar to these: http://foursquare.com/ I guess its a javascript affair but can I get some assistance as to the approach to use in wicket thanks - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org