Re: [OT] Apache con 2010 europe, when?
Thanks for the info. Already looked at the site for last year.. I've got a feeling we will be going to geecon and devoxx this year :) 2010/2/26 Tomasz Dziurko tdziu...@gmail.com 2010/2/26 nino martinez wael nino.martinez.w...@gmail.com: Interesting, i'll put that in the lineup aswell. Do you know if there's more tracks this year, meaning more simultaneous talks? Year ago there were two tracks (http://2009.geecon.org/site/schedule ) but I am not sure how would it look like in 2010, probably the same but I don't have any source 'inside' to be sure :) And if theres any talks on Agile and Test Driven and maybe something about User Experience too? And if it's still only 2 days of conference? Call for papers ends 28th February so agenda will be published probably in late March. Conference lasts three days with (probably, again) first day full of trainings and then two days with presentations. -- Pozdrawiam / Regards Tomasz Dziurko - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Print friendly panel
Hi! Anybody interested in pdf print script via wicket? ** Martin 2010/2/28 nino martinez wael nino.martinez.w...@gmail.com: Yeah I agree this is the way it should be done. Works like a charm! And then just have a simple js like this: script language=Javascript1.2 !-- function printpage() { window.print(); } //-- /script on or link button or whatever.. 2010/2/28 Riyad Kalla rka...@gmail.com This is what I've done in the past as well, allows your user to just print the page they are staring at and have the browser do the right thing in using an alternative style sheet for rendering the page -- this includes using a lot of display:none to trim down the parts of the page that you don't want printing. This way all you need on your page is a Print link that invokes the Print dialog, no other popups ontop of popups. Some info: http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/ http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/ http://webdesign.about.com/cs/css/a/aa042103a.htm On Sat, Feb 27, 2010 at 4:54 PM, Alex Rass a...@itbsllc.com wrote: Josh, This doesn't answer your question directly (about a popup). But a MUCH simpler way is to make your page printer friendly by supplying an alternative CSS for printing format (google on that). Makes life much easier. When you tell your page which css to use, you can say use this CSS for printing only. All transparent to the user. - Alex -Original Message- From: Josh Chappelle [mailto:jchappe...@4redi.com] Sent: Friday, February 26, 2010 4:09 PM To: users@wicket.apache.org Subject: Print friendly panel Hi, Does anyone know of a suggested method to render a printer friendly panel to a separate browser window so that user's can print? The only thing I have found is the following article and it looks a little clunky. http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html Basically I just need to be able to place a link that when clicked will pop up a new browser window with only the contents to the target panel. That way users can print that panel from there. Thanks, Josh - 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: Print friendly panel (pdf)
That's what google is doing to print (through a conversion on the back end). So if you contribute it, I am sure SOMEONE would want it :) - Alex -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Sunday, February 28, 2010 12:22 PM To: users@wicket.apache.org Subject: Re: Print friendly panel Hi! Anybody interested in pdf print script via wicket? ** Martin 2010/2/28 nino martinez wael nino.martinez.w...@gmail.com: Yeah I agree this is the way it should be done. Works like a charm! And then just have a simple js like this: script language=Javascript1.2 !-- function printpage() { window.print(); } //-- /script on or link button or whatever.. 2010/2/28 Riyad Kalla rka...@gmail.com This is what I've done in the past as well, allows your user to just print the page they are staring at and have the browser do the right thing in using an alternative style sheet for rendering the page -- this includes using a lot of display:none to trim down the parts of the page that you don't want printing. This way all you need on your page is a Print link that invokes the Print dialog, no other popups ontop of popups. Some info: http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/ http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/ http://webdesign.about.com/cs/css/a/aa042103a.htm On Sat, Feb 27, 2010 at 4:54 PM, Alex Rass a...@itbsllc.com wrote: Josh, This doesn't answer your question directly (about a popup). But a MUCH simpler way is to make your page printer friendly by supplying an alternative CSS for printing format (google on that). Makes life much easier. When you tell your page which css to use, you can say use this CSS for printing only. All transparent to the user. - Alex -Original Message- From: Josh Chappelle [mailto:jchappe...@4redi.com] Sent: Friday, February 26, 2010 4:09 PM To: users@wicket.apache.org Subject: Print friendly panel Hi, Does anyone know of a suggested method to render a printer friendly panel to a separate browser window so that user's can print? The only thing I have found is the following article and it looks a little clunky. http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html Basically I just need to be able to place a link that when clicked will pop up a new browser window with only the contents to the target panel. That way users can print that panel from there. Thanks, Josh - 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: Print friendly panel
Awesome! Thanks a lot guys. That will be easy to do. Josh -Original Message- From: Riyad Kalla [mailto:rka...@gmail.com] Sent: Saturday, February 27, 2010 6:06 PM To: users@wicket.apache.org Subject: Re: Print friendly panel This is what I've done in the past as well, allows your user to just print the page they are staring at and have the browser do the right thing in using an alternative style sheet for rendering the page -- this includes using a lot of display:none to trim down the parts of the page that you don't want printing. This way all you need on your page is a Print link that invokes the Print dialog, no other popups ontop of popups. Some info: http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/ http://www.scottklarr.com/topic/15/css-create-a-style-sheet-for-print-only/ http://webdesign.about.com/cs/css/a/aa042103a.htm On Sat, Feb 27, 2010 at 4:54 PM, Alex Rass a...@itbsllc.com wrote: Josh, This doesn't answer your question directly (about a popup). But a MUCH simpler way is to make your page printer friendly by supplying an alternative CSS for printing format (google on that). Makes life much easier. When you tell your page which css to use, you can say use this CSS for printing only. All transparent to the user. - Alex -Original Message- From: Josh Chappelle [mailto:jchappe...@4redi.com] Sent: Friday, February 26, 2010 4:09 PM To: users@wicket.apache.org Subject: Print friendly panel Hi, Does anyone know of a suggested method to render a printer friendly panel to a separate browser window so that user's can print? The only thing I have found is the following article and it looks a little clunky. http://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html Basically I just need to be able to place a link that when clicked will pop up a new browser window with only the contents to the target panel. That way users can print that panel from there. Thanks, Josh - 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
Bugs in PropertiesFactory?
loading my own properties-file with PropertiesFactory (1.4.6) does not work: placed myfile.properties in com.mycompany.webapp (where also MyApplication.java resides) and wanted to load it in the init()-method of MyApplication with: PropertiesFactory propertiesFactory = new PropertiesFactory(this); Properties myProps = propertiesFactory.load(getClass(), myfile); Bug 1: PropertiesFactory.load(): /** * * @see org.apache.wicket.resource.PropertiesFactory.IPropertiesLoader#load(java.lang.Class, * java.lang.String) */ public Properties load(final Class? clazz, final String path) { String fullPath = path + getFileExtension(); produces: myfileproperties so should be corrected to: public Properties load(final Class? clazz, final String path) { String fullPath = path + . + getFileExtension(); Bug 2: seems that clazz is not taken into account... Is not searching in com.mycompany.webapp! Workaround: I placed the file in root of classpath... Should I create a JIRA entry or am I doing something wrong? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bugs in PropertiesFactory?
On Sun, Feb 28, 2010 at 10:19 AM, Ralf Eichinger ralf.eichin...@pixotec.de wrote: loading my own properties-file with PropertiesFactory (1.4.6) does not work: placed myfile.properties in com.mycompany.webapp (where also MyApplication.java resides) and wanted to load it in the init()-method of MyApplication with: PropertiesFactory propertiesFactory = new PropertiesFactory(this); Properties myProps = propertiesFactory.load(getClass(), myfile); Bug 1: PropertiesFactory.load(): /** * * @see org.apache.wicket.resource.PropertiesFactory.IPropertiesLoader#load(java.lang.Class, * java.lang.String) */ public Properties load(final Class? clazz, final String path) { String fullPath = path + getFileExtension(); produces: myfileproperties so should be corrected to: public Properties load(final Class? clazz, final String path) { String fullPath = path + . + getFileExtension(); your path should contain the trailing . Bug 2: seems that clazz is not taken into account... Is not searching in com.mycompany.webapp! the class is taking into account, see AbstractPropertiesLoader#load(clazz,string) propertiesfactory is meant to be used by wicket, not directly by you. so you have to conform to how it works if you want to use it directly. i suggest you set a breakpoint and walk through the code to see where it goes wrong for you. -igor Workaround: I placed the file in root of classpath... Should I create a JIRA entry or am I doing something wrong? - 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: Announcing: visural-wicket 0.5 released - open source wicket components
I've looked into this a bit more and it could be because Fancybox attempts to detect the content type automatically. I've made an update to visural-wicket, so that the content type is explicitly forced. I think this may fix issues such as yours where the content-type is difficult to figure out in Javascript. Try out the patch and let me know if it works for you - http://www.richardnichols.net/wp-content/uploads/2010/02/visural-wicket-0.5.1.zip On 27 February 2010 22:17, danisevsky danisev...@gmail.com wrote: thank you. I tryed this, but do not work. I think problem is that image has no .jpg suffix. I do not know, how to solve it.. :( here is the result preview: http://img5.imgup.eu/prevzfs.jpg -- Richard Nichols :: http://www.visural.com/ :: http://www.richardnichols.net/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Better way to find a parent compoent in page hiearchy?
I have two pages. The first page is extended by the second page. On the second page, I want to access a component on the first page. One way to do this is to make the component a member variable of the first page. I feel this way may have two drawbacks: 1. A member variable uses more resources (memory, clustring, etc.) 2. Not all pages extending the first page may need to access this component, which make it seem unnecessary for such pages. Is there any more elegant way? I just started Wicket programming for a personal project. Thanks for any input! Regards, David - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Better way to find a parent compoent in page hiearchy?
Component#findParent(SomeClass.class) may be useful -igor On Sun, Feb 28, 2010 at 1:00 PM, David Chang david_q_zh...@yahoo.com wrote: I have two pages. The first page is extended by the second page. On the second page, I want to access a component on the first page. One way to do this is to make the component a member variable of the first page. I feel this way may have two drawbacks: 1. A member variable uses more resources (memory, clustring, etc.) 2. Not all pages extending the first page may need to access this component, which make it seem unnecessary for such pages. Is there any more elegant way? I just started Wicket programming for a personal project. Thanks for any input! Regards, David - 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: Better way to find a parent compoent in page hiearchy?
igor, thanks for prompt help! I can use Component#findParent(SomeClass.class) to find the first page. How can I further find the component by this Wicket ID? I need to overwrite its display value. Thanks again. --- On Sun, 2/28/10, Igor Vaynberg igor.vaynb...@gmail.com wrote: From: Igor Vaynberg igor.vaynb...@gmail.com Subject: Re: Better way to find a parent compoent in page hiearchy? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 4:04 PM Component#findParent(SomeClass.class) may be useful -igor On Sun, Feb 28, 2010 at 1:00 PM, David Chang david_q_zh...@yahoo.com wrote: I have two pages. The first page is extended by the second page. On the second page, I want to access a component on the first page. One way to do this is to make the component a member variable of the first page. I feel this way may have two drawbacks: 1. A member variable uses more resources (memory, clustring, etc.) 2. Not all pages extending the first page may need to access this component, which make it seem unnecessary for such pages. Is there any more elegant way? I just started Wicket programming for a personal project. Thanks for any input! Regards, David - 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: Better way to find a parent compoent in page hiearchy?
Maybe, this will be good for you: http://wicketstuff.org/wicket13doc/org/apache/wicket/MarkupContainer.html#get(java.lang.String) Regards, Peter 2010-02-28 22:12 keltezéssel, David Chang írta: igor, thanks for prompt help! I can use Component#findParent(SomeClass.class) to find the first page. How can I further find the component by this Wicket ID? I need to overwrite its display value. Thanks again. --- On Sun, 2/28/10, Igor Vaynberg igor.vaynb...@gmail.com wrote: From: Igor Vaynberg igor.vaynb...@gmail.com Subject: Re: Better way to find a parent compoent in page hiearchy? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 4:04 PM Component#findParent(SomeClass.class) may be useful -igor On Sun, Feb 28, 2010 at 1:00 PM, David Chang david_q_zh...@yahoo.com wrote: I have two pages. The first page is extended by the second page. On the second page, I want to access a component on the first page. One way to do this is to make the component a member variable of the first page. I feel this way may have two drawbacks: 1. A member variable uses more resources (memory, clustring, etc.) 2. Not all pages extending the first page may need to access this component, which make it seem unnecessary for such pages. Is there any more elegant way? I just started Wicket programming for a personal project. Thanks for any input! Regards, David - 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
Make Wicket component ID HTML element ID?
I have many Wicket components that are unique on pages. I would like to make their wicket ID HTML element ID instead of typing HTML id attribute. How can I do this? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Make Wicket component ID HTML element ID?
setOutputMarkupId(true) Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: David Chang david_q_zh...@yahoo.com Sent: Sunday, February 28, 2010 4:02 PM To: users@wicket.apache.org Subject: Make Wicket component ID HTML element ID? I have many Wicket components that are unique on pages. I would like to make their wicket ID HTML element ID instead of typing HTML id attribute. How can I do this? 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
RE: Make Wicket component ID HTML element ID?
Thanks for the info. But this method is only component-level. How can I make all Wicket components do this without repeating setOutputMarkupId(true) for each component? Regards. --- On Sun, 2/28/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: RE: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 5:15 PM setOutputMarkupId(true) Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: David Chang david_q_zh...@yahoo.com Sent: Sunday, February 28, 2010 4:02 PM To: users@wicket.apache.org Subject: Make Wicket component ID HTML element ID? I have many Wicket components that are unique on pages. I would like to make their wicket ID HTML element ID instead of typing HTML id attribute. How can I do this? 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
Re: Better way to find a parent compoent in page hiearchy?
Thanks for your input. This is interesting. Somehow I got confused. Shouldn't this method be natural part of a Component? As you know, each component has child components, which is why a Wicket page has a hiearchy of components. Let's take MarkcupContainer for the moment. Using this class means I have to add another element in the markup page, which seems complicate thhings a bit and does not seem elegant. Did I miss something? Regards. --- On Sun, 2/28/10, Major Péter majorpe...@sch.bme.hu wrote: From: Major Péter majorpe...@sch.bme.hu Subject: Re: Better way to find a parent compoent in page hiearchy? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 4:20 PM Maybe, this will be good for you: http://wicketstuff.org/wicket13doc/org/apache/wicket/MarkupContainer.html#get(java.lang.String) Regards, Peter 2010-02-28 22:12 keltezéssel, David Chang írta: igor, thanks for prompt help! I can use Component#findParent(SomeClass.class) to find the first page. How can I further find the component by this Wicket ID? I need to overwrite its display value. Thanks again. --- On Sun, 2/28/10, Igor Vaynberg igor.vaynb...@gmail.com wrote: From: Igor Vaynberg igor.vaynb...@gmail.com Subject: Re: Better way to find a parent compoent in page hiearchy? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 4:04 PM Component#findParent(SomeClass.class) may be useful -igor On Sun, Feb 28, 2010 at 1:00 PM, David Chang david_q_zh...@yahoo.com wrote: I have two pages. The first page is extended by the second page. On the second page, I want to access a component on the first page. One way to do this is to make the component a member variable of the first page. I feel this way may have two drawbacks: 1. A member variable uses more resources (memory, clustring, etc.) 2. Not all pages extending the first page may need to access this component, which make it seem unnecessary for such pages. Is there any more elegant way? I just started Wicket programming for a personal project. Thanks for any input! Regards, David - 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
Serialization and Form Models
Models have been my achilles heel when it comes to Wicket. Not so much their explicit use, but understanding whe they data they wrap around is serialized or kept in session and when it's not. I was running some tests today to experiment with just this subject. The domain object I was using in my tests intentionally had one field that I could, as an option, populate with unserializable value. This made it easy for me to determine when Wicket was trying to store the object with the page, as it would throw an exception. I created a page with a form to create new instances of this particular object. I initialized the form with a CompoundPropertyModel wrapped around my domain object. When I submitted the form and saved the object to my backend store , I received a WicketNotSerializableException. I was initially surprised by this, but after a few moments I realized (and correct me if I'm wrong) that the model wasn't detachable and that when I saved it the attribute I mentioned above was being populated with that unserializable value, but wicket was trying to save the page (probably to disk) with the model wrapped around the now unserializable object. I guess this isn't a big deal, but what concerns me, and the reason I was running these tests, was that some of the objects I'm working with have huge data graphs attached to them. I don't want these huge objects stored in memory or serialized with any of the pages to disk. Can a form be backed by a detachable model? It certainly wouldn't be a loadable detachable model for new objects that are to be created as there's nothing yet to load. If one can back a form with detachable model, does that limit anything that you can do with the form?
Re: Make Wicket component ID HTML element ID?
Use a Component.IVisitor and you can setOutputMarkupId on every child component On Feb 28, 2010, at 2:47 PM, David Chang wrote: Thanks for the info. But this method is only component-level. How can I make all Wicket components do this without repeating setOutputMarkupId(true) for each component? Regards. --- On Sun, 2/28/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: RE: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 5:15 PM setOutputMarkupId(true) Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: David Chang david_q_zh...@yahoo.com Sent: Sunday, February 28, 2010 4:02 PM To: users@wicket.apache.org Subject: Make Wicket component ID HTML element ID? I have many Wicket components that are unique on pages. I would like to make their wicket ID HTML element ID instead of typing HTML id attribute. How can I do this? 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 To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
Re: wicket-guicier -- Another Guice integration for Wicket
Joachim, I've loved it! It reduces a lot the complexity of parsing the page parameters. I think would be nice to show a 404 not found error (or something else) if the parameters doesn't match with the @inject constructors. I see another problem. When wicket-guice injects your annotated fields in a page, it injects a serializable proxy so the serialization process works pretty well even if the injected objects aren't serializable. I've tested it and you inject the fields after the page construction (PageConstructor @ line 192). But, the wicket-guice already has injected the fields (through the onComponentInstantionListener), so you're throwing away the serializable object. And we get the NotSerializableException. This could be improved. I could provide you a patch in a few day if you like. Thanks, Cheers. On Fri, Feb 26, 2010 at 11:56 PM, Joachim F. Kainz j...@jolira.com wrote: Fellow Users, Because the retails application my team is developing is mostly stateless, we are quite frequently have to use PageParameters. The untyped nature of this class has let to some nasty code. To address the issue I have thrown together wicket-guicer, which is Yet Another Guice Integration for Wicket. There are two main feature Wicket-Guicier supports: 1. Use Guice constructor injection instead of member injection. 2. Use typed parameters in the page constructor instead of PageParameters Version 1.0.4 of this component is available at http://code.google.com/p/jolira-tools/wiki/guicier?ts=1267238915updated=guicier The source is available at http://jolira-tools.googlecode.com/svn/wicket-guicier/ Any feedback would be appreciated. Best regards, Joachim - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mauro Ciancio maurociancio at gmail dot com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Where is InjectorHolder for Guice?
Hi, I'm trying to inject an object that it's not a Component. I've found that, with Spring, is as simple as using: InjectorHolder.getInjector().inject(this); But there aren't anything similar for Guice, the nearest thing looks to be: ((GuiceInjectorHolder) ((MyApplication) MyApplication.get()).getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector().injectMembers(this); as said in: http://old.nabble.com/Problem-with-Wicket-and-Guice-td14787021.html Is there a simpler way? If not, are there plans to introduce something similar in Wicket-Guice? Best regards. -- José María Ruiz - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Where is InjectorHolder for Guice?
José María, For example, sometimes I need an injected object in a DataProvider, but this is constructed in the context of a page. So, I can easily pass the injected object into the page to the DataProvider. Code: public page extends page { @inject myservice page() { new provider(myservice); } } Is this your case? PS: I think you would have understood me better if I wrote to you in spanish :) Cheers. 2010/2/28 José María Ruiz josema...@simpleoption.com: Hi, I'm trying to inject an object that it's not a Component. I've found that, with Spring, is as simple as using: InjectorHolder.getInjector().inject(this); But there aren't anything similar for Guice, the nearest thing looks to be: ((GuiceInjectorHolder) ((MyApplication) MyApplication.get()).getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector().injectMembers(this); as said in: http://old.nabble.com/Problem-with-Wicket-and-Guice-td14787021.html Is there a simpler way? If not, are there plans to introduce something similar in Wicket-Guice? Best regards. -- José María Ruiz - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mauro Ciancio maurociancio at gmail dot com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Serialization and Form Models
Matthew, A quick absolute way to make sure those values are serialized is to use the Java 'transient' keyword. But Wicket will be assuming that when a user hits the Back button, that it can re-constitute the page from the serialized info it has on disk, if it cannot, then yes you'll need a LoadableDetachable model that can rebuild that expensive graph when demanded but you won't need to persist it. -R On Sun, Feb 28, 2010 at 4:37 PM, Matthew Welch matt...@welchkin.net wrote: Models have been my achilles heel when it comes to Wicket. Not so much their explicit use, but understanding whe they data they wrap around is serialized or kept in session and when it's not. I was running some tests today to experiment with just this subject. The domain object I was using in my tests intentionally had one field that I could, as an option, populate with unserializable value. This made it easy for me to determine when Wicket was trying to store the object with the page, as it would throw an exception. I created a page with a form to create new instances of this particular object. I initialized the form with a CompoundPropertyModel wrapped around my domain object. When I submitted the form and saved the object to my backend store , I received a WicketNotSerializableException. I was initially surprised by this, but after a few moments I realized (and correct me if I'm wrong) that the model wasn't detachable and that when I saved it the attribute I mentioned above was being populated with that unserializable value, but wicket was trying to save the page (probably to disk) with the model wrapped around the now unserializable object. I guess this isn't a big deal, but what concerns me, and the reason I was running these tests, was that some of the objects I'm working with have huge data graphs attached to them. I don't want these huge objects stored in memory or serialized with any of the pages to disk. Can a form be backed by a detachable model? It certainly wouldn't be a loadable detachable model for new objects that are to be created as there's nothing yet to load. If one can back a form with detachable model, does that limit anything that you can do with the form?
Re: Better way to find a parent compoent in page hiearchy?
and the WebPage isn't a MarkupContainer or what?? 2010-02-28 23:54 keltezéssel, David Chang írta: Thanks for your input. This is interesting. Somehow I got confused. Shouldn't this method be natural part of a Component? As you know, each component has child components, which is why a Wicket page has a hiearchy of components. Let's take MarkcupContainer for the moment. Using this class means I have to add another element in the markup page, which seems complicate thhings a bit and does not seem elegant. Did I miss something? Regards. --- On Sun, 2/28/10, Major Péter majorpe...@sch.bme.hu wrote: From: Major Péter majorpe...@sch.bme.hu Subject: Re: Better way to find a parent compoent in page hiearchy? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 4:20 PM Maybe, this will be good for you: http://wicketstuff.org/wicket13doc/org/apache/wicket/MarkupContainer.html#get(java.lang.String) Regards, Peter 2010-02-28 22:12 keltezéssel, David Chang írta: igor, thanks for prompt help! I can use Component#findParent(SomeClass.class) to find the first page. How can I further find the component by this Wicket ID? I need to overwrite its display value. Thanks again. --- On Sun, 2/28/10, Igor Vaynberg igor.vaynb...@gmail.com wrote: From: Igor Vaynberg igor.vaynb...@gmail.com Subject: Re: Better way to find a parent compoent in page hiearchy? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 4:04 PM Component#findParent(SomeClass.class) may be useful -igor On Sun, Feb 28, 2010 at 1:00 PM, David Chang david_q_zh...@yahoo.com wrote: I have two pages. The first page is extended by the second page. On the second page, I want to access a component on the first page. One way to do this is to make the component a member variable of the first page. I feel this way may have two drawbacks: 1. A member variable uses more resources (memory, clustring, etc.) 2. Not all pages extending the first page may need to access this component, which make it seem unnecessary for such pages. Is there any more elegant way? I just started Wicket programming for a personal project. Thanks for any input! Regards, David - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Better way to find a parent compoent in page hiearchy?
Major, thanks for the info. You are right. I did not look down further along the wicket class hierarchy. Thanks! --- On Sun, 2/28/10, Major Péter majorpe...@sch.bme.hu wrote: From: Major Péter majorpe...@sch.bme.hu Subject: Re: Better way to find a parent compoent in page hiearchy? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 7:50 PM and the WebPage isn't a MarkupContainer or what?? 2010-02-28 23:54 keltezéssel, David Chang írta: Thanks for your input. This is interesting. Somehow I got confused. Shouldn't this method be natural part of a Component? As you know, each component has child components, which is why a Wicket page has a hiearchy of components. Let's take MarkcupContainer for the moment. Using this class means I have to add another element in the markup page, which seems complicate thhings a bit and does not seem elegant. Did I miss something? Regards. --- On Sun, 2/28/10, Major Péter majorpe...@sch.bme.hu wrote: From: Major Péter majorpe...@sch.bme.hu Subject: Re: Better way to find a parent compoent in page hiearchy? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 4:20 PM Maybe, this will be good for you: http://wicketstuff.org/wicket13doc/org/apache/wicket/MarkupContainer.html#get(java.lang.String) Regards, Peter 2010-02-28 22:12 keltezéssel, David Chang írta: igor, thanks for prompt help! I can use Component#findParent(SomeClass.class) to find the first page. How can I further find the component by this Wicket ID? I need to overwrite its display value. Thanks again. --- On Sun, 2/28/10, Igor Vaynberg igor.vaynb...@gmail.com wrote: From: Igor Vaynberg igor.vaynb...@gmail.com Subject: Re: Better way to find a parent compoent in page hiearchy? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 4:04 PM Component#findParent(SomeClass.class) may be useful -igor On Sun, Feb 28, 2010 at 1:00 PM, David Chang david_q_zh...@yahoo.com wrote: I have two pages. The first page is extended by the second page. On the second page, I want to access a component on the first page. One way to do this is to make the component a member variable of the first page. I feel this way may have two drawbacks: 1. A member variable uses more resources (memory, clustring, etc.) 2. Not all pages extending the first page may need to access this component, which make it seem unnecessary for such pages. Is there any more elegant way? I just started Wicket programming for a personal project. Thanks for any input! Regards, David - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-guicier -- Another Guice integration for Wicket
Mauro, Good point. I never tested wicket-guicier wicket-guice together as I use guicer as a complete replacement in my projects. I would appreciate a patch. Best regards, Joachim On Sun, 2010-02-28 at 20:53 -0300, Mauro Ciancio wrote: Joachim, I've loved it! It reduces a lot the complexity of parsing the page parameters. I think would be nice to show a 404 not found error (or something else) if the parameters doesn't match with the @inject constructors. I see another problem. When wicket-guice injects your annotated fields in a page, it injects a serializable proxy so the serialization process works pretty well even if the injected objects aren't serializable. I've tested it and you inject the fields after the page construction (PageConstructor @ line 192). But, the wicket-guice already has injected the fields (through the onComponentInstantionListener), so you're throwing away the serializable object. And we get the NotSerializableException. This could be improved. I could provide you a patch in a few day if you like. Thanks, Cheers. On Fri, Feb 26, 2010 at 11:56 PM, Joachim F. Kainz j...@jolira.com wrote: Fellow Users, Because the retails application my team is developing is mostly stateless, we are quite frequently have to use PageParameters. The untyped nature of this class has let to some nasty code. To address the issue I have thrown together wicket-guicer, which is Yet Another Guice Integration for Wicket. There are two main feature Wicket-Guicier supports: 1. Use Guice constructor injection instead of member injection. 2. Use typed parameters in the page constructor instead of PageParameters Version 1.0.4 of this component is available at http://code.google.com/p/jolira-tools/wiki/guicier?ts=1267238915updated=guicier The source is available at http://jolira-tools.googlecode.com/svn/wicket-guicier/ Any feedback would be appreciated. Best regards, Joachim - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Role-based wicket application
Hi, We just use one application/page for all roles, otherwise, you'd have a hard time maintaining everything especially if you have dynamic roles. Wicket has an interface you can implement for authorization (IAuthorizationStrategy); there are also existing projects that implement it for you as well and cover the general use case such as wicket-auth-roles and wicket-security. However, we just implemented our own IAuthorizationStrategy since we have an existing role-based system from older applications so I haven't had much experience with the existing projects. The basics of implementing your own are covered pretty well in the Wicket in Action book as well, but if the existing projects cover your needs then you should be able to use them pretty easily. On Fri, Feb 26, 2010 at 6:35 PM, Jing Ge (Besitec IT DEHAM) j...@besitec.com wrote: Hello guys, We have been using wicket since more than one year. It is very comfortable to work with wicket and live here in this community. Thanks you guys! Now we want to add more features into our application and we get a (actually very common) problem: What is the correct way for building a role-based wicket application? The requirement is something like this: 1. Users are assigned to different roles, or groups, or projects. 2. Some pages looks similar to the users of different roles. But they are not same. We have thought about it for a while and get some ideas: 1. One application for all roles and one page for all roles. (with if.. else maybe, we know it is not good). Is it possible with wicket? Since the wicket:id, that is defined in the html , must be added in the java class. Maybe show/hide it for different roles? 2. One application for all roles but one page for each role. The drawback is the duplicated code logic. This could be solved by class inheritance. But the html files are still duplicated. 3. One application for each role. Build a base project and then let other projects inheritance from the base one. We know that the third choice is not good (actually very bad from the technical point of view, has a lot of problems for changes, release, deployment, etc.), but it has also one real great benefit: role relevant changes will be limited only to the users of that role. That means, for such changes, only the application for that role needed to be updated, redeployed, and restarted. Is there any features of wicket can solve such problem? Does anyone of you guys has some better ideas? We appreciate any suggestions, guides, helps, etc. Thanks! Best regards Jing
Re: Make Wicket component ID HTML element ID?
Thanks for the tip. I added this approach to the top page. Here is my implemenetation: visitChildren(new IVisitorComponent() { @Override public Object component(Component c) { c.setOutputMarkupId(true); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); Is this the right way to implement? I notice one thing that is not what I want: instead of generating wanted HTML element ID such as signInOut or feedback, Wicket added one number or letter to wicket ID as HTML element ID (for example: signInOut4, feedbackb). How can I overcome this? Regards. --- On Sun, 2/28/10, Andrew Lombardi and...@mysticcoders.com wrote: From: Andrew Lombardi and...@mysticcoders.com Subject: Re: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 6:41 PM Use a Component.IVisitor and you can setOutputMarkupId on every child component On Feb 28, 2010, at 2:47 PM, David Chang wrote: Thanks for the info. But this method is only component-level. How can I make all Wicket components do this without repeating setOutputMarkupId(true) for each component? Regards. --- On Sun, 2/28/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: RE: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 5:15 PM setOutputMarkupId(true) Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: David Chang david_q_zh...@yahoo.com Sent: Sunday, February 28, 2010 4:02 PM To: users@wicket.apache.org Subject: Make Wicket component ID HTML element ID? I have many Wicket components that are unique on pages. I would like to make their wicket ID HTML element ID instead of typing HTML id attribute. How can I do this? 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 To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Make Wicket component ID HTML element ID?
you would have to explicitly call .setMarkupId on each component. If you wanted to automate, you could probably do something like c.setMarkupId(c.getId()) in your visitor. On Feb 28, 2010, at 7:52 PM, David Chang wrote: Thanks for the tip. I added this approach to the top page. Here is my implemenetation: visitChildren(new IVisitorComponent() { @Override public Object component(Component c) { c.setOutputMarkupId(true); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); Is this the right way to implement? I notice one thing that is not what I want: instead of generating wanted HTML element ID such as signInOut or feedback, Wicket added one number or letter to wicket ID as HTML element ID (for example: signInOut4, feedbackb). How can I overcome this? Regards. --- On Sun, 2/28/10, Andrew Lombardi and...@mysticcoders.com wrote: From: Andrew Lombardi and...@mysticcoders.com Subject: Re: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 6:41 PM Use a Component.IVisitor and you can setOutputMarkupId on every child component On Feb 28, 2010, at 2:47 PM, David Chang wrote: Thanks for the info. But this method is only component-level. How can I make all Wicket components do this without repeating setOutputMarkupId(true) for each component? Regards. --- On Sun, 2/28/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: RE: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 5:15 PM setOutputMarkupId(true) Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: David Chang david_q_zh...@yahoo.com Sent: Sunday, February 28, 2010 4:02 PM To: users@wicket.apache.org Subject: Make Wicket component ID HTML element ID? I have many Wicket components that are unique on pages. I would like to make their wicket ID HTML element ID instead of typing HTML id attribute. How can I do this? 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 To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
Re: Make Wicket component ID HTML element ID?
You could also use a component instantiation listener and have it automatically called for every component that is created. -- Jeremy Thomerson http://www.wickettraining.com On Sun, Feb 28, 2010 at 9:52 PM, David Chang david_q_zh...@yahoo.comwrote: Thanks for the tip. I added this approach to the top page. Here is my implemenetation: visitChildren(new IVisitorComponent() { @Override public Object component(Component c) { c.setOutputMarkupId(true); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); Is this the right way to implement? I notice one thing that is not what I want: instead of generating wanted HTML element ID such as signInOut or feedback, Wicket added one number or letter to wicket ID as HTML element ID (for example: signInOut4, feedbackb). How can I overcome this? Regards. --- On Sun, 2/28/10, Andrew Lombardi and...@mysticcoders.com wrote: From: Andrew Lombardi and...@mysticcoders.com Subject: Re: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 6:41 PM Use a Component.IVisitor and you can setOutputMarkupId on every child component On Feb 28, 2010, at 2:47 PM, David Chang wrote: Thanks for the info. But this method is only component-level. How can I make all Wicket components do this without repeating setOutputMarkupId(true) for each component? Regards. --- On Sun, 2/28/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: RE: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 5:15 PM setOutputMarkupId(true) Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: David Chang david_q_zh...@yahoo.com Sent: Sunday, February 28, 2010 4:02 PM To: users@wicket.apache.org Subject: Make Wicket component ID HTML element ID? I have many Wicket components that are unique on pages. I would like to make their wicket ID HTML element ID instead of typing HTML id attribute. How can I do this? 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 To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SV: Make Wicket component ID HTML element ID?
I notice one thing that is not what I want: instead of generating wanted HTML element ID such as signInOut or feedback, Wicket added one number or letter to wicket ID as HTML element ID (for example: signInOut4, feedbackb). How can I overcome this? Are you sure you want to? Do you use any repeaters (ListView, Loop, RepeatingView)? In that case you actually want this disambiguation so that you don't end up with multiple elements with the same id which messes with any Ajax you want to use. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org