Re: Package all CSS and JS
I think that this response by Igor to another thread was supposed to be on this one. Either way, it fits this one. it is much simpler and more efficient to set proper caching headers. > concatenating resources often does not work because different > components on different pages contribute different resources, so there > are a lot of variations of these huge files you may end up with and > would have to stream to the user over and over. yes, it would only be > one request per page, but it would be a huge one over and over as > opposed to being able to cache a lot of small resources and never > request them again. > > -igor > -- Jeremy Thomerson http://www.wickettraining.com On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes wrote: > Hi, > > Is there a way to tell wicket to package all referenced javascripts > together, the same for the css? If there isn't this solution yet, can > anyone tell me where should I look for to implement it? > > Thanks, > Eduardo S. Nunes > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Package all CSS and JS
Hi, how about doing this with some kind of precompilation step? You could manipulate the code with maven or ant befor packing the war having an task combining all js and css in one. Just an idea... Cheers Bjoern Tietjens Am 10.04.2009 um 05:31 schrieb Brill Pappin : Funny, I was thinking that same thing... in one quick app i was writing, I had ~20 header links! I kept thinking "that can't be good" :) although I have not done so yet, I think there must be a way to modify or create a resource loader that would generate a buffered version of css (for isntance) and change the request page to just load it. Let us know if you tackle that one... I'd love to see the code. - Brill Pappin On 9-Apr-09, at 10:57 AM, Eduardo Nunes wrote: I think that I didn't explain it right. What I want is that wicket concatenate all included javascripts into one file. Something like Generate just one resource with "javacript1.js", "javacript2.js" and "javacript3.js" concatenated. The reason for that is to reduce the number of requests. I have a project that includes almost 10 javascripts files and around 7 css files, it would be faster if the browser has to download just 2 files, one for all javascript and another one for css. I can do it with a servlet or something like this, but I want a solution that works inside wicket, that i don't have to change my source code. Probably wicket has a piece of source code responsible for the tag, If I could intercept it and get all included javascripts, remove them from the generated html and include my own resource with all javascripts concatenated, I would be happy hehehe Please ask me if you don't understand, I have to improve my english :( Thanks, Eduardo S. Nunes On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn wrote: On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes wrote: Hi, Is there a way to tell wicket to package all referenced javascripts together, the same for the css? If there isn't this solution yet, can anyone tell me where should I look for to implement it? You can put your resources, like css and javascript, directly in your packages either under src/main/java or src/main/resources and include them through header inclusions using a ResourceReference Craig. Thanks, Eduardo S. Nunes --- -- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Craig Tataryn site: http://www.basementcoders.com/ podcast:http://feeds.feedburner.com/TheBasementCoders irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin im: craiger...@hotmail.com, skype: craig.tataryn - 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: Can client cache pages effectively?
Still sounds like you're jumping through hoops to force this HTML caching to fit - possibly opening up security vulnerabilities by exposing a user's role in the URL - which should only be in the session. I maintain that you'd be better off caching the data - that's the expensive part anyway. But it's your app and that's my two cents. :) -- Jeremy Thomerson http://www.wickettraining.com On Thu, Apr 9, 2009 at 11:29 AM, Jim Pinkham wrote: > A quick follow up in case anyone else was curious about how this is going: > > I ended up using ehcache page cache filter for a simple page that just > displays 'current' items (calendar view of events) based on a db query. No > forms (state) on this page so it works pretty well. In my DAO that does > updates, I clear the cache. Very simple, works great. (Only catch I ran > into is that my menus change when I have a session and I'm logged in as > super-user, so I have to make sure I don't let that version of the page be > cached - I do that by adding 'super' page parameter so URL is different > and filter is set to only cache the 'normal' version. > > So, that still leaves me with my main catalog page, which is primarily a > similar list of items, but it also has some active content (in particular, > a > search form). > > So my bright idea (tm) (i.e. I'd love to hear critiques before I get too > far along with it) is the following: > > Make a new page for just the data grid, with page parameters including the > search string and last-modified date (and super-user login because I get > some edit links and such with that). Mount it and ehcache it, and override > setHeader so it becomes client cache-able. Then, my outer catalog page > with the search form on it just uses an IFrame to display the grid data > (easy to keep track of last-modified globally). Same clear method in DAO > dumps the cache whenever a change is made. > > Also, I'd want to make a robot no-follow thing to avoid google trap on that > page. Could this actually be a legitimate use of otherwise dodgy IFRAME ? > > Sound like a good plan? > > Thanks, > -- Jim. > > On Fri, Mar 27, 2009 at 1:56 PM, Jim Pinkham wrote: > > > Jeremy, > > > > Thanks for your thoughtful reply - Scenario is exactly right. > > I played around with page headers to make the whole page cacheable, but > ran > > into several problems - I have a search form, and there's an 'admin' > login > > that enables edit links. So it's really a stateful page, but I want to > > speed up the most common state. > > > > The bulk of the content is from an AjaxFallbackDefaultDataTable with > > sortable columns. I re-sorted a column with the Ajax Debug window open to > > measure it's data size - about 225000 chars. My database search takes > > 64ms. Overall client repaint time is about 2 sec with browser on > > localhost. I haven't found the right hook to measure total wicket > response > > time yet, but it appears pretty quick - so that's why I thougth it made > > sense to focus on client caching. > > > > Before I give up entirely on this idea, I'm wondering if it might make > > sense to make the grid a public Resource, which I'm hoping the browser > would > > treat like an image. I can afford a separate db query to just get my > > max(lastModified), which might let me save the time to generate HTML, > which > > looks as though it could be my bottleneck. If this way is too hard, I'll > > give up, but it sounds do-able - what do you think? > > Thanks, > > -- Jim. > > > > > > On Thu, Mar 26, 2009 at 6:30 PM, Jeremy Thomerson < > > jer...@wickettraining.com> wrote: > > > >> How is this going to help you? Scenario as I understand it: > >> > >> > >> 1. User requests homepage - pulls from site - with your etag in it > >> 2. User requests homepage again - calls site - your server does all of > >> the loading of data - then you calculate / set etag > >> 3. Browser now knows that it is the same as before and does not have > to > >> pull the HTML down > >> > >> The user saves what is likely a very short time in the overall scheme of > >> things - downloading the HTML. > >> The user still has to sit through the process of you loading the data > from > >> the search / DB / etc. and generating HTML > >> Your server saves no load - but a little bandwidth. > >> > >> I'd look at caching before it even gets to your server. Otherwise your > >> user > >> will likely not see much benefit unless you are sending multiple MB of > >> data > >> back. Sounds like premature optimization to me. > >> > >> -- > >> Jeremy Thomerson > >> http://www.wickettraining.com > >> > >> > >> > >> On Thu, Mar 26, 2009 at 5:26 PM, Jim Pinkham > wrote: > >> > >> > Thanks Jerry; I think that applies only to static pages. > >> > > >> > My next idea is to try overridding WebPage.setHeaders and just set the > >> > > >> > response.setHeader("Cache-Control", "max-age=3600, must-revalidate"); > >> > > >> > response.setHeader("ETag", "1"); // I'll use a checksum on the
Re: GWT vs. Wicket?
I really like the idea behind GWT. And striving for a statically typed 'true' OO programming model is what GWT and Wicket have in common. I haven't build anything with GWT, so my opinions in this respect are what I infer from how I think GWT works. I expect GWT to scale more easily if you plan well for it. Meaning that you probably don't want to end up with a very crowded pages that's very chatty with the server.. in that case Wicket might actually be more efficient (probably a surprise for many) because often times it'll do everything in one request (locality). A few other things I like about Wicket when compared with GWT: - It's just the Java code you work with, nothing complicating like an extra compile step (in GWT's case to JavaScript) or even byte code engineering like many other frameworks do. This makes Wicket easier to debug - though admitted Wicket doesn't have the easiest to follow bowels around due to the magic we have to do to give users a stateful programing experience. - Wicket is very flexible. I've read comments a while back of someone saying Wicket doesn't very well support integrating with other libraries... well, that's just bullocks. Some things will be harder than other things, but you can pretty much take the framework apart at any level and replace with your own ideas, including tags that dynamically create components and stuff. - Wicket is completely dynamic. I've worked on several projects now where we had panels contributed by e.g. domain objects. Maybe not something that appeals to people who take separation of layers ultra serious, but I think it is awesome. I currently use this for functionality that is about surveys. Surveys have questions, and these questions can be anything... free text, multiple choice, but potentially location or color. Questions can contribute their own panels for editing and viewing. So we can decide at some point to e.g. develop a location question, that displays a map, and we could jar the question with the UI with it, plug it in, and no-one ever had to touch other parts of the UI. I love that kind of flexiblity, and it's hard to find frameworks that support stuff like that (though I expect that you can achieve something like this with GWT, I don't expect it to be as straightforward as with Wicket). - It's safe by default. I don't mean hacker-safe, but rather that you never by default communicate sensitive info like IDs (or as with GWT whole objects) with clients. My experience with using other frameworks than Wicket is that we always spent quite a bit of time making sure users couldn't do things they weren't supposed to do (like deleting an object they have no right for), whereas with Wicket based projects the amount of time doing this is zero. I do expect a few things to be nicer with GWT though. Mainly, no worries about scaling (Wicket *is* scalable, but beyond a few servers you'll have to do work for it, while with GWT it's mainly a question of scaling your services and avoid too much chatty-ness), and no worries about detaching models! And these two advantages can be large enough for someone to prefer GWT. I can easily make this email 3 times longer with my perceived pros and cons, but these are the things that spontaneously came up. :-) Eelco On Wed, Apr 8, 2009 at 6:11 AM, Casper Bang wrote: > I was just wondering about the Wicket community's opinion of GWT. It seems > to share many of the positive characteristics as Wicket (focus on code, not > markup) with the major difference/benefit as I see, that is does not > maintain any state on the server. Also, with GWT you seem to get more > readily available components (i.e. http://extjs.com/explorer/). The bennefit > of Wicket as I can see, is that applications potentially degrade nicer and > the programming model hides the Ajax RPC better. Any thoughts? > > /Casper > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Cache oddity ... maybe
I have briefly looked at ur codes. Have u checked if your code has not executed the refresh / reload routine? Some methods are not executed in AJAX. Sorry I can't tell u what methods offhand. If you placed your code in those methods then ur new items will not be loaded but it will when u do a page refresh. This has happened to me before. -- View this message in context: http://www.nabble.com/Cache-oddity-...-maybe-tp22889814p22983675.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 control the required validations before the validation process is started
Hi, I need to control the required validations set on the components dynamically depending on the value of the other element (ex: selecting a radio button should trigger required field validation for some elements). For this I extended the components, and I m dynamically adding or removing the required validation even though the required validation was set in the constructor. I tried calling the validations controlling method in the onValidate(), validate()... but before the control comes to my method, all the validations are happening. Is there any method while will be called before the validation process is not yet started or just before the validations are checked, so that I can control the validations dynamically. Thanks, Srinivas Get your world in your inbox! Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id! Log on to http://www.sify.com ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail & notify us immediately at ad...@sifycorp.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Package all CSS and JS
Oh nice... exactly what I was thinking... glad I don't have to write it! - Brill Pappin On 9-Apr-09, at 1:26 PM, Roman Zechner wrote: Hi Eduardo! I remember there was once a discussion here on the mailing list, I think part of that was http://techblog.molindo.at/2008/08/wicket-interface-speed-up-merging-resources-for-fewer-http-requests.html Roman Eduardo Nunes wrote: for the css and for the javascripts On Thu, Apr 9, 2009 at 11:57 AM, Eduardo Nunes wrote: I think that I didn't explain it right. What I want is that wicket concatenate all included javascripts into one file. Something like Generate just one resource with "javacript1.js", "javacript2.js" and "javacript3.js" concatenated. The reason for that is to reduce the number of requests. I have a project that includes almost 10 javascripts files and around 7 css files, it would be faster if the browser has to download just 2 files, one for all javascript and another one for css. I can do it with a servlet or something like this, but I want a solution that works inside wicket, that i don't have to change my source code. Probably wicket has a piece of source code responsible for the tag, If I could intercept it and get all included javascripts, remove them from the generated html and include my own resource with all javascripts concatenated, I would be happy hehehe Please ask me if you don't understand, I have to improve my english :( Thanks, Eduardo S. Nunes On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn wrote: On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes wrote: Hi, Is there a way to tell wicket to package all referenced javascripts together, the same for the css? If there isn't this solution yet, can anyone tell me where should I look for to implement it? You can put your resources, like css and javascript, directly in your packages either under src/main/java or src/main/resources and include them through header inclusions using a ResourceReference Craig. Thanks, Eduardo S. Nunes - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Craig Tataryn site: http://www.basementcoders.com/ podcast:http://feeds.feedburner.com/TheBasementCoders irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin im: craiger...@hotmail.com, skype: craig.tataryn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Liland ...does IT better Liland IT GmbH Creative Master email: roman.zech...@liland.at office: +43 (0)463 220-111 | fax: +43 (0)463 220-288 http://www.Liland.at - 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: Package all CSS and JS
Funny, I was thinking that same thing... in one quick app i was writing, I had ~20 header links! I kept thinking "that can't be good" :) although I have not done so yet, I think there must be a way to modify or create a resource loader that would generate a buffered version of css (for isntance) and change the request page to just load it. Let us know if you tackle that one... I'd love to see the code. - Brill Pappin On 9-Apr-09, at 10:57 AM, Eduardo Nunes wrote: I think that I didn't explain it right. What I want is that wicket concatenate all included javascripts into one file. Something like Generate just one resource with "javacript1.js", "javacript2.js" and "javacript3.js" concatenated. The reason for that is to reduce the number of requests. I have a project that includes almost 10 javascripts files and around 7 css files, it would be faster if the browser has to download just 2 files, one for all javascript and another one for css. I can do it with a servlet or something like this, but I want a solution that works inside wicket, that i don't have to change my source code. Probably wicket has a piece of source code responsible for the tag, If I could intercept it and get all included javascripts, remove them from the generated html and include my own resource with all javascripts concatenated, I would be happy hehehe Please ask me if you don't understand, I have to improve my english :( Thanks, Eduardo S. Nunes On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn wrote: On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes wrote: Hi, Is there a way to tell wicket to package all referenced javascripts together, the same for the css? If there isn't this solution yet, can anyone tell me where should I look for to implement it? You can put your resources, like css and javascript, directly in your packages either under src/main/java or src/main/resources and include them through header inclusions using a ResourceReference Craig. Thanks, Eduardo S. Nunes - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Craig Tataryn site: http://www.basementcoders.com/ podcast:http://feeds.feedburner.com/TheBasementCoders irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin im: craiger...@hotmail.com, skype: craig.tataryn - 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: GWT vs. Wicket?
There is no real easy way, but to do it :) I find the hardest thing about Wicket, particularly when your first starting out, is discarding all the old ideas about how a webapp is built... Having worked in the field for a long time, servlets, JSPs, Struts, etc. it took me a while to get over the old patterns of doing things and start thinking more wicket'y I still have trouble with WIcket now and then because there *is* quite a lot of complexity when your doing something non-standard, however I usually find that the answer is the obvious one and trying something usually works... and when I think about it, i realize that the same non-standard "thing" i was doing would have taken just as much time in any other framework to sort out. What I love wicket for in particular, is the very good separation between view and controller/model. no more crap logic in my HTML! Yay. Anyway, i'll continue to use both GWT and Wicket. - Brill Pappin On 8-Apr-09, at 9:24 PM, ying rss wrote: I played with both GWT and wicket. I was drawn to wicket by several reviews and I'm disappointed. I use maven to build gwt and ext-js and GXT which works very well. Compilation is slow but with tuning to specific browser, the call stack is straight forward. It's my feeling that GWT is closer to core java than wicket. * I don't know much about javascript so I like the idea of language separation in GWT. Not very much into wicket's way to blend everything together. * Appreciate the fact there are samples for wicket. But Wicket's documentation and samples are not enough. There is a lot of pain to do a little bit more advanced things in wicket for beginners and there are many user requests in user email list. I never had so much trouble in my gwt project. Maybe I haven't found a easy way out. Appreciate any suggestions. -- View this message in context: http://www.nabble.com/GWT-vs.-Wicket--tp22950178p22962926.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: Turning off ModificationWatcher
i dont think that is on by default anymore. it made the app too slow even for dev mode :) -igor On Thu, Apr 9, 2009 at 6:07 PM, Jonathan Locke wrote: > > > Oh, it's MUCH worse than even that. Every single component constructed by > your application will get a complete Java stack trace attached to it at the > point of construction. Not only does that seriously damage your performance, > but this stack trace also takes up space! This is why we warn you about not > deploying in development mode on startup. > > > Martin Voigt-2 wrote: >> >> Na, nothing "catastrophic" will happen, or else you won't be able to >> development your app using development configuration...HOWEVER...the >> performance of your app is likely to double when running in deployment >> mode, some exceptions won't be visible to the user (i think >> component-in-use-check and others), serialization checks won't slow >> you down, that kind of stuff. >> >> If you look at the WebApplication class, you will find lots of getters >> like getRequestSettings(), getApplicationSettings() and so forth, from >> what I know, development configuration is a defined set of these >> configs which sorely focus on helping you while developing, but they >> won't help you at all while running in production mode, cos they're >> not optimized for that. On the other hand, deployment configuration is >> a defined set of these configs which sorely help you getting >> performance and "be in production". >> >> It's like running your app with logging on trace level when in >> development...If your app is any good, it may be it won't harm you at >> all (we had an app out in production running in development mode for >> weeks), but your performance will suffer for sure. >> >> bw, >> Martin >> >> 2009/4/10 Sam Stainsby : >>> On Thu, 09 Apr 2009 08:41:20 +0200, Martijn Dashorst wrote: >>> Never *EVER* deploy your application in development mode. Use deployment mode and turn those features you want on. >>> >>> Just curious - does something catastrophic happen? I'm running a testing >>> demo for a client and haven't bothered turning off development mode (I >>> assume it is on by default?). It runs fine. >>> >>> Cheers, >>> Sam. >>> >>> >>> - >>> 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/Turning-off-ModificationWatcher-tp22963478p22981611.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: Changing form validation depending on submit button.
there is form#onvalidate() -igor On Thu, Apr 9, 2009 at 5:05 PM, Ian MacLarty wrote: > On Thu, Apr 9, 2009 at 8:20 PM, John Krasnay wrote: >> Have a look here: >> >> http://cwiki.apache.org/WICKET/conditional-validation.html >> > > Thanks. That's pretty much what I ended up doing. It seemed a bit > kludgy to be doing validation in the onSubmit method. It means I > can't put my error handling code in onError where it should be. Not a > big deal though. > > Cheers, > Ian. > > - > 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: Turning off ModificationWatcher
Oh, it's MUCH worse than even that. Every single component constructed by your application will get a complete Java stack trace attached to it at the point of construction. Not only does that seriously damage your performance, but this stack trace also takes up space! This is why we warn you about not deploying in development mode on startup. Martin Voigt-2 wrote: > > Na, nothing "catastrophic" will happen, or else you won't be able to > development your app using development configuration...HOWEVER...the > performance of your app is likely to double when running in deployment > mode, some exceptions won't be visible to the user (i think > component-in-use-check and others), serialization checks won't slow > you down, that kind of stuff. > > If you look at the WebApplication class, you will find lots of getters > like getRequestSettings(), getApplicationSettings() and so forth, from > what I know, development configuration is a defined set of these > configs which sorely focus on helping you while developing, but they > won't help you at all while running in production mode, cos they're > not optimized for that. On the other hand, deployment configuration is > a defined set of these configs which sorely help you getting > performance and "be in production". > > It's like running your app with logging on trace level when in > development...If your app is any good, it may be it won't harm you at > all (we had an app out in production running in development mode for > weeks), but your performance will suffer for sure. > > bw, > Martin > > 2009/4/10 Sam Stainsby : >> On Thu, 09 Apr 2009 08:41:20 +0200, Martijn Dashorst wrote: >> >>> Never *EVER* deploy your application in development mode. Use deployment >>> mode and turn those features you want on. >> >> Just curious - does something catastrophic happen? I'm running a testing >> demo for a client and haven't bothered turning off development mode (I >> assume it is on by default?). It runs fine. >> >> Cheers, >> Sam. >> >> >> - >> 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/Turning-off-ModificationWatcher-tp22963478p22981612.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: Turning off ModificationWatcher
Oh, it's MUCH worse than even that. Every single component constructed by your application will get a complete Java stack trace attached to it at the point of construction. Not only does that seriously damage your performance, but this stack trace also takes up space! This is why we warn you about not deploying in development mode on startup. Martin Voigt-2 wrote: > > Na, nothing "catastrophic" will happen, or else you won't be able to > development your app using development configuration...HOWEVER...the > performance of your app is likely to double when running in deployment > mode, some exceptions won't be visible to the user (i think > component-in-use-check and others), serialization checks won't slow > you down, that kind of stuff. > > If you look at the WebApplication class, you will find lots of getters > like getRequestSettings(), getApplicationSettings() and so forth, from > what I know, development configuration is a defined set of these > configs which sorely focus on helping you while developing, but they > won't help you at all while running in production mode, cos they're > not optimized for that. On the other hand, deployment configuration is > a defined set of these configs which sorely help you getting > performance and "be in production". > > It's like running your app with logging on trace level when in > development...If your app is any good, it may be it won't harm you at > all (we had an app out in production running in development mode for > weeks), but your performance will suffer for sure. > > bw, > Martin > > 2009/4/10 Sam Stainsby : >> On Thu, 09 Apr 2009 08:41:20 +0200, Martijn Dashorst wrote: >> >>> Never *EVER* deploy your application in development mode. Use deployment >>> mode and turn those features you want on. >> >> Just curious - does something catastrophic happen? I'm running a testing >> demo for a client and haven't bothered turning off development mode (I >> assume it is on by default?). It runs fine. >> >> Cheers, >> Sam. >> >> >> - >> 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/Turning-off-ModificationWatcher-tp22963478p22981611.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:link behavior changed in 1.4r2
Hi, I'm trying to upgrade several sites from 1.4m3 to 1.4r2 and have hit an issue with the AutoLinkResolver. We have lots of html with linked images that look like this: This used to work fine, but with the last couple of releases (r1 and r2) clicking on the image directs the user to a blank page with the image on it rather than the intended page link through a javascript onclick action. Ideally I'd like to turn off processing of img tags by the AutoLinkResolver and only have it process href's, but I can't figure out how to do that from the javadocs. Can someone point me in the right direction? Going back and setting each of these up as a BookmarkablePageLink is not an option, we need the auto linking behavior. Thanks, -Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Turning off ModificationWatcher
Na, nothing "catastrophic" will happen, or else you won't be able to development your app using development configuration...HOWEVER...the performance of your app is likely to double when running in deployment mode, some exceptions won't be visible to the user (i think component-in-use-check and others), serialization checks won't slow you down, that kind of stuff. If you look at the WebApplication class, you will find lots of getters like getRequestSettings(), getApplicationSettings() and so forth, from what I know, development configuration is a defined set of these configs which sorely focus on helping you while developing, but they won't help you at all while running in production mode, cos they're not optimized for that. On the other hand, deployment configuration is a defined set of these configs which sorely help you getting performance and "be in production". It's like running your app with logging on trace level when in development...If your app is any good, it may be it won't harm you at all (we had an app out in production running in development mode for weeks), but your performance will suffer for sure. bw, Martin 2009/4/10 Sam Stainsby : > On Thu, 09 Apr 2009 08:41:20 +0200, Martijn Dashorst wrote: > >> Never *EVER* deploy your application in development mode. Use deployment >> mode and turn those features you want on. > > Just curious - does something catastrophic happen? I'm running a testing > demo for a client and haven't bothered turning off development mode (I > assume it is on by default?). It runs fine. > > Cheers, > Sam. > > > - > 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: Changing form validation depending on submit button.
On Thu, Apr 9, 2009 at 8:20 PM, John Krasnay wrote: > Have a look here: > > http://cwiki.apache.org/WICKET/conditional-validation.html > Thanks. That's pretty much what I ended up doing. It seemed a bit kludgy to be doing validation in the onSubmit method. It means I can't put my error handling code in onError where it should be. Not a big deal though. Cheers, Ian. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re: Turning off ModificationWatcher
Thank you for your mail. I am presently on vacation and will return April 14th. If you need urgent assistance, please email supp...@bookingbooster.com. You can also reach our Support via Skype callto://premiersupport Thank you Best regards, Nick Wheeler Booking Booster.com t: +44 (0)1273 573851 e: integrat...@bookingbooster.com a: The Brighton Forum 95 Ditchling Road Brighton BN1 4ST East Sussex United Kingdom Booking Booster is the smarter, easier and more elegant way to update agent websites. Save time, Boost Bookings with: http://www.bookingbooster.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Turning off ModificationWatcher
On Thu, 09 Apr 2009 08:41:20 +0200, Martijn Dashorst wrote: > Never *EVER* deploy your application in development mode. Use deployment > mode and turn those features you want on. Just curious - does something catastrophic happen? I'm running a testing demo for a client and haven't bothered turning off development mode (I assume it is on by default?). It runs fine. Cheers, Sam. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: debugging a Wicket application running under Jetty-6.1 in Eclipse
I'll suggest to do it in the Wicket Way, you will have much more benefits. If you made your project from the QuickStart, you will notice a 'Start' class under your 'test' source. that what it does is just start an embedded jetty pointing to your webapp directory and mounting your application under "/" context. so just right click on it and click "Debug as" -> Java Application and you're done. Even if you are working on a multi-module maven project this will work, just make sure your module are installed on your local repository, issuing 'mvn install' on the root project. If you have question regarding the 'Start.java' class just let us know. mchenini wrote: > > Hi, > > > > This is about debugging a Wicket application running under Jetty-6.1 in > Eclipse. > > > > I followed the steps shown at: > http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Pl > ugin+inside+Eclipse > > But I am getting this exception: > > > > java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher > > > Exception in thread "main" > > > Any help? > > > The steps I followed are: > > > Step 1 > Go to the Run/External Tools/External Tools ..." menu item on the "Run" > menu bar. Select "Program" and click the "New" button. On the "Main" > tab, fill in the "Location:" as the full path to your "mvn" executable. > C:\java\DEVTOOLS\MAIN\maven2\bin > > For the "Working Directory:" select the workspace that matches your > webapp. For "Arguments:" add jetty:run. > > Move to the "Environment" tab and click the "New" button to add a new > variable named MAVEN_OPTS with the value: > > -Xdebug -Xnoagent -Djava.compiler=NONE > -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y > > If you supply suspend=n instead of suspend=y you can start immediately > without running the debugger and launch the debugger at anytime you > really wish to debug. > > > > Step 2 > > Then, pull up the "Run/Debug/Debug ..." menu item and select "Remote > Java Application" and click the "New" button. Fill in the dialog by > selecting your webapp project for the "Project:" field, and ensure you > are using the same port number as you specified in the address= property > above. > > Now all you need to do is to Run/External Tools and select the name of > the maven tool setup you created in step 1 to start the plugin and then > Run/Debug and select the name of the debug setup you setup in step2. > > > > > > > > Thanks, > > Mohamed > > > This email/fax message is for the sole use of the intended > recipient(s) and may contain confidential and privileged information. > Any unauthorized review, use, disclosure or distribution of this > email/fax is prohibited. If you are not the intended recipient, please > destroy all paper and electronic copies of the original message. > > -- View this message in context: http://www.nabble.com/debugging-a-Wicket-application-running-under-Jetty-6.1-in-Eclipse-tp22979929p22980041.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
debugging a Wicket application running under Jetty-6.1 in Eclipse
Hi, This is about debugging a Wicket application running under Jetty-6.1 in Eclipse. I followed the steps shown at: http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Pl ugin+inside+Eclipse But I am getting this exception: java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher Exception in thread "main" Any help? The steps I followed are: Step 1 Go to the Run/External Tools/External Tools ..." menu item on the "Run" menu bar. Select "Program" and click the "New" button. On the "Main" tab, fill in the "Location:" as the full path to your "mvn" executable. C:\java\DEVTOOLS\MAIN\maven2\bin For the "Working Directory:" select the workspace that matches your webapp. For "Arguments:" add jetty:run. Move to the "Environment" tab and click the "New" button to add a new variable named MAVEN_OPTS with the value: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y If you supply suspend=n instead of suspend=y you can start immediately without running the debugger and launch the debugger at anytime you really wish to debug. Step 2 Then, pull up the "Run/Debug/Debug ..." menu item and select "Remote Java Application" and click the "New" button. Fill in the dialog by selecting your webapp project for the "Project:" field, and ensure you are using the same port number as you specified in the address= property above. Now all you need to do is to Run/External Tools and select the name of the maven tool setup you created in step 1 to start the plugin and then Run/Debug and select the name of the debug setup you setup in step2. Thanks, Mohamed This email/fax message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of this email/fax is prohibited. If you are not the intended recipient, please destroy all paper and electronic copies of the original message.
flush after ?
Is there an easy way to flush after you send the tag? http://developer.yahoo.com/performance/rules.html#flush I don't know if this is premature optimization or just hoping for magic speed up from simple fixes... but it is worth a shot! thanks ryan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Package all CSS and JS
Take a look to web resource optimizer (wro4j) project, hosted on google code. It's pretty easy to use: http://code.google.com/p/wro4j/ wro4j Alex Eduardo Nunes wrote: > > I think that I didn't explain it right. What I want is that wicket > concatenate all included javascripts into one file. Something like > > > > > > > Generate just one resource with "javacript1.js", "javacript2.js" and > "javacript3.js" concatenated. The reason for that is to reduce the > number of requests. I have a project that includes almost 10 > javascripts files and around 7 css files, it would be faster if the > browser has to download just 2 files, one for all javascript and > another one for css. > > I can do it with a servlet or something like this, but I want a > solution that works inside wicket, that i don't have to change my > source code. > > Probably wicket has a piece of source code responsible for the > tag, If I could intercept it and get all included > javascripts, remove them from the generated html and include my own > resource with all javascripts concatenated, I would be happy hehehe > > Please ask me if you don't understand, I have to improve my english :( > > Thanks, > Eduardo S. Nunes > > On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn > wrote: >> On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes wrote: >> >>> Hi, >>> >>> Is there a way to tell wicket to package all referenced javascripts >>> together, the same for the css? If there isn't this solution yet, can >>> anyone tell me where should I look for to implement it? >>> >> >> You can put your resources, like css and javascript, directly in your >> packages either under src/main/java or src/main/resources and include >> them >> through header inclusions using a ResourceReference >> >> Craig. >> >> >>> Thanks, >>> Eduardo S. Nunes >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> >> -- >> Craig Tataryn >> site: http://www.basementcoders.com/ >> podcast:http://feeds.feedburner.com/TheBasementCoders >> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin >> im: craiger...@hotmail.com, skype: craig.tataryn >> > > - > 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/Package-all-CSS-and-JS-tp22971703p22978723.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 Noob: Long cannot be cast to java.lang.String
I'm referring to the days of no JSP on AS400 boxes. The only option was to out.println() from a Servlet or some Serializable object a whole bunch of HTML and then do HTTP GET URL daisy-chain to another Servlet. ;-) francisco treacy wrote .. > Well, it was available 4 years ago :) > > > 2009/4/9 David Brown : > > Hello Johan, thanks! the static NumberValidator.RangeValidator(long minimum, > long maximum) worked! Wicket is great. I just wished Wicket was available 10 > years > ago! Regards, David. > > > > There are 10 kinds of people in this world: those who understand binary and > > those > who dont (Valid only for 2's complement). > > > > - Original Message - > > From: "Johan Compagner" > > To: users@wicket.apache.org > > Sent: Tuesday, April 7, 2009 7:08:16 PM GMT -06:00 US/Canada Central > > Subject: Re: Wicket Noob: Long cannot be cast to java.lang.String > > > > You seem to have a String validator on a number field. What do you > > want to test a range? Or max value of that long? Use a different > > validor > > > > On 08/04/2009, David Brown wrote: > >> Hello Wicket dev, gurus and mortals, I was successfully using Wicket to > >> build the UI for my new web-app gig. I have studied the javadoc: > >> org.apache.wicket.markup.html.form, org.apache.wicket.MarkupContainer and > >> others until bleary-eyed. The web-page I am using will display correctly > >> the > >> values for Long and Integer in a HTML text input dialog but when I try to > >> Save (write the value back to the DB) I get the following error condition. > >> I > >> can only work with String data and nothing else using the wicket ids. > >> Please > >> advise, David. > >> > >> ** > >> org.apache.wicket.WicketRuntimeException: Exception > >> 'java.lang.ClassCastException: java.lang.Long cannot be cast to > >> java.lang.String' occurred during validation > >> org.apache.wicket.validation.validator.StringValidator$MaximumLengthValidator > >> on component 1:editform:weight at > >> org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) > >> > >> There are 10 kinds of people in this world: those who understand binary and > >> those who dont (Valid only for 2's complement). > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Can client cache pages effectively?
Usually IFrame isn't a good idea, I think it's because of the accessibility and search engines. At least that is what the major part of the HTML coders talk about it. But I can't think in another way to do it. just my 5c On Thu, Apr 9, 2009 at 1:29 PM, Jim Pinkham wrote: > A quick follow up in case anyone else was curious about how this is going: > > I ended up using ehcache page cache filter for a simple page that just > displays 'current' items (calendar view of events) based on a db query. No > forms (state) on this page so it works pretty well. In my DAO that does > updates, I clear the cache. Very simple, works great. (Only catch I ran > into is that my menus change when I have a session and I'm logged in as > super-user, so I have to make sure I don't let that version of the page be > cached - I do that by adding 'super' page parameter so URL is different > and filter is set to only cache the 'normal' version. > > So, that still leaves me with my main catalog page, which is primarily a > similar list of items, but it also has some active content (in particular, a > search form). > > So my bright idea (tm) (i.e. I'd love to hear critiques before I get too > far along with it) is the following: > > Make a new page for just the data grid, with page parameters including the > search string and last-modified date (and super-user login because I get > some edit links and such with that). Mount it and ehcache it, and override > setHeader so it becomes client cache-able. Then, my outer catalog page > with the search form on it just uses an IFrame to display the grid data > (easy to keep track of last-modified globally). Same clear method in DAO > dumps the cache whenever a change is made. > > Also, I'd want to make a robot no-follow thing to avoid google trap on that > page. Could this actually be a legitimate use of otherwise dodgy IFRAME ? > > Sound like a good plan? > > Thanks, > -- Jim. > > On Fri, Mar 27, 2009 at 1:56 PM, Jim Pinkham wrote: > >> Jeremy, >> >> Thanks for your thoughtful reply - Scenario is exactly right. >> I played around with page headers to make the whole page cacheable, but ran >> into several problems - I have a search form, and there's an 'admin' login >> that enables edit links. So it's really a stateful page, but I want to >> speed up the most common state. >> >> The bulk of the content is from an AjaxFallbackDefaultDataTable with >> sortable columns. I re-sorted a column with the Ajax Debug window open to >> measure it's data size - about 225000 chars. My database search takes >> 64ms. Overall client repaint time is about 2 sec with browser on >> localhost. I haven't found the right hook to measure total wicket response >> time yet, but it appears pretty quick - so that's why I thougth it made >> sense to focus on client caching. >> >> Before I give up entirely on this idea, I'm wondering if it might make >> sense to make the grid a public Resource, which I'm hoping the browser would >> treat like an image. I can afford a separate db query to just get my >> max(lastModified), which might let me save the time to generate HTML, which >> looks as though it could be my bottleneck. If this way is too hard, I'll >> give up, but it sounds do-able - what do you think? >> Thanks, >> -- Jim. >> >> >> On Thu, Mar 26, 2009 at 6:30 PM, Jeremy Thomerson < >> jer...@wickettraining.com> wrote: >> >>> How is this going to help you? Scenario as I understand it: >>> >>> >>> 1. User requests homepage - pulls from site - with your etag in it >>> 2. User requests homepage again - calls site - your server does all of >>> the loading of data - then you calculate / set etag >>> 3. Browser now knows that it is the same as before and does not have to >>> pull the HTML down >>> >>> The user saves what is likely a very short time in the overall scheme of >>> things - downloading the HTML. >>> The user still has to sit through the process of you loading the data from >>> the search / DB / etc. and generating HTML >>> Your server saves no load - but a little bandwidth. >>> >>> I'd look at caching before it even gets to your server. Otherwise your >>> user >>> will likely not see much benefit unless you are sending multiple MB of >>> data >>> back. Sounds like premature optimization to me. >>> >>> -- >>> Jeremy Thomerson >>> http://www.wickettraining.com >>> >>> >>> >>> On Thu, Mar 26, 2009 at 5:26 PM, Jim Pinkham wrote: >>> >>> > Thanks Jerry; I think that applies only to static pages. >>> > >>> > My next idea is to try overridding WebPage.setHeaders and just set the >>> > >>> > response.setHeader("Cache-Control", "max-age=3600, must-revalidate"); >>> > >>> > response.setHeader("ETag", "1"); // I'll use a checksum on the data >>> coming >>> > back from my search (Even better would be a checksum on the rendered >>> page >>> > data - any idea how to do that?) >>> > Initial test (above) seems promising... >>> > >>> > Thanks, >>> > -- Jim. >>> > >>> > On Thu, Mar 26, 2009 at 3:2
Re: Package all CSS and JS
Hi Eduardo! I remember there was once a discussion here on the mailing list, I think part of that was http://techblog.molindo.at/2008/08/wicket-interface-speed-up-merging-resources-for-fewer-http-requests.html Roman Eduardo Nunes wrote: for the css and for the javascripts On Thu, Apr 9, 2009 at 11:57 AM, Eduardo Nunes wrote: I think that I didn't explain it right. What I want is that wicket concatenate all included javascripts into one file. Something like Generate just one resource with "javacript1.js", "javacript2.js" and "javacript3.js" concatenated. The reason for that is to reduce the number of requests. I have a project that includes almost 10 javascripts files and around 7 css files, it would be faster if the browser has to download just 2 files, one for all javascript and another one for css. I can do it with a servlet or something like this, but I want a solution that works inside wicket, that i don't have to change my source code. Probably wicket has a piece of source code responsible for the tag, If I could intercept it and get all included javascripts, remove them from the generated html and include my own resource with all javascripts concatenated, I would be happy hehehe Please ask me if you don't understand, I have to improve my english :( Thanks, Eduardo S. Nunes On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn wrote: On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes wrote: Hi, Is there a way to tell wicket to package all referenced javascripts together, the same for the css? If there isn't this solution yet, can anyone tell me where should I look for to implement it? You can put your resources, like css and javascript, directly in your packages either under src/main/java or src/main/resources and include them through header inclusions using a ResourceReference Craig. Thanks, Eduardo S. Nunes - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Craig Tataryn site: http://www.basementcoders.com/ podcast:http://feeds.feedburner.com/TheBasementCoders irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin im: craiger...@hotmail.com, skype: craig.tataryn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Liland ...does IT better Liland IT GmbH Creative Master email: roman.zech...@liland.at office: +43 (0)463 220-111 | fax: +43 (0)463 220-288 http://www.Liland.at - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Communication between applications, one using wicket
What about some kind of messaging (JMS, AMQP, ...) ? It'd be blazing combined with Comet ;-) El jue, 09-04-2009 a las 16:14 +0300, Cristi Manole escribió: > Thanks for your feedback, guys. I don't like the idea of both writing to the > database directly, because I want the layers separated. I don't think either > application should know anything about the other's database. > > I used Axis2 before, but at the moment i don't see how it can solve my > problem - meaning how to update some panel *without* doing some action > repeatedly until something worth displaying to the user happens. > > On Thu, Apr 9, 2009 at 4:00 PM, James Carman > wrote: > > > Or, just write to the database, since the wicket application polls the > > db for changes anyway. > > > > On Thu, Apr 9, 2009 at 8:59 AM, John Krasnay wrote: > > > On Thu, Apr 09, 2009 at 07:48:10AM -0500, David Brown wrote: > > >> Hello Cristi, this is typically referred to as diparate sytems > > >> communications issue. In the past I have had some success between such > > >> sytems using a WSDL and messaging. I did not have a lot of time so I > > >> opted for the Apache Axis2 framework (http://ws.apache.org/axis2/). > > >> You will have to do some work but better than developing something > > >> with low-level Java nuts-and-bolts. > > > > > > Ugh! I think Cristi's approach of a bookmarkable page is far simpler > > > than messing with SOAP stacks. > > > > > > jk > > > > > > - > > > 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: Can client cache pages effectively?
A quick follow up in case anyone else was curious about how this is going: I ended up using ehcache page cache filter for a simple page that just displays 'current' items (calendar view of events) based on a db query. No forms (state) on this page so it works pretty well. In my DAO that does updates, I clear the cache. Very simple, works great. (Only catch I ran into is that my menus change when I have a session and I'm logged in as super-user, so I have to make sure I don't let that version of the page be cached - I do that by adding 'super' page parameter so URL is different and filter is set to only cache the 'normal' version. So, that still leaves me with my main catalog page, which is primarily a similar list of items, but it also has some active content (in particular, a search form). So my bright idea (tm) (i.e. I'd love to hear critiques before I get too far along with it) is the following: Make a new page for just the data grid, with page parameters including the search string and last-modified date (and super-user login because I get some edit links and such with that). Mount it and ehcache it, and override setHeader so it becomes client cache-able. Then, my outer catalog page with the search form on it just uses an IFrame to display the grid data (easy to keep track of last-modified globally). Same clear method in DAO dumps the cache whenever a change is made. Also, I'd want to make a robot no-follow thing to avoid google trap on that page. Could this actually be a legitimate use of otherwise dodgy IFRAME ? Sound like a good plan? Thanks, -- Jim. On Fri, Mar 27, 2009 at 1:56 PM, Jim Pinkham wrote: > Jeremy, > > Thanks for your thoughtful reply - Scenario is exactly right. > I played around with page headers to make the whole page cacheable, but ran > into several problems - I have a search form, and there's an 'admin' login > that enables edit links. So it's really a stateful page, but I want to > speed up the most common state. > > The bulk of the content is from an AjaxFallbackDefaultDataTable with > sortable columns. I re-sorted a column with the Ajax Debug window open to > measure it's data size - about 225000 chars. My database search takes > 64ms. Overall client repaint time is about 2 sec with browser on > localhost. I haven't found the right hook to measure total wicket response > time yet, but it appears pretty quick - so that's why I thougth it made > sense to focus on client caching. > > Before I give up entirely on this idea, I'm wondering if it might make > sense to make the grid a public Resource, which I'm hoping the browser would > treat like an image. I can afford a separate db query to just get my > max(lastModified), which might let me save the time to generate HTML, which > looks as though it could be my bottleneck. If this way is too hard, I'll > give up, but it sounds do-able - what do you think? > Thanks, > -- Jim. > > > On Thu, Mar 26, 2009 at 6:30 PM, Jeremy Thomerson < > jer...@wickettraining.com> wrote: > >> How is this going to help you? Scenario as I understand it: >> >> >> 1. User requests homepage - pulls from site - with your etag in it >> 2. User requests homepage again - calls site - your server does all of >> the loading of data - then you calculate / set etag >> 3. Browser now knows that it is the same as before and does not have to >> pull the HTML down >> >> The user saves what is likely a very short time in the overall scheme of >> things - downloading the HTML. >> The user still has to sit through the process of you loading the data from >> the search / DB / etc. and generating HTML >> Your server saves no load - but a little bandwidth. >> >> I'd look at caching before it even gets to your server. Otherwise your >> user >> will likely not see much benefit unless you are sending multiple MB of >> data >> back. Sounds like premature optimization to me. >> >> -- >> Jeremy Thomerson >> http://www.wickettraining.com >> >> >> >> On Thu, Mar 26, 2009 at 5:26 PM, Jim Pinkham wrote: >> >> > Thanks Jerry; I think that applies only to static pages. >> > >> > My next idea is to try overridding WebPage.setHeaders and just set the >> > >> > response.setHeader("Cache-Control", "max-age=3600, must-revalidate"); >> > >> > response.setHeader("ETag", "1"); // I'll use a checksum on the data >> coming >> > back from my search (Even better would be a checksum on the rendered >> page >> > data - any idea how to do that?) >> > Initial test (above) seems promising... >> > >> > Thanks, >> > -- Jim. >> > >> > On Thu, Mar 26, 2009 at 3:22 PM, Jeremy Thomerson < >> > jer...@wickettraining.com >> > > wrote: >> > >> > > Have you looked at a standard HTTP caching proxy like >> > > http://www.squid-cache.org/ ? >> > > >> > > >> > > -- >> > > Jeremy Thomerson >> > > http://www.wickettraining.com >> > > >> > > >> > > >> > > On Thu, Mar 26, 2009 at 2:02 PM, Jim Pinkham >> wrote: >> > > >> > > > Changing my search query to this got some better hits:
Re: Turning off ModificationWatcher
it is much simpler and more efficient to set proper caching headers. concatenating resources often does not work because different components on different pages contribute different resources, so there are a lot of variations of these huge files you may end up with and would have to stream to the user over and over. yes, it would only be one request per page, but it would be a huge one over and over as opposed to being able to cache a lot of small resources and never request them again. -igor On Thu, Apr 9, 2009 at 9:00 AM, Matt Welch wrote: > > Thanks. > > Matt > > > Ryan Crumley wrote: >> >> Matt, >> >> Add this to your WebApplication.init() method: >> >> getResourceSettings().setResourcePollFrequency(null); >> >> Ryan >> >> On Wed, Apr 8, 2009 at 9:33 PM, Matthew Welch >> wrote: >>> I'm experimenting with Wicket inside Google's new Java support for its >>> App >>> Engine. My simple apps run fine if the configuration is set to >>> DEPLOYMENT, >>> however in development mode, I get an exception related to >>> ModificationWatcher. Looking at the exception I think this >>> ModificationWatcher is being used as part of a new thread which is a >>> no-no >>> inside the App Engine sandbox. Is there way way to just disbable this >>> modification watcher without putting the entire app in deployment mode? >>> There are a number of items I like about development mode but this one >>> glitch is preventing me from using it. >>> >>> Matt >>> >> >> - >> 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/Turning-off-ModificationWatcher-tp22963478p22973975.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: Montable PDF creating page
why would you want a mounted page to create pdfs? servlets are so much better at that. that said you can do getrequestcycle().setrequesttarget(new sometargetthatstreamspdfs()); throw new restartresponseexception(); -igor On Thu, Apr 9, 2009 at 12:39 AM, Stefan Lindner wrote: > I need some trick to turn the response into a PDF stream. E. g. I have a > Bookmarkable Page PdfPAge > > public class PdfPage extends WebPage { > > public PdfPage (final PageParameters parameters) { > // Respond with PDF content. > } > } > > > Application.init() { > mountBookmarkablePage("/PdfGenerator", PdfPage.class); > > Is it possible to let a WebPage create a pdfOutput? If I try to do the > following > > Response r = getResponse(); > if (r instanceof WebResponse) { > WebResponse wr = (WebResponse)r; > wr.reset(); > OutputStream os = wr.getOutputStream(); > try { > os.write(/*PDFcontent*/); > } catch (Exception e) { > e.printStackTrace(); > } > } > } > > I can see the Exception java.lang.IllegalStateException: > getOutputStream() has already been called for this response > > The reason for this is: I did not find something like > BookmarkableResource in wicket. It is no problem to have a > DynaicResourceLink in a page but the displayes content is not > bookmarkable. Any Ideas? > > - > 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: Turning off ModificationWatcher
Thanks. Matt Ryan Crumley wrote: > > Matt, > > Add this to your WebApplication.init() method: > > getResourceSettings().setResourcePollFrequency(null); > > Ryan > > On Wed, Apr 8, 2009 at 9:33 PM, Matthew Welch > wrote: >> I'm experimenting with Wicket inside Google's new Java support for its >> App >> Engine. My simple apps run fine if the configuration is set to >> DEPLOYMENT, >> however in development mode, I get an exception related to >> ModificationWatcher. Looking at the exception I think this >> ModificationWatcher is being used as part of a new thread which is a >> no-no >> inside the App Engine sandbox. Is there way way to just disbable this >> modification watcher without putting the entire app in deployment mode? >> There are a number of items I like about development mode but this one >> glitch is preventing me from using it. >> >> Matt >> > > - > 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/Turning-off-ModificationWatcher-tp22963478p22973975.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: Turning off ModificationWatcher
I have no intention of actually deploying it in development mode. I'm talking about the development sandbox provided by the Google App Engine Java SDK. Matt Martijn Dashorst wrote: > > Never *EVER* deploy your application in development mode. Use > deployment mode and turn those features you want on. > > Martijn > > On Thu, Apr 9, 2009 at 4:33 AM, Matthew Welch > wrote: >> I'm experimenting with Wicket inside Google's new Java support for its >> App >> Engine. My simple apps run fine if the configuration is set to >> DEPLOYMENT, >> however in development mode, I get an exception related to >> ModificationWatcher. Looking at the exception I think this >> ModificationWatcher is being used as part of a new thread which is a >> no-no >> inside the App Engine sandbox. Is there way way to just disbable this >> modification watcher without putting the entire app in deployment mode? >> There are a number of items I like about development mode but this one >> glitch is preventing me from using it. >> >> Matt >> > > > > -- > 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 > > > -- View this message in context: http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p22973951.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: Package all CSS and JS
for the css and for the javascripts On Thu, Apr 9, 2009 at 11:57 AM, Eduardo Nunes wrote: > I think that I didn't explain it right. What I want is that wicket > concatenate all included javascripts into one file. Something like > > > > > > > Generate just one resource with "javacript1.js", "javacript2.js" and > "javacript3.js" concatenated. The reason for that is to reduce the > number of requests. I have a project that includes almost 10 > javascripts files and around 7 css files, it would be faster if the > browser has to download just 2 files, one for all javascript and > another one for css. > > I can do it with a servlet or something like this, but I want a > solution that works inside wicket, that i don't have to change my > source code. > > Probably wicket has a piece of source code responsible for the > tag, If I could intercept it and get all included > javascripts, remove them from the generated html and include my own > resource with all javascripts concatenated, I would be happy hehehe > > Please ask me if you don't understand, I have to improve my english :( > > Thanks, > Eduardo S. Nunes > > On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn wrote: >> On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes wrote: >> >>> Hi, >>> >>> Is there a way to tell wicket to package all referenced javascripts >>> together, the same for the css? If there isn't this solution yet, can >>> anyone tell me where should I look for to implement it? >>> >> >> You can put your resources, like css and javascript, directly in your >> packages either under src/main/java or src/main/resources and include them >> through header inclusions using a ResourceReference >> >> Craig. >> >> >>> Thanks, >>> Eduardo S. Nunes >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> >> -- >> Craig Tataryn >> site: http://www.basementcoders.com/ >> podcast:http://feeds.feedburner.com/TheBasementCoders >> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin >> im: craiger...@hotmail.com, skype: craig.tataryn >> > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Package all CSS and JS
I think that I didn't explain it right. What I want is that wicket concatenate all included javascripts into one file. Something like Generate just one resource with "javacript1.js", "javacript2.js" and "javacript3.js" concatenated. The reason for that is to reduce the number of requests. I have a project that includes almost 10 javascripts files and around 7 css files, it would be faster if the browser has to download just 2 files, one for all javascript and another one for css. I can do it with a servlet or something like this, but I want a solution that works inside wicket, that i don't have to change my source code. Probably wicket has a piece of source code responsible for the tag, If I could intercept it and get all included javascripts, remove them from the generated html and include my own resource with all javascripts concatenated, I would be happy hehehe Please ask me if you don't understand, I have to improve my english :( Thanks, Eduardo S. Nunes On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn wrote: > On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes wrote: > >> Hi, >> >> Is there a way to tell wicket to package all referenced javascripts >> together, the same for the css? If there isn't this solution yet, can >> anyone tell me where should I look for to implement it? >> > > You can put your resources, like css and javascript, directly in your > packages either under src/main/java or src/main/resources and include them > through header inclusions using a ResourceReference > > Craig. > > >> Thanks, >> Eduardo S. Nunes >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > -- > Craig Tataryn > site: http://www.basementcoders.com/ > podcast:http://feeds.feedburner.com/TheBasementCoders > irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin > im: craiger...@hotmail.com, skype: craig.tataryn > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to manipulate an AjaxRequest
> It could work, but that's not what I want, because also after the exception > is thrown components could be added to the target. > In that case I've to check on every add to target if an exception has > occurred. I prefer to do this on one place. Maybe your exception handling could deal with this? Would you like to show your code in order for us to have a closer view on your particular situation? ** Martin > > > -Original Message- - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Package all CSS and JS
On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes wrote: > Hi, > > Is there a way to tell wicket to package all referenced javascripts > together, the same for the css? If there isn't this solution yet, can > anyone tell me where should I look for to implement it? > You can put your resources, like css and javascript, directly in your packages either under src/main/java or src/main/resources and include them through header inclusions using a ResourceReference Craig. > Thanks, > Eduardo S. Nunes > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Craig Tataryn site: http://www.basementcoders.com/ podcast:http://feeds.feedburner.com/TheBasementCoders irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin im: craiger...@hotmail.com, skype: craig.tataryn
RE: How to manipulate an AjaxRequest
It could work, but that's not what I want, because also after the exception is thrown components could be added to the target. In that case I've to check on every add to target if an exception has occurred. I prefer to do this on one place. But thanks for your suggestion. Regards, Frank -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Thursday, April 09, 2009 4:34 PM To: users@wicket.apache.org Subject: Re: How to manipulate an AjaxRequest >From what I can see you could have: List refreshThese = new LinkedList(); you add your components to refreshThese.add(component); and if your db update fails, just call refreshThese.clear()? Otherwise iterate through all refreshThese components and target.addComponent(refreshThese.get(itemIndex)); Could it work? Why not? ** Martin 2009/4/9 Frank Klein Koerkamp : > The exception may occur when I try to delete a record in a table. > So I click on the delete link this triggers an event that will delete record > from db. > After deletion I've to refresh an component on page, but if db gives error i > don't want to do refresh anything. > > Regards, > > Frank > > -Original Message- > From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] > Sent: Thursday, April 09, 2009 3:45 PM > To: users@wicket.apache.org > Subject: Re: How to manipulate an AjaxRequest > > You could collect your components into a list or collection before > adding them into the Target..? Or does the error occur at render-time? > > ** > Martin > > 2009/4/9 Frank Klein Koerkamp : >> Hi all, >> >> i have an Ajax call and when an exception occurs, i want to display the >> exception in an ModalWindow. >> But i also want to be able to delete everything(component, javascript) that >> is added or will be added to the AjaxRequestTarget. >> So only modalwindow popup but state on page stays the same. >> >> At this moment i'm able to let the window popup, but not yet to delete the >> other content that has been added to the AjaxRequestTarget. >> >> Does anyone have any suggestions? >> >> Kind regards, >> >> Frank Klein Koerkamp >> >> >> >> The information contained in this communication is confidential, intended >> solely for the use of the individual or entity to whom it is addressed and >> may be legally privileged and protected by professional secrecy. Access to >> this message by anyone else is unauthorized. If you are not the intended >> recipient, any disclosure, copying, or distribution of the message, or any >> action or omission taken by you in reliance on it is prohibited and may be >> unlawful. Please immediately contact the sender if you have received this >> message in error. This email does not constitute any commitment from Cordys >> Holding BV or any of its subsidiaries except when expressly agreed in a >> written agreement between the intended recipient and Cordys Holding BV or >> its subsidiaries. Cordys is neither liable for the proper and complete >> transmission of the information contained in this communication nor for any >> delay in its receipt. Cordys does not guarantee that the integrity of this >> communication has been maintained nor that the communication is free of >> viruses, interceptions or interference. If you are not the intended >> recipient of this communication please return the communication to the >> sender and delete and destroy all copies. >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to manipulate an AjaxRequest
>From what I can see you could have: List refreshThese = new LinkedList(); you add your components to refreshThese.add(component); and if your db update fails, just call refreshThese.clear()? Otherwise iterate through all refreshThese components and target.addComponent(refreshThese.get(itemIndex)); Could it work? Why not? ** Martin 2009/4/9 Frank Klein Koerkamp : > The exception may occur when I try to delete a record in a table. > So I click on the delete link this triggers an event that will delete record > from db. > After deletion I've to refresh an component on page, but if db gives error i > don't want to do refresh anything. > > Regards, > > Frank > > -Original Message- > From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] > Sent: Thursday, April 09, 2009 3:45 PM > To: users@wicket.apache.org > Subject: Re: How to manipulate an AjaxRequest > > You could collect your components into a list or collection before > adding them into the Target..? Or does the error occur at render-time? > > ** > Martin > > 2009/4/9 Frank Klein Koerkamp : >> Hi all, >> >> i have an Ajax call and when an exception occurs, i want to display the >> exception in an ModalWindow. >> But i also want to be able to delete everything(component, javascript) that >> is added or will be added to the AjaxRequestTarget. >> So only modalwindow popup but state on page stays the same. >> >> At this moment i'm able to let the window popup, but not yet to delete the >> other content that has been added to the AjaxRequestTarget. >> >> Does anyone have any suggestions? >> >> Kind regards, >> >> Frank Klein Koerkamp >> >> >> >> The information contained in this communication is confidential, intended >> solely for the use of the individual or entity to whom it is addressed and >> may be legally privileged and protected by professional secrecy. Access to >> this message by anyone else is unauthorized. If you are not the intended >> recipient, any disclosure, copying, or distribution of the message, or any >> action or omission taken by you in reliance on it is prohibited and may be >> unlawful. Please immediately contact the sender if you have received this >> message in error. This email does not constitute any commitment from Cordys >> Holding BV or any of its subsidiaries except when expressly agreed in a >> written agreement between the intended recipient and Cordys Holding BV or >> its subsidiaries. Cordys is neither liable for the proper and complete >> transmission of the information contained in this communication nor for any >> delay in its receipt. Cordys does not guarantee that the integrity of this >> communication has been maintained nor that the communication is free of >> viruses, interceptions or interference. If you are not the intended >> recipient of this communication please return the communication to the >> sender and delete and destroy all copies. >> > > - > 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
Package all CSS and JS
Hi, Is there a way to tell wicket to package all referenced javascripts together, the same for the css? If there isn't this solution yet, can anyone tell me where should I look for to implement it? Thanks, Eduardo S. Nunes - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Noob: Long cannot be cast to java.lang.String
Well, it was available 4 years ago :) 2009/4/9 David Brown : > Hello Johan, thanks! the static NumberValidator.RangeValidator(long minimum, > long maximum) worked! Wicket is great. I just wished Wicket was available 10 > years ago! Regards, David. > > There are 10 kinds of people in this world: those who understand binary and > those who don’t (Valid only for 2's complement). > > - Original Message - > From: "Johan Compagner" > To: users@wicket.apache.org > Sent: Tuesday, April 7, 2009 7:08:16 PM GMT -06:00 US/Canada Central > Subject: Re: Wicket Noob: Long cannot be cast to java.lang.String > > You seem to have a String validator on a number field. What do you > want to test a range? Or max value of that long? Use a different > validor > > On 08/04/2009, David Brown wrote: >> Hello Wicket dev, gurus and mortals, I was successfully using Wicket to >> build the UI for my new web-app gig. I have studied the javadoc: >> org.apache.wicket.markup.html.form, org.apache.wicket.MarkupContainer and >> others until bleary-eyed. The web-page I am using will display correctly the >> values for Long and Integer in a HTML text input dialog but when I try to >> Save (write the value back to the DB) I get the following error condition. I >> can only work with String data and nothing else using the wicket ids. Please >> advise, David. >> >> ** >> org.apache.wicket.WicketRuntimeException: Exception >> 'java.lang.ClassCastException: java.lang.Long cannot be cast to >> java.lang.String' occurred during validation >> org.apache.wicket.validation.validator.StringValidator$MaximumLengthValidator >> on component 1:editform:weight at >> org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) >> >> There are 10 kinds of people in this world: those who understand binary and >> those who don’t (Valid only for 2's complement). >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: How to manipulate an AjaxRequest
The exception may occur when I try to delete a record in a table. So I click on the delete link this triggers an event that will delete record from db. After deletion I've to refresh an component on page, but if db gives error i don't want to do refresh anything. Regards, Frank -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Thursday, April 09, 2009 3:45 PM To: users@wicket.apache.org Subject: Re: How to manipulate an AjaxRequest You could collect your components into a list or collection before adding them into the Target..? Or does the error occur at render-time? ** Martin 2009/4/9 Frank Klein Koerkamp : > Hi all, > > i have an Ajax call and when an exception occurs, i want to display the > exception in an ModalWindow. > But i also want to be able to delete everything(component, javascript) that > is added or will be added to the AjaxRequestTarget. > So only modalwindow popup but state on page stays the same. > > At this moment i'm able to let the window popup, but not yet to delete the > other content that has been added to the AjaxRequestTarget. > > Does anyone have any suggestions? > > Kind regards, > > Frank Klein Koerkamp > > > > The information contained in this communication is confidential, intended > solely for the use of the individual or entity to whom it is addressed and > may be legally privileged and protected by professional secrecy. Access to > this message by anyone else is unauthorized. If you are not the intended > recipient, any disclosure, copying, or distribution of the message, or any > action or omission taken by you in reliance on it is prohibited and may be > unlawful. Please immediately contact the sender if you have received this > message in error. This email does not constitute any commitment from Cordys > Holding BV or any of its subsidiaries except when expressly agreed in a > written agreement between the intended recipient and Cordys Holding BV or its > subsidiaries. Cordys is neither liable for the proper and complete > transmission of the information contained in this communication nor for any > delay in its receipt. Cordys does not guarantee that the integrity of this > communication has been maintained nor that the communication is free of > viruses, interceptions or interference. If you are not the intended recipient > of this communication please return the communication to the sender and > delete and destroy all copies. > - 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 manipulate an AjaxRequest
You could collect your components into a list or collection before adding them into the Target..? Or does the error occur at render-time? ** Martin 2009/4/9 Frank Klein Koerkamp : > Hi all, > > i have an Ajax call and when an exception occurs, i want to display the > exception in an ModalWindow. > But i also want to be able to delete everything(component, javascript) that > is added or will be added to the AjaxRequestTarget. > So only modalwindow popup but state on page stays the same. > > At this moment i'm able to let the window popup, but not yet to delete the > other content that has been added to the AjaxRequestTarget. > > Does anyone have any suggestions? > > Kind regards, > > Frank Klein Koerkamp > > > > The information contained in this communication is confidential, intended > solely for the use of the individual or entity to whom it is addressed and > may be legally privileged and protected by professional secrecy. Access to > this message by anyone else is unauthorized. If you are not the intended > recipient, any disclosure, copying, or distribution of the message, or any > action or omission taken by you in reliance on it is prohibited and may be > unlawful. Please immediately contact the sender if you have received this > message in error. This email does not constitute any commitment from Cordys > Holding BV or any of its subsidiaries except when expressly agreed in a > written agreement between the intended recipient and Cordys Holding BV or its > subsidiaries. Cordys is neither liable for the proper and complete > transmission of the information contained in this communication nor for any > delay in its receipt. Cordys does not guarantee that the integrity of this > communication has been maintained nor that the communication is free of > viruses, interceptions or interference. If you are not the intended recipient > of this communication please return the communication to the sender and > delete and destroy all copies. > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to manipulate an AjaxRequest
Hi all, i have an Ajax call and when an exception occurs, i want to display the exception in an ModalWindow. But i also want to be able to delete everything(component, javascript) that is added or will be added to the AjaxRequestTarget. So only modalwindow popup but state on page stays the same. At this moment i'm able to let the window popup, but not yet to delete the other content that has been added to the AjaxRequestTarget. Does anyone have any suggestions? Kind regards, Frank Klein Koerkamp The information contained in this communication is confidential, intended solely for the use of the individual or entity to whom it is addressed and may be legally privileged and protected by professional secrecy. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. This email does not constitute any commitment from Cordys Holding BV or any of its subsidiaries except when expressly agreed in a written agreement between the intended recipient and Cordys Holding BV or its subsidiaries. Cordys is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. Cordys does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication please return the communication to the sender and delete and destroy all copies.
Re: Communication between applications, one using wicket
On Thu, Apr 9, 2009 at 9:14 AM, Cristi Manole wrote: > Thanks for your feedback, guys. I don't like the idea of both writing to the > database directly, because I want the layers separated. I don't think either > application should know anything about the other's database. > Ok, if these are truly two completely separate systems, I can see your point on not having to have it write to the same db. And, the lowest-impact mechanism for the "other" application (we're Wicket-centric here) would be to access some URL. So, it sounds like you've got it figured out. :) > I used Axis2 before, but at the moment i don't see how it can solve my > problem - meaning how to update some panel *without* doing some action > repeatedly until something worth displaying to the user happens. > I think the simplest way to achieve what you're talking about is polling, which is what you're doing by using the AJAX self-updating stuff. Just make sure your polling interval isn't too crazy. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Communication between applications, one using wicket
On Thu, Apr 09, 2009 at 04:14:43PM +0300, Cristi Manole wrote: > > I used Axis2 before, but at the moment i don't see how it can solve my > problem - meaning how to update some panel *without* doing some action > repeatedly until something worth displaying to the user happens. > I don't think anyone has a problem with the polling part of your solution. Unless your users absolutely can't wait for the polling interval to find out when the task completes then this is by far the simplest approach. Otherwise, you're into some sort of comet solution, where you keep an HTTP channel open to your server and a thread waiting at the other end to be woken up and reply the second the task is completed. jk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Communication between applications, one using wicket
Hello Cristi, it sounds like you mean polling. When I glued the two disparate systems together the Axis2 .aar file was just connected to an Oracle socket. The socket was in permissive mode so whenever the data appeared at the socket it was immediately available to the Axis2 listener and all the XML just went over the wire immediately because of some database trigger or other event on the DB side. The Axis2 .aar validated everything and acted accordingly to forward the communication to the .asp page. Just an idea. ;-) There are 10 kinds of people in this world: those who understand binary and those who don’t (Valid only for 2's complement). - Original Message - From: "Cristi Manole" To: users@wicket.apache.org Sent: Thursday, April 9, 2009 8:14:43 AM GMT -06:00 US/Canada Central Subject: Re: Communication between applications, one using wicket Thanks for your feedback, guys. I don't like the idea of both writing to the database directly, because I want the layers separated. I don't think either application should know anything about the other's database. I used Axis2 before, but at the moment i don't see how it can solve my problem - meaning how to update some panel *without* doing some action repeatedly until something worth displaying to the user happens. On Thu, Apr 9, 2009 at 4:00 PM, James Carman wrote: > Or, just write to the database, since the wicket application polls the > db for changes anyway. > > On Thu, Apr 9, 2009 at 8:59 AM, John Krasnay wrote: > > On Thu, Apr 09, 2009 at 07:48:10AM -0500, David Brown wrote: > >> Hello Cristi, this is typically referred to as diparate sytems > >> communications issue. In the past I have had some success between such > >> sytems using a WSDL and messaging. I did not have a lot of time so I > >> opted for the Apache Axis2 framework (http://ws.apache.org/axis2/). > >> You will have to do some work but better than developing something > >> with low-level Java nuts-and-bolts. > > > > Ugh! I think Cristi's approach of a bookmarkable page is far simpler > > than messing with SOAP stacks. > > > > jk > > > > - > > 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: Communication between applications, one using wicket
Thanks for your feedback, guys. I don't like the idea of both writing to the database directly, because I want the layers separated. I don't think either application should know anything about the other's database. I used Axis2 before, but at the moment i don't see how it can solve my problem - meaning how to update some panel *without* doing some action repeatedly until something worth displaying to the user happens. On Thu, Apr 9, 2009 at 4:00 PM, James Carman wrote: > Or, just write to the database, since the wicket application polls the > db for changes anyway. > > On Thu, Apr 9, 2009 at 8:59 AM, John Krasnay wrote: > > On Thu, Apr 09, 2009 at 07:48:10AM -0500, David Brown wrote: > >> Hello Cristi, this is typically referred to as diparate sytems > >> communications issue. In the past I have had some success between such > >> sytems using a WSDL and messaging. I did not have a lot of time so I > >> opted for the Apache Axis2 framework (http://ws.apache.org/axis2/). > >> You will have to do some work but better than developing something > >> with low-level Java nuts-and-bolts. > > > > Ugh! I think Cristi's approach of a bookmarkable page is far simpler > > than messing with SOAP stacks. > > > > jk > > > > - > > 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: Communication between applications, one using wicket
Hi, there are probably easier way to provide a 'callback' channel to a remote system than a wicket page. Of course, using the web server makes sense, but I'd recommend to use a simple servlet to receive the callback and to update the specific database table instead of a wicket page, since the remote system probably doesn't need to get a html response - a simple http status code is probably enough. Using axis sounds like overkill to me... On Thu, Apr 9, 2009 at 9:36 AM, Cristi Manole wrote: > Hello, > > I have a wicket application where a user starts an action on another system > (different machine, outside network). I would like for this specific user to > receive a response from that system once the action is finished (it takes a > fair amount of time) and the status of that action. > > My idea is to have inside Wicket application an ajax self updating panel, so > that the database of the application gets read from time to time. The other > application would send a "message" to the Wicket application (call some page > with some page parameters), which would update the specific database table > with the user who started the action and the response. Once the action is > finished, the self updating panel (aware of this by reading it in the > database) becomes visible and it will contain that message to inform the > user. > > I think my idea is bad. If nothing else I consider it resource savvy. > > How do you guys handle communication between two applications (the other > application is not written in java) in order to provide the response to the > user without refreshing the page? > > Thank you very much in advance, > Cristi Manole > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Communication between applications, one using wicket
Or, just write to the database, since the wicket application polls the db for changes anyway. On Thu, Apr 9, 2009 at 8:59 AM, John Krasnay wrote: > On Thu, Apr 09, 2009 at 07:48:10AM -0500, David Brown wrote: >> Hello Cristi, this is typically referred to as diparate sytems >> communications issue. In the past I have had some success between such >> sytems using a WSDL and messaging. I did not have a lot of time so I >> opted for the Apache Axis2 framework (http://ws.apache.org/axis2/). >> You will have to do some work but better than developing something >> with low-level Java nuts-and-bolts. > > Ugh! I think Cristi's approach of a bookmarkable page is far simpler > than messing with SOAP stacks. > > jk > > - > 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: Communication between applications, one using wicket
On Thu, Apr 09, 2009 at 07:48:10AM -0500, David Brown wrote: > Hello Cristi, this is typically referred to as diparate sytems > communications issue. In the past I have had some success between such > sytems using a WSDL and messaging. I did not have a lot of time so I > opted for the Apache Axis2 framework (http://ws.apache.org/axis2/). > You will have to do some work but better than developing something > with low-level Java nuts-and-bolts. Ugh! I think Cristi's approach of a bookmarkable page is far simpler than messing with SOAP stacks. jk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Communication between applications, one using wicket
Hello Cristi, this is typically referred to as diparate sytems communications issue. In the past I have had some success between such sytems using a WSDL and messaging. I did not have a lot of time so I opted for the Apache Axis2 framework (http://ws.apache.org/axis2/). You will have to do some work but better than developing something with low-level Java nuts-and-bolts. The systems I glued together were: a C/C++/Oracle backend concoction to a .asp/vbscript(ed) front-end. HTH, David. There are 10 kinds of people in this world: those who understand binary and those who don’t (Valid only for 2's complement). - Original Message - From: "Cristi Manole" To: users@wicket.apache.org Sent: Thursday, April 9, 2009 2:36:39 AM GMT -06:00 US/Canada Central Subject: Communication between applications, one using wicket Hello, I have a wicket application where a user starts an action on another system (different machine, outside network). I would like for this specific user to receive a response from that system once the action is finished (it takes a fair amount of time) and the status of that action. My idea is to have inside Wicket application an ajax self updating panel, so that the database of the application gets read from time to time. The other application would send a "message" to the Wicket application (call some page with some page parameters), which would update the specific database table with the user who started the action and the response. Once the action is finished, the self updating panel (aware of this by reading it in the database) becomes visible and it will contain that message to inform the user. I think my idea is bad. If nothing else I consider it resource savvy. How do you guys handle communication between two applications (the other application is not written in java) in order to provide the response to the user without refreshing the page? Thank you very much in advance, Cristi Manole - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Communication between applications, one using wicket
Can the other application just write to the database? On Thu, Apr 9, 2009 at 8:28 AM, John Krasnay wrote: > Your approach sounds perfectly reasonable to me. What don't you like > about it? > > jk > > On Thu, Apr 09, 2009 at 10:36:39AM +0300, Cristi Manole wrote: >> Hello, >> >> I have a wicket application where a user starts an action on another system >> (different machine, outside network). I would like for this specific user to >> receive a response from that system once the action is finished (it takes a >> fair amount of time) and the status of that action. >> >> My idea is to have inside Wicket application an ajax self updating panel, so >> that the database of the application gets read from time to time. The other >> application would send a "message" to the Wicket application (call some page >> with some page parameters), which would update the specific database table >> with the user who started the action and the response. Once the action is >> finished, the self updating panel (aware of this by reading it in the >> database) becomes visible and it will contain that message to inform the >> user. >> >> I think my idea is bad. If nothing else I consider it resource savvy. >> >> How do you guys handle communication between two applications (the other >> application is not written in java) in order to provide the response to the >> user without refreshing the page? >> >> Thank you very much in advance, >> Cristi Manole > > - > 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: Communication between applications, one using wicket
Your approach sounds perfectly reasonable to me. What don't you like about it? jk On Thu, Apr 09, 2009 at 10:36:39AM +0300, Cristi Manole wrote: > Hello, > > I have a wicket application where a user starts an action on another system > (different machine, outside network). I would like for this specific user to > receive a response from that system once the action is finished (it takes a > fair amount of time) and the status of that action. > > My idea is to have inside Wicket application an ajax self updating panel, so > that the database of the application gets read from time to time. The other > application would send a "message" to the Wicket application (call some page > with some page parameters), which would update the specific database table > with the user who started the action and the response. Once the action is > finished, the self updating panel (aware of this by reading it in the > database) becomes visible and it will contain that message to inform the > user. > > I think my idea is bad. If nothing else I consider it resource savvy. > > How do you guys handle communication between two applications (the other > application is not written in java) in order to provide the response to the > user without refreshing the page? > > Thank you very much in advance, > Cristi Manole - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Changing form validation depending on submit button.
Have a look here: http://cwiki.apache.org/WICKET/conditional-validation.html jk On Thu, Apr 09, 2009 at 02:45:26PM +1000, Ian MacLarty wrote: > Hi, > > I have a form with two submit buttons. I want the form to validate > differently depending on what submit button is pressed (i.e. I want to > use a different IFormValidator depending on what button is used to > submit the form). How would I go about doing this? > > Ian. > > - > 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, slf4j and logback
Hi, solution found: old libs and a wrong configuration... Sorry for disturbing... marc Marc Ende schrieb: Hi, I've changed from logging using log4j to logback but there is a little drawback I haven't figured out in this combination. I've got this logback.xml: ${jboss.server.log.dir}/wz.log %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n Everything works great. After changing the Pattern the layout also changes. But whenever I call a site I got the whole debug even if I've changed the logger for "org" or "org.apache.wicket" to INFO. These settings are okay as long as the thread is "ScannerThread" (might be something of jboss). If it's a thread in the normal usage the patterns are applied correctly but the loggers are ignored completely. I've used logback in another web project where it's doing it's job. Does anybody has also this combination? Thanks for your help!!! marc - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Montable PDF creating page
I need some trick to turn the response into a PDF stream. E. g. I have a Bookmarkable Page PdfPAge public class PdfPage extends WebPage { public PdfPage (final PageParameters parameters) { // Respond with PDF content. } } Application.init() { mountBookmarkablePage("/PdfGenerator", PdfPage.class); Is it possible to let a WebPage create a pdfOutput? If I try to do the following Response r = getResponse(); if (r instanceof WebResponse) { WebResponse wr = (WebResponse)r; wr.reset(); OutputStream os = wr.getOutputStream(); try { os.write(/*PDFcontent*/); } catch (Exception e) { e.printStackTrace(); } } } I can see the Exception java.lang.IllegalStateException: getOutputStream() has already been called for this response The reason for this is: I did not find something like BookmarkableResource in wicket. It is no problem to have a DynaicResourceLink in a page but the displayes content is not bookmarkable. Any Ideas? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Communication between applications, one using wicket
Hello, I have a wicket application where a user starts an action on another system (different machine, outside network). I would like for this specific user to receive a response from that system once the action is finished (it takes a fair amount of time) and the status of that action. My idea is to have inside Wicket application an ajax self updating panel, so that the database of the application gets read from time to time. The other application would send a "message" to the Wicket application (call some page with some page parameters), which would update the specific database table with the user who started the action and the response. Once the action is finished, the self updating panel (aware of this by reading it in the database) becomes visible and it will contain that message to inform the user. I think my idea is bad. If nothing else I consider it resource savvy. How do you guys handle communication between two applications (the other application is not written in java) in order to provide the response to the user without refreshing the page? Thank you very much in advance, Cristi Manole