Re: Looking for Pop-up menu...
On Thu, Jul 23, 2009 at 2:01 AM, Ryan McKinleyryan...@gmail.com wrote: why not just a YUI menu? (not a context menu) Do you mean to use menu (not menu2) with permanently visible single menubar's item and pull down associated menu on click and resign on mouse over functinality? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: jWicket -- jQuery with Wicket integration
Given the fact that there is already wicket-jquery in wicketstoff-core, I wonder how come it is simply possible to add another JQuery integration to wicketstuff. What are the rules for adding stuff there? Can committers just do whatever the like? Doesn't there have to be some voting on the mailing list for things like that? If I was to add yet another JQuery integration, could I just put it in there as well? I'm currently doing a Wicket evaluation. Wicket may become one of the standard frameworks of the company I work for. I really like what I've seen so far, and working with Wicket can be really fun. But what looks pretty messy to me is the way things are organized (documentation, wiki, wicketstuff). To me wicketstuff presents itself as some inofficial playground with lots of badly documented things in it. However, wicketstuff-core (which is not even listed on the wicketstuff wiki (except for a migration guide)) seems to have a somewhat more official character. May the latter be taken as a production-ready supplement to Wicket? I'd appreciate it if some restructuring and clarification came along with the upcoming 1.4 release. Thanks, Reinhard Tauren Mills schrieb: Hi Richard, I actually tried out WiQuery before deciding it wasn't the right tool for me. I can't remember the exact specifics of the issues I had with it, and I only spent about a day with it. But I remember feeling like I was being forced to use it whenever and wherever I wanted to add ANY jQuery to my project. I can see how WiQuery would be good for a developer who doesn't want to touch JS, and only code in Java. With WiQuery, I can add all the functionality I need via the WiQuery API. I have nothing against the project in this regard, it seems like a great solution for that situation. But in my case, I want a wicket/jquery tool that is lightweight and stays out of my way. I would rather code client-side only stuff just in jQuery and not have anything necessary in my server code. The only time I want wicket components to be aware of my jQuery code is if there needs to be some client-server ajax communication. For instance, drag/drop information, or sorting a list of item, etc. From my perspective, I could care less if wicket knows which accordion panel is open in the browser, because *for my application*, that doesn't matter. And I do realize there are *other applications* that this would matter, for which an optional WiQuery accordion plugin would be userful. And when I want to use another add-on jQuery plugin such as superfish.js, I don't want to have to resort to WiQuery hacks or to create my own WiQuery plugin to support it. I am constantly adding little jQuery code here and there, and to have to make WiQuery plugins for it all or to code it using the WiQuery API would be a pain that I'm not willing to put up with. The following posting I made might give a little more insight into the reason I stopped using WiQuery: http://groups.google.com/group/wiquery/browse_thread/thread/190fc243777ea3ba/492092296e40fe10?lnk=gstq=tauren#492092296e40fe10 I had already found WicketJQuery at the time I tried out WiQuery. WiQuery seemed further along and was easier to add into my application, so I tried it first. But when it failed for me, I gave WicketJQuery a try. At the moment, WicketJQuery (now jWicket) certainly isn't perfect either, but it is closer to meeting my needs. So I offered my help to Stefan to get it mavenized and moved to WicketStuff. We renamed it to jWicket during this transition. This new location will make it more accessible and easier to use for other developers. Of course, I have nothing against joining forces, but I also needed something to solve a problem, and I needed it now. WiQuery wasn't doing it for me, and jWicket was. I also want a light weight tool, and I felt like WiQuery was overkill for my needs. If there is a way to join forces so that one tool can satisfy everyone without becoming some big bloated thing, then I'm all for it! Bottom line is I just want to be able to easily add jQuery code to the client side whenever and wherever I want without having to deal with server side code -- except for when I need client/server communication of jQuery events. Maybe I'm not normal in this regard, but the WiQuery API just doesn't do it for me. I'd rather code the client side in JS/jQuery and keep it out of my java code. Sorry for being long winded. Again, I have nothing against WiQuery, and was quite impressed by it. But it just didn't seem like the right tool for my needs. I'm certainly open to ideas on how to integrate the projects, but from what I can tell, they really have different visions. Tauren On Wed, Jul 22, 2009 at 11:15 AM, richardwilkorichardjohnwilkin...@gmail.com wrote: Hi, What are the advantages of jWicket over other Wicket jQuery projects (specifically wiQuery)? It would be nice if we could all work together on a single project. wiQuery has already pooled the
Re: Save CSS/StyleSheet in Database ?
Can you please send me the sample codes of your implementation for Images ? I also want dynamic images to be displayed on my web page. Thanks, Farhan From: Michael O'Cleirigh michael.ocleir...@rivulet.ca To: users@wicket.apache.org Sent: Wednesday, July 22, 2009 8:04:00 PM Subject: Re: Save CSS/StyleSheet in Database ? Hi Farhan, You should create an IRequestTargetUrlCodingStrategy implementation to serve the CSS from the database. It should work to mount the strategy on something like '/custom-user-css' and then user the rest of the path as the options for say the user and version of the css to load. The version number may be needed to get around browser caching of the CSS if changes are made. You get look at the other implementations to see how they do this but yours will be slightly different since you are serving CSS not Pages. You can then add in the CSS resource link to the pages that need it only customizing the user parameter part of the url. I've done something similar for generating user specific images (custom images stamped with user specific details) so I know it will work. Regards, Mike Thanks for quick response. Obviously, styles can be loaded from database after Login. But i want to make a separate css file and dont want ot add it in the java code, for sake of simplicity. Is there any way to store css styles directly from css file for a specific user, and then load styles directly to css file after user Login ? Or can we make css file dynamic by introducing variables in it (like in PHP) ? Thanks... From: Mathias Nilsson wicket.program...@gmail.com To: users@wicket.apache.org Sent: Wednesday, July 22, 2009 4:59:53 PM Subject: Re: Save CSS/StyleSheet in Database ? You would probably have to use cookies to save which style the users would have. There is no way knowing this without login or cookie. There are probably a better way of doing this but if you save style and classes in a database like this *{ font-family: verdana; } // a row in the database a{ color: red; } // a row in the database you could implement the IHeaderContributor and override the renderHead public void renderHead(IHeaderResponse response) { StringBuffer buf = new StringBuffer(); buf.append( style type=\text/css\ ); buf.append( *{ font-size: 9px; } ); buf.append( /style ); response.renderString(buf); } of couse you should the get it from a service or directly from a dao. public void renderHead(IHeaderResponse response) { BradningService service = getBrandingService(); // get this using @SpringBean or whatever ListString styles = service.getStyles( user ); // get the style for a user iterate here and add the style } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: should the IRequestLogger implement Serializable?
Got it! Thanks! Jing -Original Message- From: Johan Compagner [mailto:jcompag...@gmail.com] Sent: Mittwoch, 22. Juli 2009 19:42 To: users@wicket.apache.org Subject: Re: should the IRequestLogger implement Serializable? you shouldnt store those kind of objects (services or application static objects) use LoadableDetachableModel for that On Wed, Jul 22, 2009 at 16:56, Jing Ge (Besitec IT DEHAM) j...@besitec.comwrote: Well, the RequestLogger is not a pure service. It is also a data object. It is actually a combination of service and data object. Regard Jing -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Mittwoch, 22. Juli 2009 16:53 To: users@wicket.apache.org Subject: Re: should the IRequestLogger implement Serializable? Would you use new ModelUserService(getYourUserService())? It's the same thing - they are services, not data objects. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Jul 22, 2009 at 9:47 AM, Jing Ge (Besitec IT DEHAM)j...@besitec.com wrote: Hello johan, Because I want to use the information hold in the RequestLogger as an object in a model. Something like this: New ModelRequestLogger(getRequestLogger()); Thx Jing -Original Message- From: Johan Compagner [mailto:jcompag...@gmail.com] Sent: Mittwoch, 22. Juli 2009 16:43 To: users@wicket.apache.org Subject: Re: should the IRequestLogger implement Serializable? why would you serialize the request logger? there is only one and that is attached to the Application it shouldnt be serialized. Just like that Settings object is also not serialize able or the implementations of ISessionStore johan On Wed, Jul 22, 2009 at 16:38, Jing Ge (Besitec IT DEHAM) j...@besitec.comwrote: Hello all, I am trying to use the RequestLogger. It is really a greet idea that the interface ISessionLogInfo is defined. Developer can just implement this interface for logging more individual information. My requirement is: I want to use the instance of IRequestLogger for building a site status page, which means the IRequestLogger need implement the Serializable interface. Does anyone find any drawback for letting IRequestLogger implement Serializable? I am using wicket 1.4 rc4 Thx best regards. Jing Ge - 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: Spring and Wicket - is it worth it?
Hi, If you don't want to use xml you can configure your beans in pure Java. See Spring Java Configuration Project: http://www.springsource.org/javaconfig -- Daniel On Thu, Jul 23, 2009 at 3:40 AM, Dane Lavertydanelave...@gmail.com wrote: Due to the fact that nearly every substantial sample Wicket app is Spring-based, I imagine that there's something awesome about using Spring. In fact, Wicket is what has finally gotten me to start learning Spring. I think I understand the basics of dependency injection -- configure your objects in xml files and then inject them into your classes -- but I'm still not clear on the advantage of it. I've read quite a ways into Spring in Action, and the author seems to assume that the reader will automatically see why xml-based dependency injection is great thing. I must just be missing something here. What I love about Wicket is being free from xml files. Can anyone give me a concise explanation of how the advantages of Spring are worth introducing a new layer into my applications? Dane - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Spring and Wicket - is it worth it?
Spring gives flexibility in your services layer (whatever you call it). Making things transactional, adding memoization, talking to remote interfaces, configuring Hibernate and JMX beans, all that kind of stuff is easy with Spring and often unbelievably hard without. As said, Spring has no value in a Wicket application with the exception of calling out to the service layer. This is where the @SpringBean comes in handy. Regards, Erik. On Wed, 22 Jul 2009 18:40:19 -0700, Dane Laverty danelave...@gmail.com wrote: Due to the fact that nearly every substantial sample Wicket app is Spring-based, I imagine that there's something awesome about using Spring. In fact, Wicket is what has finally gotten me to start learning Spring. I think I understand the basics of dependency injection -- configure your objects in xml files and then inject them into your classes -- but I'm still not clear on the advantage of it. I've read quite a ways into Spring in Action, and the author seems to assume that the reader will automatically see why xml-based dependency injection is great thing. I must just be missing something here. What I love about Wicket is being free from xml files. Can anyone give me a concise explanation of how the advantages of Spring are worth introducing a new layer into my applications? Dane -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Spring and Wicket - is it worth it?
For automated classpath scanning, with limited XML, see http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/ Martijn On Thu, Jul 23, 2009 at 3:40 AM, Dane Lavertydanelave...@gmail.com wrote: Due to the fact that nearly every substantial sample Wicket app is Spring-based, I imagine that there's something awesome about using Spring. In fact, Wicket is what has finally gotten me to start learning Spring. I think I understand the basics of dependency injection -- configure your objects in xml files and then inject them into your classes -- but I'm still not clear on the advantage of it. I've read quite a ways into Spring in Action, and the author seems to assume that the reader will automatically see why xml-based dependency injection is great thing. I must just be missing something here. What I love about Wicket is being free from xml files. Can anyone give me a concise explanation of how the advantages of Spring are worth introducing a new layer into my applications? Dane -- 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
Re: Spring and Wicket - is it worth it?
I will vote NO. Why? Because YAGNI. ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
redirectToInterceptPage doesn't work constructor
What is the correct way to redirect to a login page from within a constructor. This is wicket 1.3.5 and the code below just doesn't redirect. All my pages inherit from AuthPage(). public AuthPage() { super(); add(new MainMenuPanel(mainmenu, this)); add(new FeedbackPanel(feedback)); if (getUser() == null) { redirectToInterceptPage(new LoginPage()); } else { authorized(); add(new UserAdminPanel(adminpanel)); } } -- Pieter Claassen musmato.com
How to customize/override .CSS of 3rd party component
Hi all, I do not know, how to override/customize CSS styles of 3rd party component, in this case YUI menu. It seems to me they are loaded from packaged resource with URL resources/org.wicketstuff.yui.inc.YUI/2.7.0b/menu/assets/menu.css, which is embedded in yui.jar. I tried to make a local copy of menu.css and put it into applications root and include it into page's header to override particular style definition within the page what normally works. This is not the case: resource inspector shows that original .css file is loaded *after* the included one, probably by Javascript in run-time... Please, could somebody explain to me, how to customize those style sheets? Thanks, Petr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: redirectToInterceptPage doesn't work constructor
Sorry, I sound illiterate to myself here. To start again, it seems that I cannot get redirectToInterceptPage to work correctly in my constructor for the AuthPage class which all my pages inherit from. Any ideas on how to do this? I find using requestcycle's redirecTo to tell me that I can only redirect a page once. Anyhow, I am sure that redirectTo will not remember the redirector URL. Thanks Pieter On Thu, Jul 23, 2009 at 11:36 AM, pieter claassen pie...@claassen.co.ukwrote: What is the correct way to redirect to a login page from within a constructor. This is wicket 1.3.5 and the code below just doesn't redirect. All my pages inherit from AuthPage(). public AuthPage() { super(); add(new MainMenuPanel(mainmenu, this)); add(new FeedbackPanel(feedback)); if (getUser() == null) { redirectToInterceptPage(new LoginPage()); } else { authorized(); add(new UserAdminPanel(adminpanel)); } } -- Pieter Claassen musmato.com -- Pieter Claassen musmato.com
Re: Use Guice....
Johannes Schneider schrieb: It's the better Spring ;-) agreed! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Bench website is down
maybe you can get it from the update manager if you are using Eclipse. http://eclipse-plugins.2y.net/eclipse/plugin_details.jsp?id=1378 http://eclipse-plugins.2y.net/eclipse/plugin_details.jsp?id=1378 -- View this message in context: http://www.nabble.com/Wicket-Bench-website-is-down-tp24616565p24622773.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: Spring and Wicket - is it worth it?
On Wed, Jul 22, 2009 at 8:40 PM, Dane Lavertydanelave...@gmail.com wrote: Due to the fact that nearly every substantial sample Wicket app is Spring-based, I imagine that there's something awesome about using Spring. In fact, Wicket is what has finally gotten me to start learning Spring. I think I understand the basics of dependency injection -- configure your objects in xml files and then inject them into your classes -- but I'm still not clear on the advantage of it. I've read quite a ways into Spring in Action, and the author seems to assume that the reader will automatically see why xml-based dependency injection is great thing. I must just be missing something here. What I love about Wicket is being free from xml files. Can anyone give me a concise explanation of how the advantages of Spring are worth introducing a new layer into my applications? Dane Personally, I have found Spring to be very beneficial and pretty easy to learn. I really don't mind xml and as a framework it does offer a lot of nice features that are really easy to tie into your application. Spring has very well written documentation that I found very easy to follow. I really like the message driven beans, helper classes for stuff like Hibernate and IBatis, Email is SUPER easy, Cron scheduling is cake and if you need MVC, theirs is well written and easy to use. Aceigi integration with Spring is very nice - switching http/https is easy and you can apply very fine grained access control (though these docs aren't very fun to read.) I'm new to Wicket, but we've used Spring to configure our service layer and made use of annotations so that our XML file isn't all that big. You don't need to use Spring, but once you start to use it, you may find at least some features are really cool. Russ _ Windows Live™ SkyDrive™: Store, access, and share your photos. See how. http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009
Re: Use Guice....
http://fiber-space.de/wordpress/?p=1016 2009/7/23 Uwe Schäfer schae...@thomas-daily.de: Johannes Schneider schrieb: It's the better Spring ;-) agreed! - 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 customize/override .CSS of 3rd party component
On Thu, Jul 23, 2009 at 11:45 AM, Mathias Nilssonwicket.program...@gmail.com wrote: You could extends the component, create own markup and css. Really: there is the getCssClass() method supplying class name of style... Thanks for prompt reply. You can also just look at the css and then in the header of your class add override them. If I didn't miss anything, it does not work (even if it should) - this is probably due run-time loading of .css file by JavaScript e.g. on load my internal style is used, but on page refresh and/or menu click, it is replaced by original one. Petr Let´s say YUI have a css class of .menu. style type=text/css .menu{ color: red; } /style -- View this message in context: http://www.nabble.com/How-to-customize-override-.CSS-of-3rd-party-component-tp24622417p24622529.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to customize/override .CSS of 3rd party component
That's odd. I works for alot of components I use. I don't exactly know which component you are trying to implement but what about. add( new YUIMenu( id ){ @Override protected void onBeforeRender() { super.onBeforeRender(); // Add css reference here or something else } }); -- View this message in context: http://www.nabble.com/How-to-customize-override-.CSS-of-3rd-party-component-tp24622417p24623102.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: redirectToInterceptPage doesn't work constructor
throw new Redirect.Exception() instead Martijn On Thu, Jul 23, 2009 at 11:44 AM, pieter claassenpie...@claassen.co.uk wrote: Sorry, I sound illiterate to myself here. To start again, it seems that I cannot get redirectToInterceptPage to work correctly in my constructor for the AuthPage class which all my pages inherit from. Any ideas on how to do this? I find using requestcycle's redirecTo to tell me that I can only redirect a page once. Anyhow, I am sure that redirectTo will not remember the redirector URL. Thanks Pieter On Thu, Jul 23, 2009 at 11:36 AM, pieter claassen pie...@claassen.co.ukwrote: What is the correct way to redirect to a login page from within a constructor. This is wicket 1.3.5 and the code below just doesn't redirect. All my pages inherit from AuthPage(). public AuthPage() { super(); add(new MainMenuPanel(mainmenu, this)); add(new FeedbackPanel(feedback)); if (getUser() == null) { redirectToInterceptPage(new LoginPage()); } else { authorized(); add(new UserAdminPanel(adminpanel)); } } -- Pieter Claassen musmato.com -- Pieter Claassen musmato.com -- 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
Re: How to customize/override .CSS of 3rd party component
On Thu, Jul 23, 2009 at 12:26 PM, Mathias Nilssonwicket.program...@gmail.com wrote: I don't exactly know which component you are trying to implement but what about. add( new YUIMenu( id ){ @Override protected void onBeforeRender() { super.onBeforeRender(); // Add css reference here or something else } }); I'm violating YuiMenuBar :-) Overriding getCssClass() method did the job - it allows to change root class name of all Yui menu hierarchy hence I can introduce my own styles in another .css file. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to customize/override .CSS of 3rd party component
Ok, You might want to google for YUI skins and take a look at YuiHeaderContributor -- View this message in context: http://www.nabble.com/How-to-customize-override-.CSS-of-3rd-party-component-tp24622417p24623391.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
Maven with Eclipse
Hi Tauren, wich Eclipse plugin for maven do you prefer? m2eclipse or IAM (q4e)? I have commit acces and now I'm starting over with development. Current steps: 1. Add keypressed detection 2. Separate the Project into small pieces Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to customize/override .CSS of 3rd party component
You might want to google for YUI skins and take a look at YuiHeaderContributor OK. Thanks for hint - I'll probably use YuiHeader Contributor. Petr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: redirectToInterceptPage doesn't work constructor
Thanks Martijn. This worked best: throw new RestartResponseAtInterceptPageException(LoginPage.class); P On Thu, Jul 23, 2009 at 12:41 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: throw new Redirect.Exception() instead Martijn On Thu, Jul 23, 2009 at 11:44 AM, pieter claassenpie...@claassen.co.uk wrote: Sorry, I sound illiterate to myself here. To start again, it seems that I cannot get redirectToInterceptPage to work correctly in my constructor for the AuthPage class which all my pages inherit from. Any ideas on how to do this? I find using requestcycle's redirecTo to tell me that I can only redirect a page once. Anyhow, I am sure that redirectTo will not remember the redirector URL. Thanks Pieter On Thu, Jul 23, 2009 at 11:36 AM, pieter claassen pie...@claassen.co.uk wrote: What is the correct way to redirect to a login page from within a constructor. This is wicket 1.3.5 and the code below just doesn't redirect. All my pages inherit from AuthPage(). public AuthPage() { super(); add(new MainMenuPanel(mainmenu, this)); add(new FeedbackPanel(feedback)); if (getUser() == null) { redirectToInterceptPage(new LoginPage()); } else { authorized(); add(new UserAdminPanel(adminpanel)); } } -- Pieter Claassen musmato.com -- Pieter Claassen musmato.com -- 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 -- Pieter Claassen musmato.com
Member variables in WebApplication are not serialized under Terracotta, correct?
Does anybody have this knowledge? Thank you! --- On Wed, 7/22/09, Peter Ertl pe...@gmx.org wrote: From: Peter Ertl pe...@gmx.org Subject: Re: Member variables in WebApplication are not serialized, correct? To: users@wicket.apache.org Date: Wednesday, July 22, 2009, 7:21 PM correct - they are not serialized however I don't know what will happen when using Terracotta... Am 23.07.2009 um 01:09 schrieb David Chang: Sorry if this is a dumb question. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Need Help in Dynamic CSS generation
I am working on creating Dynamic StyleSheets in wicket, and i found an example of similar behaviour in Wicket Examples http://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html but it is not working. When i place the following code in my CSS file (style.css), it generates error. body{background:${color1};} The css file doesn't recognizes $ simbol. Is this allowed in CSS file or not ? Please Help me out to fix this problem. Thanks --Farhan--
Re: Need Help in Dynamic CSS generation
The $ is used to replace the variable (interpolated value). It's the same technique used in properties files to replace some text. This sample works fine. if you look at the css it has been generated according to the load() method. It must be you IDE that complains about this. maybe you can shut the varning off. -- View this message in context: http://www.nabble.com/Need-Help-in-Dynamic-CSS-generation-tp24623639p24623863.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
AW: AW: SSL - ajax login
Hi Igor, I did it as you said. I took the code from AjaxFallbackButton and I copied it to an own class. In the constructor I overwrite the getCallbackUrl() method of the AjaxFormSubmitBehavior. I added the value https://localhost:8443/projectname/ as a prefix to super.getCallbackUrl(). By the way: getCallbackUrl() returns a long relative url beginning with ;sessionid. So my url is https://localhost:8443/projectname/;sessionid... When starting tomcat and accessing the website, the url wasn't applied. When clicking the link, the url http://localhost:8080/projectname/# was called. I believe it's the wrong place to manipulate the url. Maybe it is expected to return a relative path beginning with ;sessionid. That url is maybe manipulated at a different place, so in my case the end result would be http://localhost:8080/projectname/https://localhost:8443/projectname/;sessionid. That would result in an error and maybe http://localhost:8080/projectname/# is used therefore. Am I wrong? Thx Arthur Von: Igor Vaynberg igor.vaynb...@gmail.com An: users@wicket.apache.org Gesendet: Mittwoch, den 22. Juli 2009, 18:31:27 Uhr Betreff: Re: AW: SSL - ajax login ah, i thought i replied already because i looked into this yesterday. you will have to roll your own button. i would recommend looking at the sourcecode of the default button. when you add the formsubmitbehavior in your button you can override getcallbackurl() and append https to it. -igor On Wed, Jul 22, 2009 at 2:37 AM, Arthur Leigh Allenarthurleigh.al...@yahoo.de wrote: Hi again, I need to know if it's possible to switch to SSL via button or form. Otherwise I have to switch back to wicket 1.3.5. I'm in hurry because we will go online within the next 10-14 days. Can anyone give me a prompt answer please? Thx Best regards Arthur Von: Arthur Leigh Allen arthurleigh.al...@yahoo.de An: users@wicket.apache.org Gesendet: Dienstag, den 21. Juli 2009, 19:18:18 Uhr Betreff: AW: SSL - ajax login Hello Igor, thanks for your early reply. Yes, my login form is submitted via ajax. public class BasePage { public void switchViaAjax(...) { ... } public void navigateViaAjax(...) { ... } } @RequireHttps public class SSLForm extends Form { ... } public class LoginPanel { public LoginPanel() { ... } public create() { SSLForm form = new SSLForm(loginForm); form.add(username); form.add(password); AjaxFallbackButton loginButton = new AjaxFallbackButton(loginButton, form) { protected void onSubmit(AjaxRequestTarget target, Form form) { // perform login = login is done via http } } } } As you said @RequireSSL is for pages. Do you have any idea how I can remove @RequireHttps from the top of my BasePage and switch to https on login? Currently I think the only way to provide a ssl ajax call is to show the base page via ssl as a starting basis. Therefore I have to use @RequireSSL on the BasePage but that means every communication is done via ssl and that means more server ballast and a slower page refresh. Greetings Arthur Von: Igor Vaynberg igor.vaynb...@gmail.com An: users@wicket.apache.org Gesendet: Dienstag, den 21. Juli 2009, 18:08:48 Uhr Betreff: Re: SSL - ajax login @RequreHttps is meant to be a page-level feature, so it doesnt fit your usecase. is your login form submitted via ajax? show us the code to sslform, your login form - making sure to include the code to the component that submits it. -igor On Tue, Jul 21, 2009 at 8:34 AM, Arthur Leigh Allenarthurleigh.al...@yahoo.de wrote: Hello folks, I'm using wicket 1.4 RC7 now and I have a question regarding the usage of ssl. I use the HttpsRequestCycleProcessor with the annotation @RequireHttps. Imagine the following case like it is realized on different sites like web.de or gmx.de as well as xing.com. The first call will result in a http url. If you enter your login name and your password and submit the form, then the form will be send via https. I only have one page. Everything on my page is exchanged via ajax. The login is also done via ajax. Currently I use the annotation above for my BasePage but from the first call, the whole communication is done with ssl. What I would like to realize is: Using the @RequireHttps annotation on forms or submit buttons. I implemented an own SSLForm class extending the wicket form class with the annotation. But when I use the SSLForm for my login, the communication is done without ssl. I would like to use my page via http, but the ajax login should be done with ssl. The only thing I can do now is: -page completely with ssl -page completely without ssl I would appreciate any help. Best regards, Arthur
Re: jWicket -- jQuery with Wicket integration
On Thu, Jul 23, 2009 at 1:24 AM, Reinhard Nägelereinhard.naeg...@mgm-tp.com wrote: To me wicketstuff presents itself as some inofficial playground with lots of badly documented things in it. It is. Wicketstuff is open for anyone to join and basically do whatever they want with it - so long as it has something to do with Wicket. There are many abandoned projects and proofs of concept projects there. However, wicketstuff-core (which is not even listed on the wicketstuff wiki (except for a migration guide)) seems to have a somewhat more official character. May the latter be taken as a production-ready supplement to Wicket? Last year I took on the task of trying to improve the organization of wicketstuff by moving all of the most qualified projects into wicketstuff core. There's no guarantee of production-readiness. The goal was to get it where they could all be built with numbered releases to match Wicket. This is possible (I just built and deployed 1.4-rc7 last week). I will try to keep a numbered release matching every Wicket release - but some of the projects under it may be more production ready / quality than others. I'd appreciate it if some restructuring and clarification came along with the upcoming 1.4 release. Volunteers are always welcome! It seems that most of the issues you have are with wicketstuff (understandably) which should have no reflection on Wicket's 1.4 release - it just so happens that some of the same people are involved, but Wicket is the primary focus. -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: https flips to http
If you are using load balancer, than here is the solution: http://www.satyakomatineni.com/akc/servlet/DisplayServlet?url=DisplayNoteMPURLreportId=1711ownerUserId=satya Recently I had exactly same issue, now I solved it using this approach. Alex Objelean TahitianGabriel wrote: Hi, Did you ever solve this problem? I'm having the exact same problme with apache 2, tomcat 6 and wicket 1.3.6. Some of the Https URLs are redirect to Http. It seems to happen when I use the setResponsePage(Page) fonction. Any help would be appreciate... insom wrote: Thanks to everyone who has suggested solutions. It turns out that the issue is stranger than I thought, and it's not Wicket-specific. I'll share what we've got, in case it helps anyone else (not that we have a solution yet.) We have a load balancer, Apache, and Tomcat handling requests. When any servlet application is called, for example, https://jprod01.chemeketa.edu/docs/ (which is one of the sample apps that installs with Tomcat), it display perfectly fine if it has the / after docs. But if the URL is https://jprod01.chemeketa.edu/docs (without the /) then browser automatically gets redirected to http://jprod01.chemeketa.edu/docs/ (with the / but without the s in https). Why? Who knows. -- View this message in context: http://www.nabble.com/https-flips-to-http-tp19403303p24624218.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need Help in Dynamic CSS generation
I am using netbeans IDE 6.5, but i dont think this is the problem of the IDE. It throws error of Unexpected Symbol found ($). Can you please provide me the working code of using variables in css ? From: Mathias Nilsson wicket.program...@gmail.com To: users@wicket.apache.org Sent: Thursday, July 23, 2009 4:28:08 PM Subject: Re: Need Help in Dynamic CSS generation The $ is used to replace the variable (interpolated value). It's the same technique used in properties files to replace some text. This sample works fine. if you look at the css it has been generated according to the load() method. It must be you IDE that complains about this. maybe you can shut the varning off. -- View this message in context: http://www.nabble.com/Need-Help-in-Dynamic-CSS-generation-tp24623639p24623863.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need Help in Dynamic CSS generation
I use Eclipse and all I have to do was copying and pasting the code from the url you supplied. I'm no Netbeans user so maybe someone else could answer this. -- View this message in context: http://www.nabble.com/Need-Help-in-Dynamic-CSS-generation-tp24623639p24624432.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need Help in Dynamic CSS generation
Ok thanks, If any user of netBeans IDE have checked this example http://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html, then he must encountered this problem. Please help me out to resolve it ? --Farhan-- From: Mathias Nilsson wicket.program...@gmail.com To: users@wicket.apache.org Sent: Thursday, July 23, 2009 5:08:10 PM Subject: Re: Need Help in Dynamic CSS generation I use Eclipse and all I have to do was copying and pasting the code from the url you supplied. I'm no Netbeans user so maybe someone else could answer this. -- View this message in context: http://www.nabble.com/Need-Help-in-Dynamic-CSS-generation-tp24623639p24624432.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: Updating an inmethod grid, looking for hints
Hi Matej, I finally found the bug. When you are using a DefaultDataGrid it adds a PagingToolbar. PagingToolbar overrides isVisible. In isVisible the total row count is determined, this will cache the query result for this request. However, isVisible is called /before/ the ajax listener is called. Therefore any changes to the grid (like rowCount) are not used. Regards, Erik. Erik van Oosten wrote: Hi, How can I trigger an inmethod grid to do a /complete/ update of itself? The only thing that I see is markAllDirty(). That will update the items currently in the list, but it will /not/ get new items from the data provider. I researched the code for quite some time but I must have been looking at the wrong parts as I found no hook to get this done. The most I could do was call detach() on Body, one of the inner classes of a grid. But on screen, that would only update the number of items in the lower toolbar, not the items in the grid themselves. More ideas? Ideally, imho, the grid should respond to modelChanged(). But I have still no clue what should be in that method. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ -- View this message in context: http://www.nabble.com/Updating-an-inmethod-grid%2C-looking-for-hints-tp24438566p24624631.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: Updating an inmethod grid, looking for hints
Sorry, please ignore my previous e-mail. The behavior I saw was due to a DropDownChoice I added to the toolbar. During a submit Wicket verifies whether the ddc is visible. Unfortunately this leads to a call to PagingToolbar.isVisible. Back to square 1. Regards, Erik. On Thu, 23 Jul 2009 05:20:06 -0700 (PDT), Erik van Oosten e.vanoos...@grons.nl wrote: Hi Matej, I finally found the bug. When you are using a DefaultDataGrid it adds a PagingToolbar. PagingToolbar overrides isVisible. In isVisible the total row count is determined, this will cache the query result for this request. However, isVisible is called /before/ the ajax listener is called. Therefore any changes to the grid (like rowCount) are not used. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?
I have a collection of Panels that are switched via an AjaxTabbedPanel Component. One of the panels has an AjaxSelfUpdatingBehaviour attached which works fine. However, if I switch to another panel the self updating behaviour is stopped because the component is no longer visible (a precondition check). This is perfectly reasonable logic. My problem is that when I switch back to the tab with the AjaxSelfUpdatingBehaviour it is still stopped and never restarts ( I'm guessing it's related to the stop flag in the behaviours class!). So is it possible to restart the behaviour? I've tried overriding the renderHead() to try and avoid the if stopped check but it didn't work so I guess there is something more complicated going on behind the scenes. Cheers, Mark Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Re: AW: SSL - ajax login
javascript invokes the url you give it, so it looked like it should work. you might have to trace deeper to see whats going on. -igor On Thu, Jul 23, 2009 at 4:41 AM, Arthur Leigh Allenarthurleigh.al...@yahoo.de wrote: Hi Igor, I did it as you said. I took the code from AjaxFallbackButton and I copied it to an own class. In the constructor I overwrite the getCallbackUrl() method of the AjaxFormSubmitBehavior. I added the value https://localhost:8443/projectname/ as a prefix to super.getCallbackUrl(). By the way: getCallbackUrl() returns a long relative url beginning with ;sessionid. So my url is https://localhost:8443/projectname/;sessionid... When starting tomcat and accessing the website, the url wasn't applied. When clicking the link, the url http://localhost:8080/projectname/# was called. I believe it's the wrong place to manipulate the url. Maybe it is expected to return a relative path beginning with ;sessionid. That url is maybe manipulated at a different place, so in my case the end result would be http://localhost:8080/projectname/https://localhost:8443/projectname/;sessionid. That would result in an error and maybe http://localhost:8080/projectname/# is used therefore. Am I wrong? Thx Arthur Von: Igor Vaynberg igor.vaynb...@gmail.com An: users@wicket.apache.org Gesendet: Mittwoch, den 22. Juli 2009, 18:31:27 Uhr Betreff: Re: AW: SSL - ajax login ah, i thought i replied already because i looked into this yesterday. you will have to roll your own button. i would recommend looking at the sourcecode of the default button. when you add the formsubmitbehavior in your button you can override getcallbackurl() and append https to it. -igor On Wed, Jul 22, 2009 at 2:37 AM, Arthur Leigh Allenarthurleigh.al...@yahoo.de wrote: Hi again, I need to know if it's possible to switch to SSL via button or form. Otherwise I have to switch back to wicket 1.3.5. I'm in hurry because we will go online within the next 10-14 days. Can anyone give me a prompt answer please? Thx Best regards Arthur Von: Arthur Leigh Allen arthurleigh.al...@yahoo.de An: users@wicket.apache.org Gesendet: Dienstag, den 21. Juli 2009, 19:18:18 Uhr Betreff: AW: SSL - ajax login Hello Igor, thanks for your early reply. Yes, my login form is submitted via ajax. public class BasePage { public void switchViaAjax(...) { ... } public void navigateViaAjax(...) { ... } } @RequireHttps public class SSLForm extends Form { ... } public class LoginPanel { public LoginPanel() { ... } public create() { SSLForm form = new SSLForm(loginForm); form.add(username); form.add(password); AjaxFallbackButton loginButton = new AjaxFallbackButton(loginButton, form) { protected void onSubmit(AjaxRequestTarget target, Form form) { // perform login = login is done via http } } } } As you said @RequireSSL is for pages. Do you have any idea how I can remove @RequireHttps from the top of my BasePage and switch to https on login? Currently I think the only way to provide a ssl ajax call is to show the base page via ssl as a starting basis. Therefore I have to use @RequireSSL on the BasePage but that means every communication is done via ssl and that means more server ballast and a slower page refresh. Greetings Arthur Von: Igor Vaynberg igor.vaynb...@gmail.com An: users@wicket.apache.org Gesendet: Dienstag, den 21. Juli 2009, 18:08:48 Uhr Betreff: Re: SSL - ajax login @RequreHttps is meant to be a page-level feature, so it doesnt fit your usecase. is your login form submitted via ajax? show us the code to sslform, your login form - making sure to include the code to the component that submits it. -igor On Tue, Jul 21, 2009 at 8:34 AM, Arthur Leigh Allenarthurleigh.al...@yahoo.de wrote: Hello folks, I'm using wicket 1.4 RC7 now and I have a question regarding the usage of ssl. I use the HttpsRequestCycleProcessor with the annotation @RequireHttps. Imagine the following case like it is realized on different sites like web.de or gmx.de as well as xing.com. The first call will result in a http url. If you enter your login name and your password and submit the form, then the form will be send via https. I only have one page. Everything on my page is exchanged via ajax. The login is also done via ajax. Currently I use the annotation above for my BasePage but from the first call, the whole communication is done with ssl. What I would like to realize is: Using the @RequireHttps annotation on forms or submit buttons. I implemented an own SSLForm class extending the wicket form class with the annotation. But when I use the SSLForm for my login, the communication is done without ssl. I would like to use my page
Re: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?
cant you add the behavior directly to the panel? -igor On Thu, Jul 23, 2009 at 7:24 AM, Doyle, Markmark.do...@logica.com wrote: I have a collection of Panels that are switched via an AjaxTabbedPanel Component. One of the panels has an AjaxSelfUpdatingBehaviour attached which works fine. However, if I switch to another panel the self updating behaviour is stopped because the component is no longer visible (a precondition check). This is perfectly reasonable logic. My problem is that when I switch back to the tab with the AjaxSelfUpdatingBehaviour it is still stopped and never restarts ( I'm guessing it's related to the stop flag in the behaviours class!). So is it possible to restart the behaviour? I've tried overriding the renderHead() to try and avoid the if stopped check but it didn't work so I guess there is something more complicated going on behind the scenes. Cheers, Mark Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: problem with pagination when hibernate result transformer is applied
here one more concern i did not mention before . lets say total records per page is 20 and the query fetched 2 items and each item has 10 bids, so sql query will have 20 records and result transformer will reduce it to two records and user will see just 2 records instead of 20 per page ? is there a solution for this ? James Carman-3 wrote: Do a different query to ask how many there are than the one you use to return the data. On Wed, Jul 22, 2009 at 11:10 AM, tubin genfachh...@gmail.com wrote: I am using hibernate criteria query to get data for my AjaxFallbackDefaultDataTable, this datatable also gives me pagination parameters which I am apply to criteria. .The entity I am using for the criteria query has a lazy load collection ,and I need the size of the collection in the view , so If I donot eager fetch collection I end up with n+1 selects .So to eager fetch collection and not to have duplicater records I added result transformer Criteria.DISTINCT_ROOT_ENTITY anmd fetchmode join . Now the problem is with pagination , for example I have item and bids and the criteria query to fetch items with eager fetch for bids , suppose query selects one item and this item has 2 bids the query returns total 3 records and total record count will be 3 and now when I apply result transformer three records will reduce to one record , but pagination information will be wrong , please help me how to resolve this ? - 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/problem-with-pagination-when-hibernate-result-transformer-is-applied-tp24608353p24627326.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
Localizing thru database lookup
I have used .properties and .xml files in all of my Wicket projects and it has worked great. However, quite often someone in the translation team wants to changes some text, image or something else that is localized in the properties files. Has anyone moved propeties to database with success? Something like component // The wicket component language // the language country // the country variant // the variant key // the key value // the actual value This could allow text to be changed thrue a web form. If the text was changed a callback to the resource loader to refresh the value. Can anyone lead me to the right path of implementing this. What classes should I look at? Has someone used something like this and is the .properties, .xml preferred over the database? It would be nice to not have to redeploy the whole application if just a text should be altered. // Mathias
Re: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?
Well I was adding this behaviour in the constructor of the Panel, i.e. this.add(new AjaxSelfUpdatingBehaviour(...)); which I assumed resulted in the same effect. I have just changed it to the following (see below) and now get a null pointer when the behaviour tries to update the panel after I switch to another one, i.e. when the panel is no longer visible. Note, I am storing the panels in a List (tabsList) to prevent them being recreated every time a user switches tabs. I did this to preserve the state. Perhaps this is causing some problems. So to recap, this now throws a null pointer (at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:96) presumably because the panel isn't in the markup to update. tabs.add(new AbstractTab(new Model(Administration)) { public Panel getPanel(String panelId) { if (tabsList.containsKey(Administration)) { return tabsList.get(Administration); } else { AdminPanel adminPanel = new AdminPanel(panelId); adminPanel.setOutputMarkupPlaceholderTag(true); adminPanel.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); tabsList.put(Administration, adminPanel); return adminPanel; } } }); igor.vaynberg wrote: cant you add the behavior directly to the panel? -igor -- View this message in context: http://www.nabble.com/Is-it-possible-to-restart-an-AjaxSelfUpdatingBehaviour-after-it-has-been-stopped--tp24626909p24627960.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: Localizing thru database lookup
I get my localized data from the database. I do that by creating a class that subclasses org.apache.wicket.resource.loader.ComponentStringResourceLoader. My subclass interacts with the database through a dao. Then in the init-method of my Application, I register my implementation through a call to: getResourceSettings().addStringResourceLoader(new MySubclassOfComponentStringResourceLoader()); //Dave Mathias Nilsson wrote: I have used .properties and .xml files in all of my Wicket projects and it has worked great. However, quite often someone in the translation team wants to changes some text, image or something else that is localized in the properties files. Has anyone moved propeties to database with success? Something like component // The wicket component language // the language country // the country variant // the variant key // the key value // the actual value This could allow text to be changed thrue a web form. If the text was changed a callback to the resource loader to refresh the value. Can anyone lead me to the right path of implementing this. What classes should I look at? Has someone used something like this and is the .properties, .xml preferred over the database? It would be nice to not have to redeploy the whole application if just a text should be altered. // Mathias - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?
hm, not really sure. maybe you can try rolling your own behavior and customize it to your exact needs. -igor On Thu, Jul 23, 2009 at 8:09 AM, CrocodileShoesmark.do...@logica.com wrote: Well I was adding this behaviour in the constructor of the Panel, i.e. this.add(new AjaxSelfUpdatingBehaviour(...)); which I assumed resulted in the same effect. I have just changed it to the following (see below) and now get a null pointer when the behaviour tries to update the panel after I switch to another one, i.e. when the panel is no longer visible. Note, I am storing the panels in a List (tabsList) to prevent them being recreated every time a user switches tabs. I did this to preserve the state. Perhaps this is causing some problems. So to recap, this now throws a null pointer (at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:96) presumably because the panel isn't in the markup to update. tabs.add(new AbstractTab(new Model(Administration)) { public Panel getPanel(String panelId) { if (tabsList.containsKey(Administration)) { return tabsList.get(Administration); } else { AdminPanel adminPanel = new AdminPanel(panelId); adminPanel.setOutputMarkupPlaceholderTag(true); adminPanel.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); tabsList.put(Administration, adminPanel); return adminPanel; } } }); igor.vaynberg wrote: cant you add the behavior directly to the panel? -igor -- View this message in context: http://www.nabble.com/Is-it-possible-to-restart-an-AjaxSelfUpdatingBehaviour-after-it-has-been-stopped--tp24626909p24627960.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: Is it possible to restart an AjaxSelfUpdatingBehaviour after it has been stopped?
Hi, Also take a look at this thread: http://www.nabble.com/AjaxSelfUpdatingTimerBehavior-and-ModalWindow-to22202102.html I don't mean it's a correct or better solution, but so far it works for me. Hth, Daniel CrocodileShoes wrote: Well I was adding this behaviour in the constructor of the Panel, i.e. this.add(new AjaxSelfUpdatingBehaviour(...)); which I assumed resulted in the same effect. I have just changed it to the following (see below) and now get a null pointer when the behaviour tries to update the panel after I switch to another one, i.e. when the panel is no longer visible. Note, I am storing the panels in a List (tabsList) to prevent them being recreated every time a user switches tabs. I did this to preserve the state. Perhaps this is causing some problems. So to recap, this now throws a null pointer (at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:96) presumably because the panel isn't in the markup to update. tabs.add(new AbstractTab(new Model(Administration)) { public Panel getPanel(String panelId) { if (tabsList.containsKey(Administration)) { return tabsList.get(Administration); } else { AdminPanel adminPanel = new AdminPanel(panelId); adminPanel.setOutputMarkupPlaceholderTag(true); adminPanel.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); tabsList.put(Administration, adminPanel); return adminPanel; } } }); igor.vaynberg wrote: cant you add the behavior directly to the panel? -igor -- View this message in context: http://www.nabble.com/Is-it-possible-to-restart-an-AjaxSelfUpdatingBehaviour-after-it-has-been-stopped--tp24626909p24629265.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
SerializableChecker flagging transient member variable
Hi All, I am finding that the SerializableChecker is throwing an exception of for the transient variable SoftReference in CompressedPackageResource.CompressingResourceStream Is this a mistake on the checkers part or am I possibly doing something wrong? cheers CD wicket 1.3.3 on Linux
Re: Maven with Eclipse
Stefan, I'm using m2eclipse. But it can take a little getting used to. I also think it causes an occasional eclipse crash. However, I'm still glad to have it. Never tried the other one. Once m2eclipse installed, go to your SVN Repositories perspective, browse the wicketstuff-core project. Right click onto jwicket and select Check out as Maven project. This will download all of the jwicket projects (jwicket-parent, jwicket, jwicket-examples), give each of them an eclipse project with maven support enabled, and activate subversion support. Pretty seamless to then start working and committing. I still find that I need to use the mvn install command from the command line sometimes to get things deployed to my local repo. How do you want to structure the sub-projects. Perhaps something like this? jwicket-parent jwicket jwicket-core jwicket-ui-core jwicket-plugins jwicket-ui-drag jwicket-ui-drop jwicket-ui-resize jwicket-tooltip jwicket-examples Or maybe: jwicket-parent jwicket-core (both jwicket core and ui core) jwicket-plugins jwicket-ui-dragdrop jwicket-ui-resize jwicket-tooltip jwicket-examples Should tooltips be separated into different projects too? I don't think we should go too far overboard on modularization. Tauren On Thu, Jul 23, 2009 at 3:54 AM, Stefan Lindnerlind...@visionet.de wrote: Hi Tauren, wich Eclipse plugin for maven do you prefer? m2eclipse or IAM (q4e)? I have commit acces and now I'm starting over with development. Current steps: 1. Add keypressed detection 2. Separate the Project into small pieces Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Markup for Disabled Panels and Pages
Hi all, I was wondering if there is a way to change a panel's or page's markup or even class when it is disabled. I have two versions of some of my panels and pages: a XXXViewPanel/Page and a XXXEditPanel/Page. The view-only version has labels instead of dropdown menus and text fields. Based on user's roles some pages/panels might be view-only for some users and editable for some others. Is there a way that I can substitute a panel or page when it is disabled? Thanks, Zhubin Zhubin Salehi Senior Software Engineer Route1 - Securing the Digital World(tm) Phone: 416-848-8391 ext. 2262 Mobile: (optional) This electronic mail transmission contains information from Route1 Inc. that is for the sole use of the intended recipient and may contain confidential, privileged or proprietary information. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this message, its contents, or any attachment is prohibited. Any wrongful interception of this message is punishable as a federal crime. If you have received this message in error, please return a copy to the sender by electronic mail indicating the error. Then, please destroy the original message and any copies from your computer. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to get some data from servlet
Hi all ; I can't use WicketSessionFilter maybe because I am using Apache Shiro (old name is Apache Kİ). In fact Fernando's solution works; Now I can reach and use Session inside UploadRequestTarget which implements IRequestTarget. But then I realized that I reach a different Session object in UploadRequestTarget class. It creates a new Session so i can NOT access it in other WebPages. In my Application class; @Override public final Session newSession(Request request, Response response) { return new MySession(request); } Are there any way to access all Sessions or stop creating a new Session in UploadRequestTarget (which implements IRequestTarget) Thanks. Altug. 2009/7/20 Igor Vaynberg igor.vaynb...@gmail.com see WicketSessionFilter -igor On Sun, Jul 19, 2009 at 3:20 PM, Altuğ B. Altıntaşalt...@gmail.com wrote: Hi Igor; I found the problem; problem is when i hit my UploadServlet via http-get method , i simply write the url and hit the enter then below code is working Session wicketSession = Session.get(); I can get wicket Session, wow !! it is great... BUT ... When i hit my UploadServlet via http-post method, swfupload access in that way then i can NOT access wicketSession. I mean this code : Session wicketSession = Session.get(); it throws : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Any idea ? Thanks Altug.. 2009/7/14 Igor Vaynberg igor.vaynb...@gmail.com that doesnt make any sense. all things within the webapp share the session. you guys are welcome to create a quickstart that replicates this. -igor On Tue, Jul 14, 2009 at 3:47 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: Also I have a problem like yours. Servlet session and Wicket's session are different so you are getting nul. Just debug your application and you will see that they have different session Id's. I tried to use WicketSessionFilter but it doesn't work. I am using wicket 1.3.5. Cheers... Altug. 2009/6/23 danisevsky danisev...@gmail.com hello, I am using MyMultiFileUploadServlet for uploading files and in some wicket component I need find out how many files was uploaded. I was trying to set this number to the HttpSession in MyMultiFileUploadServlet and get it in the component: HttpSession httpSession = ((WebRequest) getRequest()).getHttpServletRequest() .getSession(); String count = httpSession .getAttribute(filesCount); but count is always null. Is there any way how to get some data from servlet? Thanks -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
Re: Maven with Eclipse
Looks good to me. I'm looking forward to seeing your efforts! I will hopefully be getting to adding DND to my project soon. Once I do that, I'm planning to create a new example or update the existing example to make it more attractive looking. No offense, but when I first tried out the WicketJQuery example, it kind of turned me off because it was quite messy and confusing. Once I played with it some, it all made sense and I realized it would work well for me. But initial impressions are important. Tauren On Thu, Jul 23, 2009 at 10:13 AM, Stefan Lindnerlind...@visionet.de wrote: Tauren, I think tooltips should be separated too. The layout will be jwicket-parent jwicket-core (both jwicket core and ui core) jwicket-plugins jwicket-ui-dragdrop jwicket-ui-resize jwicket-tooltip-variantA jwicket-tooltip-variantB jwicket-tooltip-variantC jwicket-examples Stefan -Ursprüngliche Nachricht- Von: Tauren Mills [mailto:yowza...@gmail.com] Gesendet: Donnerstag, 23. Juli 2009 18:30 An: users@wicket.apache.org Betreff: Re: Maven with Eclipse Stefan, I'm using m2eclipse. But it can take a little getting used to. I also think it causes an occasional eclipse crash. However, I'm still glad to have it. Never tried the other one. Once m2eclipse installed, go to your SVN Repositories perspective, browse the wicketstuff-core project. Right click onto jwicket and select Check out as Maven project. This will download all of the jwicket projects (jwicket-parent, jwicket, jwicket-examples), give each of them an eclipse project with maven support enabled, and activate subversion support. Pretty seamless to then start working and committing. I still find that I need to use the mvn install command from the command line sometimes to get things deployed to my local repo. How do you want to structure the sub-projects. Perhaps something like this? jwicket-parent jwicket jwicket-core jwicket-ui-core jwicket-plugins jwicket-ui-drag jwicket-ui-drop jwicket-ui-resize jwicket-tooltip jwicket-examples Or maybe: jwicket-parent jwicket-core (both jwicket core and ui core) jwicket-plugins jwicket-ui-dragdrop jwicket-ui-resize jwicket-tooltip jwicket-examples Should tooltips be separated into different projects too? I don't think we should go too far overboard on modularization. Tauren On Thu, Jul 23, 2009 at 3:54 AM, Stefan Lindnerlind...@visionet.de wrote: Hi Tauren, wich Eclipse plugin for maven do you prefer? m2eclipse or IAM (q4e)? I have commit acces and now I'm starting over with development. Current steps: 1. Add keypressed detection 2. Separate the Project into small pieces Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to get some data from servlet
Could you show to us the whole code? I mean, the page or panel that upload the files as well the IRequestTarget class you have implemented? On Thu, Jul 23, 2009 at 10:31 AM, Altuğ B. Altıntaş alt...@gmail.comwrote: Hi all ; I can't use WicketSessionFilter maybe because I am using Apache Shiro (old name is Apache Kİ). In fact Fernando's solution works; Now I can reach and use Session inside UploadRequestTarget which implements IRequestTarget. But then I realized that I reach a different Session object in UploadRequestTarget class. It creates a new Session so i can NOT access it in other WebPages. In my Application class; @Override public final Session newSession(Request request, Response response) { return new MySession(request); } Are there any way to access all Sessions or stop creating a new Session in UploadRequestTarget (which implements IRequestTarget) Thanks. Altug. 2009/7/20 Igor Vaynberg igor.vaynb...@gmail.com see WicketSessionFilter -igor On Sun, Jul 19, 2009 at 3:20 PM, Altuğ B. Altıntaşalt...@gmail.com wrote: Hi Igor; I found the problem; problem is when i hit my UploadServlet via http-get method , i simply write the url and hit the enter then below code is working Session wicketSession = Session.get(); I can get wicket Session, wow !! it is great... BUT ... When i hit my UploadServlet via http-post method, swfupload access in that way then i can NOT access wicketSession. I mean this code : Session wicketSession = Session.get(); it throws : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Any idea ? Thanks Altug.. 2009/7/14 Igor Vaynberg igor.vaynb...@gmail.com that doesnt make any sense. all things within the webapp share the session. you guys are welcome to create a quickstart that replicates this. -igor On Tue, Jul 14, 2009 at 3:47 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: Also I have a problem like yours. Servlet session and Wicket's session are different so you are getting nul. Just debug your application and you will see that they have different session Id's. I tried to use WicketSessionFilter but it doesn't work. I am using wicket 1.3.5. Cheers... Altug. 2009/6/23 danisevsky danisev...@gmail.com hello, I am using MyMultiFileUploadServlet for uploading files and in some wicket component I need find out how many files was uploaded. I was trying to set this number to the HttpSession in MyMultiFileUploadServlet and get it in the component: HttpSession httpSession = ((WebRequest) getRequest()).getHttpServletRequest() .getSession(); String count = httpSession .getAttribute(filesCount); but count is always null. Is there any way how to get some data from servlet? Thanks -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ. -- Fernando Wermus. www.linkedin.com/in/fernandowermus
GZip HTML response
Hi All, I really need to enable GZip compression for HTML in my app, I see in Jira that there is a bug fix for this but its not released in the stable build. In the comments it suggest he following code snippet class GZipBufferedResponse extends BufferedResponse { public void close() { String result = toString(); if (result.length != 0) { getOutputStream().write(compress(result)); } } but I don't have a clue what to do with it, could anyone point me towards the correct class where I am supposed to use this? thanks in advance CD
Re: Markup for Disabled Panels and Pages
When it is disabled you might want to set invisible it and set visible the another panel? On Thu, Jul 23, 2009 at 10:24 AM, Zhubin Salehi zhubin.sal...@route1.comwrote: Hi all, I was wondering if there is a way to change a panel's or page's markup or even class when it is disabled. I have two versions of some of my panels and pages: a XXXViewPanel/Page and a XXXEditPanel/Page. The view-only version has labels instead of dropdown menus and text fields. Based on user's roles some pages/panels might be view-only for some users and editable for some others. Is there a way that I can substitute a panel or page when it is disabled? Thanks, Zhubin Zhubin Salehi Senior Software Engineer Route1 - Securing the Digital World(tm) Phone: 416-848-8391 ext. 2262 Mobile: (optional) This electronic mail transmission contains information from Route1 Inc. that is for the sole use of the intended recipient and may contain confidential, privileged or proprietary information. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this message, its contents, or any attachment is prohibited. Any wrongful interception of this message is punishable as a federal crime. If you have received this message in error, please return a copy to the sender by electronic mail indicating the error. Then, please destroy the original message and any copies from your computer. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Fernando Wermus. www.linkedin.com/in/fernandowermus
RE: Markup for Disabled Panels and Pages
I think this is a better idea that using two different pages. I can use both editable and non-editable panels in the same page and make one of them invisible. Thanks! Zhubin -Original Message- From: Fernando Wermus [mailto:fernando.wer...@gmail.com] Sent: Thursday, July 23, 2009 2:06 PM To: users@wicket.apache.org Subject: Re: Markup for Disabled Panels and Pages When it is disabled you might want to set invisible it and set visible the another panel? On Thu, Jul 23, 2009 at 10:24 AM, Zhubin Salehi zhubin.sal...@route1.comwrote: Hi all, I was wondering if there is a way to change a panel's or page's markup or even class when it is disabled. I have two versions of some of my panels and pages: a XXXViewPanel/Page and a XXXEditPanel/Page. The view-only version has labels instead of dropdown menus and text fields. Based on user's roles some pages/panels might be view-only for some users and editable for some others. Is there a way that I can substitute a panel or page when it is disabled? Thanks, Zhubin Zhubin Salehi Senior Software Engineer Route1 - Securing the Digital World(tm) Phone: 416-848-8391 ext. 2262 Mobile: (optional) This electronic mail transmission contains information from Route1 Inc. that is for the sole use of the intended recipient and may contain confidential, privileged or proprietary information. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this message, its contents, or any attachment is prohibited. Any wrongful interception of this message is punishable as a federal crime. If you have received this message in error, please return a copy to the sender by electronic mail indicating the error. Then, please destroy the original message and any copies from your computer. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Fernando Wermus. www.linkedin.com/in/fernandowermus - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Localizing thru database lookup
Ok thanks, have you implemented some sort of cache for this, because we don't want to get every value from database all the time. -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24631887.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: SerializableChecker flagging transient member variable
I don't know much about that piece, but I'd file this as a JIRA with a stack trace. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Jul 23, 2009 at 12:06 PM, Chris Davischris.da...@hullomail.com wrote: Hi All, I am finding that the SerializableChecker is throwing an exception of for the transient variable SoftReference in CompressedPackageResource.CompressingResourceStream Is this a mistake on the checkers part or am I possibly doing something wrong? cheers CD wicket 1.3.3 on Linux - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Bypassing form validation
I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bypassing form validation
setDefaultFormProcessing(false) http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean) -- Jeremy Thomerson http://www.wickettraining.com 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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: Bypassing form validation
See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean) -Original Message- From: carlson weber filho - Master CIM Informática [mailto:cwe...@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM To: users@wicket.apache.org Subject: Bypassing form validation I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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
jboss 5, jdk 1.6, and wicket 1.3 disk space problem
Hi Everyone, I'm evaluating wicket for a new project for my company. I started looking at the wicket-examples and dropped the wicket-examples-1.3.6.war into the jboss deploy directory. It deployed fine and I went through some of the examples. My problem is that I left jboss running, and the next day came back and noticed restarting jboss took a really long time. It turns out my /home partition (where jboss is running) was 95% full. Clearing out the jboss tmp dir brought /home down to 9%. The jboss tmp I'm referring to is here: /home/laura/jboss-5.0.0.GA/server/default/tmp/ I thought that the problem might be in one the examples, so I removed wicket-examples-1.3.6.war. I've been working on a simple example of my own using the markup inheritance example and the input form examples. I was planning on putting a page demo-ing the ajax functionality too. So I've been playing around with this example and hot-deploying the war to jboss all day and I've noticed my /home has crept up to 45%. Has anyone else had this problem? We have a lot of other web apps on jboss 5, but never had this problem before (none are based on wicket). Here's my exact details: jboss-5.0.0.GA jdk1.6.0_13 wicket 1.3.6 ubuntu 8.04, Hardy Heron Thanks, Laura
Re: jboss 5, jdk 1.6, and wicket 1.3 disk space problem
what are the files/dirs created in that tmp dir? -igor On Thu, Jul 23, 2009 at 12:34 PM, Laura Gforgoodorforawes...@yahoo.com wrote: Hi Everyone, I'm evaluating wicket for a new project for my company. I started looking at the wicket-examples and dropped the wicket-examples-1.3.6.war into the jboss deploy directory. It deployed fine and I went through some of the examples. My problem is that I left jboss running, and the next day came back and noticed restarting jboss took a really long time. It turns out my /home partition (where jboss is running) was 95% full. Clearing out the jboss tmp dir brought /home down to 9%. The jboss tmp I'm referring to is here: /home/laura/jboss-5.0.0.GA/server/default/tmp/ I thought that the problem might be in one the examples, so I removed wicket-examples-1.3.6.war. I've been working on a simple example of my own using the markup inheritance example and the input form examples. I was planning on putting a page demo-ing the ajax functionality too. So I've been playing around with this example and hot-deploying the war to jboss all day and I've noticed my /home has crept up to 45%. Has anyone else had this problem? We have a lot of other web apps on jboss 5, but never had this problem before (none are based on wicket). Here's my exact details: jboss-5.0.0.GA jdk1.6.0_13 wicket 1.3.6 ubuntu 8.04, Hardy Heron Thanks, Laura - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Localizing thru database lookup
It looks like Wicket caches the string when it has been loaded ones. Is this correct? -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24633121.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: Bypassing form validation
I already tried using setDefaultFormProcessing, but I want to actually process the form without validating it, on one of these buttons but using this method, I can't update my data, . Let me explain better. I have a master-detail form, supose I have fields M1, M2 and M3 on master-side and D1, D2 on details side. Fields M1 and D1 are required. I have a submit button that will submit all data and another submit button that will submit only detail data (I know it submits all the data, but then I will store the data on memory). When I click the button that submits my detail, I don't want it to do any validation on M1 field, but I want it to validate D1. Currently I am looking for 2 solutions: 1. Validate D1 but not M1 2. Do not validate at all. tx carlson Craig McIlwee escreveu: See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean) -Original Message- From: carlson weber filho - Master CIM Informática [mailto:cwe...@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM To: users@wicket.apache.org Subject: Bypassing form validation I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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: Localizing thru database lookup
yep, you can clear the cache by calling localizer.clearCache() -igor On Thu, Jul 23, 2009 at 12:42 PM, Mathias Nilssonwicket.program...@gmail.com wrote: It looks like Wicket caches the string when it has been loaded ones. Is this correct? -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24633121.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: Bypassing form validation
you should use embedded forms. make a form for M1 inside it add another form D1 a button in D1 form will only process D1 form, a button in M1 form will process both. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: I already tried using setDefaultFormProcessing, but I want to actually process the form without validating it, on one of these buttons but using this method, I can't update my data, . Let me explain better. I have a master-detail form, supose I have fields M1, M2 and M3 on master-side and D1, D2 on details side. Fields M1 and D1 are required. I have a submit button that will submit all data and another submit button that will submit only detail data (I know it submits all the data, but then I will store the data on memory). When I click the button that submits my detail, I don't want it to do any validation on M1 field, but I want it to validate D1. Currently I am looking for 2 solutions: 1. Validate D1 but not M1 2. Do not validate at all. tx carlson Craig McIlwee escreveu: See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean) -Original Message- From: carlson weber filho - Master CIM Informática [mailto:cwe...@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM To: users@wicket.apache.org Subject: Bypassing form validation I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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: Bypassing form validation
Isn't invalid to nest forms inside forms? Igor Vaynberg escreveu: you should use embedded forms. make a form for M1 inside it add another form D1 a button in D1 form will only process D1 form, a button in M1 form will process both. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: I already tried using setDefaultFormProcessing, but I want to actually process the form without validating it, on one of these buttons but using this method, I can't update my data, . Let me explain better. I have a master-detail form, supose I have fields M1, M2 and M3 on master-side and D1, D2 on details side. Fields M1 and D1 are required. I have a submit button that will submit all data and another submit button that will submit only detail data (I know it submits all the data, but then I will store the data on memory). When I click the button that submits my detail, I don't want it to do any validation on M1 field, but I want it to validate D1. Currently I am looking for 2 solutions: 1. Validate D1 but not M1 2. Do not validate at all. tx carlson Craig McIlwee escreveu: See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean) -Original Message- From: carlson weber filho - Master CIM Informática [mailto:cwe...@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM To: users@wicket.apache.org Subject: Bypassing form validation I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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: Bypassing form validation
Wicket takes care of that for you - you can do it in Wicket. -- Jeremy Thomerson http://www.wickettraining.com 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Isn't invalid to nest forms inside forms? Igor Vaynberg escreveu: you should use embedded forms. make a form for M1 inside it add another form D1 a button in D1 form will only process D1 form, a button in M1 form will process both. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: I already tried using setDefaultFormProcessing, but I want to actually process the form without validating it, on one of these buttons but using this method, I can't update my data, . Let me explain better. I have a master-detail form, supose I have fields M1, M2 and M3 on master-side and D1, D2 on details side. Fields M1 and D1 are required. I have a submit button that will submit all data and another submit button that will submit only detail data (I know it submits all the data, but then I will store the data on memory). When I click the button that submits my detail, I don't want it to do any validation on M1 field, but I want it to validate D1. Currently I am looking for 2 solutions: 1. Validate D1 but not M1 2. Do not validate at all. tx carlson Craig McIlwee escreveu: See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean) -Original Message- From: carlson weber filho - Master CIM Informática [mailto:cwe...@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM To: users@wicket.apache.org Subject: Bypassing form validation I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: jboss 5, jdk 1.6, and wicket 1.3 disk space problem
Inside the /tmp directory is another directory called vfs-nested.tmp. Inside that is a ton of jars. It looks like it's copying them over and over: 000209d4_wicket-extensions-1.3.6.jar 0008ddb0_wicket-datetime-1.3.6.jar 000f9baa_wicket-guice-1.3.6.jar 001782a9_wicket-extensions-1.3.6.jar 00189e19_velocity-dep-1.4.jar 001dac17_wicket-jmx-1.3.6.jar 0023cb17_wicket-auth-roles-1.3.6.jar 00256edd_wicket-ioc-1.3.6.jar 0025828e_wicket-jmx-1.3.6.jar 00289db1_wicket-jmx-1.3.6.jar --- On Thu, 7/23/09, Igor Vaynberg igor.vaynb...@gmail.com wrote: From: Igor Vaynberg igor.vaynb...@gmail.com Subject: Re: jboss 5, jdk 1.6, and wicket 1.3 disk space problem To: users@wicket.apache.org Date: Thursday, July 23, 2009, 2:41 PM what are the files/dirs created in that tmp dir? -igor On Thu, Jul 23, 2009 at 12:34 PM, Laura Gforgoodorforawes...@yahoo.com wrote: Hi Everyone, I'm evaluating wicket for a new project for my company. I started looking at the wicket-examples and dropped the wicket-examples-1.3.6.war into the jboss deploy directory. It deployed fine and I went through some of the examples. My problem is that I left jboss running, and the next day came back and noticed restarting jboss took a really long time. It turns out my /home partition (where jboss is running) was 95% full. Clearing out the jboss tmp dir brought /home down to 9%. The jboss tmp I'm referring to is here: /home/laura/jboss-5.0.0.GA/server/default/tmp/ I thought that the problem might be in one the examples, so I removed wicket-examples-1.3.6.war. I've been working on a simple example of my own using the markup inheritance example and the input form examples. I was planning on putting a page demo-ing the ajax functionality too. So I've been playing around with this example and hot-deploying the war to jboss all day and I've noticed my /home has crept up to 45%. Has anyone else had this problem? We have a lot of other web apps on jboss 5, but never had this problem before (none are based on wicket). Here's my exact details: jboss-5.0.0.GA jdk1.6.0_13 wicket 1.3.6 ubuntu 8.04, Hardy Heron Thanks, Laura - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: jboss 5, jdk 1.6, and wicket 1.3 disk space problem
Google vfs-nested.tmp - returns what looks like some valid results for you. http://www.google.com/search?q=vfs-nested.tmp http://ourcraft.wordpress.com/2009/01/05/plague-of-jar-files/ -- Jeremy Thomerson http://www.wickettraining.com On Thu, Jul 23, 2009 at 2:51 PM, Laura Gforgoodorforawes...@yahoo.com wrote: Inside the /tmp directory is another directory called vfs-nested.tmp. Inside that is a ton of jars. It looks like it's copying them over and over: 000209d4_wicket-extensions-1.3.6.jar 0008ddb0_wicket-datetime-1.3.6.jar 000f9baa_wicket-guice-1.3.6.jar 001782a9_wicket-extensions-1.3.6.jar 00189e19_velocity-dep-1.4.jar 001dac17_wicket-jmx-1.3.6.jar 0023cb17_wicket-auth-roles-1.3.6.jar 00256edd_wicket-ioc-1.3.6.jar 0025828e_wicket-jmx-1.3.6.jar 00289db1_wicket-jmx-1.3.6.jar --- On Thu, 7/23/09, Igor Vaynberg igor.vaynb...@gmail.com wrote: From: Igor Vaynberg igor.vaynb...@gmail.com Subject: Re: jboss 5, jdk 1.6, and wicket 1.3 disk space problem To: users@wicket.apache.org Date: Thursday, July 23, 2009, 2:41 PM what are the files/dirs created in that tmp dir? -igor On Thu, Jul 23, 2009 at 12:34 PM, Laura Gforgoodorforawes...@yahoo.com wrote: Hi Everyone, I'm evaluating wicket for a new project for my company. I started looking at the wicket-examples and dropped the wicket-examples-1.3.6.war into the jboss deploy directory. It deployed fine and I went through some of the examples. My problem is that I left jboss running, and the next day came back and noticed restarting jboss took a really long time. It turns out my /home partition (where jboss is running) was 95% full. Clearing out the jboss tmp dir brought /home down to 9%. The jboss tmp I'm referring to is here: /home/laura/jboss-5.0.0.GA/server/default/tmp/ I thought that the problem might be in one the examples, so I removed wicket-examples-1.3.6.war. I've been working on a simple example of my own using the markup inheritance example and the input form examples. I was planning on putting a page demo-ing the ajax functionality too. So I've been playing around with this example and hot-deploying the war to jboss all day and I've noticed my /home has crept up to 45%. Has anyone else had this problem? We have a lot of other web apps on jboss 5, but never had this problem before (none are based on wicket). Here's my exact details: jboss-5.0.0.GA jdk1.6.0_13 wicket 1.3.6 ubuntu 8.04, Hardy Heron Thanks, Laura - 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: Bypassing form validation
This is sounding like a Chuck Norris joke -- Wicket doesn't create invalid code -- it roundhouse kicks the rules until they submit! On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Wicket takes care of that for you - you can do it in Wicket. -- Jeremy Thomerson http://www.wickettraining.com 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Isn't invalid to nest forms inside forms? Igor Vaynberg escreveu: you should use embedded forms. make a form for M1 inside it add another form D1 a button in D1 form will only process D1 form, a button in M1 form will process both. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: I already tried using setDefaultFormProcessing, but I want to actually process the form without validating it, on one of these buttons but using this method, I can't update my data, . Let me explain better. I have a master-detail form, supose I have fields M1, M2 and M3 on master-side and D1, D2 on details side. Fields M1 and D1 are required. I have a submit button that will submit all data and another submit button that will submit only detail data (I know it submits all the data, but then I will store the data on memory). When I click the button that submits my detail, I don't want it to do any validation on M1 field, but I want it to validate D1. Currently I am looking for 2 solutions: 1. Validate D1 but not M1 2. Do not validate at all. tx carlson Craig McIlwee escreveu: See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29 -Original Message- From: carlson weber filho - Master CIM Informática [mailto:cwe...@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM To: users@wicket.apache.org Subject: Bypassing form validation I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Localizing thru database lookup
Ok thanks, that would clear the whole cache. is there already a method to clear just one localized message. here is the thing, I want the administrator to be able to update a key, value. I don't want to clear the whole cache just the one key connected to the cache. -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24633532.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: Localizing thru database lookup
maybe there should be methods to clear a part of the cache. Like getLocalizer().clearKey( key ); and getLocalizer.clearKeys( ListString keys ); -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24633675.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: Localizing thru database lookup
you are more then welcome to add an rfe, however it is not a simple fix. the cachekey currently contains a lot more information then just the propertykey and its all sandwiched into a single string, it contains the whole path. remember, in wicket components can inherit properties form their super class, as well as resolve properties based on locale, style, and variation. to implement what you want we would have to break the string up into an object with multiple properties, then the clearcachekey() method would have to iterate over all cache keys and match any that use that property. -igor On Thu, Jul 23, 2009 at 1:13 PM, Mathias Nilssonwicket.program...@gmail.com wrote: maybe there should be methods to clear a part of the cache. Like getLocalizer().clearKey( key ); and getLocalizer.clearKeys( ListString keys ); -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24633675.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: Bypassing form validation
Well, I almost got what I want, but there's a problem. When I submit the inner form, on the onSubmit I want to check some values of the master form, and the model doesn't get updated... Any hints here? tx carlson Dane Laverty escreveu: This is sounding like a Chuck Norris joke -- Wicket doesn't create invalid code -- it roundhouse kicks the rules until they submit! On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Wicket takes care of that for you - you can do it in Wicket. -- Jeremy Thomerson http://www.wickettraining.com 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Isn't invalid to nest forms inside forms? Igor Vaynberg escreveu: you should use embedded forms. make a form for M1 inside it add another form D1 a button in D1 form will only process D1 form, a button in M1 form will process both. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: I already tried using setDefaultFormProcessing, but I want to actually process the form without validating it, on one of these buttons but using this method, I can't update my data, . Let me explain better. I have a master-detail form, supose I have fields M1, M2 and M3 on master-side and D1, D2 on details side. Fields M1 and D1 are required. I have a submit button that will submit all data and another submit button that will submit only detail data (I know it submits all the data, but then I will store the data on memory). When I click the button that submits my detail, I don't want it to do any validation on M1 field, but I want it to validate D1. Currently I am looking for 2 solutions: 1. Validate D1 but not M1 2. Do not validate at all. tx carlson Craig McIlwee escreveu: See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29 -Original Message- From: carlson weber filho - Master CIM Informática [mailto:cwe...@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM To: users@wicket.apache.org Subject: Bypassing form validation I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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 - 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: Bypassing form validation
you said you do not want to process the outer form. without validation you cannot update the model. eg if you put aa into an integer field how do we push that into an integer model? what you can do is call formcomponent.getinput() to get at the raw values of those components. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Well, I almost got what I want, but there's a problem. When I submit the inner form, on the onSubmit I want to check some values of the master form, and the model doesn't get updated... Any hints here? tx carlson Dane Laverty escreveu: This is sounding like a Chuck Norris joke -- Wicket doesn't create invalid code -- it roundhouse kicks the rules until they submit! On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Wicket takes care of that for you - you can do it in Wicket. -- Jeremy Thomerson http://www.wickettraining.com 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Isn't invalid to nest forms inside forms? Igor Vaynberg escreveu: you should use embedded forms. make a form for M1 inside it add another form D1 a button in D1 form will only process D1 form, a button in M1 form will process both. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: I already tried using setDefaultFormProcessing, but I want to actually process the form without validating it, on one of these buttons but using this method, I can't update my data, . Let me explain better. I have a master-detail form, supose I have fields M1, M2 and M3 on master-side and D1, D2 on details side. Fields M1 and D1 are required. I have a submit button that will submit all data and another submit button that will submit only detail data (I know it submits all the data, but then I will store the data on memory). When I click the button that submits my detail, I don't want it to do any validation on M1 field, but I want it to validate D1. Currently I am looking for 2 solutions: 1. Validate D1 but not M1 2. Do not validate at all. tx carlson Craig McIlwee escreveu: See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29 -Original Message- From: carlson weber filho - Master CIM Informática [mailto:cwe...@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM To: users@wicket.apache.org Subject: Bypassing form validation I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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 - 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: Spring and Wicket - is it worth it?
Wow, this post generated a short burst of heat but not much light! I think the problem is your question conflates dependency injection, XML-based configuration, and the Spring framework. IMHO you have to consider these separately to understand their relative merits. Dependency injection is simply that if object A requires object B, it can assume that it will be given an instance of object B rather than having to look up an instance of object B. This has some very important advantages: - it makes for cleaner code, since you don't have to code the lookup. - it makes your code independent of any particular lookup approach. You can change how your business layer is wired together without changing all of your code. This is particularly important when trying to create libraries to be re-used in different applications. - it makes your code easier to test, since your test code can manually inject stub objects and mocks. So for me, DI is a big win, regardless of how you do it (Spring, Guice, or even code in your app startup that instantiates the objects and wires them together). I don't find the Spring XML configuration to be that much of a problem, since most of the apps I work on have no more than a few dozen object configured there. One thing I like about it, as opposed to some annotation-based approaches, is that it's external to the objects themselves, making the objects more flexible. For example, suppose you had a WidgetDAO that worked with a DataSource. With the Spring XML you could easily create two different WidgetDAO instances each pointing to a different datasource. This would not be so easy with an annotation-based approach. As for the Spring framework itself, I find it contains a whole bunch of functionality that I normally need in a business app, such as declarative transaction management, AOP (e.g. for logging), and sane wrappers around JDBC, JavaMail, and other difficult APIs. If you're not using Spring, you usually have to figure out other ways to do these things. Hope this helps. jk On Wed, Jul 22, 2009 at 06:40:19PM -0700, Dane Laverty wrote: Due to the fact that nearly every substantial sample Wicket app is Spring-based, I imagine that there's something awesome about using Spring. In fact, Wicket is what has finally gotten me to start learning Spring. I think I understand the basics of dependency injection -- configure your objects in xml files and then inject them into your classes -- but I'm still not clear on the advantage of it. I've read quite a ways into Spring in Action, and the author seems to assume that the reader will automatically see why xml-based dependency injection is great thing. I must just be missing something here. What I love about Wicket is being free from xml files. Can anyone give me a concise explanation of how the advantages of Spring are worth introducing a new layer into my applications? Dane - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bypassing form validation
Yes, I don't want to process it, but I want to do some processing based on the form values. But I got the point, If I don't validate form, I won't get my model updated. Now my problem goes back when I wanted to validate only parts of my values, so let's supose the folowing scenario Master Form Field M1 - Required Field M2 - Required Field M3 - Required Detail Form Field D1 - Required Field D2 - Required When I submit Field D1, Field M1 must be not blank. I am checking this now on code, not using a validator. I don't care at this time if Field M2 and Field M3 are blank or not. I need the value of M1 because I do some calculations on my detail object based on that. I tried using the getRawInput() but it only returns the value of my select (the M1 field is a select). Well, is there any solution for this case? tx carlson Igor Vaynberg escreveu: you said you do not want to process the outer form. without validation you cannot update the model. eg if you put aa into an integer field how do we push that into an integer model? what you can do is call formcomponent.getinput() to get at the raw values of those components. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Well, I almost got what I want, but there's a problem. When I submit the inner form, on the onSubmit I want to check some values of the master form, and the model doesn't get updated... Any hints here? tx carlson Dane Laverty escreveu: This is sounding like a Chuck Norris joke -- Wicket doesn't create invalid code -- it roundhouse kicks the rules until they submit! On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Wicket takes care of that for you - you can do it in Wicket. -- Jeremy Thomerson http://www.wickettraining.com 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Isn't invalid to nest forms inside forms? Igor Vaynberg escreveu: you should use embedded forms. make a form for M1 inside it add another form D1 a button in D1 form will only process D1 form, a button in M1 form will process both. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: I already tried using setDefaultFormProcessing, but I want to actually process the form without validating it, on one of these buttons but using this method, I can't update my data, . Let me explain better. I have a master-detail form, supose I have fields M1, M2 and M3 on master-side and D1, D2 on details side. Fields M1 and D1 are required. I have a submit button that will submit all data and another submit button that will submit only detail data (I know it submits all the data, but then I will store the data on memory). When I click the button that submits my detail, I don't want it to do any validation on M1 field, but I want it to validate D1. Currently I am looking for 2 solutions: 1. Validate D1 but not M1 2. Do not validate at all. tx carlson Craig McIlwee escreveu: See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29 -Original Message- From: carlson weber filho - Master CIM Informática [mailto:cwe...@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM To: users@wicket.apache.org Subject: Bypassing form validation I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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
Re: Save CSS/StyleSheet in Database ?
Hi Farhan, Can you please send me the sample codes of your implementation for Images ? I also want dynamic images to be displayed on my web page. I tried to condense what I did into an email but that grew too big. I've put up the important classes onto the Wicket Wiki here: http://cwiki.apache.org/confluence/display/WICKET/How+to+Stamp+an+Image+Template+with+Context+Specific+Details. You can see that is much more limited than what you are talking about implementing but perhaps it can be a place to start from. Regards, Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bypassing form validation
M1.processInput(); if (M1.isValid()) { value=M1.getModelObject(); } else { handleerrror } -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Yes, I don't want to process it, but I want to do some processing based on the form values. But I got the point, If I don't validate form, I won't get my model updated. Now my problem goes back when I wanted to validate only parts of my values, so let's supose the folowing scenario Master Form Field M1 - Required Field M2 - Required Field M3 - Required Detail Form Field D1 - Required Field D2 - Required When I submit Field D1, Field M1 must be not blank. I am checking this now on code, not using a validator. I don't care at this time if Field M2 and Field M3 are blank or not. I need the value of M1 because I do some calculations on my detail object based on that. I tried using the getRawInput() but it only returns the value of my select (the M1 field is a select). Well, is there any solution for this case? tx carlson Igor Vaynberg escreveu: you said you do not want to process the outer form. without validation you cannot update the model. eg if you put aa into an integer field how do we push that into an integer model? what you can do is call formcomponent.getinput() to get at the raw values of those components. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Well, I almost got what I want, but there's a problem. When I submit the inner form, on the onSubmit I want to check some values of the master form, and the model doesn't get updated... Any hints here? tx carlson Dane Laverty escreveu: This is sounding like a Chuck Norris joke -- Wicket doesn't create invalid code -- it roundhouse kicks the rules until they submit! On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Wicket takes care of that for you - you can do it in Wicket. -- Jeremy Thomerson http://www.wickettraining.com 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Isn't invalid to nest forms inside forms? Igor Vaynberg escreveu: you should use embedded forms. make a form for M1 inside it add another form D1 a button in D1 form will only process D1 form, a button in M1 form will process both. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: I already tried using setDefaultFormProcessing, but I want to actually process the form without validating it, on one of these buttons but using this method, I can't update my data, . Let me explain better. I have a master-detail form, supose I have fields M1, M2 and M3 on master-side and D1, D2 on details side. Fields M1 and D1 are required. I have a submit button that will submit all data and another submit button that will submit only detail data (I know it submits all the data, but then I will store the data on memory). When I click the button that submits my detail, I don't want it to do any validation on M1 field, but I want it to validate D1. Currently I am looking for 2 solutions: 1. Validate D1 but not M1 2. Do not validate at all. tx carlson Craig McIlwee escreveu: See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29 -Original Message- From: carlson weber filho - Master CIM Informática [mailto:cwe...@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM To: users@wicket.apache.org Subject: Bypassing form validation I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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
Re: Bypassing form validation
you're the man! tx a lot carlson Igor Vaynberg escreveu: M1.processInput(); if (M1.isValid()) { value=M1.getModelObject(); } else { handleerrror } -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Yes, I don't want to process it, but I want to do some processing based on the form values. But I got the point, If I don't validate form, I won't get my model updated. Now my problem goes back when I wanted to validate only parts of my values, so let's supose the folowing scenario Master Form Field M1 - Required Field M2 - Required Field M3 - Required Detail Form Field D1 - Required Field D2 - Required When I submit Field D1, Field M1 must be not blank. I am checking this now on code, not using a validator. I don't care at this time if Field M2 and Field M3 are blank or not. I need the value of M1 because I do some calculations on my detail object based on that. I tried using the getRawInput() but it only returns the value of my select (the M1 field is a select). Well, is there any solution for this case? tx carlson Igor Vaynberg escreveu: you said you do not want to process the outer form. without validation you cannot update the model. eg if you put aa into an integer field how do we push that into an integer model? what you can do is call formcomponent.getinput() to get at the raw values of those components. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Well, I almost got what I want, but there's a problem. When I submit the inner form, on the onSubmit I want to check some values of the master form, and the model doesn't get updated... Any hints here? tx carlson Dane Laverty escreveu: This is sounding like a Chuck Norris joke -- Wicket doesn't create invalid code -- it roundhouse kicks the rules until they submit! On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Wicket takes care of that for you - you can do it in Wicket. -- Jeremy Thomerson http://www.wickettraining.com 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: Isn't invalid to nest forms inside forms? Igor Vaynberg escreveu: you should use embedded forms. make a form for M1 inside it add another form D1 a button in D1 form will only process D1 form, a button in M1 form will process both. -igor 2009/7/23 carlson weber filho - Master CIM Informática cwe...@mastercim.com.br: I already tried using setDefaultFormProcessing, but I want to actually process the form without validating it, on one of these buttons but using this method, I can't update my data, . Let me explain better. I have a master-detail form, supose I have fields M1, M2 and M3 on master-side and D1, D2 on details side. Fields M1 and D1 are required. I have a submit button that will submit all data and another submit button that will submit only detail data (I know it submits all the data, but then I will store the data on memory). When I click the button that submits my detail, I don't want it to do any validation on M1 field, but I want it to validate D1. Currently I am looking for 2 solutions: 1. Validate D1 but not M1 2. Do not validate at all. tx carlson Craig McIlwee escreveu: See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29 -Original Message- From: carlson weber filho - Master CIM Informática [mailto:cwe...@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM To: users@wicket.apache.org Subject: Bypassing form validation I have a form with two submit buttons. Is there any way to selectivelly bypass some validation on one of these buttons? I want to validate just two fields if I click on the button1 and I want to validate all fields when I click on button2 tx, carlson - 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: Spring and Wicket - is it worth it?
There we go, that's the kind of information I was looking for! Thanks John. What got me started with Spring initially was its JDBC templates, but then everything I read basically said, Yeah, Spring has JDBC templates, but you won't really need them since you should be using ORM instead. However, when I went to find some Hibernate/Wicket examples, all the ones I found were based in a Spring DI framework. So here I am. I'm sure it will be worth it in the end, but at the moment it's a lot of reading and testing without feeling like I'm being especially awesome. Dane On Thu, Jul 23, 2009 at 1:32 PM, John Krasnay j...@krasnay.ca wrote: Wow, this post generated a short burst of heat but not much light! I think the problem is your question conflates dependency injection, XML-based configuration, and the Spring framework. IMHO you have to consider these separately to understand their relative merits. Dependency injection is simply that if object A requires object B, it can assume that it will be given an instance of object B rather than having to look up an instance of object B. This has some very important advantages: - it makes for cleaner code, since you don't have to code the lookup. - it makes your code independent of any particular lookup approach. You can change how your business layer is wired together without changing all of your code. This is particularly important when trying to create libraries to be re-used in different applications. - it makes your code easier to test, since your test code can manually inject stub objects and mocks. So for me, DI is a big win, regardless of how you do it (Spring, Guice, or even code in your app startup that instantiates the objects and wires them together). I don't find the Spring XML configuration to be that much of a problem, since most of the apps I work on have no more than a few dozen object configured there. One thing I like about it, as opposed to some annotation-based approaches, is that it's external to the objects themselves, making the objects more flexible. For example, suppose you had a WidgetDAO that worked with a DataSource. With the Spring XML you could easily create two different WidgetDAO instances each pointing to a different datasource. This would not be so easy with an annotation-based approach. As for the Spring framework itself, I find it contains a whole bunch of functionality that I normally need in a business app, such as declarative transaction management, AOP (e.g. for logging), and sane wrappers around JDBC, JavaMail, and other difficult APIs. If you're not using Spring, you usually have to figure out other ways to do these things. Hope this helps. jk On Wed, Jul 22, 2009 at 06:40:19PM -0700, Dane Laverty wrote: Due to the fact that nearly every substantial sample Wicket app is Spring-based, I imagine that there's something awesome about using Spring. In fact, Wicket is what has finally gotten me to start learning Spring. I think I understand the basics of dependency injection -- configure your objects in xml files and then inject them into your classes -- but I'm still not clear on the advantage of it. I've read quite a ways into Spring in Action, and the author seems to assume that the reader will automatically see why xml-based dependency injection is great thing. I must just be missing something here. What I love about Wicket is being free from xml files. Can anyone give me a concise explanation of how the advantages of Spring are worth introducing a new layer into my applications? Dane - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Localizing thru database lookup
Couldn't the String getCacheKey(final String key, final Component component) be used? -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24635015.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: Localizing thru database lookup
the point is that there can be more then one component that use the property key. -igor On Thu, Jul 23, 2009 at 2:31 PM, Mathias Nilssonwicket.program...@gmail.com wrote: Couldn't the String getCacheKey(final String key, final Component component) be used? -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24635015.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to determine which behavior corresponds to the currently handled request target
I'm trying to design a joda time based DateTime field. There are two reasons - I use joda time only - I have to wire tree components - start date, finish date and duration, so I have to add I managed to get it working but I'm concerned about the approach I took. So please critics are welcome. Below is the source code of the component. My question is about the isAjaxRequest() method. I believe I should check whether the AjaxFormComponentUpdatingBehavior's request target is handled. But I don't know how. Please suggest. import java.util.ArrayList; import java.util.Date; import java.util.List; import org.apache.wicket.Component; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.behavior.IBehavior; import org.apache.wicket.datetime.DateConverter; import org.apache.wicket.datetime.StyleDateConverter; import org.apache.wicket.datetime.markup.html.form.DateTextField; import org.apache.wicket.extensions.yui.calendar.DateField; import org.apache.wicket.markup.html.form.FormComponentPanel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.protocol.http.WebRequest; import org.joda.time.DateTime; public class JodaDateField extends FormComponentPanelDateTime { protected class LocalDateField extends DateField { protected final class LocalDateTextField extends DateTextField { public LocalDateTextField(String id, IModelDate model, DateConverter converter) { super(id, model, converter); } @Override protected void onModelChanged() { super.onModelChanged(); if (isAjaxRequest()) { Date date = getModelObject(); LocalDateField.this.setModelObject(date); } } } public LocalDateField(String id, IModelDate model) { super(id, model); } @Override protected DateTextField newDateTextField(String id, PropertyModel dateFieldModel) { @SuppressWarnings(unchecked) IModelDate model = dateFieldModel; return new LocalDateTextField(id, model, new StyleDateConverter(true)); } @Override protected void onModelChanged() { super.onModelChanged(); if (isAjaxRequest()) { Date date = getModelObject(); JodaDateField.this.setModelObject(date == null ? null : new DateTime(date)); } } } private DateField dateField;; public JodaDateField(String id, IModelDateTime model) { super(id, model); dateField = new LocalDateField(field, new ModelDate()); add(dateField); } @Override public Component add(IBehavior... behaviors) { ListIBehavior correct = new ArrayListIBehavior(); for (IBehavior behavior : behaviors) { if (behavior instanceof AjaxFormComponentUpdatingBehavior) dateField.get(date).add(behavior); else correct.add(behavior); } return super.add(correct.toArray(new IBehavior[correct.size()])); } @Override protected void convertInput() { Date date = dateField.getConvertedInput(); setConvertedInput(date == null ? null : new DateTime(date)); } @Override public String getInput() { return dateField.getInput(); } private boolean isAjaxRequest() { return getRequest() instanceof WebRequest ((WebRequest) getRequest()).isAjax(); } @Override protected void onBeforeRender() { DateTime date = getModelObject(); dateField.setDate(date == null ? null : date.toDate()); dateField.setRequired(isRequired()); super.onBeforeRender(); } }
Re: Localizing thru database lookup
Ok maybe there is a lot of work for this issue. It isn't a problem when using wicket ComponentStringResourceLoader is just a problem if we need to access the database all the time for a string and clear the entier cache if the database is updated. when looking at the source for Localizer#getCachedKey it returns the whole path, with style and locale. If I implemented a clearCachedKey like this. ( just on top of my head ) /** * Clear a key from the cache. * */ public void clearCachedKey( final String key, final Component component ){ if( cache == null ) return; String cachedKey = getCacheKey( key, component ); if( cachedKey != null ){ cache.remove( cachedKey ); } } wouldn't that be sufficient. The entire locale, style is taken care of by the getCachedKey. If the component is null only the key is returned. -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24635300.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: Localizing thru database lookup
class B extends A class C extends A A.properties { foo=bar } Component b=new B(); Component c=new C(); b.getString(foo); c.getString(foo); someone edits A.properties in the database ui calls clearkey(foo,b) == does not clear the cache used by (c), need to call clearkey(foo, set of all descendants of A that loaded the key) this is just a class hieararchy example, what about component hierarchy examples where multiple descendant components can inherit keys from their parent component? -igor On Thu, Jul 23, 2009 at 3:01 PM, Mathias Nilssonwicket.program...@gmail.com wrote: Ok maybe there is a lot of work for this issue. It isn't a problem when using wicket ComponentStringResourceLoader is just a problem if we need to access the database all the time for a string and clear the entier cache if the database is updated. when looking at the source for Localizer#getCachedKey it returns the whole path, with style and locale. If I implemented a clearCachedKey like this. ( just on top of my head ) /** * Clear a key from the cache. * */ public void clearCachedKey( final String key, final Component component ){ if( cache == null ) return; String cachedKey = getCacheKey( key, component ); if( cachedKey != null ){ cache.remove( cachedKey ); } } wouldn't that be sufficient. The entire locale, style is taken care of by the getCachedKey. If the component is null only the key is returned. -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24635300.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: Localizing thru database lookup
Yes I get you point. What about assigning clearing strategies that can be added and implemented. let's say it's sufficient for me to just clear the cache if the component is not a subclass of another component. I can implement my own strategy for clearing the cache or key/keys. ClearCacheStrategy // clears entier cache ClearNonInheritedKeyStratergy // And so on. But i guess the price to pay of clearing the whole cache and hitting the database again is a nice price to pay without spending time on this. -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24635970.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to get some data from servlet
I will post my codes. But now i catched a very very strange position in WicketSessionFilter . Let me explain : I used WicketSessionFilter and a Simple UploadServlet as Igor said. I tested my application using Firefox 3. It gives : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle bla bla bla ... I tried to debug WicketSessionFilter , I can see that Filter runs and sets the Session into Thread but then My Servlet doesn't get the Session because some how WicketSessionFilter 's finally block runs and Session.unset() method executes. I think my Servlet can't catch the Session in Thread that WicketSessionFilter puts or something like that. The most strange part is : When I tested my application using Internet Explorer 8, WOOWs , It works. My Upload servlet can reach the same Session without any exception. I think It means WicketSessionFilter and UploadServlet runs in proper order. Also I tested my application in Chrome, and I get the same exception : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle It likes producer and consumer problem. Sessions in Wicket will kill me :) Also I set up Wicket examples and I can see WicketSessionFilter runs properly. Any suggestions ? Thank you everybody. Altug. 2009/7/23 Fernando Wermus fernando.wer...@gmail.com Could you show to us the whole code? I mean, the page or panel that upload the files as well the IRequestTarget class you have implemented? On Thu, Jul 23, 2009 at 10:31 AM, Altuğ B. Altıntaş alt...@gmail.com wrote: Hi all ; I can't use WicketSessionFilter maybe because I am using Apache Shiro (old name is Apache Kİ). In fact Fernando's solution works; Now I can reach and use Session inside UploadRequestTarget which implements IRequestTarget. But then I realized that I reach a different Session object in UploadRequestTarget class. It creates a new Session so i can NOT access it in other WebPages. In my Application class; @Override public final Session newSession(Request request, Response response) { return new MySession(request); } Are there any way to access all Sessions or stop creating a new Session in UploadRequestTarget (which implements IRequestTarget) Thanks. Altug. 2009/7/20 Igor Vaynberg igor.vaynb...@gmail.com see WicketSessionFilter -igor On Sun, Jul 19, 2009 at 3:20 PM, Altuğ B. Altıntaşalt...@gmail.com wrote: Hi Igor; I found the problem; problem is when i hit my UploadServlet via http-get method , i simply write the url and hit the enter then below code is working Session wicketSession = Session.get(); I can get wicket Session, wow !! it is great... BUT ... When i hit my UploadServlet via http-post method, swfupload access in that way then i can NOT access wicketSession. I mean this code : Session wicketSession = Session.get(); it throws : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Any idea ? Thanks Altug.. 2009/7/14 Igor Vaynberg igor.vaynb...@gmail.com that doesnt make any sense. all things within the webapp share the session. you guys are welcome to create a quickstart that replicates this. -igor On Tue, Jul 14, 2009 at 3:47 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: Also I have a problem like yours. Servlet session and Wicket's session are different so you are getting nul. Just debug your application and you will see that they have different session Id's. I tried to use WicketSessionFilter but it doesn't work. I am using wicket 1.3.5. Cheers... Altug. 2009/6/23 danisevsky danisev...@gmail.com hello, I am using MyMultiFileUploadServlet for uploading files and in some wicket component I need find out how many files was uploaded. I was trying to set this number to the HttpSession in MyMultiFileUploadServlet and get it in the component: HttpSession httpSession = ((WebRequest) getRequest()).getHttpServletRequest() .getSession(); String count = httpSession .getAttribute(filesCount); but count is always null. Is there any way how to get some data from servlet? Thanks -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ. - To unsubscribe, e-mail:
ExtJS
Hi all, Does anyone have access to the javadocs for the ext-js implementation at http://code.google.com/p/wicket-ext/ ? When I attempt to download them with maven I get an empty archive that says 'not-available'. On that note, does anyone (Paolo?) know if the Grid supports inplace cell editing via the form components as ext-js does? Seems like a cool project but I am not sure how mature it is and my UX guy is getting pushy.. John- - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to get some data from servlet
I forgot to say : I am using Wicket 1.3.6 + Tomcat + java 6 maybe it gives a clue 2009/7/24 Altuğ B. Altıntaş alt...@gmail.com I will post my codes. But now i catched a very very strange position in WicketSessionFilter . Let me explain : I used WicketSessionFilter and a Simple UploadServlet as Igor said. I tested my application using Firefox 3. It gives : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle bla bla bla ... I tried to debug WicketSessionFilter , I can see that Filter runs and sets the Session into Thread but then My Servlet doesn't get the Session because some how WicketSessionFilter 's finally block runs and Session.unset() method executes. I think my Servlet can't catch the Session in Thread that WicketSessionFilter puts or something like that. The most strange part is : When I tested my application using Internet Explorer 8, WOOWs , It works. My Upload servlet can reach the same Session without any exception. I think It means WicketSessionFilter and UploadServlet runs in proper order. Also I tested my application in Chrome, and I get the same exception : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle It likes producer and consumer problem. Sessions in Wicket will kill me :) Also I set up Wicket examples and I can see WicketSessionFilter runs properly. Any suggestions ? Thank you everybody. Altug. 2009/7/23 Fernando Wermus fernando.wer...@gmail.com Could you show to us the whole code? I mean, the page or panel that upload the files as well the IRequestTarget class you have implemented? On Thu, Jul 23, 2009 at 10:31 AM, Altuğ B. Altıntaş alt...@gmail.com wrote: Hi all ; I can't use WicketSessionFilter maybe because I am using Apache Shiro (old name is Apache Kİ). In fact Fernando's solution works; Now I can reach and use Session inside UploadRequestTarget which implements IRequestTarget. But then I realized that I reach a different Session object in UploadRequestTarget class. It creates a new Session so i can NOT access it in other WebPages. In my Application class; @Override public final Session newSession(Request request, Response response) { return new MySession(request); } Are there any way to access all Sessions or stop creating a new Session in UploadRequestTarget (which implements IRequestTarget) Thanks. Altug. 2009/7/20 Igor Vaynberg igor.vaynb...@gmail.com see WicketSessionFilter -igor On Sun, Jul 19, 2009 at 3:20 PM, Altuğ B. Altıntaşalt...@gmail.com wrote: Hi Igor; I found the problem; problem is when i hit my UploadServlet via http-get method , i simply write the url and hit the enter then below code is working Session wicketSession = Session.get(); I can get wicket Session, wow !! it is great... BUT ... When i hit my UploadServlet via http-post method, swfupload access in that way then i can NOT access wicketSession. I mean this code : Session wicketSession = Session.get(); it throws : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Any idea ? Thanks Altug.. 2009/7/14 Igor Vaynberg igor.vaynb...@gmail.com that doesnt make any sense. all things within the webapp share the session. you guys are welcome to create a quickstart that replicates this. -igor On Tue, Jul 14, 2009 at 3:47 AM, Altuğ B. Altıntaş alt...@gmail.com wrote: Also I have a problem like yours. Servlet session and Wicket's session are different so you are getting nul. Just debug your application and you will see that they have different session Id's. I tried to use WicketSessionFilter but it doesn't work. I am using wicket 1.3.5. Cheers... Altug. 2009/6/23 danisevsky danisev...@gmail.com hello, I am using MyMultiFileUploadServlet for uploading files and in some wicket component I need find out how many files was uploaded. I was trying to set this number to the HttpSession in MyMultiFileUploadServlet and get it in the component: HttpSession httpSession = ((WebRequest) getRequest()).getHttpServletRequest() .getSession(); String count = httpSession .getAttribute(filesCount); but count is always null. Is there any way how to get some data from servlet? Thanks -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail:
Re: Spring and Wicket - is it worth it?
I agree that Wicket, although it's really 'only' a view framework, could do with a couple of straightforward examples in this area, because: - A view framework without any persistence going on isn't typically very useful; - It's important, if only to learn where, how and with what to hook into various server/session/request/... lifecycle stages correctly; - Wicket should be as easy as possible to get into, and this is rather a major point, I should think; - Spring, while very useful, is just a wee bit beside the point sometimes, and you're better off using it _after_ you understand what's going on anyway. (Besides, how else could you tell if it would useful to begin with?) Cheers, Erik On Thu, Jul 23, 2009 at 11:23 PM, Dane Lavertydanelave...@gmail.com wrote: There we go, that's the kind of information I was looking for! Thanks John. What got me started with Spring initially was its JDBC templates, but then everything I read basically said, Yeah, Spring has JDBC templates, but you won't really need them since you should be using ORM instead. However, when I went to find some Hibernate/Wicket examples, all the ones I found were based in a Spring DI framework. So here I am. I'm sure it will be worth it in the end, but at the moment it's a lot of reading and testing without feeling like I'm being especially awesome. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Looking for Pop-up menu...
I Think menu2 can do what you want as Ryan said. You can override the getCssClass() to return your own class name, because the default is yui-skin-sam which will span the width of yui-menu to the whole of the containing box. final YuiMenuBar mb = new YuiMenuBar(menuBar) { @Override protected String getCssClass() { return mymenuskin; } }; HTML style .mymenuskin .yuimenubar { width: 100px; background-color: #DDD; border: 1px solid #000; float: left; } /style and then customise the menu to what ever look and feel you want. the link below can be a guide, but also firebug can help you see the css class generated. http://developer.yahoo.com/yui/menu/#cssref BTW... whether the menu pop-up on mouse click or mouse over is due the the css class yuimenubarnav - http://developer.yahoo.com/yui/menu/#usingmenubar - unforunately at this moment, this is not overriddable. hth josh 2009/7/23 Petr Fejfar petr.fej...@gmail.com On Thu, Jul 23, 2009 at 2:01 AM, Ryan McKinleyryan...@gmail.com wrote: why not just a YUI menu? (not a context menu) Do you mean to use menu (not menu2) with permanently visible single menubar's item and pull down associated menu on click and resign on mouse over functinality? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Localizing thru database lookup
there is only one correct way to clear the cache, so i do not see why that needs to be externalized. -igor On Thu, Jul 23, 2009 at 3:47 PM, Mathias Nilssonwicket.program...@gmail.com wrote: Yes I get you point. What about assigning clearing strategies that can be added and implemented. let's say it's sufficient for me to just clear the cache if the component is not a subclass of another component. I can implement my own strategy for clearing the cache or key/keys. ClearCacheStrategy // clears entier cache ClearNonInheritedKeyStratergy // And so on. But i guess the price to pay of clearing the whole cache and hitting the database again is a nice price to pay without spending time on this. -- View this message in context: http://www.nabble.com/Localizing-thru-database-lookup-tp24627686p24635970.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
Bypassing required form validation for search submit link
Hi I have a Form with fields marked with various validators. F1 = required F2 = length 4 F3 = required F4 . And I also have 2 submit links, save and search. When I click on save, the normal default form processing happens. But when I click on search I want to bypass all required validators. I saw a suggestion to modify each FormComponent's isRequired which seems reasonable : TextField txt = new TextField(txtfield, model) { public boolean isRequired() { return findParent(Form.class).getRootForm().findSubmittingButton() instanceof IRequireFields; but is there any other alternative for this scenario ? Josh