Re: a bit of topic but i couldnt resist ....
they are not the same (and yes talking about java) And yes removeAll() and remove() are just working and implemented More stranger thing is Set set1 = aSetWithSize10; Set set1 = aSetWithSize10; // different instance, same kind of set same values Collection col1 = aCollectionWithSize5; Collection col2 = aCollectionWithSize15; col1 and col2 both have 5 objects that are also in the set1,2, and the rest is just random other stuff now set1.removeAll(col1) set2.removeAll(col2) now is set1.equals(set2) ?? (or are the sizes the same) johan On Wed, Mar 4, 2009 at 02:41, jWeekend jweekend_for...@cabouge.com wrote: Johan, The question is phrased in such an ambiguous way that it's not even clear if you're using Java! If your col1 and set1 refer to the same object then your foreach is not going to get very far (concurrent modification) so I'll assume thatcol1 != set1 . From a non-functional perspective (acceptable performance, for instance), a smart implementation of removeAll may loop around the smaller of the two collections, unlike your foreach. Now that may seem irrelevant, but if col1 is a hashed (and well hashed) the removeAll may finish in an acceptable timeframe if it is an optimised implementation whereas your for loop code could go on for longer (potentially, unacceptably long). Functionally, the first problem you face is that both remove and removeAll are optional, so either one, or even both of your snippets may just throw an exception at you. If they both throw the same exception, I suppose you may even argue that your 2 snippets are functionally the same for those implementations of the two collections! If only one throws an UnsupportedOperationException then they are not equivalent. The question of the Set being sorted or not is also interesting, but may be a red herring if remove and removeAll are implemented consistently (but they may not be). If the elements of your collections are Comparables, then it is recommended but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Comparator's compare method contract is similarly loose. Put this in your test case: public void testComparingEquals(){ BigDecimal onePointOh = new BigDecimal(1.0); BigDecimal onePointOhOh = new BigDecimal(1.00); assertEquals(0, onePointOh.compareTo(onePointOhOh)); assertFalse(onePointOh.equals(onePointOhOh)); } ... yes, it passes! That means that you could have elements of the same type in both your collections and still get a different result from each of your two snippets depending on the Comparator passed in to a sorted collection referred to by set1. I think there may be more stuff that can go wrong here, but let's see where this thread heads off to! Regards - Cemal http://jWeekend.com jWeekend Johan Compagner wrote: Is this the same? Set set1 = xxx Collection col1 = xxx; foreach (col in col1) set1.remove(col) or set1.removeAll(col1); ??? -- View this message in context: http://www.nabble.com/a-bit-of-topic-but-i-couldnt-resist--tp22319709p22321977.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 - Session Management
Jeremy, I meant to ask about both the points that you have mentioned in your reply message: (i.e) Two wicket apps in two JVMs. How do we accomplish the following? - transfer state from first app to second app when clicking a link in the first app - access state in the first app from second app - preserve/expire state in the first app when moving to second app. Moreover, how do we accomplish the above three for two wicket apps in the same JVM? And also does wicket provide any extension points to have the state saved in the client side? --- I'm not sure exactly what you're asking. Is it one of the following? - I have two apps in two JVMs - how do I transfer state from one app to the second when clicking a link from one to the other? - I have two apps in two JVMs - how do I expire state in the first when moving to the second? -- Jeremy Thomerson http://www.wickettraining.com -- View this message in context: http://www.nabble.com/Wicket---Session-Management-tp22288083p22325909.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 bit of topic but i couldnt resist ....
If col1 and col2 both have the (equally) same 5 objects in common with set 1 and 2, I would expect set1.equals(set2) to return true, otherwise, I would expect them only to be of the same size. I think it is not so much about interfaces, but more about contracts. Not everything about a contract can always be expressed in interfaces. Johan Compagner wrote: they are not the same (and yes talking about java) And yes removeAll() and remove() are just working and implemented More stranger thing is Set set1 = aSetWithSize10; Set set1 = aSetWithSize10; // different instance, same kind of set same values Collection col1 = aCollectionWithSize5; Collection col2 = aCollectionWithSize15; col1 and col2 both have 5 objects that are also in the set1,2, and the rest is just random other stuff now set1.removeAll(col1) set2.removeAll(col2) now is set1.equals(set2) ?? (or are the sizes the same) johan On Wed, Mar 4, 2009 at 02:41, jWeekend jweekend_for...@cabouge.com wrote: Johan, The question is phrased in such an ambiguous way that it's not even clear if you're using Java! If your col1 and set1 refer to the same object then your foreach is not going to get very far (concurrent modification) so I'll assume thatcol1 != set1 . From a non-functional perspective (acceptable performance, for instance), a smart implementation of removeAll may loop around the smaller of the two collections, unlike your foreach. Now that may seem irrelevant, but if col1 is a hashed (and well hashed) the removeAll may finish in an acceptable timeframe if it is an optimised implementation whereas your for loop code could go on for longer (potentially, unacceptably long). Functionally, the first problem you face is that both remove and removeAll are optional, so either one, or even both of your snippets may just throw an exception at you. If they both throw the same exception, I suppose you may even argue that your 2 snippets are functionally the same for those implementations of the two collections! If only one throws an UnsupportedOperationException then they are not equivalent. The question of the Set being sorted or not is also interesting, but may be a red herring if remove and removeAll are implemented consistently (but they may not be). If the elements of your collections are Comparables, then it is recommended but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Comparator's compare method contract is similarly loose. Put this in your test case: public void testComparingEquals(){ BigDecimal onePointOh = new BigDecimal(1.0); BigDecimal onePointOhOh = new BigDecimal(1.00); assertEquals(0, onePointOh.compareTo(onePointOhOh)); assertFalse(onePointOh.equals(onePointOhOh)); } ... yes, it passes! That means that you could have elements of the same type in both your collections and still get a different result from each of your two snippets depending on the Comparator passed in to a sorted collection referred to by set1. I think there may be more stuff that can go wrong here, but let's see where this thread heads off to! Regards - Cemal http://jWeekend.com jWeekend Johan Compagner wrote: Is this the same? Set set1 = xxx Collection col1 = xxx; foreach (col in col1) set1.remove(col) or set1.removeAll(col1); ??? -- View this message in context: http://www.nabble.com/a-bit-of-topic-but-i-couldnt-resist--tp22319709p22321977.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: Wicket Bench error under Eclipse
Yes, it did the trick ;) I desinstalled the SoapUI plugin, and the error has gone. It seems that wicket bench and soapui are not compatible (but I can live without the soapui plugin) Thank you ;) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
What does Page Expired mean?
I've extended org.apache.wicket.markup.html.WebPage and created a page that has a submit button to do a search. After clicking the button, I get directed to a page with following message: Page Expired The page you requested has expired. Return to home page No error messages appear. What does this mean? The page has expired? Is there something I am missing? -- View this message in context: http://www.nabble.com/What-does-Page-Expired-mean--tp22327219p22327219.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
London Wicket Event - 1st of April @ Google
Our next London Wicket Event will be on the evening of Wednesday, April 1st, at Google. Martijn Dashorst will be flyiing over from Holland for the evening; as well as giving us a couple of interesting presentations, he will be signing your copies of Wicket In Action. Manning are kindly sending over a few copies too, so we'll be having another of our well-organised(?!) raffles. Al has fixed a bigger room for us at Google, who have been kindly hosting our events, but we do expect a fairly full auditorium again so http://jweekend.com/dev/LWUGReg/ register early. Al and I (and Martijn, no doubt, this time) will also run a general Wicket QA to wrap things up as usual. We'll be getting in some hot Pizza for around 18:15 and then: * http://jWeekend.com Cemal Bayramoglu : Welcome/Introduction * Marc Ziman: My Agile Stack (Wicket, Spring, Hibernate, MySQL) * http://wicketinaction.com Martijn Dashorst : Complex UIs With Wicket * Martijn Dashorst: Quality Control * http://herebebeasties.com Al Maw : TBD * Al Maw Cemal Bayramoglu: General Wicket QA If you're not in a rush to get away join us for the customary visit to a local pub straight after the QA. We're lucky to attract a very good crowd and they say really nice things about our events, so if you've never been, you'd most likely enjoy the experience. Full details and registration are at at http://jweekend.com/dev/LWUGReg/ the usual place - don't forget to confirm (or cancel) your registration using the link in the automated email. Regards - Cemal http://jWeekend.com jWeekend -- View this message in context: http://www.nabble.com/London-Wicket-Event---1st-of-April-%40-Google-tp22327416p22327416.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: VOTE: Remove ? extends from constructor of DropDownChoice
On Tue, 2009-03-03 at 16:02 -0500, Brill Pappin wrote: I'd hate to be prevented from doing so simply because someone wanted to lock down an API that didn't really need locking down. You are wrong. *Widening* a collection is the exact opposite of locking down. If you want to have some fancy (read hacky) write access to the model you are free to simply cast... That is the right choice here. You know that you have a special model in there, so cast it. But the common case is, that you don't know for sure whether the model supports adding of choices or not. If you don't believe me, take a look at JComboBox. javax.swing.JComboBox#getModel returns a *read only* view of the model. Regards, Johannes I think the syntax doesn't really mean read only, and if the wicket developers really want it to be read only, wrapping the list would be the way to go. I'm for the plain old ListT because its simple and explicit... List? extends T would be my next choice because it widens the scope. - Brill On 2-Mar-09, at 3:44 PM, James Carman wrote: Aren't both the choices model in DDC and the actual model of ListView supposed to be considered read-only (as far as the component is concerned)? The DDC and ListView don't need to be able to alter those models anyway, right? Perhaps my experience is just too limited, but I don't think I've ever tried to do either one of your usecases (I always consider them read-only). On Mon, Mar 2, 2009 at 3:24 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see WICKET-2126 -igor On Mon, Mar 2, 2009 at 12:19 PM, James Carman jcar...@carmanconsulting.com wrote: I vote -0.99 on this (non-binding of course). I'd vote +1 to making ListView accept List? extends T rather than making DDC less flexible. On Mon, Mar 2, 2009 at 3:11 PM, Brill Pappin br...@pappin.ca wrote: Ok, as suggested, here is the thread, and the first vote. +1 for making the generic definition the same for all list type components. FYI - you can also vote in the issue I just created at (which might actually be a better place to vote): https://issues.apache.org/jira/browse/WICKET-2137 - Brill On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote: Perhaps start a vote thread, with the subject something like: VOTE: Remove ? extends from constructor of DropDownChoice. I'd be +1 non-binding -- Jeremy Thomerson http://www.wickettraining.com On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin br...@pappin.ca wrote: I'm of the don't widen it camp anyway :) So how do I go about gathering support for having the DropDownChoice work with the models the way everything else does? - Brill On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote: yes, the choice was intentional. personally i do not care if it is T all the way, some users complained so we widened it on the choices model, we cannot widen it on the main model. -igor On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin br...@pappin.ca wrote: I see... but this would i think because Bar is a Foo: class Bar exends Foo {} List? extends Foo list = ... list.add(new Bar()); Anyway, what your saying is that the generics choice was intentional? - Brill On 27-Feb-09, at 3:19 PM, Igor Vaynberg wrote: list? extends string stings=... strings.add(asd); == wont compile -igor On Fri, Feb 27, 2009 at 11:13 AM, Adriano dos Santos Fernandes adrian...@gmail.com wrote: What do you mean with read only here? Adriano Igor Vaynberg escreveu: ? extends Foo collections are read only, it would be too inconvenient to make the model collection read only :) -igor On Thu, Feb 26, 2009 at 8:34 PM, Jeremy Thomerson jer...@wickettraining.com wrote: This is what I was commenting on last week on the list (or earlier this week). One expects List? extends Foo while the other expects ListFoo. I'm not fully convinced yet that the ? extends is the better option. Either way, I think they should be the same. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Feb 26, 2009 at 8:27 PM, Brill Pappin br...@pappin.ca wrote: Roughly what I'm doing is: class TypeA{} class TypeAModel extends LoadableDetachableModel ListTypeA { public ListTypeA load(){ ... do the load ... return ... } } TypeAModel model = new TypeAModel(); DropDownChoice TypeA ddc = new DropDownChoiceTypeA(id, model ); which gets complained about... in this case the generic def is DropDownChoiceList? extends T I think the problem is that the generic def of the class should actually be DropDownChoiceListT because you are already identifying the type when you create a new instance. Now... my generics are a bit hazy at this level, because I can
Re: VOTE: Remove ? extends from constructor of DropDownChoice
On Mon, 2009-03-02 at 15:11 -0500, Brill Pappin wrote: Ok, as suggested, here is the thread, and the first vote. +1 for making the generic definition the same for all list type components. Yes, you are right. All those list type components should have the same generic definition. But: Don't fix those components that have the correct definition. Please fix those that have the wrong (without wildcard) definition. I think the core problem is, that IModel has a setter. But it doesn't make any sense to offer a setter on a model providing a collection. If all those list type components accept IReadOnlyModel, most of the discussed points will become obvious. I think I will create another post, explaining the problem with IModel and Collections... Regards, Johannes FYI - you can also vote in the issue I just created at (which might actually be a better place to vote): https://issues.apache.org/jira/browse/WICKET-2137 - Brill On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote: Perhaps start a vote thread, with the subject something like: VOTE: Remove ? extends from constructor of DropDownChoice. I'd be +1 non-binding -- Jeremy Thomerson http://www.wickettraining.com On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin br...@pappin.ca wrote: I'm of the don't widen it camp anyway :) So how do I go about gathering support for having the DropDownChoice work with the models the way everything else does? - Brill On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote: yes, the choice was intentional. personally i do not care if it is T all the way, some users complained so we widened it on the choices model, we cannot widen it on the main model. -igor On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin br...@pappin.ca wrote: I see... but this would i think because Bar is a Foo: class Bar exends Foo {} List? extends Foo list = ... list.add(new Bar()); Anyway, what your saying is that the generics choice was intentional? - Brill On 27-Feb-09, at 3:19 PM, Igor Vaynberg wrote: list? extends string stings=... strings.add(asd); == wont compile -igor On Fri, Feb 27, 2009 at 11:13 AM, Adriano dos Santos Fernandes adrian...@gmail.com wrote: What do you mean with read only here? Adriano Igor Vaynberg escreveu: ? extends Foo collections are read only, it would be too inconvenient to make the model collection read only :) -igor On Thu, Feb 26, 2009 at 8:34 PM, Jeremy Thomerson jer...@wickettraining.com wrote: This is what I was commenting on last week on the list (or earlier this week). One expects List? extends Foo while the other expects ListFoo. I'm not fully convinced yet that the ? extends is the better option. Either way, I think they should be the same. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Feb 26, 2009 at 8:27 PM, Brill Pappin br...@pappin.ca wrote: Roughly what I'm doing is: class TypeA{} class TypeAModel extends LoadableDetachableModel ListTypeA { public ListTypeA load(){ ... do the load ... return ... } } TypeAModel model = new TypeAModel(); DropDownChoice TypeA ddc = new DropDownChoiceTypeA(id, model ); which gets complained about... in this case the generic def is DropDownChoiceList? extends T I think the problem is that the generic def of the class should actually be DropDownChoiceListT because you are already identifying the type when you create a new instance. Now... my generics are a bit hazy at this level, because I can understand why it was done that way... does anyone with more generics experience know what it should be? Is this a bug that needs filing? - Brill On 26-Feb-09, at 6:03 PM, Kaspar Fischer wrote: On 26.02.2009, at 22:52, Brill Pappin wrote: For some reason the DropDownChoice component doesn't have the same generics as ListView and it will not accept a model that listview will, despite its saying that it will accept an IModel. Is anyone else having that sort of trouble with DropDownChoice? - Brill Can you give us more information on what exactly is not working for you? DropDownChoice indeed does accept a model, see for instance the example in the class description at http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/DropDownChoice.html This works for me. Kaspar -- !-- HTML: -- select wicket:id=site optionsite 1/option optionsite 2/option /select ul li wicket:id=site2wicket:container wicket:id=sitename//li /ul // Code List SITES = Arrays.asList(new String[] { The Server Side, Java Lobby, Java.Net }); form.add(new DropDownChoice(site, SITES)); form.add(new ListView(site2, SITES) {
Re: What does Page Expired mean?
I see in the Page maps documentation: http://cwiki.apache.org/WICKET/page-maps.html that Page Exoured will be shown if the id and version for a page doesn't exist. But I can't see how the id and version of the page would not exist anymore. -- View this message in context: http://www.nabble.com/What-does-Page-Expired-mean--tp22327219p22328873.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
How (not) to: IModel and Collections (and generics)
Hi, the concept of IModel seems to be very obvious. It is simply some kind of reference and offers a getter and a setter. When used with ordinary object, everything works fine. An IModel that contains a String can easily be mapped to a TextField. The text field calls getObject to show the initial value and sets the changed string to the model using setObject on form commit. Everything becomes a little more complicated when collections are affected. The problem is, that it is not obvious what those collections represent. 1) A collection might be read-only (e.g. the possible choices for a selection). 2) But it also might be necessary to add/remove single elements (e.g. privileged users shown within a shuffle list). 3) And sometimes the complete collection is changed (can't find an example here). IModel only supports the *third* method where the complete collection is replaced. (Don't forget that the reference to the collection changes which will lead to several other problems.) I strongly recommend the usage of a wrapping class for that case. But this case is not very common. Maybe someone finds a good example - I can't. For the other two cases it does *not* make any sense to call IModel#setObject. Summary: Nearly in every case when the IModel contains a collection, the setObject method does not make any sense and must not be called. Conclusion: I think we should have created some sort of IModelProvider (contains only the getObject method) and IModel (with both methods). Components that just *read* values from the model, accept the read only interface now. For special cases where a magic component adds/removes elements to a collection, we need some sort of ICollectionModel that offers add and remove methods (but no setter). That interface - of course - will be based upon a collection *without* wildcards... Regards, Johannes Schneider - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
openstreetmap in openlayers
This is my first message to this mailinglist, so first of all: Hello everyone! I want to use wicket together with openlayers in my webapp. Therefore I looked at the openlayers contrib project on wicketstuff, which seems pretty cool. I managed to embed a wms and gmap, but I need to use openstreetmap due to license issues. I am not sure how to do this with the wicketstuff openlayers api. Is there a simple way to realize this, already? When I looked at the api I found an abstract layer class. Should I extend this class to add the openstreetmap layer? -- View this message in context: http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22329429.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: What does Page Expired mean?
This normally happens when your HttpSession expires. I'm not sure what could be the reason in your case. Edwin Ansicodd wrote: I see in the Page maps documentation: http://cwiki.apache.org/WICKET/page-maps.html that Page Exoured will be shown if the id and version for a page doesn't exist. But I can't see how the id and version of the page would not exist anymore. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: MixedParamUrlCodingStrategy and too many path parts
You'll get this warning when something/someone made the url longer then was expected by the strategy. If you don't want the standard behavior just copy/paste the code and adjust it to your needs. Still, logging the URL would be a nice addition to the default implementation. Regards, Erik. novotny wrote: Hi, I'm using MixedParamUrlCodingStrategy which seems to work fine. However I saw a bunch of errors in the log file: Too many path parts, please provide sufficient number of path parameter names If this shows up, how can I direct a user to a PageNotFound? Also how can I log what HTTp requests users are making to the site to see where this is coming from? Thanks, Jason -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Question re: style and variation
I like the brackets for clarity, but wouldn't that cause some filesystems to have trouble with the files? - Brill On 3-Mar-09, at 5:57 PM, Ned Collyer wrote: IMO, the brackets approach works because it clearly separates each of the sections. It is a bit ugly, but its still simple. Can't please everyone all of the time, but we can try to give the clients the right stuff, and the devs the power to build it :). yeah, not to mention it might get quiet ugly mypanel_style.html mypanel_style__variant.html mypanel_style__variant___locale.html mypanel__variant.html mypanel___locale.html markup(locale)(style)(variant) might work and is simpler mypanel(en_us).html mypanel(en_us)()(variant).html but sure looks ugly... :) not sure which one is better -igor -- View this message in context: http://www.nabble.com/Question-re%3A-style-and-variation-tp22302526p22319926.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: a bit of topic but i couldnt resist ....
if xxx is a mutable Set then it should work. However you have to be careful about how you remove elements from the collection you working with, depending on your you do it, you'll get an exception about concurrent modification. - Brill On 3-Mar-09, at 5:44 PM, Johan Compagner wrote: Is this the same? Set set1 = xxx Collection col1 = xxx; foreach (col in col1) set1.remove(col) or set1.removeAll(col1); ??? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Please Please Portlet
Thanks for the tip. I will look it up. I didn't include all the parameter but applicationClassName is there. Thanks again, f(t) On Tue, Mar 3, 2009 at 7:36 PM, Niels van Kampenhout n.vankampenh...@onehippo.com wrote: On Tue, Mar 3, 2009 at 7:43 AM, Francisco Diaz Trepat - gmail francisco.diaztre...@gmail.com wrote: Hi all, I decided to ask for help, since last night I had nightmares of xml files extrangulating me. I read the portlet how-to in the wiki, probably misread it. I have an application that has no portlet usage (as in no blabla extends blaportlet), but I was told that all the application could be seen from inside a portle, simply by configure xmls: web.xml portlet.xml sun-web.xml (using Netbeans, wicket 1.4rc2, glassfish v3, portlet-container from open-portal project) I have this on the web.xml: filter filter-nameWicketFilter/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class !-- portlet support -- init-param param-nameportletOnlyFilter/param-name param-valuetrue/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param init-param param-nameconfiguration/param-name param-valuedevelopment/param-value /init-param init-param param-namefilterMappingUrlPattern/param-name param-value/MyApplicationThatDoesNotWorkWithPortlet/*/param-value /init-param I have this on the portlet.xml: portlet-app id=MyApplicationThatDoesNotWorkWithPortlet portlet description MyApplicationThatDoesNotWorkWithPortlet portlet version/description portlet-name MyApplicationThatDoesNotWorkWithPortlet /portlet-name display-name MyApplicationThatDoesNotWorkWithPortlet - Portlet/display-name portlet-classorg.apache.wicket.protocol.http.portlet.WicketPortlet/portlet-class init-param namewicketFilterPath/name value/MyApplicationThatDoesNotWorkWithPortlet/value /init-param expiration-cache-1/expiration-cache supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode /supports portlet-info titleMyApplicationThatDoesNotWorkWithPortlet/title keywordsPortlet MyApplicationThatDoesNotWorkWithPortlet/keywords /portlet-info /portlet /portlet-app finally I have this on the sun-web.xml: sun-web-app error-url= context-root/MyApplicationThatDoesNotWorkWithPortlet/context-root class-loader delegate=true/ jsp-config property name=keepgenerated value=true descriptionKeep a copy of the generated servlet class' java code./description /property /jsp-config /sun-web-app Please, could someone help me out. I couldn't find a comprehensive guide to these 3 xml file and I am sure that I am missing something. I suggest looking at the web.xml and portlet.xml in wicket-examples [1]. That's what I did and I had my Wicket app running as a portlet in no time. One thing I miss in your filter configuration is the init-param 'applicationClassName' which should have your Wicket application class as value. HTH, Niels [1] http://svn.apache.org/repos/asf/wicket/releases/wicket-1.4-rc2/wicket-examples/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Please Please Portlet
(using Netbeans, wicket 1.4rc2, glassfish v3, portlet-container from open-portal project) I thought the portlet-container in effect was dead since the Sun Portal is dead? They have ditched that in favor of a solution based on Liferay 5.2 called Web Space (codename WebSynergy during development): https://webspace.dev.java.net/download.html - note that it uses Glassfish v2.1 in case you require features from v3. Around here we use a patched snapshot of 1.4 (using an adapted version of the older portlet 2.0 patch) for Wicket portlets. (Or have I been sleeping and we get real Portlet 2.0 out of the box in 1.4 now?) I noticed some differences between what we do (which works :) ) and what you posted: 1) In web.xml we have a filter mapping for each portlet: filter-mapping filter-namebookmark/filter-name url-pattern/basic/*/url-pattern dispatcherREQUEST/dispatcher dispatcherINCLUDE/dispatcher dispatcherFORWARD/dispatcher dispatcherERROR/dispatcher /filter-mapping 2) We also declare the application in the filter element: init-param param-nameapplicationClassName/param-name param-valueno.nsb.intranet.bookmark.wicket.BookmarkApplication /param-value /init-param 3) You also seem to be missing an init-parameter for viewPage, in our case e.g. init-param namewicketFilterPath/name value/basic/value /init-param init-param nameviewPage/name value/basic/list/value /init-param though in theory it should use the application's getHomePage(), I guess... 4) We do not have anything in sun-web.xml, though I guess we would benefit from a shared classloader with Web Space. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Question re: style and variation
I agree that it should stick to convention for the locale and it would be nice if the rest of the format was consistent. I wave to wonder though, if we really need a new format for the Wicket variation. Its all about search order, and there is no need to alternative separator chars our double underscores. During a lookup your simply checking if something exists, and you search in descending order of complexity. e.g.: MyFile_style_variation_en_CA_variant.html MyFile_style_variation_en_CA.html MyFile_style_variation_en.html MyFile_style_variation.html MyFile_style_en_CA_variant..html MyFile_style_en_CA.html MyFile_style_en.html MyFile_style.html MyFile_en_CA_variant.html MyFile_en_CA.html MyFile_en.html MyFile.html you can of course reduce the number of checks if the variation or the locale is not set. The only real important choice is the weight of the style_variation over the locale, which slightly changes the order of the search i.e. is the style_variation more important than the locale? Another thought, If we really want to use some sort of indicator, there is no reason it can't be the extension. e.g.: MyFile_en_CA_variant.html.style_variation or use a dash between the sections: MyFile_en_CA_variant-style_variation.html however the more I think on it, the more I think that its just not needed. There is also the matter of really needing the templates themselves to understand the locale since variable content for locale could/should likely be placed in properties files anyway. In that case the html need only handle the style_variation. One use-case I'm about to try (haven't implemented yet) is a mobile webapp that can serve slightly different content for two radically different mobile devices, where layout and style can matter a lot (mostly layout). - Brill Pappin On 3-Mar-09, at 10:18 PM, jWeekend wrote: Igor, In Java, variant is the least significant component(s) of a locale: lang_COUNTRY_variant . Wicket adds style and variation (right?) so maybe only these components of the filename should have a special marker. That way, some level of consistentcy is maintained and the Wicket specific style variation are clearly identifiable. So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html - in this example you'd need to double check that dash and the parenthesis can be used in file names on all relevant filesystems (you could even make the markers configurable I suppose in Application#init and/or using system properties ...). Of course it's not pretty; at the end of the day, your stuck with character strings so you can't stop people confusing themselves (and maybe Wicket too) with funky file names using these special characters. The javadoc says: Whereas Styles are Session (user) specific, variations are component specific. E.g. if the Style is ocean and the Variation is NorthSea, than the resources are given the names suffixed with _ocean_NorthSea. Is there a standard use-case where the solution involves using variation (that's in keeping with the original intent)? Regards - Cemal http://jWeekend.com jWeekend igor.vaynberg wrote: yeah, not to mention it might get quiet ugly mypanel_style.html mypanel_style__variant.html mypanel_style__variant___locale.html mypanel__variant.html mypanel___locale.html markup(locale)(style)(variant) might work and is simpler mypanel(en_us).html mypanel(en_us)()(variant).html but sure looks ugly... :) not sure which one is better -igor On Mon, Mar 2, 2009 at 11:30 PM, Ned Collyer ned.coll...@gmail.com wrote: Yep :). I at least 1 thought on this matter. Currently, I have a webapp module - which will have my components in it, and my components variants. I have pushed all i18n into properties files - which is working thus far. I allow the clients to customise their HTML from another folder - ie, someplace on the filesystem outside of the war. The lookup for html files for me .. should be custom dir - myPanel_myVariant_myStyle.html webapp.war - myPanel_myVariant_myStyle.html custom dir - myPanel_myVariant.html webapp.war - myPanel_myVariant.html custom dir - myPanel_myStyle.html webapp.war - myPanel_myStyle.html custom dir - myPanel.html webapp.war - myPanel.html I have a similar thing in place for properties files - and the result is actually a merge of the properties between filesystem and classpath. So many ways to skin a cat. If only we could skin this cat with locale, style AND variant - each optional. More static count of delimiters? Folder structure? Different delimiters? Different data in filename? Contents of file? The balancing act is keeping it simple - which its currently nailed, but not quite as useful as it could be!!! igor.vaynberg wrote: the problem is, if you have MyPanel_foo.html, is foo the style, the variation, or the locale? perhaps we can identify the parts differently...needs some
Re: Question re: style and variation
I think we have to be very careful about using special chars in the file name. Depending on the operating system you could have a real problem even doing this at all. I have not done any research into what you can use in a file name, but this file has to be usable on just about anything. - Brill On 3-Mar-09, at 11:29 PM, Igor Vaynberg wrote: i dont like the fact that there is now a -, (, ), and _ in the name i can live with something like HomePage()(variation)_US_en.html vs HomePage()(variation)(US_en) maybe even simpler would be do HomePage[style_variation]_US_en.html that way a style only version can be HomePage[style]_US_en.html and variation only would be HomePage[_variation]_US_en.html we can then forbid the use of _ in style and variation names. its a little more complex but avoids an empty [] or () to indicate variation only markup. I still think that HomePage[][variation][US_en].html does look cleaner and simpler then HomePage[][variation]_US_en.html or HomePage[_variation]_US_en.html because in HomePage[][variation][US_en] you only have to know [] as separators. the usecases for variations vary. suppose your application is divided in two frames and the user can select the color scheme for both. having a single value for style wont work here, it has to be per component. -igor On Tue, Mar 3, 2009 at 7:18 PM, jWeekend jweekend_for...@cabouge.com wrote: Igor, In Java, variant is the least significant component(s) of a locale: lang_COUNTRY_variant . Wicket adds style and variation (right?) so maybe only these components of the filename should have a special marker. That way, some level of consistentcy is maintained and the Wicket specific style variation are clearly identifiable. So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html - in this example you'd need to double check that dash and the parenthesis can be used in file names on all relevant filesystems (you could even make the markers configurable I suppose in Application#init and/or using system properties ...). Of course it's not pretty; at the end of the day, your stuck with character strings so you can't stop people confusing themselves (and maybe Wicket too) with funky file names using these special characters. The javadoc says: Whereas Styles are Session (user) specific, variations are component specific. E.g. if the Style is ocean and the Variation is NorthSea, than the resources are given the names suffixed with _ocean_NorthSea. Is there a standard use-case where the solution involves using variation (that's in keeping with the original intent)? Regards - Cemal http://jWeekend.com jWeekend igor.vaynberg wrote: yeah, not to mention it might get quiet ugly mypanel_style.html mypanel_style__variant.html mypanel_style__variant___locale.html mypanel__variant.html mypanel___locale.html markup(locale)(style)(variant) might work and is simpler mypanel(en_us).html mypanel(en_us)()(variant).html but sure looks ugly... :) not sure which one is better -igor On Mon, Mar 2, 2009 at 11:30 PM, Ned Collyer ned.coll...@gmail.com wrote: Yep :). I at least 1 thought on this matter. Currently, I have a webapp module - which will have my components in it, and my components variants. I have pushed all i18n into properties files - which is working thus far. I allow the clients to customise their HTML from another folder - ie, someplace on the filesystem outside of the war. The lookup for html files for me .. should be custom dir - myPanel_myVariant_myStyle.html webapp.war - myPanel_myVariant_myStyle.html custom dir - myPanel_myVariant.html webapp.war - myPanel_myVariant.html custom dir - myPanel_myStyle.html webapp.war - myPanel_myStyle.html custom dir - myPanel.html webapp.war - myPanel.html I have a similar thing in place for properties files - and the result is actually a merge of the properties between filesystem and classpath. So many ways to skin a cat. If only we could skin this cat with locale, style AND variant - each optional. More static count of delimiters? Folder structure? Different delimiters? Different data in filename? Contents of file? The balancing act is keeping it simple - which its currently nailed, but not quite as useful as it could be!!! igor.vaynberg wrote: the problem is, if you have MyPanel_foo.html, is foo the style, the variation, or the locale? perhaps we can identify the parts differently...needs some thinking. -igor -- View this message in context: http://www.nabble.com/Question-re%3A-style-and-variation-tp22302526p22303708.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:
Re: VOTE: Remove ? extends from constructor of DropDownChoice
I actually wasn't saying they were the same. What I said (meant) was that: a) don't lock down b) I prefer the explicit form rather than the Any of type form. i.e. ListT rather than List? extends T. - Brill On 4-Mar-09, at 6:26 AM, Johannes Schneider wrote: On Tue, 2009-03-03 at 16:02 -0500, Brill Pappin wrote: I'd hate to be prevented from doing so simply because someone wanted to lock down an API that didn't really need locking down. You are wrong. *Widening* a collection is the exact opposite of locking down. If you want to have some fancy (read hacky) write access to the model you are free to simply cast... That is the right choice here. You know that you have a special model in there, so cast it. But the common case is, that you don't know for sure whether the model supports adding of choices or not. If you don't believe me, take a look at JComboBox. javax.swing.JComboBox#getModel returns a *read only* view of the model. Regards, Johannes I think the syntax doesn't really mean read only, and if the wicket developers really want it to be read only, wrapping the list would be the way to go. I'm for the plain old ListT because its simple and explicit... List? extends T would be my next choice because it widens the scope. - Brill On 2-Mar-09, at 3:44 PM, James Carman wrote: Aren't both the choices model in DDC and the actual model of ListView supposed to be considered read-only (as far as the component is concerned)? The DDC and ListView don't need to be able to alter those models anyway, right? Perhaps my experience is just too limited, but I don't think I've ever tried to do either one of your usecases (I always consider them read-only). On Mon, Mar 2, 2009 at 3:24 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see WICKET-2126 -igor On Mon, Mar 2, 2009 at 12:19 PM, James Carman jcar...@carmanconsulting.com wrote: I vote -0.99 on this (non-binding of course). I'd vote +1 to making ListView accept List? extends T rather than making DDC less flexible. On Mon, Mar 2, 2009 at 3:11 PM, Brill Pappin br...@pappin.ca wrote: Ok, as suggested, here is the thread, and the first vote. +1 for making the generic definition the same for all list type components. FYI - you can also vote in the issue I just created at (which might actually be a better place to vote): https://issues.apache.org/jira/browse/WICKET-2137 - Brill On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote: Perhaps start a vote thread, with the subject something like: VOTE: Remove ? extends from constructor of DropDownChoice. I'd be +1 non-binding -- Jeremy Thomerson http://www.wickettraining.com On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin br...@pappin.ca wrote: I'm of the don't widen it camp anyway :) So how do I go about gathering support for having the DropDownChoice work with the models the way everything else does? - Brill On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote: yes, the choice was intentional. personally i do not care if it is T all the way, some users complained so we widened it on the choices model, we cannot widen it on the main model. -igor On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin br...@pappin.ca wrote: I see... but this would i think because Bar is a Foo: class Bar exends Foo {} List? extends Foo list = ... list.add(new Bar()); Anyway, what your saying is that the generics choice was intentional? - Brill On 27-Feb-09, at 3:19 PM, Igor Vaynberg wrote: list? extends string stings=... strings.add(asd); == wont compile -igor On Fri, Feb 27, 2009 at 11:13 AM, Adriano dos Santos Fernandes adrian...@gmail.com wrote: What do you mean with read only here? Adriano Igor Vaynberg escreveu: ? extends Foo collections are read only, it would be too inconvenient to make the model collection read only :) -igor On Thu, Feb 26, 2009 at 8:34 PM, Jeremy Thomerson jer...@wickettraining.com wrote: This is what I was commenting on last week on the list (or earlier this week). One expects List? extends Foo while the other expects ListFoo. I'm not fully convinced yet that the ? extends is the better option. Either way, I think they should be the same. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Feb 26, 2009 at 8:27 PM, Brill Pappin br...@pappin.ca wrote: Roughly what I'm doing is: class TypeA{} class TypeAModel extends LoadableDetachableModel ListTypeA { public ListTypeA load(){ ... do the load ... return ... } } TypeAModel model = new TypeAModel(); DropDownChoice TypeA ddc = new DropDownChoiceTypeA(id, model ); which gets complained about... in this case the generic def is DropDownChoiceList? extends T I think the problem is that the generic def of the class should actually be DropDownChoiceListT because you are already identifying the type when you create a new instance. Now... my generics are a bit hazy at this level, because I can understand why it was done that way... does anyone with
Re: What does Page Expired mean?
Can you suggest a way to debug this? I am not showing anything in the logs or in the debugger. Dave Schoorl wrote: This normally happens when your HttpSession expires. I'm not sure what could be the reason in your case. Edwin Ansicodd wrote: I see in the Page maps documentation: http://cwiki.apache.org/WICKET/page-maps.html that Page Exoured will be shown if the id and version for a page doesn't exist. But I can't see how the id and version of the page would not exist anymore. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/What-does-Page-Expired-mean--tp22327219p22331861.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: What does Page Expired mean?
They will not exist if the session has expired or if the page cache has become inconsistent somehow. Usually you'll get this is you wait on a page for a while, or are in dev mode and change the code a lot. - Brill On 4-Mar-09, at 7:14 AM, Edwin Ansicodd wrote: I see in the Page maps documentation: http://cwiki.apache.org/WICKET/page-maps.html that Page Exoured will be shown if the id and version for a page doesn't exist. But I can't see how the id and version of the page would not exist anymore. -- View this message in context: http://www.nabble.com/What-does-Page-Expired-mean--tp22327219p22328873.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: What does Page Expired mean?
In my experience the most often case is when I have a non-serializable field in a page with Ajax components. On the first Ajax interaction the serialization fails (SerializableChecker logs its detailed exception) and on the next Ajax request Wicket cannot find a page with the latest version and complains with PageExpiredException. So page expiration is not exactly session expiration. Session expiration is just one of the cases in which your page(s) is(are) lost. El mié, 04-03-2009 a las 14:39 +0100, Dave Schoorl escribió: This normally happens when your HttpSession expires. I'm not sure what could be the reason in your case. Edwin Ansicodd wrote: I see in the Page maps documentation: http://cwiki.apache.org/WICKET/page-maps.html that Page Exoured will be shown if the id and version for a page doesn't exist. But I can't see how the id and version of the page would not exist anymore. - 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: What does Page Expired mean?
It's not an error or something to debug, which is why you are not seeing anything in the log. Session is a basic webapp (not just java webapp) concept, I recommend reading up on it in the docs for your application server. - Brill On 4-Mar-09, at 10:05 AM, Edwin Ansicodd wrote: Can you suggest a way to debug this? I am not showing anything in the logs or in the debugger. Dave Schoorl wrote: This normally happens when your HttpSession expires. I'm not sure what could be the reason in your case. Edwin Ansicodd wrote: I see in the Page maps documentation: http://cwiki.apache.org/WICKET/page-maps.html that Page Exoured will be shown if the id and version for a page doesn't exist. But I can't see how the id and version of the page would not exist anymore. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/What-does-Page-Expired-mean--tp22327219p22331861.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
Uppercasing inputs
Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Uppercasing inputs
public class UpperCaseBehavior extends AttributeAppender { private static final long serialVersionUID = 1L; public UpperCaseBehavior() { super(style, new ModelString(text-transform: uppercase), ;); } @Override public void bind(Component component) { super.bind(component); component.add(new AttributeAppender( onkeyup, new ModelString(this.value = this.value.toUpperCase()), ;)); } } Leszek Gawron escreveu: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Uppercasing inputs
Maybe: class MyUpperCaseModel extends WhatEverModelString { public void setObject(String value) { if(value != null) { super.setValue(value.toUpperCase()); } else { super.setValue(value); } } } and use MyUpperCaseModel instead of WhatEverModelString. Ernesto On Wed, Mar 4, 2009 at 4:30 PM, Leszek Gawron lgaw...@apache.org wrote: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: bad practice in sharing models between wicket form and hibernate?
In my current project I do just that and it works fine. I must add that it is a highly interactive application, so I work with long conversations (managed hibernate sessions), where the transaction is committed only after a number of request/response cycles after the user clicks on 'save'. During the conversation my business objects are in persistent state (never detached), and I wrap every business object in a LDM, except I do not load from database, but from EhCache. The only thing that I had to do, is move all validation, even simple syntax checking, like field lengths, required fields etc., out of the business objects, because I create a domain object with a default (no-arg) constructor and add it to the Hibernate session. At that moment, the object has invalid state (required fields have no data etc.) So I have to trust on form validation and/or guide each object through a validator before it is saved to the database or actually used in the domain layer. Maintaining the objects validity combined with the separation of layers is, I think, the only 'pitfall' I encountered that I have not yet found a completely satisfactory answer for. Hope this helps. Stephen Swinsburg wrote: Hi all, I'm after your thoughts on the following method. Suppose there is a wicket form with some fields that can map directly to a simple Hibernate object, and hence a db table. Is it safe to simply wrap this object in a CompoundPropertyModel and use it as the backing model for the form? Then in the onSubmit method, calling a method to get the object from the form's model and saving it via Hibernate. This does work fine, I'm just after any pitfalls that might happen down the track. Very simple form here. thanks. S - 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: VOTE: Remove ? extends from constructor of DropDownChoice
On Wed, 2009-03-04 at 10:04 -0500, Brill Pappin wrote: I actually wasn't saying they were the same. What I said (meant) was that: a) don't lock down Locking down means *removing* the wildcard. Adding the wildcard *widens* the collection. To be clear: Wildcard -- it fits for everybody No wildcard -- it fits only for some special cases (maybe yours) b) I prefer the explicit form rather than the Any of type form. i.e. ListT rather than List? extends T. They mean something completely different. I understand that you prefer the shorter version. Many do. But it stays wrong... If the constructor accepts ListNumber, everybody *has* to give you exactly a ListNumber. ListNumber n = new ListNumber; If the constructor accepts the widened type, you can add all those lists... List? extends Number n = new ListNumber; List? extends Number n = new ListInteger; List? extends Number n = new ListDouble; If you don't believe me, take a look at GlazedLists. Compare version 1.7 and version 1.8. They changed exactly that thing (a non backward compatible change!). They made exactly the same fault... Regards, Johannes - Brill On 4-Mar-09, at 6:26 AM, Johannes Schneider wrote: On Tue, 2009-03-03 at 16:02 -0500, Brill Pappin wrote: I'd hate to be prevented from doing so simply because someone wanted to lock down an API that didn't really need locking down. You are wrong. *Widening* a collection is the exact opposite of locking down. If you want to have some fancy (read hacky) write access to the model you are free to simply cast... That is the right choice here. You know that you have a special model in there, so cast it. But the common case is, that you don't know for sure whether the model supports adding of choices or not. If you don't believe me, take a look at JComboBox. javax.swing.JComboBox#getModel returns a *read only* view of the model. Regards, Johannes I think the syntax doesn't really mean read only, and if the wicket developers really want it to be read only, wrapping the list would be the way to go. I'm for the plain old ListT because its simple and explicit... List? extends T would be my next choice because it widens the scope. - Brill On 2-Mar-09, at 3:44 PM, James Carman wrote: Aren't both the choices model in DDC and the actual model of ListView supposed to be considered read-only (as far as the component is concerned)? The DDC and ListView don't need to be able to alter those models anyway, right? Perhaps my experience is just too limited, but I don't think I've ever tried to do either one of your usecases (I always consider them read-only). On Mon, Mar 2, 2009 at 3:24 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see WICKET-2126 -igor On Mon, Mar 2, 2009 at 12:19 PM, James Carman jcar...@carmanconsulting.com wrote: I vote -0.99 on this (non-binding of course). I'd vote +1 to making ListView accept List? extends T rather than making DDC less flexible. On Mon, Mar 2, 2009 at 3:11 PM, Brill Pappin br...@pappin.ca wrote: Ok, as suggested, here is the thread, and the first vote. +1 for making the generic definition the same for all list type components. FYI - you can also vote in the issue I just created at (which might actually be a better place to vote): https://issues.apache.org/jira/browse/WICKET-2137 - Brill On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote: Perhaps start a vote thread, with the subject something like: VOTE: Remove ? extends from constructor of DropDownChoice. I'd be +1 non-binding -- Jeremy Thomerson http://www.wickettraining.com On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin br...@pappin.ca wrote: I'm of the don't widen it camp anyway :) So how do I go about gathering support for having the DropDownChoice work with the models the way everything else does? - Brill On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote: yes, the choice was intentional. personally i do not care if it is T all the way, some users complained so we widened it on the choices model, we cannot widen it on the main model. -igor On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin br...@pappin.ca wrote: I see... but this would i think because Bar is a Foo: class Bar exends Foo {} List? extends Foo list = ... list.add(new Bar()); Anyway, what your saying is that the generics choice was intentional? - Brill On 27-Feb-09, at 3:19 PM, Igor Vaynberg wrote: list? extends string stings=... strings.add(asd); == wont compile -igor On Fri, Feb 27, 2009 at 11:13 AM, Adriano dos Santos Fernandes adrian...@gmail.com wrote: What do you mean with read only here? Adriano Igor Vaynberg escreveu: ? extends Foo collections are read only, it would be too inconvenient to make the model
Re: How (not) to: IModel and Collections (and generics)
Does AbstractReadOnlyModel accomplish what you're talking about? Scott On Wed, Mar 4, 2009 at 4:50 AM, Johannes Schneider maili...@cedarsoft.com wrote: Hi, the concept of IModel seems to be very obvious. It is simply some kind of reference and offers a getter and a setter. When used with ordinary object, everything works fine. An IModel that contains a String can easily be mapped to a TextField. The text field calls getObject to show the initial value and sets the changed string to the model using setObject on form commit. Everything becomes a little more complicated when collections are affected. The problem is, that it is not obvious what those collections represent. 1) A collection might be read-only (e.g. the possible choices for a selection). 2) But it also might be necessary to add/remove single elements (e.g. privileged users shown within a shuffle list). 3) And sometimes the complete collection is changed (can't find an example here). IModel only supports the *third* method where the complete collection is replaced. (Don't forget that the reference to the collection changes which will lead to several other problems.) I strongly recommend the usage of a wrapping class for that case. But this case is not very common. Maybe someone finds a good example - I can't. For the other two cases it does *not* make any sense to call IModel#setObject. Summary: Nearly in every case when the IModel contains a collection, the setObject method does not make any sense and must not be called. Conclusion: I think we should have created some sort of IModelProvider (contains only the getObject method) and IModel (with both methods). Components that just *read* values from the model, accept the read only interface now. For special cases where a magic component adds/removes elements to a collection, we need some sort of ICollectionModel that offers add and remove methods (but no setter). That interface - of course - will be based upon a collection *without* wildcards... Regards, Johannes Schneider - 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 Quickstart Installation Guide for Beginners
Alright, I just created a JIRA account. I've browsed to the Wicket project, but I don't see any way to create a new issue. At the top of the screen I have HOME, BROWSE PROJECT and FIND ISSUES, and under that I see Open Issues, Road Map, Change Log, Popular Issues, Subversion Commits, Releases, Versions, Components, and FishEye. Where should I go to create an issue? -Original Message- From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] Sent: Tuesday, March 03, 2009 11:14 PM To: users@wicket.apache.org Subject: Re: Wicket Quickstart Installation Guide for Beginners I think the admins disabled attachments for non-committers. Can you attach them through a JIRA issue? then someone with the correct permissions can upload them. Just make sure to give them identifiable names, and don't forget to check the Intended for inclusion in Apache products check box :) Martijn On Wed, Mar 4, 2009 at 1:45 AM, Dane Laverty danelave...@chemeketa.edu wrote: Thanks, it looks good. I checked the Confluence website about adding images to a page and it says: To attach a file to a page, 1. Go to the page and click on the 'Attachments' tab. 2. Browse through your files and select the file you'd like to attach. 3. Enter a description for the attachment in the 'Comment' text field (optional). 4. Click 'Attach more files' if required. 5. Click 'Attach File'. I'm not seeing any 'Attachments' tab. Do I need different permissions? Or do I have to link to an image hosted elsewhere? -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Tuesday, March 03, 2009 4:23 PM To: users@wicket.apache.org Subject: Re: Wicket Quickstart Installation Guide for Beginners i got you most of the way there, you just need to upload images and put them in the right place when you hit edit page, switch to the first tab which says rich format that should give you a nice wysiwig editor to work with. -igor On Tue, Mar 3, 2009 at 4:08 PM, Dane Laverty danelave...@chemeketa.edu wrote: I attempted to do that, but without any luck. I'm not at all familiar with wikis, but I'd be happy to do it if someone will point me in the right direction. -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Tuesday, March 03, 2009 3:44 PM To: users@wicket.apache.org Subject: Re: Wicket Quickstart Installation Guide for Beginners you can add a link to it off our wiki. or possibly upload it to the wiki, not sure how attachments there work. -igor - 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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: VOTE: Remove ? extends from constructor of DropDownChoice
Hi everyone (I'm new to the list), Johannes, you are right about lists: If the constructor accepts the widened type, you can add all those lists... List? extends Number n = new ListNumber; List? extends Number n = new ListInteger; List? extends Number n = new ListDouble; But in our case the constructor parameter is an IModel, no a list. Try the following: IModelList? extends Number model = new LoadableDetachableModelListInteger() { ... }; See my comment in JIRA for more detail. Olivier 2009/3/4 Johannes Schneider maili...@cedarsoft.com: On Wed, 2009-03-04 at 10:04 -0500, Brill Pappin wrote: I actually wasn't saying they were the same. What I said (meant) was that: a) don't lock down Locking down means *removing* the wildcard. Adding the wildcard *widens* the collection. To be clear: Wildcard -- it fits for everybody No wildcard -- it fits only for some special cases (maybe yours) b) I prefer the explicit form rather than the Any of type form. i.e. ListT rather than List? extends T. They mean something completely different. I understand that you prefer the shorter version. Many do. But it stays wrong... If the constructor accepts ListNumber, everybody *has* to give you exactly a ListNumber. ListNumber n = new ListNumber; If the constructor accepts the widened type, you can add all those lists... List? extends Number n = new ListNumber; List? extends Number n = new ListInteger; List? extends Number n = new ListDouble; If you don't believe me, take a look at GlazedLists. Compare version 1.7 and version 1.8. They changed exactly that thing (a non backward compatible change!). They made exactly the same fault... Regards, Johannes - Brill On 4-Mar-09, at 6:26 AM, Johannes Schneider wrote: On Tue, 2009-03-03 at 16:02 -0500, Brill Pappin wrote: I'd hate to be prevented from doing so simply because someone wanted to lock down an API that didn't really need locking down. You are wrong. *Widening* a collection is the exact opposite of locking down. If you want to have some fancy (read hacky) write access to the model you are free to simply cast... That is the right choice here. You know that you have a special model in there, so cast it. But the common case is, that you don't know for sure whether the model supports adding of choices or not. If you don't believe me, take a look at JComboBox. javax.swing.JComboBox#getModel returns a *read only* view of the model. Regards, Johannes I think the syntax doesn't really mean read only, and if the wicket developers really want it to be read only, wrapping the list would be the way to go. I'm for the plain old ListT because its simple and explicit... List? extends T would be my next choice because it widens the scope. - Brill On 2-Mar-09, at 3:44 PM, James Carman wrote: Aren't both the choices model in DDC and the actual model of ListView supposed to be considered read-only (as far as the component is concerned)? The DDC and ListView don't need to be able to alter those models anyway, right? Perhaps my experience is just too limited, but I don't think I've ever tried to do either one of your usecases (I always consider them read-only). On Mon, Mar 2, 2009 at 3:24 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see WICKET-2126 -igor On Mon, Mar 2, 2009 at 12:19 PM, James Carman jcar...@carmanconsulting.com wrote: I vote -0.99 on this (non-binding of course). I'd vote +1 to making ListView accept List? extends T rather than making DDC less flexible. On Mon, Mar 2, 2009 at 3:11 PM, Brill Pappin br...@pappin.ca wrote: Ok, as suggested, here is the thread, and the first vote. +1 for making the generic definition the same for all list type components. FYI - you can also vote in the issue I just created at (which might actually be a better place to vote): https://issues.apache.org/jira/browse/WICKET-2137 - Brill On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote: Perhaps start a vote thread, with the subject something like: VOTE: Remove ? extends from constructor of DropDownChoice. I'd be +1 non-binding -- Jeremy Thomerson http://www.wickettraining.com On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin br...@pappin.ca wrote: I'm of the don't widen it camp anyway :) So how do I go about gathering support for having the DropDownChoice work with the models the way everything else does? - Brill On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote: yes, the choice was intentional. personally i do not care if it is T all the way, some users complained so we widened it on the choices model, we cannot widen it on the main model. -igor On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin br...@pappin.ca wrote: I see... but this would i think because Bar is a Foo: class Bar exends Foo {} List?
Re: VOTE: Remove ? extends from constructor of DropDownChoice
I agree. It is very sensible to be able to provide a ModelListInteger as the choices for a dropdown that has ModelNumber. Restricting the choices to ModelListT only eliminates (sensible) options for the client code. Scott On Wed, Mar 4, 2009 at 8:08 AM, Johannes Schneider maili...@cedarsoft.com wrote: On Wed, 2009-03-04 at 10:04 -0500, Brill Pappin wrote: I actually wasn't saying they were the same. What I said (meant) was that: a) don't lock down Locking down means *removing* the wildcard. Adding the wildcard *widens* the collection. To be clear: Wildcard -- it fits for everybody No wildcard -- it fits only for some special cases (maybe yours) b) I prefer the explicit form rather than the Any of type form. i.e. ListT rather than List? extends T. They mean something completely different. I understand that you prefer the shorter version. Many do. But it stays wrong... If the constructor accepts ListNumber, everybody *has* to give you exactly a ListNumber. ListNumber n = new ListNumber; If the constructor accepts the widened type, you can add all those lists... List? extends Number n = new ListNumber; List? extends Number n = new ListInteger; List? extends Number n = new ListDouble; If you don't believe me, take a look at GlazedLists. Compare version 1.7 and version 1.8. They changed exactly that thing (a non backward compatible change!). They made exactly the same fault... Regards, Johannes - Show quoted text - - Brill On 4-Mar-09, at 6:26 AM, Johannes Schneider wrote: On Tue, 2009-03-03 at 16:02 -0500, Brill Pappin wrote: I'd hate to be prevented from doing so simply because someone wanted to lock down an API that didn't really need locking down. You are wrong. *Widening* a collection is the exact opposite of locking down. If you want to have some fancy (read hacky) write access to the model you are free to simply cast... That is the right choice here. You know that you have a special model in there, so cast it. But the common case is, that you don't know for sure whether the model supports adding of choices or not. If you don't believe me, take a look at JComboBox. javax.swing.JComboBox#getModel returns a *read only* view of the model. Regards, Johannes I think the syntax doesn't really mean read only, and if the wicket developers really want it to be read only, wrapping the list would be the way to go. I'm for the plain old ListT because its simple and explicit... List? extends T would be my next choice because it widens the scope. - Brill On 2-Mar-09, at 3:44 PM, James Carman wrote: Aren't both the choices model in DDC and the actual model of ListView supposed to be considered read-only (as far as the component is concerned)? The DDC and ListView don't need to be able to alter those models anyway, right? Perhaps my experience is just too limited, but I don't think I've ever tried to do either one of your usecases (I always consider them read-only). On Mon, Mar 2, 2009 at 3:24 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see WICKET-2126 -igor On Mon, Mar 2, 2009 at 12:19 PM, James Carman jcar...@carmanconsulting.com wrote: I vote -0.99 on this (non-binding of course). I'd vote +1 to making ListView accept List? extends T rather than making DDC less flexible. On Mon, Mar 2, 2009 at 3:11 PM, Brill Pappin br...@pappin.ca wrote: Ok, as suggested, here is the thread, and the first vote. +1 for making the generic definition the same for all list type components. FYI - you can also vote in the issue I just created at (which might actually be a better place to vote): https://issues.apache.org/jira/browse/WICKET-2137 - Brill On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote: Perhaps start a vote thread, with the subject something like: VOTE: Remove ? extends from constructor of DropDownChoice. I'd be +1 non-binding -- Jeremy Thomerson http://www.wickettraining.com On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin br...@pappin.ca wrote: I'm of the don't widen it camp anyway :) So how do I go about gathering support for having the DropDownChoice work with the models the way everything else does? - Brill On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote: yes, the choice was intentional. personally i do not care if it is T all the way, some users complained so we widened it on the choices model, we cannot widen it on the main model. -igor On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin br...@pappin.ca wrote: I see... but this would i think because Bar is a Foo: class Bar exends Foo {} List? extends Foo list = ... list.add(new Bar()); Anyway, what your saying is that the generics choice was intentional? - Brill On 27-Feb-09, at 3:19 PM, Igor Vaynberg wrote: list? extends string stings=...
Re: Question re: style and variation
the problem is when you have MyFile_foo_en_CA.html is foo the style or the variation? you can have one without the other, or both. -igor On Wed, Mar 4, 2009 at 6:58 AM, Brill Pappin br...@pappin.ca wrote: I agree that it should stick to convention for the locale and it would be nice if the rest of the format was consistent. I wave to wonder though, if we really need a new format for the Wicket variation. Its all about search order, and there is no need to alternative separator chars our double underscores. During a lookup your simply checking if something exists, and you search in descending order of complexity. e.g.: MyFile_style_variation_en_CA_variant.html MyFile_style_variation_en_CA.html MyFile_style_variation_en.html MyFile_style_variation.html MyFile_style_en_CA_variant..html MyFile_style_en_CA.html MyFile_style_en.html MyFile_style.html MyFile_en_CA_variant.html MyFile_en_CA.html MyFile_en.html MyFile.html you can of course reduce the number of checks if the variation or the locale is not set. The only real important choice is the weight of the style_variation over the locale, which slightly changes the order of the search i.e. is the style_variation more important than the locale? Another thought, If we really want to use some sort of indicator, there is no reason it can't be the extension. e.g.: MyFile_en_CA_variant.html.style_variation or use a dash between the sections: MyFile_en_CA_variant-style_variation.html however the more I think on it, the more I think that its just not needed. There is also the matter of really needing the templates themselves to understand the locale since variable content for locale could/should likely be placed in properties files anyway. In that case the html need only handle the style_variation. One use-case I'm about to try (haven't implemented yet) is a mobile webapp that can serve slightly different content for two radically different mobile devices, where layout and style can matter a lot (mostly layout). - Brill Pappin On 3-Mar-09, at 10:18 PM, jWeekend wrote: Igor, In Java, variant is the least significant component(s) of a locale: lang_COUNTRY_variant . Wicket adds style and variation (right?) so maybe only these components of the filename should have a special marker. That way, some level of consistentcy is maintained and the Wicket specific style variation are clearly identifiable. So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html - in this example you'd need to double check that dash and the parenthesis can be used in file names on all relevant filesystems (you could even make the markers configurable I suppose in Application#init and/or using system properties ...). Of course it's not pretty; at the end of the day, your stuck with character strings so you can't stop people confusing themselves (and maybe Wicket too) with funky file names using these special characters. The javadoc says: Whereas Styles are Session (user) specific, variations are component specific. E.g. if the Style is ocean and the Variation is NorthSea, than the resources are given the names suffixed with _ocean_NorthSea. Is there a standard use-case where the solution involves using variation (that's in keeping with the original intent)? Regards - Cemal http://jWeekend.com jWeekend igor.vaynberg wrote: yeah, not to mention it might get quiet ugly mypanel_style.html mypanel_style__variant.html mypanel_style__variant___locale.html mypanel__variant.html mypanel___locale.html markup(locale)(style)(variant) might work and is simpler mypanel(en_us).html mypanel(en_us)()(variant).html but sure looks ugly... :) not sure which one is better -igor On Mon, Mar 2, 2009 at 11:30 PM, Ned Collyer ned.coll...@gmail.com wrote: Yep :). I at least 1 thought on this matter. Currently, I have a webapp module - which will have my components in it, and my components variants. I have pushed all i18n into properties files - which is working thus far. I allow the clients to customise their HTML from another folder - ie, someplace on the filesystem outside of the war. The lookup for html files for me .. should be custom dir - myPanel_myVariant_myStyle.html webapp.war - myPanel_myVariant_myStyle.html custom dir - myPanel_myVariant.html webapp.war - myPanel_myVariant.html custom dir - myPanel_myStyle.html webapp.war - myPanel_myStyle.html custom dir - myPanel.html webapp.war - myPanel.html I have a similar thing in place for properties files - and the result is actually a merge of the properties between filesystem and classpath. So many ways to skin a cat. If only we could skin this cat with locale, style AND variant - each optional. More static count of delimiters? Folder structure? Different delimiters? Different data in filename? Contents of file? The balancing act is keeping it simple - which its currently nailed, but
Re: Markup inheritance and composition mix
in markup for B you dont have a tag with wicket:id=C so where should the markup for panel C be rendered? -igor On Tue, Mar 3, 2009 at 4:33 PM, Dragut Razvan razvan.softw...@gmail.com wrote: Hi Igor, First, thanks answering. I have posted the demo code that throws this exception in a pastebin here : http://pastebin.com/f28244adb If there's anything unclear, please let me know. Cheers, Razvan igor.vaynberg wrote: its really had to tell whats going on because your markup is being stripped, why dont you paste it all into a pastebin and send us a link to that instead. -igor On Mon, Mar 2, 2009 at 5:49 PM, Dragut Razvan wrote: sorry for posting for the third time but need to make sure everything is visible : [C content] Dragut Razvan wrote: there where seems that text is missing is 2 spans ... one contains the other one. B contains C Dragut Razvan wrote: Hi everyone, I am new to wicket and I am encountering a problem when I am trying to mix some panel inheritance and composition. I don't know whether I'm doing something wrong or it is not supposed to work like that but hope you can help with some advice. So here's my hierarchy : Panel - A - B . This is an inheritance relationship where panel B extends panel A which extends Panel. Panel - C . If I add panel B and panel C to a page everything works fine. If I am trying to add panel C to panel B ( bPanelInstance.add(C) ) and add panel B to the page then I am getting into problems (even if C is an EmptyPanel instance) : If I have [C content] I get an exception saying that the end tag for panel b is missing, though the end tag is there. Here's a sample of my exception where the name login equates to b from my exmaple. WicketMessage: close tag not found for tag: . Component: [MarkupContainer [Component id = login]] Root cause: org.apache.wicket.markup.MarkupException: close tag not found for tag: . Component: [MarkupContainer [Component id = login]] at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:123) at org.apache.wicket.Component.renderComponent(Component.java:2596) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1521) at org.apache.wicket.Component.render(Component.java:2421) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1399) at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537) at org.apache.wicket.Page.onRender(Page.java:1522) at org.apache.wicket.Component.render(Component.java:2421) at org.apache.wicket.Page.renderPage(Page.java:926) Adding a panel to another one works fine unless is one of my extended panels, therefore I guess it's something that I am missing when I am extending the panels. The way I am extending the panels is standard and only I only override that required constructor and nothing else. To summarize : I have some markup inheritance with panels which works fine. I get the above error when I am trying to add a panel using Panel's add method to my extended panels. The html markup it's correct and it's not missing any tags. Markup inheritance is done in the simplest way by only providing the panel id constructor. Do you have any idea why this happens ? If you think it should not happen, you have tried it, you do not get into this and cannot reproduce the error, can you provide a simple working example of this scenario ? I am using Wicket 1.4-rc2. Thanks very much, Kind Regards, Razvan -- View this message in context: http://www.nabble.com/Markup-inheritance-and-composition-mix-tp22300927p22301004.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 -- View this message in context: http://www.nabble.com/Markup-inheritance-and-composition-mix-tp22300927p22321225.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: Please Please Portlet
afaik 1.4 snapshots should have native portlet 2.0 support. -igor On Wed, Mar 4, 2009 at 6:58 AM, Wilhelmsen Tor Iver toriv...@arrive.no wrote: (using Netbeans, wicket 1.4rc2, glassfish v3, portlet-container from open-portal project) I thought the portlet-container in effect was dead since the Sun Portal is dead? They have ditched that in favor of a solution based on Liferay 5.2 called Web Space (codename WebSynergy during development): https://webspace.dev.java.net/download.html - note that it uses Glassfish v2.1 in case you require features from v3. Around here we use a patched snapshot of 1.4 (using an adapted version of the older portlet 2.0 patch) for Wicket portlets. (Or have I been sleeping and we get real Portlet 2.0 out of the box in 1.4 now?) I noticed some differences between what we do (which works :) ) and what you posted: 1) In web.xml we have a filter mapping for each portlet: filter-mapping filter-namebookmark/filter-name url-pattern/basic/*/url-pattern dispatcherREQUEST/dispatcher dispatcherINCLUDE/dispatcher dispatcherFORWARD/dispatcher dispatcherERROR/dispatcher /filter-mapping 2) We also declare the application in the filter element: init-param param-nameapplicationClassName/param-name param-valueno.nsb.intranet.bookmark.wicket.BookmarkApplication /param-value /init-param 3) You also seem to be missing an init-parameter for viewPage, in our case e.g. init-param namewicketFilterPath/name value/basic/value /init-param init-param nameviewPage/name value/basic/list/value /init-param though in theory it should use the application's getHomePage(), I guess... 4) We do not have anything in sun-web.xml, though I guess we would benefit from a shared classloader with Web Space. - 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 (not) to: IModel and Collections (and generics)
components that deal with collections in wicket always reuse the same instance of collection is one was provided where it makes sense. setobject is still called on the model, but is called with the same instance of collection. this is necessary so that if you have a model that translates a collection of one type to a collection of another can perform the conversion when the component pushes new data into it. -igor On Wed, Mar 4, 2009 at 4:50 AM, Johannes Schneider maili...@cedarsoft.com wrote: Hi, the concept of IModel seems to be very obvious. It is simply some kind of reference and offers a getter and a setter. When used with ordinary object, everything works fine. An IModel that contains a String can easily be mapped to a TextField. The text field calls getObject to show the initial value and sets the changed string to the model using setObject on form commit. Everything becomes a little more complicated when collections are affected. The problem is, that it is not obvious what those collections represent. 1) A collection might be read-only (e.g. the possible choices for a selection). 2) But it also might be necessary to add/remove single elements (e.g. privileged users shown within a shuffle list). 3) And sometimes the complete collection is changed (can't find an example here). IModel only supports the *third* method where the complete collection is replaced. (Don't forget that the reference to the collection changes which will lead to several other problems.) I strongly recommend the usage of a wrapping class for that case. But this case is not very common. Maybe someone finds a good example - I can't. For the other two cases it does *not* make any sense to call IModel#setObject. Summary: Nearly in every case when the IModel contains a collection, the setObject method does not make any sense and must not be called. Conclusion: I think we should have created some sort of IModelProvider (contains only the getObject method) and IModel (with both methods). Components that just *read* values from the model, accept the read only interface now. For special cases where a magic component adds/removes elements to a collection, we need some sort of ICollectionModel that offers add and remove methods (but no setter). That interface - of course - will be based upon a collection *without* wildcards... Regards, Johannes Schneider - 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: What does Page Expired mean?
Thank you for all the comments! The Page Expired seemed to result because I had in my WebApplication: mountBookmarkablePage(homepage, InitialPage.class); But InitialPage extended a different base page as the search page I was using. I changed InitialPage to use the same base page and then Page Expired error no longer appeared. -- View this message in context: http://www.nabble.com/What-does-Page-Expired-mean--tp22327219p22334691.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: Markup inheritance and composition mix
Hi Igor, I was hoping I can create the hierarchy in the Index.html page not in the panel itself, which I might want to reuse in other pages. The reason I wanted to do it like that is that I want to reuse the B panel as a panel which always contains a feedback panel along with _random_ forms/panels etc. Anyway, your argument is fairly decent ... thanks very much for making it clear. Regards, Razvan igor.vaynberg wrote: in markup for B you dont have a tag with wicket:id=C so where should the markup for panel C be rendered? -igor On Tue, Mar 3, 2009 at 4:33 PM, Dragut Razvan razvan.softw...@gmail.com wrote: Hi Igor, First, thanks answering. I have posted the demo code that throws this exception in a pastebin here : http://pastebin.com/f28244adb If there's anything unclear, please let me know. Cheers, Razvan igor.vaynberg wrote: its really had to tell whats going on because your markup is being stripped, why dont you paste it all into a pastebin and send us a link to that instead. -igor On Mon, Mar 2, 2009 at 5:49 PM, Dragut Razvan wrote: sorry for posting for the third time but need to make sure everything is visible : [C content] Dragut Razvan wrote: there where seems that text is missing is 2 spans ... one contains the other one. B contains C Dragut Razvan wrote: Hi everyone, I am new to wicket and I am encountering a problem when I am trying to mix some panel inheritance and composition. I don't know whether I'm doing something wrong or it is not supposed to work like that but hope you can help with some advice. So here's my hierarchy : Panel - A - B . This is an inheritance relationship where panel B extends panel A which extends Panel. Panel - C . If I add panel B and panel C to a page everything works fine. If I am trying to add panel C to panel B ( bPanelInstance.add(C) ) and add panel B to the page then I am getting into problems (even if C is an EmptyPanel instance) : If I have [C content] I get an exception saying that the end tag for panel b is missing, though the end tag is there. Here's a sample of my exception where the name login equates to b from my exmaple. WicketMessage: close tag not found for tag: . Component: [MarkupContainer [Component id = login]] Root cause: org.apache.wicket.markup.MarkupException: close tag not found for tag: . Component: [MarkupContainer [Component id = login]] at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:123) at org.apache.wicket.Component.renderComponent(Component.java:2596) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1521) at org.apache.wicket.Component.render(Component.java:2421) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1399) at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537) at org.apache.wicket.Page.onRender(Page.java:1522) at org.apache.wicket.Component.render(Component.java:2421) at org.apache.wicket.Page.renderPage(Page.java:926) Adding a panel to another one works fine unless is one of my extended panels, therefore I guess it's something that I am missing when I am extending the panels. The way I am extending the panels is standard and only I only override that required constructor and nothing else. To summarize : I have some markup inheritance with panels which works fine. I get the above error when I am trying to add a panel using Panel's add method to my extended panels. The html markup it's correct and it's not missing any tags. Markup inheritance is done in the simplest way by only providing the panel id constructor. Do you have any idea why this happens ? If you think it should not happen, you have tried it, you do not get into this and cannot reproduce the error, can you provide a simple working example of this scenario ? I am using Wicket 1.4-rc2. Thanks very much, Kind Regards, Razvan -- View this message in context: http://www.nabble.com/Markup-inheritance-and-composition-mix-tp22300927p22301004.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 -- View this message in context: http://www.nabble.com/Markup-inheritance-and-composition-mix-tp22300927p22321225.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 -- View this message in context: http://www.nabble.com/Markup-inheritance-and-composition-mix-tp22300927p22334770.html Sent from the Wicket - User mailing list archive at Nabble.com.
Expected close tag for wicket:link ??
I find this error in my log file when a wicket page loads. Would anyone know what causes this error? ERROR org.apache.wicket.RequestCycle - unexpected exception when handling another exception: Expected close tag for wicket:link -- View this message in context: http://www.nabble.com/Expected-close-tag-for-%3Cwicket%3Alink%3Etp22335083p22335083.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
Static generation of pages from Wicket
Hello, What is the recommended technique for generation of pages (usually served by wicket in a web server), statically so that they can be served by say, a CDN. I want to use Wicket since its great for iterative development. However, all my pages are stateless and hence do not need to persist state on the server. In order to scale, I want to generate the pages in an offline stage and distribute them on a CDN. One option I have is to use wget to build the entire site statically. Is there a more Wicket approach to do this? What techniques would you suggest? Thanks, Vinayak - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Static generation of pages from Wicket
you can try wickettester -igor On Wed, Mar 4, 2009 at 9:54 AM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, What is the recommended technique for generation of pages (usually served by wicket in a web server), statically so that they can be served by say, a CDN. I want to use Wicket since its great for iterative development. However, all my pages are stateless and hence do not need to persist state on the server. In order to scale, I want to generate the pages in an offline stage and distribute them on a CDN. One option I have is to use wget to build the entire site statically. Is there a more Wicket approach to do this? What techniques would you suggest? Thanks, Vinayak - 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: Uppercasing inputs
Leszek, ... or, probably the most Wicket-way of doing this is to make a TextField subclass that overrides getConverter to return your special IConverter implementation which performs the capitalisation in its convertToObject. Regards - Cemal http://jWeekend.com jWeekend Leszek Gawron-2 wrote: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22335650.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 Quickstart Installation Guide for Beginners
I think you need to login first. Here is wher you can create a JIRA account (can be used for all Apache projects that use JIRA) : https://issues.apache.org/jira/secure/Signup!default.jspa Maarten On Wed, Mar 4, 2009 at 5:27 PM, Dane Laverty danelave...@chemeketa.eduwrote: Alright, I just created a JIRA account. I've browsed to the Wicket project, but I don't see any way to create a new issue. At the top of the screen I have HOME, BROWSE PROJECT and FIND ISSUES, and under that I see Open Issues, Road Map, Change Log, Popular Issues, Subversion Commits, Releases, Versions, Components, and FishEye. Where should I go to create an issue? -Original Message- From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] Sent: Tuesday, March 03, 2009 11:14 PM To: users@wicket.apache.org Subject: Re: Wicket Quickstart Installation Guide for Beginners I think the admins disabled attachments for non-committers. Can you attach them through a JIRA issue? then someone with the correct permissions can upload them. Just make sure to give them identifiable names, and don't forget to check the Intended for inclusion in Apache products check box :) Martijn On Wed, Mar 4, 2009 at 1:45 AM, Dane Laverty danelave...@chemeketa.edu wrote: Thanks, it looks good. I checked the Confluence website about adding images to a page and it says: To attach a file to a page, 1. Go to the page and click on the 'Attachments' tab. 2. Browse through your files and select the file you'd like to attach. 3. Enter a description for the attachment in the 'Comment' text field (optional). 4. Click 'Attach more files' if required. 5. Click 'Attach File'. I'm not seeing any 'Attachments' tab. Do I need different permissions? Or do I have to link to an image hosted elsewhere? -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Tuesday, March 03, 2009 4:23 PM To: users@wicket.apache.org Subject: Re: Wicket Quickstart Installation Guide for Beginners i got you most of the way there, you just need to upload images and put them in the right place when you hit edit page, switch to the first tab which says rich format that should give you a nice wysiwig editor to work with. -igor On Tue, Mar 3, 2009 at 4:08 PM, Dane Laverty danelave...@chemeketa.edu wrote: I attempted to do that, but without any luck. I'm not at all familiar with wikis, but I'd be happy to do it if someone will point me in the right direction. -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Tuesday, March 03, 2009 3:44 PM To: users@wicket.apache.org Subject: Re: Wicket Quickstart Installation Guide for Beginners you can add a link to it off our wiki. or possibly upload it to the wiki, not sure how attachments there work. -igor - 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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: openstreetmap in openlayers
I tried a few things and I think I managed the integration of openstreetmaps. The browser is contacting the osm tile server BUT everything I get are pink tiles? Here is the output of the final html page: html head titleWicket Quickstart Archetype Homepage/title script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]]*//script script type=text/javascript src=http://openlayers.org/api/OpenLayers.js;/script script type=text/javascript src=resources/org.wicketstuff.openlayers.OpenLayersMap/wicket-openlayersmap.js/script script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, load, function(event) { function osm_getTileURL(bounds) {var res = this.map.getResolution();var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)); var z = this.map.getZoom(); var limit = Math.pow(2, z); if (y 0 || y = limit) { return OpenLayers.Util.getImagesLocation() + '404.png'; } else { x = ((x % limit) + limit) % limit;return this.url + z + '/' + x + '/' + y + '.' + this.type; } } ;}); /*--]]*//script script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, domready, function(event) { var options = {maxResolution: 156543.0339, projection: new OpenLayers.Projection('EPSG:900913'), numZoomLevels:18, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34), units: 'm', displayProjection: new OpenLayers.Projection('EPSG:4326')}; new WicketOMap('map7', options); var osm23008635 =new OpenLayers.Layer.TMS('OpenStreetMap (Mapnik)', 'http://tile.openstreetmap.org/', {type: 'png', attribution: http://www.openstreetmap.org/ OpenStreetMap , displayOutsideMaxExtent: true}); Wicket.omaps['map7'].addLayer(osm23008635,23008635); Wicket.omaps['map7'].zoomToMaxExtent(); Wicket.omaps['map7'].addControl('LayerSwitcher', new OpenLayers.Control.LayerSwitcher()); Wicket.omaps['map7'].setPopupId('content8'); ;}); /*--]]*//script /head body br/br/ wicket:panel div wicket:id=infoWindow style=display: none id=infoWindow9 div wicket:id=content id=content8wicket:panel wicket:child/ /wicket:panel/div /div div wicket:id=map class=map style=width: 100%; height: 100%; id=map7/div /wicket:panel /body /html Any ideas? -- View this message in context: http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22336109.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 Quickstart Installation Guide for Beginners
Alright Igor, that's all of them. Thanks for everyone's help with this.
Re: openstreetmap in openlayers
Hello, Pink tiles means there is a mismatch somewhere between your layers. Does your openlayers javascript work correctly? (i.e. when not emitted from wicket openlayers?) This page embeds an openstreet map in openlayers: http://wiki.openstreetmap.org/wiki/OpenLayers But it doesn't use the OpenLayers.Layer.TMS object. It adds its own import (http://openstreetmap.org/openlayers/OpenStreetMap.js ) and uses an OpenLayers.Layer.OSM object. Perhaps your integration should use that instead? There is a ticket for something similiar that might get into OpenLayers 2.8 (http://trac.openlayers.org/ticket/1950) Mike I tried a few things and I think I managed the integration of openstreetmaps. The browser is contacting the osm tile server BUT everything I get are pink tiles? Here is the output of the final html page: html head titleWicket Quickstart Archetype Homepage/title script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]]*//script script type=text/javascript src=http://openlayers.org/api/OpenLayers.js;/script script type=text/javascript src=resources/org.wicketstuff.openlayers.OpenLayersMap/wicket-openlayersmap.js/script script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, load, function(event) { function osm_getTileURL(bounds) {var res = this.map.getResolution();var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)); var z = this.map.getZoom(); var limit = Math.pow(2, z); if (y 0 || y = limit) { return OpenLayers.Util.getImagesLocation() + '404.png'; } else { x = ((x % limit) + limit) % limit;return this.url + z + '/' + x + '/' + y + '.' + this.type; } } ;}); /*--]]*//script script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, domready, function(event) { var options = {maxResolution: 156543.0339, projection: new OpenLayers.Projection('EPSG:900913'), numZoomLevels:18, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34), units: 'm', displayProjection: new OpenLayers.Projection('EPSG:4326')}; new WicketOMap('map7', options); var osm23008635 =new OpenLayers.Layer.TMS('OpenStreetMap (Mapnik)', 'http://tile.openstreetmap.org/', {type: 'png', attribution: http://www.openstreetmap.org/ OpenStreetMap , displayOutsideMaxExtent: true}); Wicket.omaps['map7'].addLayer(osm23008635,23008635); Wicket.omaps['map7'].zoomToMaxExtent(); Wicket.omaps['map7'].addControl('LayerSwitcher', new OpenLayers.Control.LayerSwitcher()); Wicket.omaps['map7'].setPopupId('content8'); ;}); /*--]]*//script /head body br/br/ wicket:panel div wicket:id=infoWindow style=display: none id=infoWindow9 div wicket:id=content id=content8wicket:panel wicket:child/ /wicket:panel/div /div div wicket:id=map class=map style=width: 100%; height: 100%; id=map7/div /wicket:panel /body /html Any ideas? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Quickstart Installation Guide for Beginners
they are attached -igor On Wed, Mar 4, 2009 at 10:48 AM, Dane Laverty danelave...@chemeketa.edu wrote: Alright Igor, that's all of them. Thanks for everyone's help with this. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Static generation of pages from Wicket
You could just introduce a caching filter in front of the pages, right? On Wed, Mar 4, 2009 at 12:54 PM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, What is the recommended technique for generation of pages (usually served by wicket in a web server), statically so that they can be served by say, a CDN. I want to use Wicket since its great for iterative development. However, all my pages are stateless and hence do not need to persist state on the server. In order to scale, I want to generate the pages in an offline stage and distribute them on a CDN. One option I have is to use wget to build the entire site statically. Is there a more Wicket approach to do this? What techniques would you suggest? Thanks, Vinayak - 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: Expected close tag for wicket:link ??
Seeing the whole stack trace might help! Thomas On Wed, Mar 4, 2009 at 6:34 PM, Edwin Ansicodd erik.g.hau...@gmail.comwrote: I find this error in my log file when a wicket page loads. Would anyone know what causes this error? ERROR org.apache.wicket.RequestCycle - unexpected exception when handling another exception: Expected close tag for wicket:link -- View this message in context: http://www.nabble.com/Expected-close-tag-for-%3Cwicket%3Alink%3Etp22335083p22335083.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Wicket Eclipse Consulting www.devotek-it.ch thomasmaeder.blogspot.com
Re: Static generation of pages from Wicket
James, We are planning to use Amazon S3 to host all static pages -- The idea is to create a CNAME to the vhost on S3. This way all pages get served from S3. How would I use the caching filter to do this? I have no way to intercept the request once it is made to S3. Thanks, Vinayak James Carman wrote: You could just introduce a caching filter in front of the pages, right? On Wed, Mar 4, 2009 at 12:54 PM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, What is the recommended technique for generation of pages (usually served by wicket in a web server), statically so that they can be served by say, a CDN. I want to use Wicket since its great for iterative development. However, all my pages are stateless and hence do not need to persist state on the server. In order to scale, I want to generate the pages in an offline stage and distribute them on a CDN. One option I have is to use wget to build the entire site statically. Is there a more Wicket approach to do this? What techniques would you suggest? Thanks, Vinayak - 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: Static generation of pages from Wicket
Yeah, scratch that idea. I thought you meant from your own server. You could try something like HTTrack (http://www.httrack.com/) and point it at your local installation of Wicket. Once you download the entire site, you just zip it up and upload it. On Wed, Mar 4, 2009 at 2:18 PM, Vinayak Borkar vbo...@yahoo.com wrote: James, We are planning to use Amazon S3 to host all static pages -- The idea is to create a CNAME to the vhost on S3. This way all pages get served from S3. How would I use the caching filter to do this? I have no way to intercept the request once it is made to S3. Thanks, Vinayak James Carman wrote: You could just introduce a caching filter in front of the pages, right? On Wed, Mar 4, 2009 at 12:54 PM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, What is the recommended technique for generation of pages (usually served by wicket in a web server), statically so that they can be served by say, a CDN. I want to use Wicket since its great for iterative development. However, all my pages are stateless and hence do not need to persist state on the server. In order to scale, I want to generate the pages in an offline stage and distribute them on a CDN. One option I have is to use wget to build the entire site statically. Is there a more Wicket approach to do this? What techniques would you suggest? Thanks, Vinayak - 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
Simple Ajax Form
Hi, I would really appreciate it if someone could post code for a simple ajax form. I just want to submit some data in the form without the whole page reloading, just the form should reload after the submit. Say I have 3 textfields. Firstname, lastname and fullname. I enter the first two fields and when I click submit, the third field just concatenates the first two fields and displays. How can I do that with ajax? Thank you! -- View this message in context: http://www.nabble.com/Simple-Ajax-Form-tp22337895p22337895.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: Simple Ajax Form
Hava a look at http://www.wicketstuff.org/wicket13/ajax/form.1 , then download the wicket sample application and examine the source code. -Ursprüngliche Nachricht- Von: newbieabc [mailto:newbie...@yahoo.com] Gesendet: Mittwoch, 4. März 2009 20:55 An: users@wicket.apache.org Betreff: Simple Ajax Form Hi, I would really appreciate it if someone could post code for a simple ajax form. I just want to submit some data in the form without the whole page reloading, just the form should reload after the submit. Say I have 3 textfields. Firstname, lastname and fullname. I enter the first two fields and when I click submit, the third field just concatenates the first two fields and displays. How can I do that with ajax? Thank you! -- View this message in context: http://www.nabble.com/Simple-Ajax-Form-tp22337895p22337895.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: Uppercasing inputs
Ernesto's got you on the right track. I'd recommend taking it a step further like described here: http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/ Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: Ernesto Reinaldo Barreiro reier...@gmail.com Sent: Wednesday, March 04, 2009 9:43 AM To: users@wicket.apache.org Subject: Re: Uppercasing inputs Maybe: class MyUpperCaseModel extends WhatEverModelString { public void setObject(String value) { if(value != null) { super.setValue(value.toUpperCase()); } else { super.setValue(value); } } } and use MyUpperCaseModel instead of WhatEverModelString. Ernesto On Wed, Mar 4, 2009 at 4:30 PM, Leszek Gawron lgaw...@apache.org wrote: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards -- Leszek Gawron - 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: Simple Ajax Form
I had some errors with the example, that's why I was hoping to get code to submit data from two fields using the ajax form. Basically I just want the form part of the page to update without reloading the whole page. Thanks -- View this message in context: http://www.nabble.com/Simple-Ajax-Form-tp22337895p22338749.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: Simple Ajax Form
Show us YOUR code and we'll point out the issue. I use Ajax forms everywhere. cheers, Steve On 04/03/2009, at 8:35 PM, newbieabc wrote: I had some errors with the example, that's why I was hoping to get code to submit data from two fields using the ajax form. Basically I just want the form part of the page to update without reloading the whole page. Thanks -- View this message in context: http://www.nabble.com/Simple-Ajax-Form-tp22337895p22338749.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: VOTE: Remove ? extends from constructor of DropDownChoice
See the sample test in ticket: WICKET-2137 https://issues.apache.org/jira/browse/WICKET-2137 - brill On 4-Mar-09, at 11:08 AM, Johannes Schneider wrote: On Wed, 2009-03-04 at 10:04 -0500, Brill Pappin wrote: I actually wasn't saying they were the same. What I said (meant) was that: a) don't lock down Locking down means *removing* the wildcard. Adding the wildcard *widens* the collection. To be clear: Wildcard -- it fits for everybody No wildcard -- it fits only for some special cases (maybe yours) b) I prefer the explicit form rather than the Any of type form. i.e. ListT rather than List? extends T. They mean something completely different. I understand that you prefer the shorter version. Many do. But it stays wrong... If the constructor accepts ListNumber, everybody *has* to give you exactly a ListNumber. ListNumber n = new ListNumber; If the constructor accepts the widened type, you can add all those lists... List? extends Number n = new ListNumber; List? extends Number n = new ListInteger; List? extends Number n = new ListDouble; If you don't believe me, take a look at GlazedLists. Compare version 1.7 and version 1.8. They changed exactly that thing (a non backward compatible change!). They made exactly the same fault... Regards, Johannes - Brill On 4-Mar-09, at 6:26 AM, Johannes Schneider wrote: On Tue, 2009-03-03 at 16:02 -0500, Brill Pappin wrote: I'd hate to be prevented from doing so simply because someone wanted to lock down an API that didn't really need locking down. You are wrong. *Widening* a collection is the exact opposite of locking down. If you want to have some fancy (read hacky) write access to the model you are free to simply cast... That is the right choice here. You know that you have a special model in there, so cast it. But the common case is, that you don't know for sure whether the model supports adding of choices or not. If you don't believe me, take a look at JComboBox. javax.swing.JComboBox#getModel returns a *read only* view of the model. Regards, Johannes I think the syntax doesn't really mean read only, and if the wicket developers really want it to be read only, wrapping the list would be the way to go. I'm for the plain old ListT because its simple and explicit... List? extends T would be my next choice because it widens the scope. - Brill On 2-Mar-09, at 3:44 PM, James Carman wrote: Aren't both the choices model in DDC and the actual model of ListView supposed to be considered read-only (as far as the component is concerned)? The DDC and ListView don't need to be able to alter those models anyway, right? Perhaps my experience is just too limited, but I don't think I've ever tried to do either one of your usecases (I always consider them read-only). On Mon, Mar 2, 2009 at 3:24 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see WICKET-2126 -igor On Mon, Mar 2, 2009 at 12:19 PM, James Carman jcar...@carmanconsulting.com wrote: I vote -0.99 on this (non-binding of course). I'd vote +1 to making ListView accept List? extends T rather than making DDC less flexible. On Mon, Mar 2, 2009 at 3:11 PM, Brill Pappin br...@pappin.ca wrote: Ok, as suggested, here is the thread, and the first vote. +1 for making the generic definition the same for all list type components. FYI - you can also vote in the issue I just created at (which might actually be a better place to vote): https://issues.apache.org/jira/browse/WICKET-2137 - Brill On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote: Perhaps start a vote thread, with the subject something like: VOTE: Remove ? extends from constructor of DropDownChoice. I'd be +1 non-binding -- Jeremy Thomerson http://www.wickettraining.com On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin br...@pappin.ca wrote: I'm of the don't widen it camp anyway :) So how do I go about gathering support for having the DropDownChoice work with the models the way everything else does? - Brill On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote: yes, the choice was intentional. personally i do not care if it is T all the way, some users complained so we widened it on the choices model, we cannot widen it on the main model. -igor On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin br...@pappin.ca wrote: I see... but this would i think because Bar is a Foo: class Bar exends Foo {} List? extends Foo list = ... list.add(new Bar()); Anyway, what your saying is that the generics choice was intentional? - Brill On 27-Feb-09, at 3:19 PM, Igor Vaynberg wrote: list? extends string stings=... strings.add(asd); == wont compile -igor On Fri, Feb 27, 2009 at 11:13 AM, Adriano dos Santos Fernandes adrian...@gmail.com wrote: What do you mean with read only here? Adriano Igor Vaynberg escreveu: ? extends Foo collections are read only, it would be too inconvenient to make the model collection read only :) -igor On Thu, Feb 26, 2009 at 8:34 PM, Jeremy Thomerson
RE: Wicket Quickstart Installation Guide for Beginners
Great. I've finished putting the pictures into the document. Is there a place on the wiki where I should locate the page? Dane -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Wednesday, March 04, 2009 10:55 AM To: users@wicket.apache.org Subject: Re: Wicket Quickstart Installation Guide for Beginners they are attached -igor On Wed, Mar 4, 2009 at 10:48 AM, Dane Laverty danelave...@chemeketa.edu wrote: Alright Igor, that's all of them. Thanks for everyone's help with this. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Question re: style and variation
For my own edification, I missed the thread on style. what exactly is the style that is different from the variation? I guess for Locale, it *does* use the double underscores when you have a placeholder as in the case of a country only. I think its a familiar model and using it for another feature would not be so bad (although I admin, it's ugly)... I'd be very cautious about what other chars you use as delimiters though. - Brill On 4-Mar-09, at 11:46 AM, Igor Vaynberg wrote: the problem is when you have MyFile_foo_en_CA.html is foo the style or the variation? you can have one without the other, or both. -igor On Wed, Mar 4, 2009 at 6:58 AM, Brill Pappin br...@pappin.ca wrote: I agree that it should stick to convention for the locale and it would be nice if the rest of the format was consistent. I wave to wonder though, if we really need a new format for the Wicket variation. Its all about search order, and there is no need to alternative separator chars our double underscores. During a lookup your simply checking if something exists, and you search in descending order of complexity. e.g.: MyFile_style_variation_en_CA_variant.html MyFile_style_variation_en_CA.html MyFile_style_variation_en.html MyFile_style_variation.html MyFile_style_en_CA_variant..html MyFile_style_en_CA.html MyFile_style_en.html MyFile_style.html MyFile_en_CA_variant.html MyFile_en_CA.html MyFile_en.html MyFile.html you can of course reduce the number of checks if the variation or the locale is not set. The only real important choice is the weight of the style_variation over the locale, which slightly changes the order of the search i.e. is the style_variation more important than the locale? Another thought, If we really want to use some sort of indicator, there is no reason it can't be the extension. e.g.: MyFile_en_CA_variant.html.style_variation or use a dash between the sections: MyFile_en_CA_variant-style_variation.html however the more I think on it, the more I think that its just not needed. There is also the matter of really needing the templates themselves to understand the locale since variable content for locale could/ should likely be placed in properties files anyway. In that case the html need only handle the style_variation. One use-case I'm about to try (haven't implemented yet) is a mobile webapp that can serve slightly different content for two radically different mobile devices, where layout and style can matter a lot (mostly layout). - Brill Pappin On 3-Mar-09, at 10:18 PM, jWeekend wrote: Igor, In Java, variant is the least significant component(s) of a locale: lang_COUNTRY_variant . Wicket adds style and variation (right?) so maybe only these components of the filename should have a special marker. That way, some level of consistentcy is maintained and the Wicket specific style variation are clearly identifiable. So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html - in this example you'd need to double check that dash and the parenthesis can be used in file names on all relevant filesystems (you could even make the markers configurable I suppose in Application#init and/or using system properties ...). Of course it's not pretty; at the end of the day, your stuck with character strings so you can't stop people confusing themselves (and maybe Wicket too) with funky file names using these special characters. The javadoc says: Whereas Styles are Session (user) specific, variations are component specific. E.g. if the Style is ocean and the Variation is NorthSea, than the resources are given the names suffixed with _ocean_NorthSea. Is there a standard use-case where the solution involves using variation (that's in keeping with the original intent)? Regards - Cemal http://jWeekend.com jWeekend igor.vaynberg wrote: yeah, not to mention it might get quiet ugly mypanel_style.html mypanel_style__variant.html mypanel_style__variant___locale.html mypanel__variant.html mypanel___locale.html markup(locale)(style)(variant) might work and is simpler mypanel(en_us).html mypanel(en_us)()(variant).html but sure looks ugly... :) not sure which one is better -igor On Mon, Mar 2, 2009 at 11:30 PM, Ned Collyer ned.coll...@gmail.com wrote: Yep :). I at least 1 thought on this matter. Currently, I have a webapp module - which will have my components in it, and my components variants. I have pushed all i18n into properties files - which is working thus far. I allow the clients to customise their HTML from another folder - ie, someplace on the filesystem outside of the war. The lookup for html files for me .. should be custom dir - myPanel_myVariant_myStyle.html webapp.war - myPanel_myVariant_myStyle.html custom dir - myPanel_myVariant.html webapp.war - myPanel_myVariant.html custom dir - myPanel_myStyle.html webapp.war - myPanel_myStyle.html custom dir -
Re: VOTE: Remove ? extends from constructor of DropDownChoice
So, do we need to make it IModel? extends List? extends T? That would allow what Oliver was talking about. On Wed, Mar 4, 2009 at 4:14 PM, Brill Pappin br...@pappin.ca wrote: See the sample test in ticket: WICKET-2137 https://issues.apache.org/jira/browse/WICKET-2137 - brill On 4-Mar-09, at 11:08 AM, Johannes Schneider wrote: On Wed, 2009-03-04 at 10:04 -0500, Brill Pappin wrote: I actually wasn't saying they were the same. What I said (meant) was that: a) don't lock down Locking down means *removing* the wildcard. Adding the wildcard *widens* the collection. To be clear: Wildcard -- it fits for everybody No wildcard -- it fits only for some special cases (maybe yours) b) I prefer the explicit form rather than the Any of type form. i.e. ListT rather than List? extends T. They mean something completely different. I understand that you prefer the shorter version. Many do. But it stays wrong... If the constructor accepts ListNumber, everybody *has* to give you exactly a ListNumber. ListNumber n = new ListNumber; If the constructor accepts the widened type, you can add all those lists... List? extends Number n = new ListNumber; List? extends Number n = new ListInteger; List? extends Number n = new ListDouble; If you don't believe me, take a look at GlazedLists. Compare version 1.7 and version 1.8. They changed exactly that thing (a non backward compatible change!). They made exactly the same fault... Regards, Johannes - Brill On 4-Mar-09, at 6:26 AM, Johannes Schneider wrote: On Tue, 2009-03-03 at 16:02 -0500, Brill Pappin wrote: I'd hate to be prevented from doing so simply because someone wanted to lock down an API that didn't really need locking down. You are wrong. *Widening* a collection is the exact opposite of locking down. If you want to have some fancy (read hacky) write access to the model you are free to simply cast... That is the right choice here. You know that you have a special model in there, so cast it. But the common case is, that you don't know for sure whether the model supports adding of choices or not. If you don't believe me, take a look at JComboBox. javax.swing.JComboBox#getModel returns a *read only* view of the model. Regards, Johannes I think the syntax doesn't really mean read only, and if the wicket developers really want it to be read only, wrapping the list would be the way to go. I'm for the plain old ListT because its simple and explicit... List? extends T would be my next choice because it widens the scope. - Brill On 2-Mar-09, at 3:44 PM, James Carman wrote: Aren't both the choices model in DDC and the actual model of ListView supposed to be considered read-only (as far as the component is concerned)? The DDC and ListView don't need to be able to alter those models anyway, right? Perhaps my experience is just too limited, but I don't think I've ever tried to do either one of your usecases (I always consider them read-only). On Mon, Mar 2, 2009 at 3:24 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see WICKET-2126 -igor On Mon, Mar 2, 2009 at 12:19 PM, James Carman jcar...@carmanconsulting.com wrote: I vote -0.99 on this (non-binding of course). I'd vote +1 to making ListView accept List? extends T rather than making DDC less flexible. On Mon, Mar 2, 2009 at 3:11 PM, Brill Pappin br...@pappin.ca wrote: Ok, as suggested, here is the thread, and the first vote. +1 for making the generic definition the same for all list type components. FYI - you can also vote in the issue I just created at (which might actually be a better place to vote): https://issues.apache.org/jira/browse/WICKET-2137 - Brill On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote: Perhaps start a vote thread, with the subject something like: VOTE: Remove ? extends from constructor of DropDownChoice. I'd be +1 non-binding -- Jeremy Thomerson http://www.wickettraining.com On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin br...@pappin.ca wrote: I'm of the don't widen it camp anyway :) So how do I go about gathering support for having the DropDownChoice work with the models the way everything else does? - Brill On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote: yes, the choice was intentional. personally i do not care if it is T all the way, some users complained so we widened it on the choices model, we cannot widen it on the main model. -igor On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin br...@pappin.ca wrote: I see... but this would i think because Bar is a Foo: class Bar exends Foo {} List? extends Foo list = ... list.add(new Bar()); Anyway, what your saying is that the generics choice was intentional? - Brill On 27-Feb-09, at 3:19 PM, Igor Vaynberg wrote: list? extends string stings=... strings.add(asd); == wont compile -igor On Fri, Feb 27, 2009 at 11:13 AM, Adriano dos Santos Fernandes adrian...@gmail.com
wicket generating its code for href
I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.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 generating its code for href
that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.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
How can I injecting a Springbean into a custom session.
Apologies if this is more of a Spring question than a Wicket question, I'm just not sure. Anyway, the problem. I have a custom session class which inherits form WebSession. I've overridden the WebApplication's newSession() method in order to return a new instance of my custom session. However I want my custom session to use a Springbean but because the Spring container didn't create the custom session object it can't inject the dependency. Does anybody know how to get around this or if it's possible. It could be that my design is flawed ;D -- View this message in context: http://www.nabble.com/How-can-I-injecting-a-Springbean-into-a-custom-session.-tp22340379p22340379.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 generating its code for href
no i did not use wicket:link . igor.vaynberg wrote: that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340387.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: How can I injecting a Springbean into a custom session.
class mysession { @SpringBean private dao; public mysession(...) { super(...); InjectorHolder.getInjector().inject(this); } } -igor On Wed, Mar 4, 2009 at 1:59 PM, CrocodileShoes markjohndo...@googlemail.com wrote: Apologies if this is more of a Spring question than a Wicket question, I'm just not sure. Anyway, the problem. I have a custom session class which inherits form WebSession. I've overridden the WebApplication's newSession() method in order to return a new instance of my custom session. However I want my custom session to use a Springbean but because the Spring container didn't create the custom session object it can't inject the dependency. Does anybody know how to get around this or if it's possible. It could be that my design is flawed ;D -- View this message in context: http://www.nabble.com/How-can-I-injecting-a-Springbean-into-a-custom-session.-tp22340379p22340379.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: wicket generating its code for href
strange, create a quickstart and attach it to a jira issue -igor On Wed, Mar 4, 2009 at 2:00 PM, miro miroconn...@yahoo.com wrote: no i did not use wicket:link . igor.vaynberg wrote: that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340387.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: wicket generating its code for href
i am using wicket 1.3.5. Is it fixed in newer versions ? igor.vaynberg wrote: strange, create a quickstart and attach it to a jira issue -igor On Wed, Mar 4, 2009 at 2:00 PM, miro miroconn...@yahoo.com wrote: no i did not use wicket:link . igor.vaynberg wrote: that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340387.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340609.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: Uppercasing inputs
Cemal, I think I have to respectfully disagree with you here. I describe what I feel is a better solution, and a little bit of why in this blog post from a few months ago: http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/ Basically, doing it the way you suggested isn't reusable across many components - you have to create overridden variants of each type of input. Also, a converter (or more specifically, an implementation of IConverter) is supposed to be for transforming a type of object to a string usable in the browser / form post / etc, as it's javadoc mentions. Anyway, as the saying goes there are many ways to skin a cat - although the saying isn't that great, I think it applies - there are multiple ways of accomplishing the same thing. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 12:04 PM, jWeekend jweekend_for...@cabouge.comwrote: Leszek, ... or, probably the most Wicket-way of doing this is to make a TextField subclass that overrides getConverter to return your special IConverter implementation which performs the capitalisation in its convertToObject. Regards - Cemal http://jWeekend.com jWeekend Leszek Gawron-2 wrote: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22335650.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 generating its code for href
Since we don't know what the issue is, it is likely not fixed in newer versions. However, if you create a quickstart that demonstrates this behavior - as Igor mentioned - then you can open a JIRA issue. Of course, you could also test that quickstart easily with newer versions. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 4:10 PM, miro miroconn...@yahoo.com wrote: i am using wicket 1.3.5. Is it fixed in newer versions ? igor.vaynberg wrote: strange, create a quickstart and attach it to a jira issue -igor On Wed, Mar 4, 2009 at 2:00 PM, miro miroconn...@yahoo.com wrote: no i did not use wicket:link . igor.vaynberg wrote: that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340387.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340609.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 generating its code for href
attached is the image http://www.nabble.com/file/p22340865/wicket-problem.jpeg Jeremy Thomerson-5 wrote: Since we don't know what the issue is, it is likely not fixed in newer versions. However, if you create a quickstart that demonstrates this behavior - as Igor mentioned - then you can open a JIRA issue. Of course, you could also test that quickstart easily with newer versions. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 4:10 PM, miro miroconn...@yahoo.com wrote: i am using wicket 1.3.5. Is it fixed in newer versions ? igor.vaynberg wrote: strange, create a quickstart and attach it to a jira issue -igor On Wed, Mar 4, 2009 at 2:00 PM, miro miroconn...@yahoo.com wrote: no i did not use wicket:link . igor.vaynberg wrote: that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340387.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340609.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 -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340865.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 generating its code for href
http://www.jeremythomerson.com/blog/2008/11/17/wicket-quickstart-tutorial/ On Wed, Mar 4, 2009 at 4:23 PM, miro miroconn...@yahoo.com wrote: attached is the image http://www.nabble.com/file/p22340865/wicket-problem.jpeg Jeremy Thomerson-5 wrote: Since we don't know what the issue is, it is likely not fixed in newer versions. However, if you create a quickstart that demonstrates this behavior - as Igor mentioned - then you can open a JIRA issue. Of course, you could also test that quickstart easily with newer versions. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 4:10 PM, miro miroconn...@yahoo.com wrote: i am using wicket 1.3.5. Is it fixed in newer versions ? igor.vaynberg wrote: strange, create a quickstart and attach it to a jira issue -igor On Wed, Mar 4, 2009 at 2:00 PM, miro miroconn...@yahoo.com wrote: no i did not use wicket:link . igor.vaynberg wrote: that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340387.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340609.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 -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340865.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 -- Jeremy Thomerson http://www.wickettraining.com
Re: wicket generating its code for href
You'll need to generate, test if its still broken, then attach the quickstart as Jeremy says. But what perplexes me more is how come you can't type your messages into an email? These messages are archived online so someone else with the same issue could find the issues easier if it was in the message and not in a screenshot of your text editor with the message typed into it. Steve On 04/03/2009, at 10:23 PM, miro wrote: attached is the image http://www.nabble.com/file/p22340865/wicket-problem.jpeg Jeremy Thomerson-5 wrote: Since we don't know what the issue is, it is likely not fixed in newer versions. However, if you create a quickstart that demonstrates this behavior - as Igor mentioned - then you can open a JIRA issue. Of course, you could also test that quickstart easily with newer versions. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 4:10 PM, miro miroconn...@yahoo.com wrote: i am using wicket 1.3.5. Is it fixed in newer versions ? igor.vaynberg wrote: strange, create a quickstart and attach it to a jira issue -igor On Wed, Mar 4, 2009 at 2:00 PM, miro miroconn...@yahoo.com wrote: no i did not use wicket:link . igor.vaynberg wrote: that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340387.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340609.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 -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340865.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: Wicket Quickstart Installation Guide for Beginners
i think somewhere off the main page should be fine. it is a nice addition to the wiki, we might even have to make this a faq and link to it off our website :) -igor On Wed, Mar 4, 2009 at 1:15 PM, Dane Laverty danelave...@chemeketa.edu wrote: Great. I've finished putting the pictures into the document. Is there a place on the wiki where I should locate the page? Dane -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Wednesday, March 04, 2009 10:55 AM To: users@wicket.apache.org Subject: Re: Wicket Quickstart Installation Guide for Beginners they are attached -igor On Wed, Mar 4, 2009 at 10:48 AM, Dane Laverty danelave...@chemeketa.edu wrote: Alright Igor, that's all of them. Thanks for everyone's help with this. - 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: Uppercasing inputs
Jeremy, I sensed you were uncomfortable with my most Wicket-way suggestion when I read http://www.nabble.com/RE%3A-Uppercasing-inputs-p22338461.html your previous post on this thread stating that the model doing the transformation work was on the right track; it is not unusual that more than one design can satisfy a given requirement. Do you like the idea of a model being responsible for conversion of users' textual input? Your article illustrates the use of nested models nicely but on this occasion I would probably go with http://www.nabble.com/Re%3A-Uppercasing-inputs-p22332471.html Adriano's idea for a client side, instant gratification, solution, and a custom text field with a converter if the conversion can happen later, on the server. Regards - Cemal http://jWeekend.com jWeekend Jeremy Thomerson-5 wrote: Cemal, I think I have to respectfully disagree with you here. I describe what I feel is a better solution, and a little bit of why in this blog post from a few months ago: http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/ Basically, doing it the way you suggested isn't reusable across many components - you have to create overridden variants of each type of input. Also, a converter (or more specifically, an implementation of IConverter) is supposed to be for transforming a type of object to a string usable in the browser / form post / etc, as it's javadoc mentions. Anyway, as the saying goes there are many ways to skin a cat - although the saying isn't that great, I think it applies - there are multiple ways of accomplishing the same thing. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 12:04 PM, jWeekend jweekend_for...@cabouge.comwrote: Leszek, ... or, probably the most Wicket-way of doing this is to make a TextField subclass that overrides getConverter to return your special IConverter implementation which performs the capitalisation in its convertToObject. Regards - Cemal http://jWeekend.com jWeekend Leszek Gawron-2 wrote: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22335650.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 -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22341681.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: Question re: style and variation
What I'm trying to do at the moment (and the purpose of starting this thread) is creating custom form fields, that have different types of HTML depending on the variant. So I could do new LabelledTextField(banana) { public String getVariation() { return complex; } } new LabelledTextField(banana) { public String getVariation() { return basic; } } I need these to work in conjunction with style which is driven by the users session. This handles the skin or look n feel of the app, and various branded images. An alternative approach could be: Style = handles just the css filename and images Locale = handles the properties files and images Variant = handles the HTML files Not all resources are created equal. Brill Pappin wrote: For my own edification, I missed the thread on style. what exactly is the style that is different from the variation? I guess for Locale, it *does* use the double underscores when you have a placeholder as in the case of a country only. I think its a familiar model and using it for another feature would not be so bad (although I admin, it's ugly)... I'd be very cautious about what other chars you use as delimiters though. - Brill -- View this message in context: http://www.nabble.com/Question-re%3A-style-and-variation-tp22302526p22341732.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: Uppercasing inputs
pft, you guys! i would go with the simplest! class uppercasetextfield extends textfieldstring { public void updatemodel() { final String str=getconvertedinput(); setdefaultmodelobject((str==null)?null:str.touppercase()); } } done! -igor On Wed, Mar 4, 2009 at 3:07 PM, jWeekend jweekend_for...@cabouge.com wrote: Jeremy, I sensed you were uncomfortable with my most Wicket-way suggestion when I read http://www.nabble.com/RE%3A-Uppercasing-inputs-p22338461.html your previous post on this thread stating that the model doing the transformation work was on the right track; it is not unusual that more than one design can satisfy a given requirement. Do you like the idea of a model being responsible for conversion of users' textual input? Your article illustrates the use of nested models nicely but on this occasion I would probably go with http://www.nabble.com/Re%3A-Uppercasing-inputs-p22332471.html Adriano's idea for a client side, instant gratification, solution, and a custom text field with a converter if the conversion can happen later, on the server. Regards - Cemal http://jWeekend.com jWeekend Jeremy Thomerson-5 wrote: Cemal, I think I have to respectfully disagree with you here. I describe what I feel is a better solution, and a little bit of why in this blog post from a few months ago: http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/ Basically, doing it the way you suggested isn't reusable across many components - you have to create overridden variants of each type of input. Also, a converter (or more specifically, an implementation of IConverter) is supposed to be for transforming a type of object to a string usable in the browser / form post / etc, as it's javadoc mentions. Anyway, as the saying goes there are many ways to skin a cat - although the saying isn't that great, I think it applies - there are multiple ways of accomplishing the same thing. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 12:04 PM, jWeekend jweekend_for...@cabouge.comwrote: Leszek, ... or, probably the most Wicket-way of doing this is to make a TextField subclass that overrides getConverter to return your special IConverter implementation which performs the capitalisation in its convertToObject. Regards - Cemal http://jWeekend.com jWeekend Leszek Gawron-2 wrote: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22335650.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 -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22341681.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: wicket generating its code for href
I found the problem its happening because of getMarkupSettings().setAutomaticLinking(true); i commented that and its working , but still a question what will i loose by commenting that ? Stephen Swinsburg-2 wrote: You'll need to generate, test if its still broken, then attach the quickstart as Jeremy says. But what perplexes me more is how come you can't type your messages into an email? These messages are archived online so someone else with the same issue could find the issues easier if it was in the message and not in a screenshot of your text editor with the message typed into it. Steve On 04/03/2009, at 10:23 PM, miro wrote: attached is the image http://www.nabble.com/file/p22340865/wicket-problem.jpeg Jeremy Thomerson-5 wrote: Since we don't know what the issue is, it is likely not fixed in newer versions. However, if you create a quickstart that demonstrates this behavior - as Igor mentioned - then you can open a JIRA issue. Of course, you could also test that quickstart easily with newer versions. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 4:10 PM, miro miroconn...@yahoo.com wrote: i am using wicket 1.3.5. Is it fixed in newer versions ? igor.vaynberg wrote: strange, create a quickstart and attach it to a jira issue -igor On Wed, Mar 4, 2009 at 2:00 PM, miro miroconn...@yahoo.com wrote: no i did not use wicket:link . igor.vaynberg wrote: that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340387.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340609.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 -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340865.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22341787.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 generating its code for href
considering this is a setting that is disabled by default, the question is: what did you gain by enabling it? -igor On Wed, Mar 4, 2009 at 3:13 PM, miro miroconn...@yahoo.com wrote: I found the problem its happening because of getMarkupSettings().setAutomaticLinking(true); i commented that and its working , but still a question what will i loose by commenting that ? Stephen Swinsburg-2 wrote: You'll need to generate, test if its still broken, then attach the quickstart as Jeremy says. But what perplexes me more is how come you can't type your messages into an email? These messages are archived online so someone else with the same issue could find the issues easier if it was in the message and not in a screenshot of your text editor with the message typed into it. Steve On 04/03/2009, at 10:23 PM, miro wrote: attached is the image http://www.nabble.com/file/p22340865/wicket-problem.jpeg Jeremy Thomerson-5 wrote: Since we don't know what the issue is, it is likely not fixed in newer versions. However, if you create a quickstart that demonstrates this behavior - as Igor mentioned - then you can open a JIRA issue. Of course, you could also test that quickstart easily with newer versions. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 4:10 PM, miro miroconn...@yahoo.com wrote: i am using wicket 1.3.5. Is it fixed in newer versions ? igor.vaynberg wrote: strange, create a quickstart and attach it to a jira issue -igor On Wed, Mar 4, 2009 at 2:00 PM, miro miroconn...@yahoo.com wrote: no i did not use wicket:link . igor.vaynberg wrote: that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340387.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340609.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 -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340865.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22341787.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: Uppercasing inputs
Igor, Nope, not for me (this time). Here's the Javadoc for updateModel: * Updates this components model from the request, it expects that the object is already * converted through the convertInput() call that is called by the validate() method when a form * is being processed. Regards - Cemal http://jWeekend.com jWeekend igor.vaynberg wrote: pft, you guys! i would go with the simplest! class uppercasetextfield extends textfieldstring { public void updatemodel() { final String str=getconvertedinput(); setdefaultmodelobject((str==null)?null:str.touppercase()); } } done! -igor On Wed, Mar 4, 2009 at 3:07 PM, jWeekend jweekend_for...@cabouge.com wrote: Jeremy, I sensed you were uncomfortable with my most Wicket-way suggestion when I read http://www.nabble.com/RE%3A-Uppercasing-inputs-p22338461.html your previous post on this thread stating that the model doing the transformation work was on the right track; it is not unusual that more than one design can satisfy a given requirement. Do you like the idea of a model being responsible for conversion of users' textual input? Your article illustrates the use of nested models nicely but on this occasion I would probably go with http://www.nabble.com/Re%3A-Uppercasing-inputs-p22332471.html Adriano's idea for a client side, instant gratification, solution, and a custom text field with a converter if the conversion can happen later, on the server. Regards - Cemal http://jWeekend.com jWeekend Jeremy Thomerson-5 wrote: Cemal, I think I have to respectfully disagree with you here. I describe what I feel is a better solution, and a little bit of why in this blog post from a few months ago: http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/ Basically, doing it the way you suggested isn't reusable across many components - you have to create overridden variants of each type of input. Also, a converter (or more specifically, an implementation of IConverter) is supposed to be for transforming a type of object to a string usable in the browser / form post / etc, as it's javadoc mentions. Anyway, as the saying goes there are many ways to skin a cat - although the saying isn't that great, I think it applies - there are multiple ways of accomplishing the same thing. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 12:04 PM, jWeekend jweekend_for...@cabouge.comwrote: Leszek, ... or, probably the most Wicket-way of doing this is to make a TextField subclass that overrides getConverter to return your special IConverter implementation which performs the capitalisation in its convertToObject. Regards - Cemal http://jWeekend.com jWeekend Leszek Gawron-2 wrote: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22335650.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 -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22341681.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22341926.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 generating its code for href
I did that for auto linking using wicket:link http://cwiki.apache.org/WICKET/autolink.html igor.vaynberg wrote: considering this is a setting that is disabled by default, the question is: what did you gain by enabling it? -igor On Wed, Mar 4, 2009 at 3:13 PM, miro miroconn...@yahoo.com wrote: I found the problem its happening because of getMarkupSettings().setAutomaticLinking(true); i commented that and its working , but still a question what will i loose by commenting that ? Stephen Swinsburg-2 wrote: You'll need to generate, test if its still broken, then attach the quickstart as Jeremy says. But what perplexes me more is how come you can't type your messages into an email? These messages are archived online so someone else with the same issue could find the issues easier if it was in the message and not in a screenshot of your text editor with the message typed into it. Steve On 04/03/2009, at 10:23 PM, miro wrote: attached is the image http://www.nabble.com/file/p22340865/wicket-problem.jpeg Jeremy Thomerson-5 wrote: Since we don't know what the issue is, it is likely not fixed in newer versions. However, if you create a quickstart that demonstrates this behavior - as Igor mentioned - then you can open a JIRA issue. Of course, you could also test that quickstart easily with newer versions. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 4:10 PM, miro miroconn...@yahoo.com wrote: i am using wicket 1.3.5. Is it fixed in newer versions ? igor.vaynberg wrote: strange, create a quickstart and attach it to a jira issue -igor On Wed, Mar 4, 2009 at 2:00 PM, miro miroconn...@yahoo.com wrote: no i did not use wicket:link . igor.vaynberg wrote: that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340387.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340609.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 -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340865.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22341787.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22342034.html Sent from the Wicket - User
Re: Uppercasing inputs
LOL! Nah - I would just change all the setters on every domain object to be: public void setFoo(String foo) { this.foo = foo == null ? null : foo.toUpperCase(); } Or, maybe I'd use AOP and build an aspect that could automatically intercept calls to com.mydomain setters that take a single string argument and do the upper-casing there! It's makes me smile to think of how many ways a single thing can be done. Leszek - you should now definitely have plenty of choices. Pick which feels best / most comfortable for you! On Wed, Mar 4, 2009 at 5:22 PM, jWeekend jweekend_for...@cabouge.comwrote: Igor, Nope, not for me (this time). Here's the Javadoc for updateModel: * Updates this components model from the request, it expects that the object is already * converted through the convertInput() call that is called by the validate() method when a form * is being processed. Regards - Cemal http://jWeekend.com jWeekend igor.vaynberg wrote: pft, you guys! i would go with the simplest! class uppercasetextfield extends textfieldstring { public void updatemodel() { final String str=getconvertedinput(); setdefaultmodelobject((str==null)?null:str.touppercase()); } } done! -igor On Wed, Mar 4, 2009 at 3:07 PM, jWeekend jweekend_for...@cabouge.com wrote: Jeremy, I sensed you were uncomfortable with my most Wicket-way suggestion when I read http://www.nabble.com/RE%3A-Uppercasing-inputs-p22338461.htmlyour previous post on this thread stating that the model doing the transformation work was on the right track; it is not unusual that more than one design can satisfy a given requirement. Do you like the idea of a model being responsible for conversion of users' textual input? Your article illustrates the use of nested models nicely but on this occasion I would probably go with http://www.nabble.com/Re%3A-Uppercasing-inputs-p22332471.html Adriano's idea for a client side, instant gratification, solution, and a custom text field with a converter if the conversion can happen later, on the server. Regards - Cemal http://jWeekend.com jWeekend Jeremy Thomerson-5 wrote: Cemal, I think I have to respectfully disagree with you here. I describe what I feel is a better solution, and a little bit of why in this blog post from a few months ago: http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/ Basically, doing it the way you suggested isn't reusable across many components - you have to create overridden variants of each type of input. Also, a converter (or more specifically, an implementation of IConverter) is supposed to be for transforming a type of object to a string usable in the browser / form post / etc, as it's javadoc mentions. Anyway, as the saying goes there are many ways to skin a cat - although the saying isn't that great, I think it applies - there are multiple ways of accomplishing the same thing. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 12:04 PM, jWeekend jweekend_for...@cabouge.comwrote: Leszek, ... or, probably the most Wicket-way of doing this is to make a TextField subclass that overrides getConverter to return your special IConverter implementation which performs the capitalisation in its convertToObject. Regards - Cemal http://jWeekend.com jWeekend Leszek Gawron-2 wrote: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22335650.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 -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22341681.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:
Re: wicket generating its code for href
Well, since that page says to convert **all** and you just figured out that you don't actually want **all**, you should use wicket:link or link components. On Wed, Mar 4, 2009 at 5:28 PM, miro miroconn...@yahoo.com wrote: I did that for auto linking using wicket:link http://cwiki.apache.org/WICKET/autolink.html igor.vaynberg wrote: considering this is a setting that is disabled by default, the question is: what did you gain by enabling it? -igor On Wed, Mar 4, 2009 at 3:13 PM, miro miroconn...@yahoo.com wrote: I found the problem its happening because of getMarkupSettings().setAutomaticLinking(true); i commented that and its working , but still a question what will i loose by commenting that ? Stephen Swinsburg-2 wrote: You'll need to generate, test if its still broken, then attach the quickstart as Jeremy says. But what perplexes me more is how come you can't type your messages into an email? These messages are archived online so someone else with the same issue could find the issues easier if it was in the message and not in a screenshot of your text editor with the message typed into it. Steve On 04/03/2009, at 10:23 PM, miro wrote: attached is the image http://www.nabble.com/file/p22340865/wicket-problem.jpeg Jeremy Thomerson-5 wrote: Since we don't know what the issue is, it is likely not fixed in newer versions. However, if you create a quickstart that demonstrates this behavior - as Igor mentioned - then you can open a JIRA issue. Of course, you could also test that quickstart easily with newer versions. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 4:10 PM, miro miroconn...@yahoo.com wrote: i am using wicket 1.3.5. Is it fixed in newer versions ? igor.vaynberg wrote: strange, create a quickstart and attach it to a jira issue -igor On Wed, Mar 4, 2009 at 2:00 PM, miro miroconn...@yahoo.com wrote: no i did not use wicket:link . igor.vaynberg wrote: that markup must be inside wicket:link, move it outside -igor On Wed, Mar 4, 2009 at 1:41 PM, miro miroconn...@yahoo.com wrote: I am trying to use jqery tabs but because wicket inserts its own code for href and jqery tabs are not working http://www.nabble.com/file/p22340018/wicket-problem.gif Attached is the Image -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340018.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340387.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340609.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 -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22340865.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/wicket-generating-its-code-for-href-tp22340018p22341787.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
Re: Uppercasing inputs
you can create a convertermodel that takes an instance of iconverter and uses that to convert the values, then you can subclass textfield, override initmodel() and wrap any model the textfield had with this one. that way everyone is happy! -igor On Wed, Mar 4, 2009 at 3:29 PM, Jeremy Thomerson jer...@wickettraining.com wrote: LOL! Nah - I would just change all the setters on every domain object to be: public void setFoo(String foo) { this.foo = foo == null ? null : foo.toUpperCase(); } Or, maybe I'd use AOP and build an aspect that could automatically intercept calls to com.mydomain setters that take a single string argument and do the upper-casing there! It's makes me smile to think of how many ways a single thing can be done. Leszek - you should now definitely have plenty of choices. Pick which feels best / most comfortable for you! On Wed, Mar 4, 2009 at 5:22 PM, jWeekend jweekend_for...@cabouge.comwrote: Igor, Nope, not for me (this time). Here's the Javadoc for updateModel: * Updates this components model from the request, it expects that the object is already * converted through the convertInput() call that is called by the validate() method when a form * is being processed. Regards - Cemal http://jWeekend.com jWeekend igor.vaynberg wrote: pft, you guys! i would go with the simplest! class uppercasetextfield extends textfieldstring { public void updatemodel() { final String str=getconvertedinput(); setdefaultmodelobject((str==null)?null:str.touppercase()); } } done! -igor On Wed, Mar 4, 2009 at 3:07 PM, jWeekend jweekend_for...@cabouge.com wrote: Jeremy, I sensed you were uncomfortable with my most Wicket-way suggestion when I read http://www.nabble.com/RE%3A-Uppercasing-inputs-p22338461.htmlyour previous post on this thread stating that the model doing the transformation work was on the right track; it is not unusual that more than one design can satisfy a given requirement. Do you like the idea of a model being responsible for conversion of users' textual input? Your article illustrates the use of nested models nicely but on this occasion I would probably go with http://www.nabble.com/Re%3A-Uppercasing-inputs-p22332471.html Adriano's idea for a client side, instant gratification, solution, and a custom text field with a converter if the conversion can happen later, on the server. Regards - Cemal http://jWeekend.com jWeekend Jeremy Thomerson-5 wrote: Cemal, I think I have to respectfully disagree with you here. I describe what I feel is a better solution, and a little bit of why in this blog post from a few months ago: http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/ Basically, doing it the way you suggested isn't reusable across many components - you have to create overridden variants of each type of input. Also, a converter (or more specifically, an implementation of IConverter) is supposed to be for transforming a type of object to a string usable in the browser / form post / etc, as it's javadoc mentions. Anyway, as the saying goes there are many ways to skin a cat - although the saying isn't that great, I think it applies - there are multiple ways of accomplishing the same thing. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 12:04 PM, jWeekend jweekend_for...@cabouge.comwrote: Leszek, ... or, probably the most Wicket-way of doing this is to make a TextField subclass that overrides getConverter to return your special IConverter implementation which performs the capitalisation in its convertToObject. Regards - Cemal http://jWeekend.com jWeekend Leszek Gawron-2 wrote: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Uppercasing-inputs-tp22332360p22335650.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: Uppercasing inputs
Igor, Still no ;-) A key point is that conversion should happen before validation so you can check if the transformed data (not just the plain text) is valid. Otherwise, what is your validation good for? Regards - Cemal http://jWeekend.com jWeekend PS You are still going to help when I get stuck, aren't you? PPS Is PTF pause for thought, or were you swearing? igor.vaynberg wrote: you can create a convertermodel that takes an instance of iconverter and uses that to convert the values, then you can subclass textfield, override initmodel() and wrap any model the textfield had with this one. that way everyone is happy! -igor On Wed, Mar 4, 2009 at 3:29 PM, Jeremy Thomerson jer...@wickettraining.com wrote: LOL! Nah - I would just change all the setters on every domain object to be: public void setFoo(String foo) { this.foo = foo == null ? null : foo.toUpperCase(); } Or, maybe I'd use AOP and build an aspect that could automatically intercept calls to com.mydomain setters that take a single string argument and do the upper-casing there! It's makes me smile to think of how many ways a single thing can be done. Leszek - you should now definitely have plenty of choices. Pick which feels best / most comfortable for you! On Wed, Mar 4, 2009 at 5:22 PM, jWeekend jweekend_for...@cabouge.comwrote: Igor, Nope, not for me (this time). Here's the Javadoc for updateModel: * Updates this components model from the request, it expects that the object is already * converted through the convertInput() call that is called by the validate() method when a form * is being processed. Regards - Cemal http://jWeekend.com jWeekend igor.vaynberg wrote: pft, you guys! i would go with the simplest! class uppercasetextfield extends textfieldstring { public void updatemodel() { final String str=getconvertedinput(); setdefaultmodelobject((str==null)?null:str.touppercase()); } } done! -igor On Wed, Mar 4, 2009 at 3:07 PM, jWeekend jweekend_for...@cabouge.com wrote: Jeremy, I sensed you were uncomfortable with my most Wicket-way suggestion when I read http://www.nabble.com/RE%3A-Uppercasing-inputs-p22338461.htmlyour previous post on this thread stating that the model doing the transformation work was on the right track; it is not unusual that more than one design can satisfy a given requirement. Do you like the idea of a model being responsible for conversion of users' textual input? Your article illustrates the use of nested models nicely but on this occasion I would probably go with http://www.nabble.com/Re%3A-Uppercasing-inputs-p22332471.html Adriano's idea for a client side, instant gratification, solution, and a custom text field with a converter if the conversion can happen later, on the server. Regards - Cemal http://jWeekend.com jWeekend Jeremy Thomerson-5 wrote: Cemal, I think I have to respectfully disagree with you here. I describe what I feel is a better solution, and a little bit of why in this blog post from a few months ago: http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/ Basically, doing it the way you suggested isn't reusable across many components - you have to create overridden variants of each type of input. Also, a converter (or more specifically, an implementation of IConverter) is supposed to be for transforming a type of object to a string usable in the browser / form post / etc, as it's javadoc mentions. Anyway, as the saying goes there are many ways to skin a cat - although the saying isn't that great, I think it applies - there are multiple ways of accomplishing the same thing. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 12:04 PM, jWeekend jweekend_for...@cabouge.comwrote: Leszek, ... or, probably the most Wicket-way of doing this is to make a TextField subclass that overrides getConverter to return your special IConverter implementation which performs the capitalisation in its convertToObject. Regards - Cemal http://jWeekend.com jWeekend Leszek Gawron-2 wrote: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my regards -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail:
Re: Uppercasing inputs
sigh, i was being sarcastic. i frankensteined both yours and jeremy's ideas together into a solution that used both and was needlessly complex. -igor On Wed, Mar 4, 2009 at 3:59 PM, jWeekend jweekend_for...@cabouge.com wrote: Igor, Still no ;-) A key point is that conversion should happen before validation so you can check if the transformed data (not just the plain text) is valid. Otherwise, what is your validation good for? Regards - Cemal http://jWeekend.com jWeekend PS You are still going to help when I get stuck, aren't you? PPS Is PTF pause for thought, or were you swearing? igor.vaynberg wrote: you can create a convertermodel that takes an instance of iconverter and uses that to convert the values, then you can subclass textfield, override initmodel() and wrap any model the textfield had with this one. that way everyone is happy! -igor On Wed, Mar 4, 2009 at 3:29 PM, Jeremy Thomerson jer...@wickettraining.com wrote: LOL! Nah - I would just change all the setters on every domain object to be: public void setFoo(String foo) { this.foo = foo == null ? null : foo.toUpperCase(); } Or, maybe I'd use AOP and build an aspect that could automatically intercept calls to com.mydomain setters that take a single string argument and do the upper-casing there! It's makes me smile to think of how many ways a single thing can be done. Leszek - you should now definitely have plenty of choices. Pick which feels best / most comfortable for you! On Wed, Mar 4, 2009 at 5:22 PM, jWeekend jweekend_for...@cabouge.comwrote: Igor, Nope, not for me (this time). Here's the Javadoc for updateModel: * Updates this components model from the request, it expects that the object is already * converted through the convertInput() call that is called by the validate() method when a form * is being processed. Regards - Cemal http://jWeekend.com jWeekend igor.vaynberg wrote: pft, you guys! i would go with the simplest! class uppercasetextfield extends textfieldstring { public void updatemodel() { final String str=getconvertedinput(); setdefaultmodelobject((str==null)?null:str.touppercase()); } } done! -igor On Wed, Mar 4, 2009 at 3:07 PM, jWeekend jweekend_for...@cabouge.com wrote: Jeremy, I sensed you were uncomfortable with my most Wicket-way suggestion when I read http://www.nabble.com/RE%3A-Uppercasing-inputs-p22338461.htmlyour previous post on this thread stating that the model doing the transformation work was on the right track; it is not unusual that more than one design can satisfy a given requirement. Do you like the idea of a model being responsible for conversion of users' textual input? Your article illustrates the use of nested models nicely but on this occasion I would probably go with http://www.nabble.com/Re%3A-Uppercasing-inputs-p22332471.html Adriano's idea for a client side, instant gratification, solution, and a custom text field with a converter if the conversion can happen later, on the server. Regards - Cemal http://jWeekend.com jWeekend Jeremy Thomerson-5 wrote: Cemal, I think I have to respectfully disagree with you here. I describe what I feel is a better solution, and a little bit of why in this blog post from a few months ago: http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/ Basically, doing it the way you suggested isn't reusable across many components - you have to create overridden variants of each type of input. Also, a converter (or more specifically, an implementation of IConverter) is supposed to be for transforming a type of object to a string usable in the browser / form post / etc, as it's javadoc mentions. Anyway, as the saying goes there are many ways to skin a cat - although the saying isn't that great, I think it applies - there are multiple ways of accomplishing the same thing. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 12:04 PM, jWeekend jweekend_for...@cabouge.comwrote: Leszek, ... or, probably the most Wicket-way of doing this is to make a TextField subclass that overrides getConverter to return your special IConverter implementation which performs the capitalisation in its convertToObject. Regards - Cemal http://jWeekend.com jWeekend Leszek Gawron-2 wrote: Hello, one of my customers has this weird requirement that all data should be input/shown uppercase. I can easily add input { text-transform: uppercase; } to my css rules, but this does not change the fact that data written into database will still be case sensitive. How can I create a behavior for TextField so that the dat is uppercased before being written to the model? my
Re: Uppercasing inputs
Igor, ... hence the ;-) The point is worth making for others who come across this thread, and, just as much, in response to some of the other solutions suggested. I don't think there's any more to be milked out of this thread. Regards - Cemal http://jWeekend.com jWeekend igor.vaynberg wrote: sigh, i was being sarcastic. i frankensteined both yours and jeremy's ideas together into a solution that used both and was needlessly complex. -igor On Wed, Mar 4, 2009 at 3:59 PM, jWeekend jweekend_for...@cabouge.com wrote: Igor, Still no ;-) A key point is that conversion should happen before validation so you can check if the transformed data (not just the plain text) is valid. Otherwise, what is your validation good for? Regards - Cemal http://jWeekend.com jWeekend PS You are still going to help when I get stuck, aren't you? PPS Is PTF pause for thought, or were you swearing? igor.vaynberg wrote: you can create a convertermodel that takes an instance of iconverter and uses that to convert the values, then you can subclass textfield, override initmodel() and wrap any model the textfield had with this one. that way everyone is happy! -igor On Wed, Mar 4, 2009 at 3:29 PM, Jeremy Thomerson jer...@wickettraining.com wrote: LOL! Nah - I would just change all the setters on every domain object to be: public void setFoo(String foo) { this.foo = foo == null ? null : foo.toUpperCase(); } Or, maybe I'd use AOP and build an aspect that could automatically intercept calls to com.mydomain setters that take a single string argument and do the upper-casing there! It's makes me smile to think of how many ways a single thing can be done. Leszek - you should now definitely have plenty of choices. Pick which feels best / most comfortable for you! On Wed, Mar 4, 2009 at 5:22 PM, jWeekend jweekend_for...@cabouge.comwrote: Igor, Nope, not for me (this time). Here's the Javadoc for updateModel: * Updates this components model from the request, it expects that the object is already * converted through the convertInput() call that is called by the validate() method when a form * is being processed. Regards - Cemal http://jWeekend.com jWeekend igor.vaynberg wrote: pft, you guys! i would go with the simplest! class uppercasetextfield extends textfieldstring { public void updatemodel() { final String str=getconvertedinput(); setdefaultmodelobject((str==null)?null:str.touppercase()); } } done! -igor On Wed, Mar 4, 2009 at 3:07 PM, jWeekend jweekend_for...@cabouge.com wrote: Jeremy, I sensed you were uncomfortable with my most Wicket-way suggestion when I read http://www.nabble.com/RE%3A-Uppercasing-inputs-p22338461.htmlyour previous post on this thread stating that the model doing the transformation work was on the right track; it is not unusual that more than one design can satisfy a given requirement. Do you like the idea of a model being responsible for conversion of users' textual input? Your article illustrates the use of nested models nicely but on this occasion I would probably go with http://www.nabble.com/Re%3A-Uppercasing-inputs-p22332471.html Adriano's idea for a client side, instant gratification, solution, and a custom text field with a converter if the conversion can happen later, on the server. Regards - Cemal http://jWeekend.com jWeekend Jeremy Thomerson-5 wrote: Cemal, I think I have to respectfully disagree with you here. I describe what I feel is a better solution, and a little bit of why in this blog post from a few months ago: http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/ Basically, doing it the way you suggested isn't reusable across many components - you have to create overridden variants of each type of input. Also, a converter (or more specifically, an implementation of IConverter) is supposed to be for transforming a type of object to a string usable in the browser / form post / etc, as it's javadoc mentions. Anyway, as the saying goes there are many ways to skin a cat - although the saying isn't that great, I think it applies - there are multiple ways of accomplishing the same thing. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 4, 2009 at 12:04 PM, jWeekend jweekend_for...@cabouge.comwrote: Leszek, ... or, probably the most Wicket-way of doing this is to make a TextField subclass that overrides getConverter to return your special IConverter implementation which performs the capitalisation in its convertToObject. Regards - Cemal http://jWeekend.com jWeekend Leszek Gawron-2 wrote: Hello, one of my customers has this weird requirement that all data should be input/shown
using tabindex attribute in a radio input
Hi, It's a bit complex but im using the wicket ajax RadioGroup to display/hide another form. That part works and when the radio is selected the form is displayed. However the input textfields all have tabindex attributes set (thsi allows a user to tab to the next input field). However if the tabindex is added to a input type=radio tabindex=5 wicket:id=myradio/ the tabindex doesn't seem to be there. I tried view source of the HTML but since this form is in a webmarkupcontainer that is normally not visible, it doesn't show up. Initially I had the tabindex in the HTML just as the textfields, and then I tried adding the attribute in java both as onComponentTag and SimpleAttributeModifier but it just doesn't display any help is greatly appreciated! Thanks, Jason -- View this message in context: http://www.nabble.com/using-tabindex-attribute-in-a-radio-input-tp2234p2234.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: using tabindex attribute in a radio input
I just happened to google https://issues.apache.org/jira/browse/WICKET-2031 as someone else filed the same issue. However I am using RadioGroup and it's still not working... if someone has a simple example of this, let me know! Thanks, Jason novotny wrote: Hi, It's a bit complex but im using the wicket ajax RadioGroup to display/hide another form. That part works and when the radio is selected the form is displayed. However the input textfields all have tabindex attributes set (thsi allows a user to tab to the next input field). However if the tabindex is added to a input type=radio tabindex=5 wicket:id=myradio/ the tabindex doesn't seem to be there. I tried view source of the HTML but since this form is in a webmarkupcontainer that is normally not visible, it doesn't show up. Initially I had the tabindex in the HTML just as the textfields, and then I tried adding the attribute in java both as onComponentTag and SimpleAttributeModifier but it just doesn't display any help is greatly appreciated! Thanks, Jason -- View this message in context: http://www.nabble.com/using-tabindex-attribute-in-a-radio-input-tp2234p22343371.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
Forward to a different page, but same URL
Is it possible to render a different pageClassB when pageClassA is called, while maintaining the same URL? Using redirectToInterceptPage will send and redirect to a non-bookmarkable session url, and thus isn't an option. So is it possible to render/switch from different .html files fom the same PageClass? In an action (MVC push) webframework, you could simply specify and forward to a different view file without any HTTP redirect and within the same HTTP request, but how can you do this in Wicket while keeping the same URL? -- View this message in context: http://www.nabble.com/Forward-to-a-different-page%2C-but-same-URL-tp22343544p22343544.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: Forward to a different page, but same URL
redirect to intercept page doesn't have to go to a non-bookmarkable page... just redirect to Page.class rather than new Page(). On Wed, Mar 4, 2009 at 7:32 PM, Prag pragprog...@gmail.com wrote: Is it possible to render a different pageClassB when pageClassA is called, while maintaining the same URL? Using redirectToInterceptPage will send and redirect to a non-bookmarkable session url, and thus isn't an option. So is it possible to render/switch from different .html files fom the same PageClass? In an action (MVC push) webframework, you could simply specify and forward to a different view file without any HTTP redirect and within the same HTTP request, but how can you do this in Wicket while keeping the same URL? -- View this message in context: http://www.nabble.com/Forward-to-a-different-page%2C-but-same-URL-tp22343544p22343544.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 -- Jeremy Thomerson http://www.wickettraining.com
Re: Uppercasing inputs
On Wed, Mar 4, 2009 at 6:29 PM, Jeremy Thomerson jer...@wickettraining.com wrote: LOL! Nah - I would just change all the setters on every domain object to be: public void setFoo(String foo) { this.foo = foo == null ? null : foo.toUpperCase(); } Or, maybe I'd use AOP and build an aspect that could automatically intercept calls to com.mydomain setters that take a single string argument and do the upper-casing there! Instead of doing it on *all* single-string argument methods, you could annotate the parameters: public void setFoo(@Upcase String foo) { this.foo = foo; } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forward to a different page, but same URL
I fixed it using setResponsePage(). I though that that would do a redirect (what I didn't wanted), but it didn't, so it's solved :) Jeremy Thomerson-5 wrote: redirect to intercept page doesn't have to go to a non-bookmarkable page... just redirect to Page.class rather than new Page(). On Wed, Mar 4, 2009 at 7:32 PM, Prag pragprog...@gmail.com wrote: Is it possible to render a different pageClassB when pageClassA is called, while maintaining the same URL? Using redirectToInterceptPage will send and redirect to a non-bookmarkable session url, and thus isn't an option. So is it possible to render/switch from different .html files fom the same PageClass? In an action (MVC push) webframework, you could simply specify and forward to a different view file without any HTTP redirect and within the same HTTP request, but how can you do this in Wicket while keeping the same URL? -- View this message in context: http://www.nabble.com/Forward-to-a-different-page%2C-but-same-URL-tp22343544p22343544.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 -- Jeremy Thomerson http://www.wickettraining.com -- View this message in context: http://www.nabble.com/Forward-to-a-different-page%2C-but-same-URL-tp22343544p22343847.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
how to save validated fields in a form even if entire form still needs work
Hi, I have a form with 8 required fields. I'd like it if even if they just fill out 4 of the fields, I can go ahead and persist those field answers to the database and still remind them to fill out the remaining fields. What is the hook method that I override to persist the valid fields? Thanks, Jason -- View this message in context: http://www.nabble.com/how-to-save-%22validated%22-fields-in-a-form-even-if-entire-form-still-needs-work-tp22343848p22343848.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: how to save validated fields in a form even if entire form still needs work
I haven't tried it and don't have the code in front of me, but you might be able to call setDefaultFormProcessing(false) on your submit button, and then in your submit code, call the validate method manually. If it succeeds, persist and move on, if not, persist and stay on page, allowing errors to appear. Note that this will obviously give you some challenges - validation makes sure it's safe to go into the DB. If it's supposed to be a numeric field and they but in br549, then it won't ever get converted and set on your model, so that won't be a problem. But if they put in a string that's twice as long as your DB column, and you persist despite validation, you will get an error (or however your system handles it). On Wed, Mar 4, 2009 at 8:01 PM, novotny novo...@gridsphere.org wrote: Hi, I have a form with 8 required fields. I'd like it if even if they just fill out 4 of the fields, I can go ahead and persist those field answers to the database and still remind them to fill out the remaining fields. What is the hook method that I override to persist the valid fields? Thanks, Jason -- View this message in context: http://www.nabble.com/how-to-save-%22validated%22-fields-in-a-form-even-if-entire-form-still-needs-work-tp22343848p22343848.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 -- Jeremy Thomerson http://www.wickettraining.com
Re: Trying to stay stateless but having some issues
Jeremy Thomerson-5 wrote: The continuation URL looks to only be stored if you arrived at the page by a call to PageMap#redirectToInterceptPage, which is called by RestartResponseAtInterceptPage exception. It's also stored in the session (or rather, the PageMap, which is stored in the session). So, yes, you would need a session to store that info into. A suggestion might be to add the return URL to the sign in form as a hidden field, which you could redirect to in your onSubmit by throwing new RedirectException(urlFromForm). That doesn't sound like the cleanest solution. I'd have to think more to come up with something else. Thank you for the reply. I guess I'm a little surprised to run into this as it seems like this would be a pretty common scenario for an application. I'm certain willing to consider any approach. If forced, I can probably live with the long, non-bookmarkable url after this login operation if I have to. -- View this message in context: http://www.nabble.com/Trying-to-stay-stateless-but-having-some-issues-tp22323101p22344092.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: using tabindex attribute in a radio input
the group itself wont show tabindex, you have to add it to the radio components you add to the group. -igor On Wed, Mar 4, 2009 at 5:17 PM, novotny novo...@gridsphere.org wrote: I just happened to google https://issues.apache.org/jira/browse/WICKET-2031 as someone else filed the same issue. However I am using RadioGroup and it's still not working... if someone has a simple example of this, let me know! Thanks, Jason novotny wrote: Hi, It's a bit complex but im using the wicket ajax RadioGroup to display/hide another form. That part works and when the radio is selected the form is displayed. However the input textfields all have tabindex attributes set (thsi allows a user to tab to the next input field). However if the tabindex is added to a input type=radio tabindex=5 wicket:id=myradio/ the tabindex doesn't seem to be there. I tried view source of the HTML but since this form is in a webmarkupcontainer that is normally not visible, it doesn't show up. Initially I had the tabindex in the HTML just as the textfields, and then I tried adding the attribute in java both as onComponentTag and SimpleAttributeModifier but it just doesn't display any help is greatly appreciated! Thanks, Jason -- View this message in context: http://www.nabble.com/using-tabindex-attribute-in-a-radio-input-tp2234p22343371.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 save validated fields in a form even if entire form still needs work
override form.onerror() and retrieve user-entered values by visiting your formcomponents and calling getinput(). -igor On Wed, Mar 4, 2009 at 6:01 PM, novotny novo...@gridsphere.org wrote: Hi, I have a form with 8 required fields. I'd like it if even if they just fill out 4 of the fields, I can go ahead and persist those field answers to the database and still remind them to fill out the remaining fields. What is the hook method that I override to persist the valid fields? Thanks, Jason -- View this message in context: http://www.nabble.com/how-to-save-%22validated%22-fields-in-a-form-even-if-entire-form-still-needs-work-tp22343848p22343848.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: Tabbed Panel problem
On Tue, 03 Mar 2009, Ashis wrote: I am using Ajax Tabbed Panel.I have 4 tabs.First tab contains login form and javascript to display images. When i run the project all works fine, javascript displaying images also gets load but if i click the first tab again the javascript displaying images does not gets load and blank page is displayed in browser How do you include the javascript, and how do you invoke it? Please suggest me some help See Javascript console of Firefox and Ajax debug console of Wicket. Best wishes, Timo - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to save validated fields in a form even if entire form still needs work
Take a look at IFormValidator. taha On Thu, Mar 5, 2009 at 7:31 AM, novotny novo...@gridsphere.org wrote: Hi, I have a form with 8 required fields. I'd like it if even if they just fill out 4 of the fields, I can go ahead and persist those field answers to the database and still remind them to fill out the remaining fields. What is the hook method that I override to persist the valid fields? Thanks, Jason -- View this message in context: http://www.nabble.com/how-to-save-%22validated%22-fields-in-a-form-even-if-entire-form-still-needs-work-tp22343848p22343848.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