Re: Quickstart Problems
Hi Maxim, with causeway.apache.org (which uses wicket under the covers) we've taken to keeping our quickstarts [1],[2] as a separate github project ... makes it easier for us to maintain out of band, and for users to contribute issues. Just an idea. Thx Dan [1] https://github.com/apache/causeway-app-simpleapp [2] https://github.com/apache/causeway-app-helloworld On Fri, 25 Aug 2023 at 16:39, Maxim Solodovnik wrote: > Sounds like we can fix something before 9.15 release :) > > I'll try to check it :) > > can you please file JIRA here: > https://issues.apache.org/jira/projects/WICKET ? > > On Fri, 25 Aug 2023 at 22:20, Dr. Janko Jochimsen > wrote: > > > > Hi, > > > > I am new to Wicket but have some experience with Java and Tapestry. > Installing the quickstarts I have run into some problems that make me > wonder how many people are starting with this platform as of 2023? > > > > First the facts: > > I installed the default quickstart 9.14.0 from the > https://wicket.apache.org/start/quickstart.html as well as the 10.0.0.M1 > directly via eclipse both into a completely fresh eclipse Version: 2023-06 > (4.28.0) running under Java 17.0.8.7 from Openlogic. In both versions I > have got problem 1. and 2. Problem 3. is exclusive on 10.0.0-M1 but this is > due to the enforcement of Java 17 in Version 10. > > > > Now the problems: > > 1.) There is a simple problem with the keystore > > > > In Line 46 of the Start.java the keystore (keystore.p12) is supposed to > be read. However in the path "\src\test\resources" you will find only a > file keystore (without the .p12 suffix). That can not work and therefore > the switch to https breaks if that file is not renamed. After renaming the > keystore file it worked and I can change to https (at least in 9.14.0 under > Java 11. > > > > 2.) > > In the path "\src\test\jetty" are four xml definition file how all get a > > > > Referenced file contains errors ( > http://www.eclipse.org/jetty/configure_9_0.dtd). > > > > error. > > > > I didn't managed to switch this off but it seems to be irrelevant at > least for the development system > > > > > > 3.) > > > > It looks as if the usage of org.eclipse.jetty.util.ssl.SslContextFactory > is outdated and for Java 17 broken. > > > > a.) > > In Line 58 of the Start.java a SslContextFactory is created by this > command: > > > > SslContextFactory sslContextFactory = new SslContextFactory(); > > > > This call is deprecated in Java 11 and causes an error in Java 17. It > should read: > > > > SslContextFactory sslContextFactory = new SslContextFactory.Server(); > > > > > > b.) > > > > A little bit more complicated is the problem in line 64 ff > > > > It states: > > ServerConnector https = new ServerConnector(server, new > SslConnectionFactory( > > sslContextFactory, "http/1.1"), new HttpConnectionFactory(https_config)); > > > > While this is legal in Java 11 but not in Java 17. With 17 you get a > > > > The constructor SslConnectionFactory(SslContextFactory, String) is > undefined > > > > error. > > > > You can kind of work around it by making an explicit cast > > > > ServerConnector https = new ServerConnector(server, new > SslConnectionFactory( > > (org.eclipse.jetty.util.ssl.SslContextFactory.Server) sslContextFactory, > "http/1.1"), new HttpConnectionFactory(https_config)); > > > > That works for the http side but it will break if you change to https > with the following error. > > > > [qtp2009787198-27] WARN org.eclipse.jetty.server.HttpChannel - > handleException / org.eclipse.jetty.http.BadMessageException: 400: Invalid > SNI > > > > > > I understand that a lot of the old hands work in their production > environments and do not have any problems on this level but for a newcomer > it is a bit disappointing to run into a number of problems as soon as you > load / create a completely untouched quickstart, > > > > Thanks anyway to keep going with this interesting platform. > > > > > > Best > > > > > > Janko > > > > > > This email was scanned by Bitdefender > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > -- > Best regards, > Maxim > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Wicket MVVM
Regarding the annotation-heavy soup (nice phrase!) - in theory you could remove them because the programming model is completely open for customisation ... it consists of a set of so-called FacetFactory's that introspect the domain classes (or anywhere else you want to specify the semantics) and build up the domain model. In fact, most folk tend to use the associated .layout.xml file for UI hints rather than the @XxxLayout annotations, because making changes doesn't require a recompile. In theory this could be done for other annotations too, if that's your preference. Regarding pluggable persistence - we support JDO and JPA and in the past someone spiked neo4j and mongodb, so that's definitely doable. But this isn't really the forum to talk too much about Apache Isis, we have a mailing list or a slack channel if you want to learn more. -- Dan On Thu, 17 Nov 2022 at 16:28, Martin Terra wrote: > Thanks, interesting. First impression it's quite some > annotation-heavy-soup. Was hoping for more wicket-like 100% pojo/lambda > approach and more clear divide separation of > view<->viewmodel<->persistence in a way that I can implement or plug > something else for persistence. > > Anyways, will have a look if it can be used efficiently. > > ** > Martin > > to 17. marrask. 2022 klo 17.17 Dan Haywood (d...@haywood-associates.co.uk) > kirjoitti: > > > There is a plan to add OData support to isis.apache.org, so that a > > collection of objects could be opened in (and perhaps edited through) > > Excel, say. > > > > Dan > > > > On Thu, 17 Nov 2022 at 13:45, Martin Grigorov > > wrote: > > > > > Hi, > > > > > > I am not sure how much helpful my answer is to you but > > > https://isis.apache.org/ does something similar. > > > Isis defines a model based on your naked objects. > > > And then different viewers visualize the objectis/collections. Apache > > > Wicket is one of the available viewers. REST is another. AFAIK there is > > no > > > POI viewer but there is a plugin for the Wicket viewer that adds > "export > > to > > > Excel" button next to the tables. > > > > > > On Thu, Nov 17, 2022 at 11:48 AM Martin Terra < > > > martin.te...@koodaripalvelut.com> wrote: > > > > > > > Hi! > > > > > > > > Is there a library/example/experience for doing MVVM with wicket (or > > > > something close enough to serve as a useful reference)? > > > > > > > > A practical goal would be to decouple the Wicket stack from other > > layers > > > > and automate gui code generation based on predefined patterns & > layout > > > > design (benefits would be stabilty, testability, predictability, > > standard > > > > practices, maintainability, upgradeability, code generation/ai code > > > > copilot, etc.). > > > > > > > > Preferably it would work even so far that we could plug/attach either > > > > jakarta poi or wicket to the same model and get as output (for > example) > > > > either a html table or excel sheet. > > > > > > > > How it works is, basically you would have a wicket plugin that > > > > "interprets/implements" the model. Alternatively you could have a > > jakarta > > > > poi plugin as well. > > > > > > > > You could also have a mix of the two, for example: an instruction in > > the > > > > model for an action (link, button, etc. rendered by the wicket > plugin) > > > has > > > > an "embedded instruction" to further render an excel sheet via (a > > > different > > > > plugin) jakarta poi as a result of the wicket action (so that when > the > > > user > > > > clicks the link, the user can download the sheet generated by the > model > > > via > > > > a wicket download stream associated with the defined link/action). > > > > > > > > > > > > ** > > > > Martin > > > > > > > > > >
Re: Wicket MVVM
There is a plan to add OData support to isis.apache.org, so that a collection of objects could be opened in (and perhaps edited through) Excel, say. Dan On Thu, 17 Nov 2022 at 13:45, Martin Grigorov wrote: > Hi, > > I am not sure how much helpful my answer is to you but > https://isis.apache.org/ does something similar. > Isis defines a model based on your naked objects. > And then different viewers visualize the objectis/collections. Apache > Wicket is one of the available viewers. REST is another. AFAIK there is no > POI viewer but there is a plugin for the Wicket viewer that adds "export to > Excel" button next to the tables. > > On Thu, Nov 17, 2022 at 11:48 AM Martin Terra < > martin.te...@koodaripalvelut.com> wrote: > > > Hi! > > > > Is there a library/example/experience for doing MVVM with wicket (or > > something close enough to serve as a useful reference)? > > > > A practical goal would be to decouple the Wicket stack from other layers > > and automate gui code generation based on predefined patterns & layout > > design (benefits would be stabilty, testability, predictability, standard > > practices, maintainability, upgradeability, code generation/ai code > > copilot, etc.). > > > > Preferably it would work even so far that we could plug/attach either > > jakarta poi or wicket to the same model and get as output (for example) > > either a html table or excel sheet. > > > > How it works is, basically you would have a wicket plugin that > > "interprets/implements" the model. Alternatively you could have a jakarta > > poi plugin as well. > > > > You could also have a mix of the two, for example: an instruction in the > > model for an action (link, button, etc. rendered by the wicket plugin) > has > > an "embedded instruction" to further render an excel sheet via (a > different > > plugin) jakarta poi as a result of the wicket action (so that when the > user > > clicks the link, the user can download the sheet generated by the model > via > > a wicket download stream associated with the defined link/action). > > > > > > ** > > Martin > > >
Re: Urgent help
I doubt that Martin (Grigorov) will be able to help much based on this description, Mukesh... there's not enough info here. I would recommend you put together a small quickstart sample application on github somewhere, which demonstrates and explains clearly the issue that you are having. On Fri, 28 Aug 2020 at 06:49, MUKESH S B wrote: > Hi Grigorov, >This is Mukesh SB,I am working on a project but not able > to fix the bug.We are using JAVA with wicket as a presentation layer. > > In a page,we have a NEXT button with POST request,if we change/tamper to > GET ,and then if I click on NEXT button.It is processing to next page and I > am getting 200 as a response. > I have implemented Methodmismatch() > But I am still getting same 200 response. > > Please help.Very urgent. > Waiting for your reply. > > Thanks, > Mukesh SB >
Re: Scaffolding
Yep, I wrote that. Looks like you and 7 other people like it, judging by the github stars ! cheers Dan On Thu, 7 Feb 2019 at 10:16, Zala Pierre GOUPIL wrote: > Thanks Dan! As a side-note, are you the author of this tool: > https://github.com/danhaywood/java-testsupport ? I love it! :-) > > Regards, > > Zala > > > > On Thu, Feb 7, 2019 at 11:12 AM Dan Haywood > wrote: > > > There's a framework called NoWicket [1] that is a half-way house between > > "raw" Wicket and Apache Isis; might be worth taking a look at. > > > > Cheers > > Dan > > (Apache Isis committer) > > > > [1] http://invesdwin.de/nowicket/introduction?0 > > > > On Thu, 7 Feb 2019 at 10:01, Martin Grigorov > wrote: > > > > > Hi, > > > > > > It depends how much code you want to be generated for you. > > > I just use Intellij IDEA templates to generate pages, panels, > fragments, > > > ... > > > But if you want also CRUD related code to be generated then I am not > > aware > > > of such tools. > > > > > > Apache Isis provides something similar. There you design your domain > > > entities and the framework generates the UI (with Wicket) and REST > > > interfaces for them. There is also Angular frontend that consumes the > > REST > > > APIs. > > > But here you have much less freedom how your (Wicket) UI will look > like. > > > You can override the defaults but it is an effort! > > > > > > On Thu, Feb 7, 2019 at 11:28 AM Zala Pierre GOUPIL < > > goupilpie...@gmail.com > > > > > > > wrote: > > > > > > > All, > > > > > > > > It's 2019 now. Which scaffolding tool for a Wicket 8 user would you > > > advise, > > > > please? > > > > > > > > Regards, > > > > > > > > Zala > > > > > > > > > > > > -- > > > > Je n'aime pas seulement ma vie, mais aussi celle des autres. > > > > > > > > (Blade Runner) > > > > > > > > > > > > -- > Je n'aime pas seulement ma vie, mais aussi celle des autres. > > (Blade Runner) >
Re: Scaffolding
There's a framework called NoWicket [1] that is a half-way house between "raw" Wicket and Apache Isis; might be worth taking a look at. Cheers Dan (Apache Isis committer) [1] http://invesdwin.de/nowicket/introduction?0 On Thu, 7 Feb 2019 at 10:01, Martin Grigorov wrote: > Hi, > > It depends how much code you want to be generated for you. > I just use Intellij IDEA templates to generate pages, panels, fragments, > ... > But if you want also CRUD related code to be generated then I am not aware > of such tools. > > Apache Isis provides something similar. There you design your domain > entities and the framework generates the UI (with Wicket) and REST > interfaces for them. There is also Angular frontend that consumes the REST > APIs. > But here you have much less freedom how your (Wicket) UI will look like. > You can override the defaults but it is an effort! > > On Thu, Feb 7, 2019 at 11:28 AM Zala Pierre GOUPIL > > wrote: > > > All, > > > > It's 2019 now. Which scaffolding tool for a Wicket 8 user would you > advise, > > please? > > > > Regards, > > > > Zala > > > > > > -- > > Je n'aime pas seulement ma vie, mais aussi celle des autres. > > > > (Blade Runner) > > >
Re: Problems with update of wicket from 8.0.0 to 8.1.0
Use mvn dependency:tree to capture your actual classpath before and after the upgrade; this should help you identify where the clash is in your classpath. You can then use exclusions or dependencyManagement to pick up the correct version. I use IntelliJ and the "Maven Helper" plugin is invaluable for finding conflicts; I think that Eclipse has something similar built-in. HTH On Thu, 1 Nov 2018 at 08:12, Martin Grigorov wrote: > Hi, > > I guess it is the upgrade of CGLIB and ASM: > https://issues.apache.org/jira/browse/WICKET-6552 > Please check whether you have more than one version of ASM in your > classpath. Maybe another dependency in your app depends on ASM 5.x > > On Thu, Nov 1, 2018 at 9:35 AM Илья Нарыжный wrote: > > > Hello, wicket users, > > > > After updating just of wicket version in our projects from 8.0.0 to 8.1.0 > > we started to see the following exception during rendering time. > > Nothing was changed except wicket version. Do you have any suggestions > what > > hidden dependencies and etc. might lead to this issue? > > > > java.lang.NoClassDefFoundError: Could not initialize class > > net.sf.cglib.proxy.Enhancer > > at > > > > > org.apache.wicket.proxy.LazyInitProxyFactory.createProxy(LazyInitProxyFactory.java:183) > > at > > > > > org.apache.wicket.guice.GuiceFieldValueFactory.getFieldValue(GuiceFieldValueFactory.java:88) > > at org.apache.wicket.injection.Injector.inject(Injector.java:111) > > at > > > > > org.apache.wicket.guice.GuiceComponentInjector.inject(GuiceComponentInjector.java:122) > > at > > > > > org.apache.wicket.guice.GuiceComponentInjector.onInstantiation(GuiceComponentInjector.java:128) > > at > > > > > org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:38) > > at > > > > > org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34) > > at > > > > > org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80) > > at > > > > > org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:33) > > > > Thanks, > > Ilia > > > > - > > Orienteer(http://orienteer.org) - open source Business Application > > Platform > > >
Re: How allow select from a disabled field
yep, just to say that the suggestion worked. Thx! [1] https://issues.apache.org/jira/browse/ISIS-1552 On Sat, 3 Dec 2016 at 13:32 Dan Haywood <d...@haywood-associates.co.uk> wrote: > Ok, thanks... I'll try it out and report back > > On Sat, 3 Dec 2016, 12:02 Martin Grigorov, <mgrigo...@apache.org> wrote: > > There is no need of new method to TextField (or other FormComponents). > We already > have org.apache.wicket.markup.html.form.FormComponent#onDisabled(), it sets > the "disabled" attribute at the moment. > > Sven's suggestion to use Behavior + IComponentInstantiationListener looks > the most flexible to me. > @Dan: this should solve the issue for Isis. > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Fri, Dec 2, 2016 at 6:03 PM, Martijn Dashorst < > martijn.dasho...@gmail.com > > wrote: > > > On Fri, Dec 2, 2016 at 12:21 PM, Pedro Santos <pedros...@gmail.com> > wrote: > > > After reading the thread on Isis's mailing list, I'm under the > impression > > > that the best solution is to offer an API enabling users to configure > how > > > the disabled text field will be shown. My suggestion is to add the > method > > > TextField.showDisabledAsReadOnly(boolean) and to keep the current > > > "disabled" attribute as the default presentation of a disabled text > > field. > > > > Of course we can change the behavior in a major version such as 8.0. > > > > That said, changing disabled to mean readonly doesn't sound like a > > good idea as a general rule, only if the names convey different > > meanings. > > > > > > OTOH, I doubt adding a `setReadOnly` option to TextField is a good > > option as well. > > > > Martijn > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > >
Re: How allow select from a disabled field
Ok, thanks... I'll try it out and report back On Sat, 3 Dec 2016, 12:02 Martin Grigorov,wrote: > There is no need of new method to TextField (or other FormComponents). > We already > have org.apache.wicket.markup.html.form.FormComponent#onDisabled(), it sets > the "disabled" attribute at the moment. > > Sven's suggestion to use Behavior + IComponentInstantiationListener looks > the most flexible to me. > @Dan: this should solve the issue for Isis. > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Fri, Dec 2, 2016 at 6:03 PM, Martijn Dashorst < > martijn.dasho...@gmail.com > > wrote: > > > On Fri, Dec 2, 2016 at 12:21 PM, Pedro Santos > wrote: > > > After reading the thread on Isis's mailing list, I'm under the > impression > > > that the best solution is to offer an API enabling users to configure > how > > > the disabled text field will be shown. My suggestion is to add the > method > > > TextField.showDisabledAsReadOnly(boolean) and to keep the current > > > "disabled" attribute as the default presentation of a disabled text > > field. > > > > Of course we can change the behavior in a major version such as 8.0. > > > > That said, changing disabled to mean readonly doesn't sound like a > > good idea as a general rule, only if the names convey different > > meanings. > > > > > > OTOH, I doubt adding a `setReadOnly` option to TextField is a good > > option as well. > > > > Martijn > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > >
How allow select from a disabled field
The Apache Isis project [1] uses Wicket for its main viewer, and we recently had this question [2] on our mailing list is: I believe it was mentioned once in another thread that selecting text (and so copying) from a disabled field doesn't work in Firefox on Windows. Since a week or two it's not possible on a lot of Chrome installations of our users either, probably due to a Chrome update. This really is a big problem for our users because we share a lot of configuration data for internet access and telephony services and copying data makes sure they don't make mistakes while configuring their systems. Would it be a problem to use the read only attribute instead of the disabled attribute? That would be an easy fix. Martin G suggested a possible fix using CSS, but unfortunately to no avail. Since this presumably could impact all Wicket users, the suggestion [3] was to re-raise the question here. So, are there any thoughts on this? Is there any way to enable select text for a disabled input field for both latest Chrome and Firefox? Thx Dan [1] http://isis.apache.org/ [2] https://lists.apache.org/thread.html/354ff5bb35c3dd60fbe643f824951c9665aa7546d79562cf15e014f7@%3Cusers.isis.apache.org%3E [3] https://lists.apache.org/thread.html/566709f02cc6a4607d1f86d98e19ec1e7d39a2a255dc9895d5800635@%3Cusers.isis.apache.org%3E
Re: Exceptional upgrade experience 6.14.0 - 6.17.0
+1 for providing that feedback; seconded! We use Wicket within Apache Isis, and it too uses plenty of the same components, and I can't recall any problems either, all the way through the various 6.x releases. Cheers Dan On 16 October 2014 23:26, Matt Pavlovich mattr...@gmail.com wrote: Hi all- I wanted to take a minute to thank all the Wicket Project contributors— committers, users and the community as whole. We just completed a seamless upgrade from 6.14.0 to 6.17.0 and had to make *zero* code changes. This is extremely impressive for any software project, and especially notable due to the fact that we use all sorts of complex Wicket features, extend components, and implement custom extensions in our Integrated Console product. Our Wicket feature list includes, but isn’t limited to: * Modules * Events * Modals * Ajax everywhere— Input, Fields, Validation * Custom Authorization Strategy * Sortable Tables * Feedback panels * Breadcrumb bar * Ajax auto-refreshing components * .. many more AND, we support running in Tomcat and Apache Karaf (OSGi runtime). Great work and thank you! Matt Pavlovich Founding Partner Media Driver https://mediadriver.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Apache Con EU Budapest, 17~21 Nov 2014
Hi folks, Just to make you aware, in case you weren't already, that Apachecon EU 2014 is running in Budapest in Nov 17th to 21st [1]. There's a great variety of talks there, from a whole variety of ASF projects; surely something for anyone. Wicket is particularly well represented, with three talks from Martijn (Dashorst) on Wicket [2], [3], [4]. More details here [5]. If you'll indulge me in a bit of cross-promotion, you might also be interested in another Apache framework that is a big user of Wicket, namely Apache Isis [6]. There's a couple of sessions on Isis, too [7], [8]. So do see if you can find the time to attend, would be great to meet up. Cheers Dan Haywood Apache Wicket user/Apache Isis committer [1] http://events.linuxfoundation.org/events/apachecon-europe/program/schedule [2] http://sched.co/1pbmoTb [3] http://sched.co/1pbmsCq [4] http://sched.co/1pbmuuc [5] http://markmail.org/message/rdrn4v26f26xqazx [6] http://isis.apache.org [7] http://sched.co/1nhAGlb [8] http://sched.co/1pbB8Sh
Re: Wicket 6.0.0: RenderStrategy.REDIRECT_TO_RENDER and missing FeedbackMessages in ComponentFeedbackPanel.
On 18 September 2012 12:41, Jeremy Thomerson jer...@wickettraining.comwrote: Can you create a small quickstart to demonstrate the problem? I've just done this, and confirmed (what I believe is) the problem. WICKET-4773 [1] raised, which x-refs a github project that demonstrates the issue. Dan [1] https://issues.apache.org/jira/browse/WICKET-4773
Wicket 6.0.0: RenderStrategy.REDIRECT_TO_RENDER and missing FeedbackMessages in ComponentFeedbackPanel.
We're using RenderStrategy.REDIRECT_TO_RENDER (ie redirect after post strategy; in 1.4.x this was working fine and our FeedbackMessage's were rendered correctly against their reporter using ComponentFeedbackPanel. Having upgraded to 6.0.0, the messages no longer appear. Investigating, it seems that the FeedbackMessage#detach() causes reporter to be set to null, meaning that the ComponentFeedbackPanel's filter makes no match on the subsequent render. Changing the RenderStrategy to REDIRECT_TO_BUFFER causes the feedback messages to appear. This looks like a regression to me? But perhaps there's something I'm meant to do that isn't in the 6.0.0 migration notes? Any advice welcome! Dan
Announcing WicketObjects v0.1
Hi all, I'd like to announce a new open source (ASLv2) project to help develop Wicket applications - Wicket Objects. This is an integration between Wicket and the Naked Objects framework. The idea is that you can develop full webapps just by writing domain objects pojos, and Wicket Objects (with a little help from NOF) then renders your objects automatically. You can then use your Wicket skills to customize the UI as need be. There's some screenshots and a quick start on my blog (http://danhaywood.com) and there's a website too (http://wicketobjects.sourceforge.net). To get started all you'll need is SVN and MVN. I'm looking for feedback, and I'm also hoping that some of you smart web UI guys (not my strongest suit!) might be interested in helping me develop it up to a v1.0 release. Thanks for reading, Cheers Dan Haywood -- consultant, mentor, developer, author agile, ddd, oo, java, .net, sybase MA, MBCS, CITP, CEng /mail: /d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk /book: /Domain Driven Design using Naked Objects http://pragprog.com/titles/dhnako /blog: /http://danhaywood.com /twitter: /http://twitter.com/dkhaywood - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re: Can I develop without recompiling/restarting after every change?
have you tried JRebel? I've not used it myself, but there was an interview on JavaPosse recently, sounds like it'd be an ideal fit for any Wicket developer. Dan On 22/07/28164 20:59, David Chang wrote: I am using Tomcat, any tips about how to develop out recompiling/restarting after every change? Best. --- On Fri, 5/21/10, Jeremy Thomersonjer...@wickettraining.com wrote: From: Jeremy Thomersonjer...@wickettraining.com Subject: Re: Can I develop without recompiling/restarting after every change? To: users@wicket.apache.org Date: Friday, May 21, 2010, 12:17 PM the easiest way to do this is to use the Start class (Start.java) from the quickstart to run an embedded jetty instance in your IDE. then, if you run it in debug mode, it will hotswap any possible changes (and tell you if you must restart if it's an incompatible change) -- Jeremy Thomerson http://www.wickettraining.com On Fri, May 21, 2010 at 10:53 AM, ekallevige...@ekallevig.com wrote: I'm a front-end developer trying to learn Java (total n00b) and working on a wicket application at work. The whole process feels very slow primarily because I have to recompile and restart JBoss every time I make a change. So I'm wondering what the best way is to avoid having to do this when editing .java/.js/.css/.html files during development? I'd like to just make changes and then refresh the browser to test -- is this possible? I've seen in the FAQ that you can change the application settings to auto-reload markup .html files -- where would I insert this setting (remember I'm a total n00b). As to .css/.js/.java files -- do I need jRebel or something like that to get these files to reload automatically? Thanks for helping out a super-beginner :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Can-I-develop-without-recompiling-restarting-after-every-change-tp2226360p2226360.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to validate an entire object in a form (rather than a particular property of that object)
ok, thanks ... that worked. It threw up a different problem, but that'll be another post. Dan On 20/04/2010 01:53, Igor Vaynberg wrote: you can override form.onvalidate() and do your validation there -igor On Mon, Apr 19, 2010 at 4:51 PM, Dan Haywood dkhayw...@gmail.com mailto:dkhayw...@gmail.com wrote: Hi Pedro, but my problem is that there is no form component to represent the form itself, is there? Any other thoughts? Dan On 19/04/2010 20:27, Pedro Santos wrote: Hi Dan On Mon, Apr 19, 2010 at 2:04 PM, Dan Haywood dkhayw...@gmail.com mailto:dkhayw...@gmail.com wrote: Another form-related question. I can see how to install a validator on a Form - Form#add(IFormValidator) - but it seems that AbstractFormValidator, the adapter, always requires a specific FormComponent to be specified in its error(...) method. How does one raise an error on the state of the form (and by implication, that of the underlying domain object) itself, without having to specify any form component? FeedbackMessages API, is expection an Component object as reporter. Maybe add the validation error to the form component will make sense: formComponent.getForm().error( theValidationErrorNotFormComponentSpecific ) An example would be the classic fromDate endDate. A workaround would be to install the validator on - say - the endDate. But I'm after a general solution, rather than a solution for this particular example. Thanks Dan -- Dan Haywood consultant, mentor, developer, author agile, ddd, oo, java, .net, sybase MA, MBCS, CITP, CEng /mail: /d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk /phone: /+44 (0)7961 144286 /book: /Domain Driven Design using Naked Objects http://pragprog.com/titles/dhnako /blog: /http://danhaywood.com /linked in: /http://uk.linkedin.com/in/dkhaywood /twitter: /http://twitter.com/dkhaywood /sybase: /http://sybtraining.co.uk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org mailto:users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org mailto:users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org mailto:users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org mailto:users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
how to handle clear input for custom FormComponents
Hi all, I've developed a custom FormComponent (by subclassing FormComponentPanel) to act as a reference from one object to another (eg a Customer to an Address), but am having problems figuring out how to handle clear input (ie, if the user hits the cancel button on the form). To explain a little further, the FormComponent is called EntityLink, and renders the reference (eg the Customer's homeAddress) a hyperlink. I have a button on the EntityLink panel allowing the user to perform a search for other objects of the correct type, and then select it. Doing this updates the EntityLink component, with a pending value (ie of the new homeAddress). If the user hits the OK button, then the pending value is copied over to the domain object (ie to the Customer's actual homeAddress property). In the cancel button's onSubmit() method I'm calling getForm().clearInput(), which seems to use a visitor to call clearInput() on all child FormComponent's. The FormComponent's clearInput() method seems only to set the rawInput to a constant (NO_RAW_INPUT), which looks like it's a magic value of some kind when the form component is actually rendered - all rather low level. I think what I'd like is to eagerly capture this clearInput so that I can reset my EntityLink's hyperlink back to the original value and discard the pending value. However, clearInput() is unfortunately marked as final so there doesn't seem to be any easy way to capture this. Looking at other implementations of FormComponentPanel (eg DateTimeField) they are really very little other than wrappers around simple FormComponents, so they don't offer any real clues. Can anyone help me here, then? Thanks Dan -- Dan Haywood consultant, mentor, developer, author agile, ddd, oo, java, .net, sybase MA, MBCS, CITP, CEng /mail: /d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk /phone: /+44 (0)7961 144286 /book: /Domain Driven Design using Naked Objects http://pragprog.com/titles/dhnako /blog: /http://danhaywood.com /linked in: /http://uk.linkedin.com/in/dkhaywood /twitter: /http://twitter.com/dkhaywood /sybase: /http://sybtraining.co.uk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to handle clear input for custom FormComponents
I found a way to make this work (though I worry the solution might be a little fragile). Basically, I'm overriding getInputAsArray() in my wrapper EntityLink, delegating to a hidden text field; then, in onBeforeRender() I check if there is input, and if not then infer that clearInput must've been called on and so zap the value of the hidden text field. If anyone cares to look at the code, it's on sourceforge: http://wicketobjects.svn.sourceforge.net/viewvc/wicketobjects/trunk/main/viewer/src/main/java/org/starobjects/wicket/viewer/components/entitylink/EntityLink.java?revision=78view=markup Thanks anyway Dan Dan Haywood consultant, mentor, developer, author agile, ddd, oo, java, .net, sybase MA, MBCS, CITP, CEng /mail: /d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk /phone: /+44 (0)7961 144286 /book: /Domain Driven Design using Naked Objects http://pragprog.com/titles/dhnako /blog: /http://danhaywood.com /linked in: /http://uk.linkedin.com/in/dkhaywood /twitter: /http://twitter.com/dkhaywood /sybase: /http://sybtraining.co.uk On 19/04/2010 13:08, Jeremy Thomerson wrote: You shouldn't be committing your changes to the actual domain object until the form is submitted (your ok button). Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device From: Dan Haywood dkhayw...@gmail.com Sent: Monday, April 19, 2010 5:53 AM To: users@wicket.apache.org Subject: how to handle clear input for custom FormComponents Hi all, I've developed a custom FormComponent (by subclassing FormComponentPanel) to act as a reference from one object to another (eg a Customer to an Address), but am having problems figuring out how to handle clear input (ie, if the user hits the cancel button on the form). To explain a little further, the FormComponent is called EntityLink, and renders the reference (eg the Customer's homeAddress) a hyperlink. I have a button on the EntityLink panel allowing the user to perform a search for other objects of the correct type, and then select it. Doing this updates the EntityLink component, with a pending value (ie of the new homeAddress). If the user hits the OK button, then the pending value is copied over to the domain object (ie to the Customer's actual homeAddress property). In the cancel button's onSubmit() method I'm calling getForm().clearInput(), which seems to use a visitor to call clearInput() on all child FormComponent's. The FormComponent's clearInput() method seems only to set the rawInput to a constant (NO_RAW_INPUT), which looks like it's a magic value of some kind when the form component is actually rendered - all rather low level. I think what I'd like is to eagerly capture this clearInput so that I can reset my EntityLink's hyperlink back to the original value and discard the pending value. However, clearInput() is unfortunately marked as final so there doesn't seem to be any easy way to capture this. Looking at other implementations of FormComponentPanel (eg DateTimeField) they are really very little other than wrappers around simple FormComponents, so they don't offer any real clues. Can anyone help me here, then? Thanks Dan -- Dan Haywood consultant, mentor, developer, author agile, ddd, oo, java, .net, sybase MA, MBCS, CITP, CEng /mail: /d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk /phone: /+44 (0)7961 144286 /book: /Domain Driven Design using Naked Objects http://pragprog.com/titles/dhnako /blog: /http://danhaywood.com /linked in: /http://uk.linkedin.com/in/dkhaywood /twitter: /http://twitter.com/dkhaywood /sybase: /http://sybtraining.co.uk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
how to make a BookmarkablePageLink enabled when its parent component is disabled?
I have a FormComponentPanel (called EntityLink) that holds an image, a hyperlink (a BookmarkablePageLink) and a hidden text field holding the serializable value of the reference. Initially I want the form is in read-only mode and so I have disabled all of its form components. However, I'd like the link to be enabled. Looking at the source code, Wicket calls isLinkEnabled() to determine how to render the link; this in turn calls isEnabledInHierarchy(). My problem is the latter is (correctly returning false) but I want the former to return true. Both methods are final, however. I'm obviously tackling this incorrectly - so what would be the Wicket way? Thanks Dan -- Dan Haywood consultant, mentor, developer, author agile, ddd, oo, java, .net, sybase MA, MBCS, CITP, CEng /mail: /d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk /phone: /+44 (0)7961 144286 /book: /Domain Driven Design using Naked Objects http://pragprog.com/titles/dhnako /blog: /http://danhaywood.com /linked in: /http://uk.linkedin.com/in/dkhaywood /twitter: /http://twitter.com/dkhaywood /sybase: /http://sybtraining.co.uk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to validate an entire object in a form (rather than a particular property of that object)
Another form-related question. I can see how to install a validator on a Form - Form#add(IFormValidator) - but it seems that AbstractFormValidator, the adapter, always requires a specific FormComponent to be specified in its error(...) method. How does one raise an error on the state of the form (and by implication, that of the underlying domain object) itself, without having to specify any form component? An example would be the classic fromDate endDate. A workaround would be to install the validator on - say - the endDate. But I'm after a general solution, rather than a solution for this particular example. Thanks Dan -- Dan Haywood consultant, mentor, developer, author agile, ddd, oo, java, .net, sybase MA, MBCS, CITP, CEng /mail: /d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk /phone: /+44 (0)7961 144286 /book: /Domain Driven Design using Naked Objects http://pragprog.com/titles/dhnako /blog: /http://danhaywood.com /linked in: /http://uk.linkedin.com/in/dkhaywood /twitter: /http://twitter.com/dkhaywood /sybase: /http://sybtraining.co.uk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to make a BookmarkablePageLink enabled when its parent component is disabled?
Hi Pedro, That was my first instinct, to override isEnabled(), but it turns out that it is isLinkEnabled() that gets called, in the onComponentTag() method (ie when rendering). So, no joy there. Any other suggestions, anyone? Dan On 19/04/2010 20:41, Pedro Santos wrote: Hi, you can override the isEnable method and implement your rule, like: new BookmarkablePageLink { boolean isEnabled() { return form.getState() == allowedState; } } or you can add the link higher in the component hierarchy, don't as an form child. On Mon, Apr 19, 2010 at 1:45 PM, Dan Haywood dkhayw...@gmail.com mailto:dkhayw...@gmail.com wrote: I have a FormComponentPanel (called EntityLink) that holds an image, a hyperlink (a BookmarkablePageLink) and a hidden text field holding the serializable value of the reference. Initially I want the form is in read-only mode and so I have disabled all of its form components. However, I'd like the link to be enabled. Looking at the source code, Wicket calls isLinkEnabled() to determine how to render the link; this in turn calls isEnabledInHierarchy(). My problem is the latter is (correctly returning false) but I want the former to return true. Both methods are final, however. I'm obviously tackling this incorrectly - so what would be the Wicket way? Thanks Dan -- Dan Haywood consultant, mentor, developer, author agile, ddd, oo, java, .net, sybase MA, MBCS, CITP, CEng /mail: /d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk /phone: /+44 (0)7961 144286 /book: /Domain Driven Design using Naked Objects http://pragprog.com/titles/dhnako /blog: /http://danhaywood.com /linked in: /http://uk.linkedin.com/in/dkhaywood /twitter: /http://twitter.com/dkhaywood /sybase: /http://sybtraining.co.uk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org mailto:users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org mailto:users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to validate an entire object in a form (rather than a particular property of that object)
Hi Pedro, but my problem is that there is no form component to represent the form itself, is there? Any other thoughts? Dan On 19/04/2010 20:27, Pedro Santos wrote: Hi Dan On Mon, Apr 19, 2010 at 2:04 PM, Dan Haywood dkhayw...@gmail.com mailto:dkhayw...@gmail.com wrote: Another form-related question. I can see how to install a validator on a Form - Form#add(IFormValidator) - but it seems that AbstractFormValidator, the adapter, always requires a specific FormComponent to be specified in its error(...) method. How does one raise an error on the state of the form (and by implication, that of the underlying domain object) itself, without having to specify any form component? FeedbackMessages API, is expection an Component object as reporter. Maybe add the validation error to the form component will make sense: formComponent.getForm().error( theValidationErrorNotFormComponentSpecific ) An example would be the classic fromDate endDate. A workaround would be to install the validator on - say - the endDate. But I'm after a general solution, rather than a solution for this particular example. Thanks Dan -- Dan Haywood consultant, mentor, developer, author agile, ddd, oo, java, .net, sybase MA, MBCS, CITP, CEng /mail: /d...@haywood-associates.co.uk mailto:d...@haywood-associates.co.uk /phone: /+44 (0)7961 144286 /book: /Domain Driven Design using Naked Objects http://pragprog.com/titles/dhnako /blog: /http://danhaywood.com /linked in: /http://uk.linkedin.com/in/dkhaywood /twitter: /http://twitter.com/dkhaywood /sybase: /http://sybtraining.co.uk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org mailto:users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org mailto:users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org