Re: Need to minimize the names using Ajax
Just a slight addition, there is a wonderful example amongst the wicket examples on the site. They even limit the number of choices to ten. Linda Igor Vaynberg wrote: see AutoCompleteTextField -igor On Tue, Mar 10, 2009 at 8:14 AM, newbie_to_wicket sm.shaf...@gmail.comwrote: Hi All, I am using wicket framework. I have to achieve the functionality as I shown in the below image. http://www.nabble.com/file/p22437770/names.jpeg Whenever I pressed R in the textfield box then it should displays the names which contans R as the first letter. Thanks for your help J -- View this message in context: http://www.nabble.com/Need-to-minimize-the-names-using-Ajax-tp22437770p22437770.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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.10/1994 - Release Date: 03/10/09 19:51:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DropDownChoice NO_SELECTION_VALUE static field
Hello! I have an issue with the DropDownChoice (wicket 1.3.4). Lets say I do this: ListOption _options = getOptions(); someRenderer = new ChoiceRenderer() { ... } DropDownChoice _ddc = new DropDownChoice(dropDown, new Model((Serializable) _option),options, someRenderer); The Option class looks like this: public class Option { private String display_name; private String id; gettersAndSetters... } If I select an Option from the DDC, and that Option has id = -1, the AbstractSingleSelectChoice#getDefaultChoice(final Object selected) will interpret my choice as the protected static final String NO_SELECTION_VALUE = -1 in AbstractSingleSelectChoice.java. The result will be that the Choose one option is visible in the DDC. Shouldn't the NO_SELECTION_VALUE be customizable? -- View this message in context: http://www.nabble.com/DropDownChoice-NO_SELECTION_VALUE-static-field-tp22451464p22451464.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
lazy adding rows to a list
Hi, I have a data being fetched from a service and this take some time. I don't want user to wait until all the data is read but I would like him to see page partially rendered and then like it is growing longer and longer. Is it possible with wicket? I tried AjaxLazyLoadPanel and ListView, DataView but have no idea how to use it in such case. Could anyone help? br -- View this message in context: http://www.nabble.com/lazy-adding-rows-to-a-list-tp22452088p22452088.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
Escapeing of single quotes for AutoCompleteTextField
Hello, I'm using wicket version 1.4-rc1. I have a list of journals coming from a database from which selects. I present this list in an AutoCompleteTextField. Some of the Journal's name contain single quotes like in Reader's Digest. It's not possible to select an entry with single quotes. I think the single quote breaks the JavaScript. As a quick and dirty solution I now replace every single quote with a ` in getChoices(). This is somehow acceptable but not really working in IE6 which complains about a type mismatch. Does anybody have better strategy to work around this? A similar problem must have hit somebody else out there :) Thanks for reading Tom -- _ Thomas Gier QLEO GmbH Theaterstr. 13 52062 Aachen Tel +49-241-900 89-21 Fax +49-241-900 89-19 thomas.g...@qleo.de www.qleo.de QLEO Science: System-Lösungen für Forschung - Lehre - Administration _ QLEO Science GmbH, Theaterstr. 13, D-52062 Aachen, Tel. +49 241 90089-0 ; Fax +49 241 90089-19 Sitz der Gesellschaft: Aachen - Amtsgericht Aachen HR B 7321 Geschäftsführer: Dr. rer. medic. Dipl.-Ing Bernhard Krause M.O.R. Dipl.-Ing. Daniel Müllers SAE Dipl.-Math. Armin Priggen _ Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese eMail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Override ResourceReference
Hi Guys, Is there any way to override a ResourceReference already added to the page? Thanks AT
encoding issue on ajax form post (portlet)
Hi all, I have a wicket project that suddenly required to support portlets. I traveled through a lot of (I guess) normal issues from not being familiar with portlets technology. But now I am at a cross rode (quoting obama) :-) I have an encoding issue in which, for as much as I could investigate, begins something like this: 1- type [Hómer] in a textfield 2- wicket javascript functions to handle post encode the field value to H%C3%D3 (or similar) 3-portlet handles the request and redireccionates it to wicket. 4-on wicket side H\ufffd is the resulting string. 5- when ajax returns H?omer is the resulting string. I have ISO-8859-1 in the main page (and only page) of my wicket application. All the rest is ajax. With my application inside the portlet container the UTF-8 is the encoding but this doesn't seam to be because I change the encoding for the portlet-driver and it didn't work at all. Any Ideas? f(t)
URL mounting on Websphere causes Error 404
Hi, I developed my application using Jetty server and URL mounting worked fine. When I deploy it on Websphere it still works but on the end of HTML response to browser, string Error 404: SRVE0190E: File not found: /home is appended. I'm using: - wicket 1.3.4 - IBM WebSphere Application Server - ND, 6.0.2.17 Build Number: cf170648.10 Build Date: 11/29/06 - java version 1.5.0_12 (build 1.5.0_12-b04) Example of URL mount: mount(new QueryStringUrlCodingStrategy(/home, HomePage.class)); End of source of return HTML: html ?xml version='1.0' encoding='UTF-8'? html head ... !-- some HTML cut -- ... /table /body /html Error 404: SRVE0190E: File not found: /home html Does somebody have an idea what could be the problem? Without URL mounting string does not apear on Websphere. -- View this message in context: http://www.nabble.com/URL-mounting-on-Websphere-causes-Error-404-tp22455795p22455795.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: counting/summing items in a list view
Thanks that worked just fine. - Brill On 11-Mar-09, at 4:08 AM, triswork wrote: Hi It isn't working because you are using a static model on your Label. So, when your label component calls the model's getObject() method, the underlying object is the String value originally returned by adder.getValue(), NOT the actual adder itself. An easy fix is to make your model dynamic. Something like this should do it: add(new Label(mySum, new Model() { @Override public Object getObject() { return adder.getValue(); } }); Have a look at PropertyModels for a more elegant solution :) Brill Pappin wrote: I have an issue I'm sure someone else must have come across at one point or another. It's essentially to do with rendering order. Take the following example: final BigDecimalCalc adder = new BigDecimalCalc(); add(new ListView...(myListView, yModel(...)) { ... protected void populateItem(ListItem... item) { ... BigDecimal total = ...; adder.add(total); }} }); add(new Label(mySum, adder.getValue()); So of course the mySum label gets rendered before the listView items have been rendered, which in turn means that the result for mySum is always zero. Now I could likely pre-load my data and make my calculations before sending it to the components, but it seems to me that since I'm iterating over the data anyway, I'd like to use that loop for doing something like sum the elements in the list. Does anyone have a solution for this or is there some Wicket magic I haven't found yet? - Brill - 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/counting-summing-items-in-a-list-view-tp22448946p22450359.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
DataView Model
I just started using some code that was retired for awhile, so I'm not sure what all changed around it and the behavior I'm seeing is really strange. I have a DataView on my page and wicket is complain that my model object doesn't have a getter for the id of the DataView. I.E. DataView is called alternateWebsites and wicket is complaining that the model object doesn't have getAleternateWebsites. I'm confused as to what change would make a DataView itself call set/get Model??? I'm also confused how the compound property model is even getting attached to the DataView. I was able to fix this with a setModel(new Model()) on the dataView. But that seems awefully hackish. Douglas
Re: DataView Model
Did you use a CompoundPropertyModel on the page? If so, that would explain why it was looking for a setter with the name of the DataView. Linda. Douglas Ferguson wrote: I just started using some code that was retired for awhile, so I'm not sure what all changed around it and the behavior I'm seeing is really strange. I have a DataView on my page and wicket is complain that my model object doesn't have a getter for the id of the DataView. I.E. DataView is called alternateWebsites and wicket is complaining that the model object doesn't have getAleternateWebsites. I'm confused as to what change would make a DataView itself call set/get Model??? I'm also confused how the compound property model is even getting attached to the DataView. I was able to fix this with a setModel(new Model()) on the dataView. But that seems awefully hackish. Douglas No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.10/1994 - Release Date: 03/10/09 19:51:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: memcached session store
Just to be complete, even if this is not really an option for us: with ONE_PASS_RENDER clustering with wicket would be fine, no further state management issues, right? Right. And there is back button support (access to older pages/ previous renderings) to consider, which without session affinity you'll have to distribute throughout your cluster (though you might want to do that anyway to support fall over). Eelco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What IDE best fits with Wicket?
I'm using Jetty directly (without Maven, though we do use maven for project management), and hotswap works great then. Eelco On Tue, Mar 10, 2009 at 4:47 AM, francisco treacy francisco.tre...@gmail.com wrote: i would like to add an ingredient here: scala. is there anyone successfully using an IDE with wicket/maven/scala *and* jetty hotswap? i have always developed wicket/java in eclipse (dead easy to set up - create quickstart archetype, right click debug Start.java and off you go). but scala plugin for eclipse was a PIA to work with (stable or nightly) and i decided to try with netbeans 6.5, where scala plugin is quite decent. i managed to set up the quickstart with maven, added some config for scala and all is great... but i really can't figure out how to have jetty hotswap support. apparently i should add some configuration to tell netbeans i want the process-resources goal to execute each time i save an html file, or compile a scala file. it is not very convenient to restart the app every time i make a change. does anybody have experience with a similar setup? thanks, francisco On Sat, Feb 28, 2009 at 5:45 AM, Brill Pappin br...@pappin.ca wrote: It's been a year or two since I tried it... but I couldn't stand it unfortunately (m4eclipse was going through some serious issues at the time). Glad to see that its improved enough to use! - Brill On 27-Feb-09, at 6:14 AM, Sergio García wrote: I'm using Q4E, and although it has some flaws, it works very good with maven Brill Pappin wrote: What are you using instead? - Brill On 24-Feb-09, at 12:45 PM, James Carman wrote: +1! We had an awful lot of trouble getting it to work for us. On Tue, Feb 24, 2009 at 12:38 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: m2eclipse is absolutely worthless for anything beyond a quickstart. It is constantly reparsing poms, grinding eclipse to a halt. It failed to generate the right project dependencies for our multimodule project that consists of 2 multimodule child projects. It failed miserably to uninstall, needing me to axe my eclipse installation. In short: my experience (and that of my co-workers) with m2eclipse is that it is far from ready for prime time. Martijn On Tue, Feb 24, 2009 at 5:55 PM, Brill Pappin br...@pappin.ca wrote: I should add something about the Eclipse maven plugins... don't go for the official eclipse Q4 plugin... use the Maven Integration 4 Eclipse plugin (and actually the development version if your jiggy with it, it works and gets updated/fixed way more often). If your on Netbeans, I think Maven will generate Netbeans project files for you as well (it will do so for eclipse), so you could actually flip back and forth if you wanted. - Brill Pappin On 23-Feb-09, at 5:19 PM, Pierre Goupil wrote: +1, I like Wicket Bench. And with M2Eclipse, you have the full sources JavaDoc just by adding Wicket as a dependency, which is very convenient. But don't expect Wicket Bench to do too much, it's just a small, useful tool. Pierre Hi, I use Eclipse with Wicket Bench plugin and it works very fine. -- Sans amis était le grand maître des mondes, Eprouvait manque, ce pour quoi il créa les esprits, Miroirs bienveillants de sa béatitude. Mais au vrai, il ne trouva aucun égal, Du calice du royaume total des âmes Ecume jusqu'à lui l'infinité. (Schiller, l'amitié) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: memcached session store
In my point of view none sticky sessions are just broken or can be broken very easily I dont know exactly how all the implementations work but does this example all ways work? a user clicks on a button that button click does take some time and in the mean time a user clicks on the same or another button In a sticky session configuration this works fine. Wicket makes sure that they are synced and a page wont be altered by 2 threads at the same time\ But how does a none sticky configuration work? Will the second request go to another server? And just alter there the page state? It can do that because our sync block doesnt work then ofcourse. But if this happens, what happens after that? now the same page instance is altered on both places.. Which one takes precedence ? Because it is impossible for the container to merge the objects. So it should take 1 or the other.. So the first click that took longer then the second click will overwrite the second click page. But that now overwritten page is now shown to the user So if you then click on something that was on the page of the second click but wasnt on the page of the first click. Then you will get an page expired or something like that.. maybe somehow containers do some synching across concurrent request of 1 session (hopefully the will send them to the same server) But i dont know. Synching over servers is very expensive.. then the whole usage of having none sticky sessions is completely gone in my eyes. johan On Tue, Mar 10, 2009 at 10:49, Martin Grotzke martin.grot...@javakaffee.dewrote: On Mon, 2009-03-09 at 22:54 -0700, Victor Igumnov wrote: Even if you have the memcached store in place, wicket still requires session affinity. Wicket buffers redirect responses locally so the client needs to go to the same server twice or the client will receive an expired session. Wicket is a stateful framework, session affinity is a must. Are there other things (besides the buffered response when doing a redirect-after-post with the REDIRECT_TO_BUFFER setting) that require sticky sessions? We'd like to use wicket in a stateless mode and defer session creation as long as it's possible for a user. Even if wicket is made with a statefull programming model in mind we think there are still many advantages over other (non-component-based) frameworks. Also we need a dynamic structure which would be rather hard to realize/simulate with some other component oriented frameworks ;) Cheers, Martin On Mar 9, 2009, at 7:03 AM, Martin Grotzke wrote: On Mon, 2009-03-09 at 13:07 +0100, Martijn Dashorst wrote: Starts to sound like a form of premature optimization. If you are new to Wicket, why do you want to implement a memcached session store? What is the usecase? We're starting a new project (the relaunch of a big ecommerce system) and want to be able to scale out (just throw in new hardware when traffic grows). Additionally we have the requirement of session failover, both in standard operations and for deployments. We're discussing non-sticky vs. sticky sessions here and for non- sticky sessions memcached (as caching layer in addition to sessions stored in a database) is a good candidate, as you don't replicate the changed session to all other nodes, but only to the primary node for this session id. This is an important aspect for beeing able to scale out. Concerning non-sticky/sticky/memcached/whatever we're not decided yet, still running in evaluation mode :) Cheers, Martin Martijn On Mon, Mar 9, 2009 at 9:56 AM, Martin Grotzke martin.grot...@javakaffee.de wrote: On Sun, 2009-03-08 at 16:56 -0700, Victor Igumnov wrote: I wrote a memcached session manager store for jetty, that our wicket app utilizes. Works well, except I can't open source it, since it was created on the company's dime ;-( Well, most interesting things are not so simple to realize that one can do it in its spare time. But the good point is that we can do such interesting things in our job :) Here is my opinion on memcached as a session store. Memcached will not work well as a wicket session store, due to 1mb size limits. Good to know, I wasn't aware of this restriction (I still need to read more about this for details). So one is forced to handle resources eating much memory (e.g. fileupload) not via session, which is the case even without this 1 mb size limit :) Do you have a case where this limit is important especially for wicket? You honestly don't want to serialize anything past 100kb in size due to performance reasons. Right. That said, It works best if you use memcached as a container httpsessionstore with the wicket secondlevelcache diskpagestore. The only thing you need to serialize is the last pagemap which should only be 50kb in size max. You still get fail over since
Re: AW: Tabbed Panel with bookmarkable links
Use wicket-stuff. It makes sense for this. You might even consider just adding this to minis in WS. http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/trunk/wicketstuff-core/minis-parent/ -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 10, 2009 at 10:25 AM, Christian Helmbold christian.helmb...@yahoo.de wrote: Instead of competing, why don't we set up a project some place and check both solutions in under different packages? We can then refactor them into one and take the best of both :) I agree. Is there an existing place in the wicket project to do this? I've discovered some troubles in my solution when multiple tabbed panes are used in one page. The state of other panels is not hold correctly in the URLs and so the tabbed panels influence each other. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Play sound on client side (browser)
Wicket just generates HTML. Start by figuring out the HTML / JS you need, then just generate that with Wicket. (i.e., you'll probably need an embed tag... even if that's added by AJAX) -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 10, 2009 at 10:52 AM, Giovanni pino_o...@yahoo.com wrote: How can I play a sound on the client computer using wicket? For example, using ajax and the world clock example ( http://wicketstuff.org/wicket13/ajax/world-clock.1), I would like to make the client computer play an audio file or any sound when the time is 12:00. Can someone help me?
AutoCompletetextField misbehavior in IE
I have an AutoCompleteTextField on my form (nothing fancy, have a simple list and filtered using CollectionUtils.select from commons-collection). The field works just fine in FF but I see strange behavior with IE. 1. When I type in the first character in the field, the list is retrieved correctly but the display takes place elsewher on the page (left bottom corner, which is outside the display area of the panel that this box is on). 2. When I type in a second character, nothing changes, no filtering or refresh of the list. the original display in the left bottom corner stays and the DEBUG panel shows Channel busy...postponing message. IE status bar shows Error on Page with message Type mistmatch Code 0. When I click outside the textbox (but not on one of the choices), the list disappears and the box is blank. Selecting a value from the original list displayed in the left bottom corner populates the TextField. 3. Clearing the field and retyping a character doesn't help, I have to reinvoke the page and the same behavior is observed again. Any clues on what I might be missing and how to fix this? I am using Wicket 1.3.5. Thanks -- View this message in context: http://www.nabble.com/AutoCompletetextField-misbehavior-in-IE-tp22459455p22459455.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: test page rendering
Is there a similar way to ensure that all wicket:message key resources exist? //Swanthe Igor Vaynberg wrote: if you want the removal of wicket:id to fail turn on component use check in debug settings. -igor On Tue, Mar 10, 2009 at 3:12 AM, Swanthe Lindgren swanthe.lindg...@megasol.se wrote: Hi all I have begun unit testing my wicket pages and one of the most basic tests I want to do is to make sure each and every page can render properly. The WicketTester.assertRenderedPage() looks like a good approach but it doesnt seam to care about the HTML. If I remove a wicket:id from the markupfile, the test is still passed. Is this correct or might there be something else I have done wrong? //Swanthe - 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: AutoCompletetextField misbehavior in IE
If it helps, here's the HTML: td align=left select wicket:id=selection option/option /select labelXYZ: /label input wicket:id=autoselectXYZ type=text size=64 width=64/ labelName: /label input wicket:id=name type=text/ input type=button wicket:id=searchBtn value=Search/ /td The autoselectXYZ is the auto complete field. I have changed the field names from the original. Thanks! -- View this message in context: http://www.nabble.com/AutoCompletetextField-misbehavior-in-IE-tp22459455p22459574.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: memcached session store
On Wed, 2009-03-11 at 09:31 -0700, Eelco Hillenius wrote: Just to be complete, even if this is not really an option for us: with ONE_PASS_RENDER clustering with wicket would be fine, no further state management issues, right? Right. And there is back button support (access to older pages/ previous renderings) to consider, I asume you are referring to the PageMap storing versioned pages... which without session affinity you'll have to distribute throughout your cluster (though you might want to do that anyway to support fall over). Right now we plan to run Wicket without a PageMap (or 0 versioned pages), REDIRECT_TO_RENDER and only LoadableDetachableModel with all required information in the URL. Do you think there are problems with this approach? Would you say REDIRECT_TO_RENDER has other disadvantages besides fetching entities twice? Cheers, Martin Eelco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org signature.asc Description: This is a digitally signed message part
Re: memcached session store
Hi, One would need to handle this on the client side, by disabling buttons/links when they are clicked. Also AJAX communicatoin has to be handled, as this is also often a candidate that triggers multiple requests running in parallel. Cheers, Martin On Wed, 2009-03-11 at 17:45 +0100, Johan Compagner wrote: In my point of view none sticky sessions are just broken or can be broken very easily I dont know exactly how all the implementations work but does this example all ways work? a user clicks on a button that button click does take some time and in the mean time a user clicks on the same or another button In a sticky session configuration this works fine. Wicket makes sure that they are synced and a page wont be altered by 2 threads at the same time\ But how does a none sticky configuration work? Will the second request go to another server? And just alter there the page state? It can do that because our sync block doesnt work then ofcourse. But if this happens, what happens after that? now the same page instance is altered on both places.. Which one takes precedence ? Because it is impossible for the container to merge the objects. So it should take 1 or the other.. So the first click that took longer then the second click will overwrite the second click page. But that now overwritten page is now shown to the user So if you then click on something that was on the page of the second click but wasnt on the page of the first click. Then you will get an page expired or something like that.. maybe somehow containers do some synching across concurrent request of 1 session (hopefully the will send them to the same server) But i dont know. Synching over servers is very expensive.. then the whole usage of having none sticky sessions is completely gone in my eyes. johan On Tue, Mar 10, 2009 at 10:49, Martin Grotzke martin.grot...@javakaffee.dewrote: On Mon, 2009-03-09 at 22:54 -0700, Victor Igumnov wrote: Even if you have the memcached store in place, wicket still requires session affinity. Wicket buffers redirect responses locally so the client needs to go to the same server twice or the client will receive an expired session. Wicket is a stateful framework, session affinity is a must. Are there other things (besides the buffered response when doing a redirect-after-post with the REDIRECT_TO_BUFFER setting) that require sticky sessions? We'd like to use wicket in a stateless mode and defer session creation as long as it's possible for a user. Even if wicket is made with a statefull programming model in mind we think there are still many advantages over other (non-component-based) frameworks. Also we need a dynamic structure which would be rather hard to realize/simulate with some other component oriented frameworks ;) Cheers, Martin On Mar 9, 2009, at 7:03 AM, Martin Grotzke wrote: On Mon, 2009-03-09 at 13:07 +0100, Martijn Dashorst wrote: Starts to sound like a form of premature optimization. If you are new to Wicket, why do you want to implement a memcached session store? What is the usecase? We're starting a new project (the relaunch of a big ecommerce system) and want to be able to scale out (just throw in new hardware when traffic grows). Additionally we have the requirement of session failover, both in standard operations and for deployments. We're discussing non-sticky vs. sticky sessions here and for non- sticky sessions memcached (as caching layer in addition to sessions stored in a database) is a good candidate, as you don't replicate the changed session to all other nodes, but only to the primary node for this session id. This is an important aspect for beeing able to scale out. Concerning non-sticky/sticky/memcached/whatever we're not decided yet, still running in evaluation mode :) Cheers, Martin Martijn On Mon, Mar 9, 2009 at 9:56 AM, Martin Grotzke martin.grot...@javakaffee.de wrote: On Sun, 2009-03-08 at 16:56 -0700, Victor Igumnov wrote: I wrote a memcached session manager store for jetty, that our wicket app utilizes. Works well, except I can't open source it, since it was created on the company's dime ;-( Well, most interesting things are not so simple to realize that one can do it in its spare time. But the good point is that we can do such interesting things in our job :) Here is my opinion on memcached as a session store. Memcached will not work well as a wicket session store, due to 1mb size limits. Good to know, I wasn't aware of this restriction (I still need to read more about this for details). So one is forced to handle resources eating much memory (e.g. fileupload) not via session, which is the case even without this 1 mb size limit :) Do you have a case where this limit is
Re: test page rendering
see IResourceSettings#setThrowExceptionOnMissingResource(boolean) -igor On Wed, Mar 11, 2009 at 8:57 AM, Swanthe Lindgren swanthe.lindg...@megasol.se wrote: Is there a similar way to ensure that all wicket:message key resources exist? //Swanthe Igor Vaynberg wrote: if you want the removal of wicket:id to fail turn on component use check in debug settings. -igor On Tue, Mar 10, 2009 at 3:12 AM, Swanthe Lindgren swanthe.lindg...@megasol.se wrote: Hi all I have begun unit testing my wicket pages and one of the most basic tests I want to do is to make sure each and every page can render properly. The WicketTester.assertRenderedPage() looks like a good approach but it doesnt seam to care about the HTML. If I remove a wicket:id from the markupfile, the test is still passed. Is this correct or might there be something else I have done wrong? //Swanthe - 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: URL mounting on Websphere causes Error 404
you are using wicket filter or servlet? -igor On Wed, Mar 11, 2009 at 6:04 AM, Goran Novak gnovak@gmail.com wrote: Hi, I developed my application using Jetty server and URL mounting worked fine. When I deploy it on Websphere it still works but on the end of HTML response to browser, string Error 404: SRVE0190E: File not found: /home is appended. I'm using: - wicket 1.3.4 - IBM WebSphere Application Server - ND, 6.0.2.17 Build Number: cf170648.10 Build Date: 11/29/06 - java version 1.5.0_12 (build 1.5.0_12-b04) Example of URL mount: mount(new QueryStringUrlCodingStrategy(/home, HomePage.class)); End of source of return HTML: html ?xml version='1.0' encoding='UTF-8'? html head ... !-- some HTML cut -- ... /table /body /html Error 404: SRVE0190E: File not found: /home html Does somebody have an idea what could be the problem? Without URL mounting string does not apear on Websphere. -- View this message in context: http://www.nabble.com/URL-mounting-on-Websphere-causes-Error-404-tp22455795p22455795.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: Escapeing of single quotes for AutoCompleteTextField
can you try replacing it with apos; and see if that works better? -igor 2009/3/11 Thomas Gier thomas.g...@factscience.de Hello, I'm using wicket version 1.4-rc1. I have a list of journals coming from a database from which selects. I present this list in an AutoCompleteTextField. Some of the Journal's name contain single quotes like in Reader's Digest. It's not possible to select an entry with single quotes. I think the single quote breaks the JavaScript. As a quick and dirty solution I now replace every single quote with a ` in getChoices(). This is somehow acceptable but not really working in IE6 which complains about a type mismatch. Does anybody have better strategy to work around this? A similar problem must have hit somebody else out there :) Thanks for reading Tom -- _ Thomas Gier QLEO GmbH Theaterstr. 13 52062 Aachen Tel +49-241-900 89-21 Fax +49-241-900 89-19 thomas.g...@qleo.de www.qleo.de QLEO Science: System-Lösungen für Forschung - Lehre - Administration _ QLEO Science GmbH, Theaterstr. 13, D-52062 Aachen, Tel. +49 241 90089-0 ; Fax +49 241 90089-19 Sitz der Gesellschaft: Aachen - Amtsgericht Aachen HR B 7321 Geschäftsführer: Dr. rer. medic. Dipl.-Ing Bernhard Krause M.O.R. Dipl.-Ing. Daniel Müllers SAE Dipl.-Math. Armin Priggen _ Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese eMail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Switch tab only if user doesn't want to save changes.
Could you post how you are detecting unsaved changes? I am trying to implement something similar. Thanks, Josh Fabio Fioretti wrote: Thank you Maurice, what you suggested matched the way I was trying to solve the problem, but I had to add a bit of client-side logic to decide whether to display the confirm dialog or not, basing the decision on the enabled/disabled status of the save button inside the first tab, which already implemented the logic to detect unsaved changes. I paste the relevant bits to share my solution with you all. Probably it's not optimal at all, so please do feel free to comment/correct/laugh. :) @Override protected IAjaxCallDecorator getAjaxCallDecorator() { // Add custom decorator for tabs other than the one containing detailsPanel if ( index != 0 ) { return new AjaxCallDecorator() { @Override public CharSequence decorateScript( CharSequence script ) { // Ask for user confirmation, as tab-switching discards unsaved changes. final String saveButton = detailsPanel != null ? detailsPanel.getSaveButtonMarkupId() : ; final StringBuffer decoration = new StringBuffer(); return decoration.append(String.format(if( document.getElementById('%s')!= null , saveButton)) .append(String.format( !document.getElementById('%s').disabled , saveButton)) .append( !confirm('Please note that unsaved changes will be lost.\\n\\nDo you want to switch tab?')) ) .append({ return false; }) .append(script); } }; } return super.getAjaxCallDecorator(); } Cheers, Fabio Fioretti - WindoM On Sun, Jul 13, 2008 at 9:43 PM, Maurice Marrink marr...@gmail.com wrote: Override newLink to return an ajaxfallbacklink where you have overridden the getAjaxCallDecorator method to return a custom IAjaxCallDecorator. Use that to insert a javascript confirm dialog. Maurice On Fri, Jul 11, 2008 at 7:28 PM, Fabio Fioretti windom.macroso...@gmail.com wrote: Hi all, thanks in advance for your precious support. I have an AjaxTabbedPanel with two tabs. In the first tab there is a panel with a form, some input fields and a save button; the content of the second tab is irrelevant. Use-case: 1 - user selects first tab; 2 - user makes some changes in the input fields but doesn't click the save button; 3 - user selects second tab. On step 3, users loses all his updates without being warned. I would like to add a javascript confirm dialog to be triggered only when some changes have been performed but not saved (no ModalWindow, just javascript). I mean something like: There are some unsaved changes that will be lost, do you really want to switch tab? OK Cancel. OK brings the user to the second tab, Cancel makes him stay in the first tab. The panel inside the first tab has a handy boolean hasUnsavedChanges() method, but I don't know where I could call it and how to inject an if (!confirm('...')) return false;. Maybe in the onClick(AjaxRequestTarget target) method of the AjaxFallbackLink returned by AjaxTabbedPanel's newLink() method? What's the best way to do it? Thank you very much, Fabio Fioretti - WindoM - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Switch-tab-only-if-user-doesn%27t-want-to-save-changes.-tp18408885p22460250.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: Need to minimize the names using Ajax
and if you use object autocomplete from extensions or is it wicketstuff theres no limit to it :) 2009/3/11 Linda van der Pal lvd...@heritageagenturen.nl Just a slight addition, there is a wonderful example amongst the wicket examples on the site. They even limit the number of choices to ten. Linda Igor Vaynberg wrote: see AutoCompleteTextField -igor On Tue, Mar 10, 2009 at 8:14 AM, newbie_to_wicket sm.shaf...@gmail.com wrote: Hi All, I am using wicket framework. I have to achieve the functionality as I shown in the below image. http://www.nabble.com/file/p22437770/names.jpeg Whenever I pressed R in the textfield box then it should displays the names which contans R as the first letter. Thanks for your help J -- View this message in context: http://www.nabble.com/Need-to-minimize-the-names-using-Ajax-tp22437770p22437770.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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.10/1994 - Release Date: 03/10/09 19:51:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AutoCompletetextField misbehavior in IE
I've got the same behaviour with 1.3.5 on IE (even in the example application). It works with the 1.4RC2 and the latest 1.3.5 SNAPSHOT (that you can get in the http://wicketstuff.org/maven/repository/org/apache/wicket/ wicketstuff repositoryor with http://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x SVN ). -- View this message in context: http://www.nabble.com/AutoCompletetextField-misbehavior-in-IE-tp22459455p22462226.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: lazy adding rows to a list
see an article on wicketinaction.com that shows how to do this. -igor On Wed, Mar 11, 2009 at 2:48 AM, benyk ben...@hotmail.com wrote: Hi, I have a data being fetched from a service and this take some time. I don't want user to wait until all the data is read but I would like him to see page partially rendered and then like it is growing longer and longer. Is it possible with wicket? I tried AjaxLazyLoadPanel and ListView, DataView but have no idea how to use it in such case. Could anyone help? br -- View this message in context: http://www.nabble.com/lazy-adding-rows-to-a-list-tp22452088p22452088.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: memcached session store
thats impossible to do completely A refresh of a browser is for example 1 And that would be quite annoying that you have to do that because you have some kind of configuration on the serverside johan On Wed, Mar 11, 2009 at 18:17, Martin Grotzke martin.grot...@javakaffee.dewrote: Hi, One would need to handle this on the client side, by disabling buttons/links when they are clicked. Also AJAX communicatoin has to be handled, as this is also often a candidate that triggers multiple requests running in parallel. Cheers, Martin On Wed, 2009-03-11 at 17:45 +0100, Johan Compagner wrote: In my point of view none sticky sessions are just broken or can be broken very easily I dont know exactly how all the implementations work but does this example all ways work? a user clicks on a button that button click does take some time and in the mean time a user clicks on the same or another button In a sticky session configuration this works fine. Wicket makes sure that they are synced and a page wont be altered by 2 threads at the same time\ But how does a none sticky configuration work? Will the second request go to another server? And just alter there the page state? It can do that because our sync block doesnt work then ofcourse. But if this happens, what happens after that? now the same page instance is altered on both places.. Which one takes precedence ? Because it is impossible for the container to merge the objects. So it should take 1 or the other.. So the first click that took longer then the second click will overwrite the second click page. But that now overwritten page is now shown to the user So if you then click on something that was on the page of the second click but wasnt on the page of the first click. Then you will get an page expired or something like that.. maybe somehow containers do some synching across concurrent request of 1 session (hopefully the will send them to the same server) But i dont know. Synching over servers is very expensive.. then the whole usage of having none sticky sessions is completely gone in my eyes. johan On Tue, Mar 10, 2009 at 10:49, Martin Grotzke martin.grot...@javakaffee.dewrote: On Mon, 2009-03-09 at 22:54 -0700, Victor Igumnov wrote: Even if you have the memcached store in place, wicket still requires session affinity. Wicket buffers redirect responses locally so the client needs to go to the same server twice or the client will receive an expired session. Wicket is a stateful framework, session affinity is a must. Are there other things (besides the buffered response when doing a redirect-after-post with the REDIRECT_TO_BUFFER setting) that require sticky sessions? We'd like to use wicket in a stateless mode and defer session creation as long as it's possible for a user. Even if wicket is made with a statefull programming model in mind we think there are still many advantages over other (non-component-based) frameworks. Also we need a dynamic structure which would be rather hard to realize/simulate with some other component oriented frameworks ;) Cheers, Martin On Mar 9, 2009, at 7:03 AM, Martin Grotzke wrote: On Mon, 2009-03-09 at 13:07 +0100, Martijn Dashorst wrote: Starts to sound like a form of premature optimization. If you are new to Wicket, why do you want to implement a memcached session store? What is the usecase? We're starting a new project (the relaunch of a big ecommerce system) and want to be able to scale out (just throw in new hardware when traffic grows). Additionally we have the requirement of session failover, both in standard operations and for deployments. We're discussing non-sticky vs. sticky sessions here and for non- sticky sessions memcached (as caching layer in addition to sessions stored in a database) is a good candidate, as you don't replicate the changed session to all other nodes, but only to the primary node for this session id. This is an important aspect for beeing able to scale out. Concerning non-sticky/sticky/memcached/whatever we're not decided yet, still running in evaluation mode :) Cheers, Martin Martijn On Mon, Mar 9, 2009 at 9:56 AM, Martin Grotzke martin.grot...@javakaffee.de wrote: On Sun, 2009-03-08 at 16:56 -0700, Victor Igumnov wrote: I wrote a memcached session manager store for jetty, that our wicket app utilizes. Works well, except I can't open source it, since it was created on the company's dime ;-( Well, most interesting things are not so simple to realize that one can do it in its spare time. But the good point is that we can do such interesting things in our job :) Here is my opinion on memcached as a session store.
Re: Shared string resources
Put them in YourApplicationName.properties and use StringResourceModel. See internationalization help in Wicket in Action. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 11, 2009 at 2:20 PM, Seven Corners shel...@blackwave.tv wrote: I have some strings that I'd like to access from a common string table that is not tied to any particular component. How can I do this? -- View this message in context: http://www.nabble.com/Shared-string-resources-tp22462537p22462537.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: Shared string resources
Thanks so much! Seven Corners wrote: I have some strings that I'd like to access from a common string table that is not tied to any particular component. How can I do this? -- View this message in context: http://www.nabble.com/Shared-string-resources-tp22462537p22462644.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
Shared string resources
I have some strings that I'd like to access from a common string table that is not tied to any particular component. How can I do this? -- View this message in context: http://www.nabble.com/Shared-string-resources-tp22462537p22462537.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
adding multiple onchange behaviors to DDC
I've searched the list for this, but didn't find an answer, at least not a recent one. When I add more than one OnChangeAjaxBehavior to a DropDownChoice, only the last one gets executed. Is that just the way it is? Will
Re: memcached session store
I had issues when running non-sticky sessions with ONE_PASS_RENDERER, the results were mixed. Responses came back as a mixed bag, sometimes it worked or not. Expired sessions did happen from time to time with no rhyme or reason. Sticky sessions is a must on wicket. I hate to say this but, if your writing a stateless oriented site, wicket might not be the best choice. Your fighting an uphill battle. On Mar 11, 2009, at 10:17 AM, Martin Grotzke wrote: Hi, One would need to handle this on the client side, by disabling buttons/links when they are clicked. Also AJAX communicatoin has to be handled, as this is also often a candidate that triggers multiple requests running in parallel. Cheers, Martin On Wed, 2009-03-11 at 17:45 +0100, Johan Compagner wrote: In my point of view none sticky sessions are just broken or can be broken very easily I dont know exactly how all the implementations work but does this example all ways work? a user clicks on a button that button click does take some time and in the mean time a user clicks on the same or another button In a sticky session configuration this works fine. Wicket makes sure that they are synced and a page wont be altered by 2 threads at the same time\ But how does a none sticky configuration work? Will the second request go to another server? And just alter there the page state? It can do that because our sync block doesnt work then ofcourse. But if this happens, what happens after that? now the same page instance is altered on both places.. Which one takes precedence ? Because it is impossible for the container to merge the objects. So it should take 1 or the other.. So the first click that took longer then the second click will overwrite the second click page. But that now overwritten page is now shown to the user So if you then click on something that was on the page of the second click but wasnt on the page of the first click. Then you will get an page expired or something like that.. maybe somehow containers do some synching across concurrent request of 1 session (hopefully the will send them to the same server) But i dont know. Synching over servers is very expensive.. then the whole usage of having none sticky sessions is completely gone in my eyes. johan On Tue, Mar 10, 2009 at 10:49, Martin Grotzke martin.grot...@javakaffee.dewrote: On Mon, 2009-03-09 at 22:54 -0700, Victor Igumnov wrote: Even if you have the memcached store in place, wicket still requires session affinity. Wicket buffers redirect responses locally so the client needs to go to the same server twice or the client will receive an expired session. Wicket is a stateful framework, session affinity is a must. Are there other things (besides the buffered response when doing a redirect-after-post with the REDIRECT_TO_BUFFER setting) that require sticky sessions? We'd like to use wicket in a stateless mode and defer session creation as long as it's possible for a user. Even if wicket is made with a statefull programming model in mind we think there are still many advantages over other (non-component-based) frameworks. Also we need a dynamic structure which would be rather hard to realize/simulate with some other component oriented frameworks ;) Cheers, Martin On Mar 9, 2009, at 7:03 AM, Martin Grotzke wrote: On Mon, 2009-03-09 at 13:07 +0100, Martijn Dashorst wrote: Starts to sound like a form of premature optimization. If you are new to Wicket, why do you want to implement a memcached session store? What is the usecase? We're starting a new project (the relaunch of a big ecommerce system) and want to be able to scale out (just throw in new hardware when traffic grows). Additionally we have the requirement of session failover, both in standard operations and for deployments. We're discussing non-sticky vs. sticky sessions here and for non- sticky sessions memcached (as caching layer in addition to sessions stored in a database) is a good candidate, as you don't replicate the changed session to all other nodes, but only to the primary node for this session id. This is an important aspect for beeing able to scale out. Concerning non-sticky/sticky/memcached/whatever we're not decided yet, still running in evaluation mode :) Cheers, Martin Martijn On Mon, Mar 9, 2009 at 9:56 AM, Martin Grotzke martin.grot...@javakaffee.de wrote: On Sun, 2009-03-08 at 16:56 -0700, Victor Igumnov wrote: I wrote a memcached session manager store for jetty, that our wicket app utilizes. Works well, except I can't open source it, since it was created on the company's dime ;-( Well, most interesting things are not so simple to realize that one can do it in its spare time. But the good point is that we can do such interesting things in our job :) Here is my opinion on memcached as a session store. Memcached will not work well as a wicket session store, due to 1mb size limits. Good to know, I
Re: AutoCompletetextField misbehavior in IE
Thanks for the pointer - I shall get the latest snapshot (RCs unfortunately don't fly around here) and test this out. -- View this message in context: http://www.nabble.com/AutoCompletetextField-misbehavior-in-IE-tp22459455p22463273.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: AutoCompletetextField misbehavior in IE
RCs are unacceptable and snapshots are okay? -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 11, 2009 at 3:03 PM, cbchhaya cbchh...@gmail.com wrote: Thanks for the pointer - I shall get the latest snapshot (RCs unfortunately don't fly around here) and test this out. -- View this message in context: http://www.nabble.com/AutoCompletetextField-misbehavior-in-IE-tp22459455p22463273.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: Extensible wicket application
Daniel Dominik Holúbek wrote: I have looked at OSGi a bit, but I do not understand it (basically I do not even now how to build a project with it :) ) Does anybody have any clue? I hope I have written this clearly enough. If not, feel free to ask :) Daniel, designing modular applications using classloader is not easy as it might seem. Your specific problem could be even simple, but soon you'll find more complex cases. So, if modules are important to you, I suggest you look at what others have done or to existing framework. You have cited OSGi an if you search a few weeks ago back in the archive of this mailing list there was a guy that linked a paper about how to use OSGi and Wicket. I've done something similar with the NetBeans Platform. You might also have a look at Glassfish v3 which is extensible by means of OSGi and could be a starting point. -- Fabrizio Giudici - Java Architect, Project Manager Tidalwave s.a.s. - We make Java work. Everywhere. weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog fabrizio.giud...@tidalwave.it - mobile: +39 348.150.6941 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DropDownChoice NO_SELECTION_VALUE static field
please open a jira issue. -igor On Wed, Mar 11, 2009 at 1:32 AM, ulrik ulrik.hagb...@gmail.com wrote: Hello! I have an issue with the DropDownChoice (wicket 1.3.4). Lets say I do this: ListOption _options = getOptions(); someRenderer = new ChoiceRenderer() { ... } DropDownChoice _ddc = new DropDownChoice(dropDown, new Model((Serializable) _option),options, someRenderer); The Option class looks like this: public class Option { private String display_name; private String id; gettersAndSetters... } If I select an Option from the DDC, and that Option has id = -1, the AbstractSingleSelectChoice#getDefaultChoice(final Object selected) will interpret my choice as the protected static final String NO_SELECTION_VALUE = -1 in AbstractSingleSelectChoice.java. The result will be that the Choose one option is visible in the DDC. Shouldn't the NO_SELECTION_VALUE be customizable? -- View this message in context: http://www.nabble.com/DropDownChoice-NO_SELECTION_VALUE-static-field-tp22451464p22451464.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: DataView Model
Yeah.. but, why would get/set be called on a dataview? The strange thing is that it was barfing like this before. Douglas -Original Message- From: Linda van der Pal [mailto:lvd...@heritageagenturen.nl] Sent: Wednesday, March 11, 2009 10:24 AM To: users@wicket.apache.org Subject: Re: DataView Model Did you use a CompoundPropertyModel on the page? If so, that would explain why it was looking for a setter with the name of the DataView. Linda. Douglas Ferguson wrote: I just started using some code that was retired for awhile, so I'm not sure what all changed around it and the behavior I'm seeing is really strange. I have a DataView on my page and wicket is complain that my model object doesn't have a getter for the id of the DataView. I.E. DataView is called alternateWebsites and wicket is complaining that the model object doesn't have getAleternateWebsites. I'm confused as to what change would make a DataView itself call set/get Model??? I'm also confused how the compound property model is even getting attached to the DataView. I was able to fix this with a setModel(new Model()) on the dataView. But that seems awefully hackish. Douglas No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.10/1994 - Release Date: 03/10/09 19:51:00 - 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: AutoCompletetextField misbehavior in IE
Unfortunately, replacing with the snapshot doesn't work either. Was this a known problem in an earlier version that has been fixed in the 1.4RC or 1.3-SNAPSHOT? If not, can this be a quirk with the way my HTML is structured so that, for some reason, it's not able to create the display area right under the textfield? -- View this message in context: http://www.nabble.com/AutoCompletetextField-misbehavior-in-IE-tp22459455p22464624.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: Shared string resources
You can also just use ResourceModel(some.string.property) if you don't have any thing that needs to be substituted into the strings when they are rendered. ie some.string.property=this is some text or StringResourceModel( various constructors ) if you need some dynamic value in there: ie some.string.property=This is a {0} string This will work from the same YourApplicationName.properties file. cheers, Steve On 11/03/2009, at 7:24 PM, Jeremy Thomerson wrote: Put them in YourApplicationName.properties and use StringResourceModel. See internationalization help in Wicket in Action. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 11, 2009 at 2:20 PM, Seven Corners shel...@blackwave.tv wrote: I have some strings that I'd like to access from a common string table that is not tied to any particular component. How can I do this? -- View this message in context: http://www.nabble.com/Shared-string-resources- tp22462537p22462537.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: adding multiple onchange behaviors to DDC
On Wed, Mar 11, 2009 at 8:47 PM, Will Jaynes wjay...@gmail.com wrote: When I add more than one OnChangeAjaxBehavior to a DropDownChoice, only the last one gets executed. Is that just the way it is? Yes, though I vaguely remember something like CompoundBehavior. You might want to search the list for that. Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to redirect without extending RedirectPage?
Hi all, I would like to create a custom PageExpired ErrorPage, which contains some message and after 5 secs it redirects to the Homepage. I found RedirectPage to solve this, but when I extend it, it won't contain the design elements which are now in a custom WebPage class. I could make on the same principal a custom RedirectPageTemplate, but then it would be just code-duplicating... That's why I tried to open the original RedirectPage class and copied the contents of it, but it doesn't want to work. Can someone help me? What am I doing wrong? //Or is there other way to solve the problem? //Does it need other modifications in other files? The Java code is: public final class PageExpiredError extends CustomWebPage { public PageExpiredError() { super(); final WebMarkupContainer redirect = new WebMarkupContainer(redirect); final String content = 5 + ;URL= + new GroupHierarchy().urlFor(IRedirectListener.INTERFACE); redirect.add(new AttributeModifier(content, new Model(content))); add(redirect); } } If I'm using the setRedirect(true); command, Firefox gives me a Redirect Loop Error.. I don't think the html code is relevant in this case. Thanks. Best Regards, Peter Major - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to redirect without extending RedirectPage?
Just output a meta tag in your custom page that tells the browser to go to a different URL after 5 seconds. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 11, 2009 at 5:20 PM, Major Péter majorpe...@sch.bme.hu wrote: Hi all, I would like to create a custom PageExpired ErrorPage, which contains some message and after 5 secs it redirects to the Homepage. I found RedirectPage to solve this, but when I extend it, it won't contain the design elements which are now in a custom WebPage class. I could make on the same principal a custom RedirectPageTemplate, but then it would be just code-duplicating... That's why I tried to open the original RedirectPage class and copied the contents of it, but it doesn't want to work. Can someone help me? What am I doing wrong? //Or is there other way to solve the problem? //Does it need other modifications in other files? The Java code is: public final class PageExpiredError extends CustomWebPage { public PageExpiredError() { super(); final WebMarkupContainer redirect = new WebMarkupContainer(redirect); final String content = 5 + ;URL= + new GroupHierarchy().urlFor(IRedirectListener.INTERFACE); redirect.add(new AttributeModifier(content, new Model(content))); add(redirect); } } If I'm using the setRedirect(true); command, Firefox gives me a Redirect Loop Error.. I don't think the html code is relevant in this case. Thanks. Best Regards, Peter Major - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to redirect without extending RedirectPage?
Thanks for the quick response. I modified the html code like this: html xmlns:wicket wicket:head titletitle/title META http-equiv=refresh content=5;URL=http://linktosomewhere; /wicket:head body wicket:extendblah blah/wicket:extend /body /html It works fine, but now the URL is burned into the html. Is there a way to make the link some way to depends on a Model? //It would be just a prettier solution to the problem. Thanks, Peter Jeremy Thomerson írta: Just output a meta tag in your custom page that tells the browser to go to a different URL after 5 seconds. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 11, 2009 at 5:20 PM, Major Péter majorpe...@sch.bme.hu wrote: Hi all, I would like to create a custom PageExpired ErrorPage, which contains some message and after 5 secs it redirects to the Homepage. I found RedirectPage to solve this, but when I extend it, it won't contain the design elements which are now in a custom WebPage class. I could make on the same principal a custom RedirectPageTemplate, but then it would be just code-duplicating... That's why I tried to open the original RedirectPage class and copied the contents of it, but it doesn't want to work. Can someone help me? What am I doing wrong? //Or is there other way to solve the problem? //Does it need other modifications in other files? The Java code is: public final class PageExpiredError extends CustomWebPage { public PageExpiredError() { super(); final WebMarkupContainer redirect = new WebMarkupContainer(redirect); final String content = 5 + ;URL= + new GroupHierarchy().urlFor(IRedirectListener.INTERFACE); redirect.add(new AttributeModifier(content, new Model(content))); add(redirect); } } If I'm using the setRedirect(true); command, Firefox gives me a Redirect Loop Error.. I don't think the html code is relevant in this case. Thanks. Best Regards, Peter Major - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to redirect without extending RedirectPage?
Write your own header contributor that takes a model as a parameter and generates the meta tag for you. See the JS and CSS header contributors for inspiration. Hint: if you're generating links to within your app, you could also take a Class and PageParmeters rather than a model and generate the URL from those. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 11, 2009 at 5:38 PM, Major Péter majorpe...@sch.bme.hu wrote: Thanks for the quick response. I modified the html code like this: html xmlns:wicket wicket:head titletitle/title META http-equiv=refresh content=5;URL=http://linktosomewhere; /wicket:head body wicket:extendblah blah/wicket:extend /body /html It works fine, but now the URL is burned into the html. Is there a way to make the link some way to depends on a Model? //It would be just a prettier solution to the problem. Thanks, Peter Jeremy Thomerson írta: Just output a meta tag in your custom page that tells the browser to go to a different URL after 5 seconds. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 11, 2009 at 5:20 PM, Major Péter majorpe...@sch.bme.hu wrote: Hi all, I would like to create a custom PageExpired ErrorPage, which contains some message and after 5 secs it redirects to the Homepage. I found RedirectPage to solve this, but when I extend it, it won't contain the design elements which are now in a custom WebPage class. I could make on the same principal a custom RedirectPageTemplate, but then it would be just code-duplicating... That's why I tried to open the original RedirectPage class and copied the contents of it, but it doesn't want to work. Can someone help me? What am I doing wrong? //Or is there other way to solve the problem? //Does it need other modifications in other files? The Java code is: public final class PageExpiredError extends CustomWebPage { public PageExpiredError() { super(); final WebMarkupContainer redirect = new WebMarkupContainer(redirect); final String content = 5 + ;URL= + new GroupHierarchy().urlFor(IRedirectListener.INTERFACE); redirect.add(new AttributeModifier(content, new Model(content))); add(redirect); } } If I'm using the setRedirect(true); command, Firefox gives me a Redirect Loop Error.. I don't think the html code is relevant in this case. Thanks. Best Regards, Peter Major - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket - opensocial integration (with example code)
Hi everyone, we are currently working on an opensocial application based on wicket. Currently it is not possible to use the ajax functionality of wicket in an opensocial app. opensocial is based on iframes which run your html / js in a seperate domain. If you build a widget for myspace.com for example, your html will run in msappspace.com which will prevent ajax call due to cross domain browser security. Luckily there is a opensocial method gadgets.io.makeRequest to pull xml content from your backend which is proxied through the opensocial container and basically works like an ajax request. so i created a bridge which replaces the XHR of wicket-ajax.js with an implementation based on makeRequest. Without further ado: script type=text/javascript Wicket.Ajax.createTransport = function() { return { open: function(method, url, async) { this.url = url; }, setRequestHeader: function(key, value) { }, send: function(body) { var req_params = new Object(); req_params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT; var req = gadgets.io.makeRequest(http://your.server.com; + this.url + + body, this.callback.bind(this), req_params); }, callback: function(data) { this.responseText = data.text; this.status = 200; this.readyState = 4; this.onreadystatechange(); }, getResponseHeader: function(key) { return null; }, abort: function() { } }; } /script By including this script below your wicket-ajax script in the opensocial app you can use finally use ajax functionality directly on the canvas. It should work completely transparent so no changes in your wicket code should be required. Developing / porting wicket code to opensocial apps should be a lot easier now :) Note that this example does not support error handling, headers, aborting and GET request also do not work completely. Adding this functionality should be easy however. Feel free to use / modify / publish the code as you like. Best Regards, Armin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket - opensocial integration (with example code)
Armin, maybe you should put this on our wiki page. threads like this tend to get lost easily in all the traffic. -igor On Wed, Mar 11, 2009 at 4:28 PM, Armin Bauer armin.ba...@amiando.com wrote: Hi everyone, we are currently working on an opensocial application based on wicket. Currently it is not possible to use the ajax functionality of wicket in an opensocial app. opensocial is based on iframes which run your html / js in a seperate domain. If you build a widget for myspace.com for example, your html will run in msappspace.com which will prevent ajax call due to cross domain browser security. Luckily there is a opensocial method gadgets.io.makeRequest to pull xml content from your backend which is proxied through the opensocial container and basically works like an ajax request. so i created a bridge which replaces the XHR of wicket-ajax.js with an implementation based on makeRequest. Without further ado: script type=text/javascript Wicket.Ajax.createTransport = function() { return { open: function(method, url, async) { this.url = url; }, setRequestHeader: function(key, value) { }, send: function(body) { var req_params = new Object(); req_params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT; var req = gadgets.io.makeRequest(http://your.server.com; + this.url + + body, this.callback.bind(this), req_params); }, callback: function(data) { this.responseText = data.text; this.status = 200; this.readyState = 4; this.onreadystatechange(); }, getResponseHeader: function(key) { return null; }, abort: function() { } }; } /script By including this script below your wicket-ajax script in the opensocial app you can use finally use ajax functionality directly on the canvas. It should work completely transparent so no changes in your wicket code should be required. Developing / porting wicket code to opensocial apps should be a lot easier now :) Note that this example does not support error handling, headers, aborting and GET request also do not work completely. Adding this functionality should be easy however. Feel free to use / modify / publish the code as you like. Best Regards, Armin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket-Security security check on component on a panel
I am trying to do a security check on a component that is on a panel like this: if(SecureComponentHelper.isAuthenticated(myComponent) SecureComponentHelper.isActionAuthorized(myComponent, enable)) { // Do Something } I have also tried this: if(myComponent.isAuthenticated() !myComponent.isActionAuthorized(enable)) { // Do Something } Basically the same thing. myComponent implements ISecureComponent. setSecurityCheck(new ComponentSecurityCheck(this)) is called in the constructors of myComponent. This works fine if myComponent is on a page, but does not work if myComponent is on a panel. I get the following exception: Caused by: org.apache.wicket.security.strategies.SecurityException: Unable to create alias for component: [MarkupContainer [Component id = myComponent]] at org.apache.wicket.security.components.SecureComponentHelper.alias(SecureComponentHelper.java:263) at org.apache.wicket.security.hive.authorization.permissions.ComponentPermission.init(ComponentPermission.java:54) at org.apache.wicket.security.swarm.strategies.SwarmStrategy.isComponentAuthorized(SwarmStrategy.java:228) at org.apache.wicket.security.checks.ComponentSecurityCheck.isActionAuthorized(ComponentSecurityCheck.java:127) at org.apache.wicket.security.components.SecureComponentHelper.isActionAuthorized(SecureComponentHelper.java:177) at com.scanman.panels.menus.MainMenuHandHeldPanel.init(MainMenuHandHeldPanel.java:123) at com.scanman.pages.menus.MainMenu$2.init(MainMenu.java:157) at com.scanman.pages.menus.MainMenu.init(MainMenu.java:157) ... 28 more Caused by: java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = resetButtonContainer]] at org.apache.wicket.Component.getPage(Component.java:1729) at org.apache.wicket.security.components.SecureComponentHelper.alias(SecureComponentHelper.java:259) ... 35 more How do you do a security check on a component that is on a panel? Thanks, Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataView Model
I had a similar problem but then i found I was not adding a model to the components i was adding in my listview.populateItem() may be it helps.. taha On Thu, Mar 12, 2009 at 2:20 AM, Douglas Ferguson doug...@douglasferguson.us wrote: Yeah.. but, why would get/set be called on a dataview? The strange thing is that it was barfing like this before. Douglas -Original Message- From: Linda van der Pal [mailto:lvd...@heritageagenturen.nl] Sent: Wednesday, March 11, 2009 10:24 AM To: users@wicket.apache.org Subject: Re: DataView Model Did you use a CompoundPropertyModel on the page? If so, that would explain why it was looking for a setter with the name of the DataView. Linda. Douglas Ferguson wrote: I just started using some code that was retired for awhile, so I'm not sure what all changed around it and the behavior I'm seeing is really strange. I have a DataView on my page and wicket is complain that my model object doesn't have a getter for the id of the DataView. I.E. DataView is called alternateWebsites and wicket is complaining that the model object doesn't have getAleternateWebsites. I'm confused as to what change would make a DataView itself call set/get Model??? I'm also confused how the compound property model is even getting attached to the DataView. I was able to fix this with a setModel(new Model()) on the dataView. But that seems awefully hackish. Douglas No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.10/1994 - Release Date: 03/10/09 19:51:00 - 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