Re: Is it the best way to code a Link depending on a condition
Joseph, Can you explain a little bit what you mean by provide it with attribute (IModelString) ? private Label labelTitle; public static Label createLabelTitle(String title) { return new Label(title,new Model( title )); } -- becomes private Label labelTitle; public static Label createLabelTitle(String title) { return new Label(title,new PropertyModel( ModelClass, title )); } Is it right what I create ? Joseph Pachod wrote: cmoulliard wrote: What I have done to avoid to repeat the creation of the labels is to define and use static method private Label labelTitle; public static Label getLabelTitle(String title) { return new Label(title,new Model( title )); } I personally would name this method createLabelTitle(String title) or getNewLabelTitle(String title), for explicitness. Furthermore, I would directly provide it with a final IModelString title attribute, not to dictate how the data has to be provided (dynamic or not for example). In the end, this method is fine for just a label, but for anything more complex a panel would be the way to go I would say. The main exception here I see right now is the case of pages. For example, if we're speaking of a page title, then I would define it in my base page and make an abstract String getTitle() method in the base page so I'm sure everyone set it up later on. I would do the same if it's a specific kind of structured page, for example an abstract class ContentHoldingPage extend TheBasePage. ++ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Charles Moulliard SOA Architect My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ -- View this message in context: http://www.nabble.com/Is-it-the-best-way-to-code-a-Link-depending-on-a-condition-tp25488603p25530206.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
AjaxFallbackDataTable and partial refreshing problem
Hi all! I'm relatively new with Wicket. I've implemented AjaxFallbackDataTable by using the example from wicket-examples. (AjaxFallbackDataTable Example - demonstrates an AJAX enabled datatable component http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.AjaxDataTablePage) http://www.wicket-library.com/wicket-examples/repeater/ I have a page with AjaxFallbackDataTable containing some email addresses fetched from the database by using Hibernate. Page also contains another panel for adding and removing email addresses. When I add or remove an address from the database using Hibernate, I use AjaxFallbackButton and a form with input field and add AjaxFallbackDataTable to the AjaxRequestTarget on submit. getService().addEmailAddress(address); if (target != null) { target.addComponent(getEmailList()); } Results: - AjaxFallbackDataTable reloads itself but the navigation toolbar does not change. - If I add an address, it does appear in AjaxFallbackDataTable only if I have removed an address earlier - The initial time maximum row count of AjaxFallbackDataTable does not change even if I add rows and add AjaxFallbackDataTable to target. - All the needed data is fetched from my DataProvider at the right time but for some reason AjaxFallbackDataTable does not show it all. So the question is: How can I refresh AjaxFallbackDataTable completely so that navigation toolbar and row amount will also refresh. - Simo http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.AjaxDataTablePage - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicketstuff-dojo wicket 1.4
Hi, ask the question: Is there a new version of wicketstuff-dojo, which is compatible with the Wicket 1.4 version. Thanks in advance. Elena
wicketstuff-dojo wicket 1.4
Hi, ask the question: Is there a new version of wicketstuff-dojo, which is compatible with the Wicket 1.4 version. Thanks in advance. Elena
wicket menu
Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri
Re: wicketstuff-dojo wicket 1.4
It seems this is the latest: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-dojo-1.1/ wicket 1.3.6 dojo 1.1 El lun, 21-09-2009 a las 09:54 +0200, Elena Stoll escribió: Hi, ask the question: Is there a new version of wicketstuff-dojo, which is compatible with the Wicket 1.4 version. Thanks in advance. Elena - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket menu
Hover menu or just static? If static then it is easy to just change the html/css of tabbed panel into vertical or horizontal menu. Probably you can roll a hover too. ** Martin 2009/9/21 Boydens Joeri (OZ) joeri.boyd...@oz.be: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
JavaBooks.org launches
JavaBooks.org's goal is to centralize, categorize and offer meta-information in the form of ratings, comments and reviews for all Java related publications. By joining the JavaBooks community you'll be able to stay informed about the latest Java publications, search for the right book or magazine to help you learn, read user comments and reviews to make up your mind, buy and take advantage of the discounts offered and share your thoughts on the books you've read. There you'll be able to find also wicket related books. It would be nice if you would make a review of Wicket in Action, Pro Wicket or any other book you have read. Thanks! Alex Objelean - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: wicket menu
Martin, I'm looking for something like http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/ but the items should be generated from Java code. We also need a different Menu structure depending on the user role. Joeri -Oorspronkelijk bericht- Van: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Verzonden: maandag 21 september 2009 11:06 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu Hover menu or just static? If static then it is easy to just change the html/css of tabbed panel into vertical or horizontal menu. Probably you can roll a hover too. ** Martin 2009/9/21 Boydens Joeri (OZ) joeri.boyd...@oz.be: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri - 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 menu
check https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicketstuff-suckerfish/ https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicketstuff-suckerfish-examples/ and the author's blog entry: http://javathoughts.capesugarbird.com/2007/12/suckerfish-dropdowns-for-wicket-redux.html and YahooUI based one at https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/yui-parent/ El lun, 21-09-2009 a las 11:10 +0200, Boydens Joeri (OZ) escribió: Martin, I'm looking for something like http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/ but the items should be generated from Java code. We also need a different Menu structure depending on the user role. Joeri -Oorspronkelijk bericht- Van: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Verzonden: maandag 21 september 2009 11:06 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu Hover menu or just static? If static then it is easy to just change the html/css of tabbed panel into vertical or horizontal menu. Probably you can roll a hover too. ** Martin 2009/9/21 Boydens Joeri (OZ) joeri.boyd...@oz.be: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri - 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: wicket menu
Hi! Ok. The top menu looks just like Wicket tabbed panel and it can be different for different users. He hover effect is something you need extra. There was a discussion about menus in wicket just recently.. couldn't remember the topic. There was a project in google code about it... maybe someone remembers better. ** Martin I'm looking for something like http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/ but the items should be generated from Java code. We also need a different Menu structure depending on the user role. Joeri -Oorspronkelijk bericht- Van: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Verzonden: maandag 21 september 2009 11:06 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu Hover menu or just static? If static then it is easy to just change the html/css of tabbed panel into vertical or horizontal menu. Probably you can roll a hover too. ** Martin 2009/9/21 Boydens Joeri (OZ) joeri.boyd...@oz.be: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri - 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: wicket menu
I've seen some code based on YUI, but I can't find that anymore in the svn. I think YUI menu is in here. https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/ Ernesto
Re: wicket menu
Maybe you are referring to this thread? http://www.nabble.com/Shall-we-create-a-menu-in-wicket--td25469316.html Ernesto http://www.nabble.com/Shall-we-create-a-menu-in-wicket--td25469316.html#a25471808 On Mon, Sep 21, 2009 at 11:22 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Ok. The top menu looks just like Wicket tabbed panel and it can be different for different users. He hover effect is something you need extra. There was a discussion about menus in wicket just recently.. couldn't remember the topic. There was a project in google code about it... maybe someone remembers better. ** Martin I'm looking for something like http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/but the items should be generated from Java code. We also need a different Menu structure depending on the user role. Joeri -Oorspronkelijk bericht- Van: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Verzonden: maandag 21 september 2009 11:06 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu Hover menu or just static? If static then it is easy to just change the html/css of tabbed panel into vertical or horizontal menu. Probably you can roll a hover too. ** Martin 2009/9/21 Boydens Joeri (OZ) joeri.boyd...@oz.be: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri - 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: wicket menu
Ernesto, Is there also a up-to-date release for wicket 1.3 ? Joeri Joeri Boydens OZ Onafhankelijk Ziekenfonds Informatica 050 40 53 09 -Oorspronkelijk bericht- Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Verzonden: maandag 21 september 2009 11:23 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu I've seen some code based on YUI, but I can't find that anymore in the svn. I think YUI menu is in here. https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicke tstuff-core-1.4.1/yui-parent/ Ernesto - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket menu
It shouldn't be that difficult to make a Wicket component out of the example you provide. Best, Ernesto On Mon, Sep 21, 2009 at 11:10 AM, Boydens Joeri (OZ) joeri.boyd...@oz.bewrote: Martin, I'm looking for something like http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/but the items should be generated from Java code. We also need a different Menu structure depending on the user role. Joeri -Oorspronkelijk bericht- Van: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Verzonden: maandag 21 september 2009 11:06 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu Hover menu or just static? If static then it is easy to just change the html/css of tabbed panel into vertical or horizontal menu. Probably you can roll a hover too. ** Martin 2009/9/21 Boydens Joeri (OZ) joeri.boyd...@oz.be: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri - 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
this.getForm().getModelObject() returns the model of another form page
I have created a form class which is used by a class extending webpage. When I call the following method in the onSubmit method of the form button I receive the model attached to another form page (= requestFormModel) and not (= requestMessageFormModel). Is there any restrictions/limitations using this method call : this.getForm().getModelObject() Here is the code of my RequestMessageForm() public class RequestMessageForm extends Form { private static final long serialVersionUID = 1L; public RequestMessageForm(String name) { super(name, new CompoundPropertyModel(new RequestMessageFormModel())); // Add textFields add(textfieldRequestMessageId); add(textfieldFromDate); add(textfieldToDate); // Add drop down choice add(dropDownChoiceStatus); add(dropDownChoiceType); // Add buttons add(new Button(bSearchCriteriaRequestMessage) { @Override public void onSubmit() { Log.info(Model received RM : + this.getForm().getModelObject()); // Here I receive the model requestFormModel and not requestMessageFormModel setResponsePage(new RequestMessagePage((RequestMessageFormModel) this.getForm().getModelObject())); } }); } Remark : The class RequestMessageFormModel is a simple POJO extending the class CommonFormModel (which is also a POJO). The class RequestFormModel used by the other page extends CommonFormModel ) Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer * blog : http://cmoulliard.blogspot.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket menu
Is there also a up-to-date release for wicket 1.3 ? Forget already about 1.3... use 1.4+ ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket menu
I really don't know... I have used that menu component over a year ago... I remember I did that with some wicket-1.3.* version. But I do not have the sources of that project anymore... Right now I using just another Menu component that I have build based on an available JavaScript library. See this info on thread. http://www.nabble.com/Shall-we-create-a-menu-in-wicket--td25469316.html On the other hand it shouldn't be that difficult to build your own Menu component using the http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/ http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/you mentioned. That's one of the thinks what makes Wicket so nice! Do you want me to give t a try? Best, Ernesto On Mon, Sep 21, 2009 at 11:31 AM, Boydens Joeri (OZ) joeri.boyd...@oz.bewrote: Ernesto, Is there also a up-to-date release for wicket 1.3 ? Joeri Joeri Boydens OZ Onafhankelijk Ziekenfonds Informatica 050 40 53 09 -Oorspronkelijk bericht- Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Verzonden: maandag 21 september 2009 11:23 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu I've seen some code based on YUI, but I can't find that anymore in the svn. I think YUI menu is in here. https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicke tstuff-core-1.4.1/yui-parent/ Ernesto - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[Re: AjaxFallbackDataTable and partial refreshing problem]
It was a Hibernate session problem after all. AjaxFallbackDefaultDataTable works like a dream now :) - Simo ---BeginMessage--- Hi all! I'm relatively new with Wicket. I've implemented AjaxFallbackDataTable by using the example from wicket-examples. (AjaxFallbackDataTable Example - demonstrates an AJAX enabled datatable component http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.AjaxDataTablePage) http://www.wicket-library.com/wicket-examples/repeater/ I have a page with AjaxFallbackDataTable containing some email addresses fetched from the database by using Hibernate. Page also contains another panel for adding and removing email addresses. When I add or remove an address from the database using Hibernate, I use AjaxFallbackButton and a form with input field and add AjaxFallbackDataTable to the AjaxRequestTarget on submit. getService().addEmailAddress(address); if (target != null) { target.addComponent(getEmailList()); } Results: - AjaxFallbackDataTable reloads itself but the navigation toolbar does not change. - If I add an address, it does appear in AjaxFallbackDataTable only if I have removed an address earlier - The initial time maximum row count of AjaxFallbackDataTable does not change even if I add rows and add AjaxFallbackDataTable to target. - All the needed data is fetched from my DataProvider at the right time but for some reason AjaxFallbackDataTable does not show it all. So the question is: How can I refresh AjaxFallbackDataTable completely so that navigation toolbar and row amount will also refresh. - Simo http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.AjaxDataTablePage ---End Message--- - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: this.getForm().getModelObject() returns the model of another form page
i dont see how that can happen if i look at your code. is RequestMessageForm .this != this.getForm() ?? do you nest forms? johan On Mon, Sep 21, 2009 at 11:38, Charles Moulliard cmoulli...@gmail.comwrote: I have created a form class which is used by a class extending webpage. When I call the following method in the onSubmit method of the form button I receive the model attached to another form page (= requestFormModel) and not (= requestMessageFormModel). Is there any restrictions/limitations using this method call : this.getForm().getModelObject() Here is the code of my RequestMessageForm() public class RequestMessageForm extends Form { private static final long serialVersionUID = 1L; public RequestMessageForm(String name) { super(name, new CompoundPropertyModel(new RequestMessageFormModel())); // Add textFields add(textfieldRequestMessageId); add(textfieldFromDate); add(textfieldToDate); // Add drop down choice add(dropDownChoiceStatus); add(dropDownChoiceType); // Add buttons add(new Button(bSearchCriteriaRequestMessage) { @Override public void onSubmit() { Log.info(Model received RM : + this.getForm().getModelObject()); // Here I receive the model requestFormModel and not requestMessageFormModel setResponsePage(new RequestMessagePage((RequestMessageFormModel) this.getForm().getModelObject())); } }); } Remark : The class RequestMessageFormModel is a simple POJO extending the class CommonFormModel (which is also a POJO). The class RequestFormModel used by the other page extends CommonFormModel ) Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer * blog : http://cmoulliard.blogspot.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
access post data
Hi, is there simple way how to access raw POST data? I'm trying: ((WebRequest)getRequest()).getHttpServletRequest().getInputStream(); but it's empty (it seems to be already processed). Thanks - Petr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: access post data
My problem, it's needed to set correct request content type (for example application/json) to disallow wicket from processing the post data (and making parameters from them). Cheers - Petr 2009/9/21 Petr Kobalíček kobalicek.p...@gmail.com: Hi, is there simple way how to access raw POST data? I'm trying: ((WebRequest)getRequest()).getHttpServletRequest().getInputStream(); but it's empty (it seems to be already processed). Thanks - Petr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Close ModalWindow on ESC key pressed
Hi, I want to close a modal window when the user presses the ESC key. Right now I have overridden the show method in our ModalWindow subclass and added the keypress event listener (using jquery), the javascript close function is just copied from the ModalWindow. Opening the modal window and closing it with ESC works once, unfortunately, I cannot open any more the modal window after that. Can anyone hint on what's the problem here, or perhaps someone already has a working solution? This is the implementation of the show method: @Override public void show(final AjaxRequestTarget target) { if (!isShown()) { final AppendingStringBuffer buffer = new AppendingStringBuffer(500); buffer.append(function mwClose(ev) {\n + var code = ev.keyCode || ev.which;\n + if (code == 27) { + getCloseJavascript() + }; + }); buffer.append(jQuery(document).keypress(mwClose);\n); target.appendJavascript(buffer.toString()); } super.show(target); } The getCloseJavascript method (copied from ModalWindow, as it's private therein): /** * @return javascript that closes current modal window */ private static String getCloseJavacript() { return var win;\n // + try {\n + win = window.parent.Wicket.Window;\n + } catch (ignore) {\n + }\n + if (typeof(win) == \undefined\ || typeof(win.current) == \undefined\) {\n + try {\n + win = window.Wicket.Window;\n + } catch (ignore) {\n + }\n + }\n + if (typeof(win) != \undefined\ typeof(win.current) != \undefined\) {\n + var close = function(w) { w.setTimeout(function() {\n + win.current.close();\n + }, 0); } \n + try { close(window.parent); } catch (ignore) { close(window); };\n + }; } Thanx for your help, cheers, Martin signature.asc Description: This is a digitally signed message part
Re: how to control visibility of Border's markup?
If you set the borders as transparent resolvers, implement they isVisible method, and add the components direct to the border parent component? On Sun, Sep 20, 2009 at 6:53 AM, Vladimir Kovalyuk koval...@gmail.comwrote: I would like to control programmatically the visibility of the border itself, meaning that components within the border are always visible. I can create two different borders and switch between them but it looks too complicated.
Re: JavaBooks.org launches
Hope JavaBooks.org was made in wicket. if not, maybe it is spam :)NM On Mon, Sep 21, 2009 at 11:06 AM, Objelean Alex alex.objel...@gmail.comwrote: JavaBooks.org's goal is to centralize, categorize and offer meta-information in the form of ratings, comments and reviews for all Java related publications. By joining the JavaBooks community you'll be able to stay informed about the latest Java publications, search for the right book or magazine to help you learn, read user comments and reviews to make up your mind, buy and take advantage of the discounts offered and share your thoughts on the books you've read. There you'll be able to find also wicket related books. It would be nice if you would make a review of Wicket in Action, Pro Wicket or any other book you have read. Thanks! Alex Objelean - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
+ key as alternative for tab key
Hi, We are rewriting an old fat client application to a more elegant web application based on Wicket. In the requirements they state that the users of the fat client application do all input with the right side of their keyboard and want to keep it that way. One special requirement is that navigating between fields should be done with the ' + ' symbol on the right hand keypad instead of the 'tab' key. When navigating between fields there is also happing validation on the server side, so an ajax call will be necessary. How would you do this in an elegant and generic way ? Joeri
Re: wicket menu
Hi Joeri, I just implemented the menu you mentioned http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/ in here http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src/com/antilia/web/dynamicdrive If you want to give it a try... get those sources on that package and mount the test page http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src/com/antilia/web/dynamicdrive/test/TestMenu.java On you application... Feel free to modify the code as you need... It is so easy to create components in Wicket (moreover, when someone else has done the dirty JavaScript work;-) Best, Ernesto http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src/com/antilia/web/dynamicdrive On Mon, Sep 21, 2009 at 11:03 AM, Boydens Joeri (OZ) joeri.boyd...@oz.bewrote: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri
Re: + key as alternative for tab key
this is pure JavaScript just register a listener for 'keydown' event for all required fields (probably the ones with tabindex) and if the event's key code is the one for '+' on the keypad (I don't know it) then just call this.blur() which will move the focus to the next field. El lun, 21-09-2009 a las 15:03 +0200, Boydens Joeri (OZ) escribió: Hi, We are rewriting an old fat client application to a more elegant web application based on Wicket. In the requirements they state that the users of the fat client application do all input with the right side of their keyboard and want to keep it that way. One special requirement is that navigating between fields should be done with the ' + ' symbol on the right hand keypad instead of the 'tab' key. When navigating between fields there is also happing validation on the server side, so an ajax call will be necessary. How would you do this in an elegant and generic way ? Joeri - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Defaulting a DropDownChoice
tdelesio wrote: final DropDownChoice downChoice = new DropDownChoice(name, new CompoundPropertyModel(playerModel), playersModel, new ChoiceRenderer(username, id)); This would work fine w/o serialization except that the compound expects a setter with the name of the component from the object that comes from the backing LDM (playerModel) so it would error. I essentially want it to not use a setter, instead just store the value itself as the object. BTW...this is the error that is generated when you try and use new CompoundPropertyModel(playerModel) for the backing of the DDC. java.lang.UnsupportedOperationException: Model class ViewPicksPage$1 does not support setObject(Object) at org.apache.wicket.model.AbstractReadOnlyModel.setObject(AbstractReadOnlyModel.java:55) at org.apache.wicket.Component.setDefaultModelObject(Component.java:3052) Tim -- View this message in context: http://www.nabble.com/Defaulting-a-DropDownChoice-tp25508933p25530325.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: + key as alternative for tab key
Good question, pretty much javascript work. I'm curios know your final solution. One fine solution is to create an subclass of AjaxFormComponentUpdatingBehavior to onchange event. On this behavior you can put your javascript rules. Take a look at OnChangeAjaxBehavior to see how it could be done. On Mon, Sep 21, 2009 at 10:03 AM, Boydens Joeri (OZ) joeri.boyd...@oz.bewrote: Hi, We are rewriting an old fat client application to a more elegant web application based on Wicket. In the requirements they state that the users of the fat client application do all input with the right side of their keyboard and want to keep it that way. One special requirement is that navigating between fields should be done with the ' + ' symbol on the right hand keypad instead of the 'tab' key. When navigating between fields there is also happing validation on the server side, so an ajax call will be necessary. How would you do this in an elegant and generic way ? Joeri
RE: wicket menu
Hi Ernesto, I downloaded your files and it's working fine! It's indeed very easy to create such a menu if the javascript exists ! I'll have a look how we can integrate it in our new project! Thanks Joeri Ps: i had problems with the google svn... maybe it's my eclipse settings but I downloaded the files manually.. -Oorspronkelijk bericht- Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Verzonden: maandag 21 september 2009 15:08 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu Hi Joeri, I just implemented the menu you mentioned http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css _menu_2/ in here http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src /com/antilia/web/dynamicdrive If you want to give it a try... get those sources on that package and mount the test page http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src /com/antilia/web/dynamicdrive/test/TestMenu.java On you application... Feel free to modify the code as you need... It is so easy to create components in Wicket (moreover, when someone else has done the dirty JavaScript work;-) Best, Ernesto http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/sr c/com/antilia/web/dynamicdrive On Mon, Sep 21, 2009 at 11:03 AM, Boydens Joeri (OZ) joeri.boyd...@oz.bewrote: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket menu
Hi Joeri, Good to hear that it worked for you! In the mean time I did some clean-up to make the component more configurable... If you get the chance to improve it, and if you are allowed to do so, it would nice if you also share the modifications... So, that others can benefit too. I also have had problems with SVN and eclipse (I guess because a stupid proxy in between) but after some struggle I manage to get it working Best, Ernesto On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) joeri.boyd...@oz.bewrote: Hi Ernesto, I downloaded your files and it's working fine! It's indeed very easy to create such a menu if the javascript exists ! I'll have a look how we can integrate it in our new project! Thanks Joeri Ps: i had problems with the google svn... maybe it's my eclipse settings but I downloaded the files manually.. -Oorspronkelijk bericht- Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Verzonden: maandag 21 september 2009 15:08 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu Hi Joeri, I just implemented the menu you mentioned http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css _menu_2/ in here http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src /com/antilia/web/dynamicdrive If you want to give it a try... get those sources on that package and mount the test page http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src /com/antilia/web/dynamicdrive/test/TestMenu.java On you application... Feel free to modify the code as you need... It is so easy to create components in Wicket (moreover, when someone else has done the dirty JavaScript work;-) Best, Ernesto http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/sr c/com/antilia/web/dynamicdrive On Mon, Sep 21, 2009 at 11:03 AM, Boydens Joeri (OZ) joeri.boyd...@oz.bewrote: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Defaulting a DropDownChoice
Hi Tim, I think what happens is that the playerModel is an instance of AbstractReadOnlyModel. So DDC can not set the choice on it. As you need to avoid the player serialization on playerModel, I suggest you create an custom model ( and forgot any AbstractReadOnlyModel class or subclass usage for your component default model ), that you can set and get an Player type. But internally, it only keep the id value to serialization process. In that way, you will can find the Player on deserialization process. I saw an example of this type of model on Wicket in Action book. class CustomPlayerModel extends Model{ private id; public getObject(){ dao.getPlayer(id); } public setObject(player){ this.id = player.getId(); } } final DropDownChoice downChoice = new DropDownChoice(name, new CustomPlayerModel(Player), playersModel, new ChoiceRenderer(username, id)); On Mon, Sep 21, 2009 at 10:24 AM, tdelesio tdele...@gmail.com wrote: tdelesio wrote: final DropDownChoice downChoice = new DropDownChoice(name, new CompoundPropertyModel(playerModel), playersModel, new ChoiceRenderer(username, id)); This would work fine w/o serialization except that the compound expects a setter with the name of the component from the object that comes from the backing LDM (playerModel) so it would error. I essentially want it to not use a setter, instead just store the value itself as the object. BTW...this is the error that is generated when you try and use new CompoundPropertyModel(playerModel) for the backing of the DDC. java.lang.UnsupportedOperationException: Model class ViewPicksPage$1 does not support setObject(Object) at org.apache.wicket.model.AbstractReadOnlyModel.setObject(AbstractReadOnlyModel.java:55) at org.apache.wicket.Component.setDefaultModelObject(Component.java:3052) Tim -- View this message in context: http://www.nabble.com/Defaulting-a-DropDownChoice-tp25508933p25530325.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
DefaultDataTable
Hi i've found a tutorial for adding own components to the DefaultDataTable: http://cwiki.apache.org/WICKET/adding-links-in-a-defaultdatatable.html my problem is, that i can't figure out, what class Transaction is exactly. ore if there is any other way, for adding own components e.g. subtables. Christoph - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket menu
I just downloaded and tried. Works good in FF 3.0.14 If you are using IE6, you will get a 4 pixel space on a secondary list. This causes issues when you slide the mouse in this tiny space. In the Test example, this is the list that would show when hovering over Two-2-1. For IE6, I can fix by adding another layer in the CSS - see Fix IE6 sub menu list. The use of the _ in front of the left: is only visible for IE6 /*All subsequent sub menu levels vertical offset after 1st level sub menu */ .jqueryslidemenu ul li ul li ul{ top: 0; } /*Fix IE6 sub menu list */ .jqueryslidemenu ul li ul li ul li{ _left: -4px; /* IE6 only */ } On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi Joeri, Good to hear that it worked for you! In the mean time I did some clean-up to make the component more configurable... If you get the chance to improve it, and if you are allowed to do so, it would nice if you also share the modifications... So, that others can benefit too. I also have had problems with SVN and eclipse (I guess because a stupid proxy in between) but after some struggle I manage to get it working Best, Ernesto On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) joeri.boyd...@oz.be wrote: Hi Ernesto, I downloaded your files and it's working fine! It's indeed very easy to create such a menu if the javascript exists ! I'll have a look how we can integrate it in our new project! Thanks Joeri Ps: i had problems with the google svn... maybe it's my eclipse settings but I downloaded the files manually.. -Oorspronkelijk bericht- Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Verzonden: maandag 21 september 2009 15:08 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu Hi Joeri, I just implemented the menu you mentioned http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css _menu_2/ in here http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src /com/antilia/web/dynamicdrive If you want to give it a try... get those sources on that package and mount the test page http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src /com/antilia/web/dynamicdrive/test/TestMenu.java On you application... Feel free to modify the code as you need... It is so easy to create components in Wicket (moreover, when someone else has done the dirty JavaScript work;-) Best, Ernesto http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/sr c/com/antilia/web/dynamicdrive On Mon, Sep 21, 2009 at 11:03 AM, Boydens Joeri (OZ) joeri.boyd...@oz.bewrote: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket menu
Thanks for the feedback! Just one question... I can't see the problems you are mentioning on my (MultipleIEs) IE6. On the other hand if I add the lines you mention then I get those sub-menus displaced to the left... 4 pixels. So, it might be that this is somethings that doesn't show up on my simulated IE6? So, I first committed the changes you proposed but later I rolled them back... as I can't see the problems myself. Maybe we should report this in here http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/ As I'm just building a wrapper for what they have done Best, Ernesto On Mon, Sep 21, 2009 at 4:32 PM, T Ames tamesw...@gmail.com wrote: I just downloaded and tried. Works good in FF 3.0.14 If you are using IE6, you will get a 4 pixel space on a secondary list. This causes issues when you slide the mouse in this tiny space. In the Test example, this is the list that would show when hovering over Two-2-1. For IE6, I can fix by adding another layer in the CSS - see Fix IE6 sub menu list. The use of the _ in front of the left: is only visible for IE6 /*All subsequent sub menu levels vertical offset after 1st level sub menu */ .jqueryslidemenu ul li ul li ul{ top: 0; } /*Fix IE6 sub menu list */ .jqueryslidemenu ul li ul li ul li{ _left: -4px; /* IE6 only */ } On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi Joeri, Good to hear that it worked for you! In the mean time I did some clean-up to make the component more configurable... If you get the chance to improve it, and if you are allowed to do so, it would nice if you also share the modifications... So, that others can benefit too. I also have had problems with SVN and eclipse (I guess because a stupid proxy in between) but after some struggle I manage to get it working Best, Ernesto On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) joeri.boyd...@oz.be wrote: Hi Ernesto, I downloaded your files and it's working fine! It's indeed very easy to create such a menu if the javascript exists ! I'll have a look how we can integrate it in our new project! Thanks Joeri Ps: i had problems with the google svn... maybe it's my eclipse settings but I downloaded the files manually.. -Oorspronkelijk bericht- Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Verzonden: maandag 21 september 2009 15:08 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu Hi Joeri, I just implemented the menu you mentioned http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css _menu_2/ in here http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src /com/antilia/web/dynamicdrive If you want to give it a try... get those sources on that package and mount the test page http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src /com/antilia/web/dynamicdrive/test/TestMenu.java On you application... Feel free to modify the code as you need... It is so easy to create components in Wicket (moreover, when someone else has done the dirty JavaScript work;-) Best, Ernesto http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/sr c/com/antilia/web/dynamicdrive On Mon, Sep 21, 2009 at 11:03 AM, Boydens Joeri (OZ) joeri.boyd...@oz.bewrote: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket menu
Hmmm. The demo version on the dynamicdrive site works ok in my IE6. On Mon, Sep 21, 2009 at 11:10 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Thanks for the feedback! Just one question... I can't see the problems you are mentioning on my (MultipleIEs) IE6. On the other hand if I add the lines you mention then I get those sub-menus displaced to the left... 4 pixels. So, it might be that this is somethings that doesn't show up on my simulated IE6? So, I first committed the changes you proposed but later I rolled them back... as I can't see the problems myself. Maybe we should report this in here http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/ As I'm just building a wrapper for what they have done Best, Ernesto On Mon, Sep 21, 2009 at 4:32 PM, T Ames tamesw...@gmail.com wrote: I just downloaded and tried. Works good in FF 3.0.14 If you are using IE6, you will get a 4 pixel space on a secondary list. This causes issues when you slide the mouse in this tiny space. In the Test example, this is the list that would show when hovering over Two-2-1. For IE6, I can fix by adding another layer in the CSS - see Fix IE6 sub menu list. The use of the _ in front of the left: is only visible for IE6 /*All subsequent sub menu levels vertical offset after 1st level sub menu */ .jqueryslidemenu ul li ul li ul{ top: 0; } /*Fix IE6 sub menu list */ .jqueryslidemenu ul li ul li ul li{ _left: -4px; /* IE6 only */ } On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi Joeri, Good to hear that it worked for you! In the mean time I did some clean-up to make the component more configurable... If you get the chance to improve it, and if you are allowed to do so, it would nice if you also share the modifications... So, that others can benefit too. I also have had problems with SVN and eclipse (I guess because a stupid proxy in between) but after some struggle I manage to get it working Best, Ernesto On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) joeri.boyd...@oz.be wrote: Hi Ernesto, I downloaded your files and it's working fine! It's indeed very easy to create such a menu if the javascript exists ! I'll have a look how we can integrate it in our new project! Thanks Joeri Ps: i had problems with the google svn... maybe it's my eclipse settings but I downloaded the files manually.. -Oorspronkelijk bericht- Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Verzonden: maandag 21 september 2009 15:08 Aan: users@wicket.apache.org Onderwerp: Re: wicket menu Hi Joeri, I just implemented the menu you mentioned http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css _menu_2/ in here http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src /com/antilia/web/dynamicdrive If you want to give it a try... get those sources on that package and mount the test page http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src /com/antilia/web/dynamicdrive/test/TestMenu.java On you application... Feel free to modify the code as you need... It is so easy to create components in Wicket (moreover, when someone else has done the dirty JavaScript work;-) Best, Ernesto http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/sr c/com/antilia/web/dynamicdrive On Mon, Sep 21, 2009 at 11:03 AM, Boydens Joeri (OZ) joeri.boyd...@oz.bewrote: Hi, We are changing from Struts to Wicket, in our Struts application we used Struts-Menu. Now I've searched the wicket mailing list but I couldn't find any descent menu. Is there a Wicket menu available, where can I find it ? Or should I write my own? I've seen some code based on YUI, but I can't find that anymore in the svn. Joeri - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Column Pagingview
Is there a way of having a paging view for columns instead of rows? Does anybody know how to do this or have any examples? Thanks
Form Processing problem on pages with Border - Wicket 1.4.1
I am migrating a project from 1.3.6 to 1.4.1. I've run into a problem and I'm not sure if this is a bug or not. Most of the pages have a border and the border has a DropDownChoice in it (as well as other components). Technically it's in a panel in the border. The Form objects are typically children of the border, like add(border); border.add(inputForm); When the form is submitted, the DropDownChoice's value is being reset. I've traced through the code and it looks like the root of the cause is in Form#internalUpdateFormComponentModels. This is checking if there is a border and, if yes, then visiting all the components of the border. The internalUpdateFormComponentModels method in 1.3.6 didn't look for the border and visit it's components. It's not obvious to me why this needs to be done now in 1.4. So ultimately FormComponent#visitComponentsPostOrderHelper is being called for all components whether they are inside the form or not. It's returning visitor.component(component), which calls Form#component and that calls ((IFormModelUpdateListener)component).updateModel(); I looked through the nabble logs and noticed this entry here: http://www.nabble.com/Form-processing-issues-and-questions-%28particularly-r elated-to-Border-and-ListMultipleChoice%29-td25251849.html#a25251849 Is there something I need to do here? I'm not seeing any way of telling the Form not to visit the Border's controls, and again, I'm not sure why it's doing this. I'd greatly appreciate any insight that can be offered. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DefaultDataTable
Transaction, in that example, is a domain object that the table lists. -igor On Mon, Sep 21, 2009 at 7:03 AM, Christoph Hochreiner ch.hochrei...@gmail.com wrote: Hi i've found a tutorial for adding own components to the DefaultDataTable: http://cwiki.apache.org/WICKET/adding-links-in-a-defaultdatatable.html my problem is, that i can't figure out, what class Transaction is exactly. ore if there is any other way, for adding own components e.g. subtables. Christoph - 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
same model for multiple pages?
Hi. I have the situation, where more than one page is referencing the same parent model - wrapped and not. I use thickbox (somewhat like modal window), and display separate pages in the thickbox using iframe. So you get like ParentPage -creates- SubTBPage. What I do want here, is for all those pages share the same model in this fashion: ParentPage (uses model_1) - createsPageForThickboxIframe - SubTBPage (uses model_1.1(wrapping model_1)). In case to make it functional - so the child model objects (MO) (of model_1.1) would use parent wrapped MO (of model_1), I keep the reference to parent (wrapped) model in child MO. The problem is, that in the end two pages starts using different MO's - so obviously because of the serialization. Are there any best practices for such scenario? How could I create Model objects hierarchy, and pass that around without being afraid of hidden traps? I guess I shouldn't reference Models in my model objects, but then, how would I reference model objects from my wrapped model. Should this logic go to model itself? Thanks, Vytautas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Column Pagingview
Hi Ryan, I just update http://wicketstuff.org/confluence/display/STUFFWIKI/Table If you not mind to work with TableModel from swing api, than you can use the table component from wicket stuff. On Mon, Sep 21, 2009 at 1:15 PM, Ryan Burns captainbirds...@gmail.comwrote: Is there a way of having a paging view for columns instead of rows? Does anybody know how to do this or have any examples? Thanks
ClassCastException in ListMultipleChoice
Hello, I have a ListMultipleChoice component in my form and I get the following exception when I select an option and submit the form: Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection at org.apache.wicket.markup.html.form.ListMultipleChoice.updateModel(ListMu ltipleChoice.java:325) at org.apache.wicket.markup.html.form.Form$20.validate(Form.java:1837) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent( Form.java:165) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPost OrderHelper(FormComponent.java:421) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPost OrderHelper(FormComponent.java:408) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPost Order(FormComponent.java:385) at org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(For m.java:1060) at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModel s(Form.java:1829) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.j ava:1796) at org.apache.wicket.markup.html.form.Form.process(Form.java:865) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:807) ... 53 more Could someone please point out if I'm missing something? Here's the relevant pieces of my code: -- ListMultipleChoice searchPymntApplCd = new ListMultipleChoice( searchPymntApplCd, new AbstractReadOnlyModel() { public Object getObject() { return getPaymentApplOptions(paymentAppls); //This returns ArrayListPaymentApplOption }}, new IChoiceRenderer() { public Object getDisplayValue(Object object) { PaymentApplOption option = (PaymentApplOption) object; return option.getPymntApplDesc(); } public String getIdValue(Object object, int index) { if (PaymentApplOption.class.isInstance(object)) { PaymentApplOption option = (PaymentApplOption) object; return option.getPymntApplCd(); } return null; } }).setMaxRows(5); searchPymntApplCd.setRequired(false); searchPymntApplCd.setType(Collection.class); add(searchPymntApplCd); --- public class PaymentApplOption implements Serializable { private String pymntApplCd; private String pymntApplDesc; ... } Thanks.
Multiple choice checkboxes
Is there a way to have multiple choice checkboxes? From what I read on the forums, I could only have a ListMultipleChoice. But I need to have multiple choice checkboxes. Any examples on how I could achieve that? Thanks.
Re: Multiple choice checkboxes
This should be good for you: http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.CheckBoxMultipleChoicePage Regards, Peter 2009-09-21 23:13 keltezéssel, Sadhna Ahuja írta: Is there a way to have multiple choice checkboxes? From what I read on the forums, I could only have a ListMultipleChoice. But I need to have multiple choice checkboxes. Any examples on how I could achieve that? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org