Is there SmartFormComponent available?
Hello, We have following situation: entity can have value of various type: boolean, enum, number and etc. And it'll be nice to have some SmartFormComponent which can show required representation of UI according to type: radio button, checkbox, etc. Is there something lika that available? I understand, that to implement of this component in Wicket is pretty simple, but don't want reinvent the wheel.:) Thanks, Ilia
Re: Is there SmartFormComponent available?
Hi, There is no such generic component. There are few libraries which try to provide such generic bean editor: - Apache Isis (Wicket viewer), (http://isis.apache.org/) - Wicketopia (https://github.com/jwcarman/Wicketopia) - Wicket Web Beans (not maintained) - Wicket RAD (not maintained) The simple solution is when such component provides exactly what you need for your use case. Both functionally and UI. When you try to make it generic it is no so simple anymore. On Mon, May 20, 2013 at 1:30 PM, Илья Нарыжный phan...@ydn.ru wrote: Hello, We have following situation: entity can have value of various type: boolean, enum, number and etc. And it'll be nice to have some SmartFormComponent which can show required representation of UI according to type: radio button, checkbox, etc. Is there something lika that available? I understand, that to implement of this component in Wicket is pretty simple, but don't want reinvent the wheel.:) Thanks, Ilia -- Martin Grigorov Wicket Training Consulting http://jWeekend.com http://jweekend.com/
DropDownChoice in FormComponentPanel
I have a FormComponentPanel with both string fields DropDownChoice controls. How do I get the drop downs' current selections from inside my override of convertInput()? I can get the string fields' values by calling the fields' convertInput() methods, but when I call convertInput() on the drop downs, I get the ORIGINAL value of the drop down, not the CURRENT value. I'm using Wicket 1.4.17 (version imposed by our corporate framework). I've looked at several different Wicket references, including Wicket in Action, Apache Wicket Cookbook the new online free Wicket guide, but could not find this issue discussed. ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. **
RE: DropDownChoice in FormComponentPanel
Simplest way I can think of is something like: @Override protected void onBeforeRender() { if(isValid()) { dropDown.getFormField().setDefaultModel(getDefaultModel()); } ... super.onBeforeRender(); } @Override protected void convertInput() { if(dropdown != null) { setConvertedInput(dropDown.getConvertedInput()); } ... } But it really depends on what your FormComponentPanel is wrapping and how you share its model among the child components. Refer to the Wicket Users Guide section 1.8 Creating comples form components with FormComponentPanel: http://wicket.apache.org/learn/books/freeguide.html Or search the wiki pages: https://cwiki.apache.org/WICKET/creating-custom-formcomponentpanels-to-build -valid-objects-using-wickets-form-validation-logic.html ~ Thank you, Paul Bors -Original Message- From: Richard W. Adams [mailto:rwada...@up.com] Sent: Monday, May 20, 2013 8:10 AM To: users@wicket.apache.org Subject: DropDownChoice in FormComponentPanel I have a FormComponentPanel with both string fields DropDownChoice controls. How do I get the drop downs' current selections from inside my override of convertInput()? I can get the string fields' values by calling the fields' convertInput() methods, but when I call convertInput() on the drop downs, I get the ORIGINAL value of the drop down, not the CURRENT value. I'm using Wicket 1.4.17 (version imposed by our corporate framework). I've looked at several different Wicket references, including Wicket in Action, Apache Wicket Cookbook the new online free Wicket guide, but could not find this issue discussed. ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. ** - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Not redirecting to stateful URL after upgrade from 6.6.0 to 6.7.0
Is anyone else having problems where wicket is not redirecting to a stateful URL when going to a mounted URL for a stateful page? I have a page, which is stateful, mounted at /mypage. In wicket 6.6.0 when I went to that URL it would redirect to /mypage?0. With the upgrade to 6.7.0 it no longer does this and is causing problems with the back button because I have AJAX components on the page which update the page, but if a user navigates forward then tries to use the back button they get a new instance of the page due to wicket not appending the page id and redirecting on initial request. This appears to be due to changes in WebPageRenderer, but I'm not yet sure if that is the culprit. Just thought I'd check here quick before I dig into this too much further.
RE: DropDownChoice in FormComponentPanel
I'm not finished investigating this yet, but my preliminary findings indicate that the solution (at least in my case) is to call dropdown.getModelObject() instead of dropdown.convertInput(). In the use cases I've tested so far, getModelObject() returns the correct value. From: Paul Bors p...@bors.ws To: users@wicket.apache.org Date: 05/20/2013 11:35 AM Subject:RE: DropDownChoice in FormComponentPanel Simplest way I can think of is something like: @Override protected void onBeforeRender() { if(isValid()) { dropDown.getFormField().setDefaultModel(getDefaultModel()); } ... super.onBeforeRender(); } @Override protected void convertInput() { if(dropdown != null) { setConvertedInput(dropDown.getConvertedInput()); } ... } But it really depends on what your FormComponentPanel is wrapping and how you share its model among the child components. Refer to the Wicket Users Guide section 1.8 Creating comples form components with FormComponentPanel: http://wicket.apache.org/learn/books/freeguide.html Or search the wiki pages: https://cwiki.apache.org/WICKET/creating-custom-formcomponentpanels-to-build -valid-objects-using-wickets-form-validation-logic.html ~ Thank you, Paul Bors -Original Message- From: Richard W. Adams [mailto:rwada...@up.com] Sent: Monday, May 20, 2013 8:10 AM To: users@wicket.apache.org Subject: DropDownChoice in FormComponentPanel I have a FormComponentPanel with both string fields DropDownChoice controls. How do I get the drop downs' current selections from inside my override of convertInput()? I can get the string fields' values by calling the fields' convertInput() methods, but when I call convertInput() on the drop downs, I get the ORIGINAL value of the drop down, not the CURRENT value. I'm using Wicket 1.4.17 (version imposed by our corporate framework). I've looked at several different Wicket references, including Wicket in Action, Apache Wicket Cookbook the new online free Wicket guide, but could not find this issue discussed. ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. ** - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. **
RE: DropDownChoice in FormComponentPanel
Be careful as getModelObject() returns the model object of the form field after the form has been processed (since that's when it's updated). convertInput() is used to take the rawInput as text and convert it to the Java type and then used to validate the user input which will not end up in the model object if validation fails. If you use getModelObject() your user input will be reset each time an error occurs and the user would have to input the selection over and over which is annoying for forms that have many form fields (since the each error field will be reset). For more on how Wicket processes see the From JavaDoc: http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/ html/form/Form.html http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/ html/form/FormComponent.html#convertInput() ~ Thank you, Paul Bors -Original Message- From: Richard W. Adams [mailto:rwada...@up.com] Sent: Monday, May 20, 2013 12:54 PM To: users@wicket.apache.org Subject: RE: DropDownChoice in FormComponentPanel I'm not finished investigating this yet, but my preliminary findings indicate that the solution (at least in my case) is to call dropdown.getModelObject() instead of dropdown.convertInput(). In the use cases I've tested so far, getModelObject() returns the correct value. From: Paul Bors p...@bors.ws To: users@wicket.apache.org Date: 05/20/2013 11:35 AM Subject:RE: DropDownChoice in FormComponentPanel Simplest way I can think of is something like: @Override protected void onBeforeRender() { if(isValid()) { dropDown.getFormField().setDefaultModel(getDefaultModel()); } ... super.onBeforeRender(); } @Override protected void convertInput() { if(dropdown != null) { setConvertedInput(dropDown.getConvertedInput()); } ... } But it really depends on what your FormComponentPanel is wrapping and how you share its model among the child components. Refer to the Wicket Users Guide section 1.8 Creating comples form components with FormComponentPanel: http://wicket.apache.org/learn/books/freeguide.html Or search the wiki pages: https://cwiki.apache.org/WICKET/creating-custom-formcomponentpanels-to-build -valid-objects-using-wickets-form-validation-logic.html ~ Thank you, Paul Bors -Original Message- From: Richard W. Adams [mailto:rwada...@up.com] Sent: Monday, May 20, 2013 8:10 AM To: users@wicket.apache.org Subject: DropDownChoice in FormComponentPanel I have a FormComponentPanel with both string fields DropDownChoice controls. How do I get the drop downs' current selections from inside my override of convertInput()? I can get the string fields' values by calling the fields' convertInput() methods, but when I call convertInput() on the drop downs, I get the ORIGINAL value of the drop down, not the CURRENT value. I'm using Wicket 1.4.17 (version imposed by our corporate framework). I've looked at several different Wicket references, including Wicket in Action, Apache Wicket Cookbook the new online free Wicket guide, but could not find this issue discussed. ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. ** - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. ** - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Not redirecting to stateful URL after upgrade from 6.6.0 to 6.7.0
May be related to WICKET-5083. Please retry with the upcoming 6.8.0: https://dist.apache.org/repos/dist/dev/wicket/6.8.0/ Sven On 05/20/2013 06:53 PM, Barrett Snyder wrote: Is anyone else having problems where wicket is not redirecting to a stateful URL when going to a mounted URL for a stateful page? I have a page, which is stateful, mounted at /mypage. In wicket 6.6.0 when I went to that URL it would redirect to /mypage?0. With the upgrade to 6.7.0 it no longer does this and is causing problems with the back button because I have AJAX components on the page which update the page, but if a user navigates forward then tries to use the back button they get a new instance of the page due to wicket not appending the page id and redirecting on initial request. This appears to be due to changes in WebPageRenderer, but I'm not yet sure if that is the culprit. Just thought I'd check here quick before I dig into this too much further. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Not redirecting to stateful URL after upgrade from 6.6.0 to 6.7.0
Yes, looks like this fixed it. Also looks like 6.8.0 was moved to the release folder in the middle of my testing this. Is it being released today? On Mon, May 20, 2013 at 11:59 AM, Sven Meier s...@meiers.net wrote: May be related to WICKET-5083. Please retry with the upcoming 6.8.0: https://dist.apache.org/repos/**dist/dev/wicket/6.8.0/https://dist.apache.org/repos/dist/dev/wicket/6.8.0/ Sven On 05/20/2013 06:53 PM, Barrett Snyder wrote: Is anyone else having problems where wicket is not redirecting to a stateful URL when going to a mounted URL for a stateful page? I have a page, which is stateful, mounted at /mypage. In wicket 6.6.0 when I went to that URL it would redirect to /mypage?0. With the upgrade to 6.7.0 it no longer does this and is causing problems with the back button because I have AJAX components on the page which update the page, but if a user navigates forward then tries to use the back button they get a new instance of the page due to wicket not appending the page id and redirecting on initial request. This appears to be due to changes in WebPageRenderer, but I'm not yet sure if that is the culprit. Just thought I'd check here quick before I dig into this too much further. --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Not redirecting to stateful URL after upgrade from 6.6.0 to 6.7.0
Well, it got the 3 votes it needed so probably yes especially since the stage repository is not around anymore :) http://wicket-dev.markmail.org/search/?q=#query:+page:1+mid:xllxk4ltv5rmogk7 +state:results ~ Thank you, Paul Bors -Original Message- From: Barrett Snyder [mailto:barret...@gmail.com] Sent: Monday, May 20, 2013 4:31 PM To: users@wicket.apache.org Subject: Re: Not redirecting to stateful URL after upgrade from 6.6.0 to 6.7.0 Yes, looks like this fixed it. Also looks like 6.8.0 was moved to the release folder in the middle of my testing this. Is it being released today? On Mon, May 20, 2013 at 11:59 AM, Sven Meier s...@meiers.net wrote: May be related to WICKET-5083. Please retry with the upcoming 6.8.0: https://dist.apache.org/repos/**dist/dev/wicket/6.8.0/https://dist.ap ache.org/repos/dist/dev/wicket/6.8.0/ Sven On 05/20/2013 06:53 PM, Barrett Snyder wrote: Is anyone else having problems where wicket is not redirecting to a stateful URL when going to a mounted URL for a stateful page? I have a page, which is stateful, mounted at /mypage. In wicket 6.6.0 when I went to that URL it would redirect to /mypage?0. With the upgrade to 6.7.0 it no longer does this and is causing problems with the back button because I have AJAX components on the page which update the page, but if a user navigates forward then tries to use the back button they get a new instance of the page due to wicket not appending the page id and redirecting on initial request. This appears to be due to changes in WebPageRenderer, but I'm not yet sure if that is the culprit. Just thought I'd check here quick before I dig into this too much further. --**--**-- --- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscribe@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: Not redirecting to stateful URL after upgrade from 6.6.0 to 6.7.0
Thanks Paul, I haven't been watching the dev list. On Mon, May 20, 2013 at 1:38 PM, Paul Bors p...@bors.ws wrote: Well, it got the 3 votes it needed so probably yes especially since the stage repository is not around anymore :) http://wicket-dev.markmail.org/search/?q=#query:+page:1+mid:xllxk4ltv5rmogk7 +state:results ~ Thank you, Paul Bors -Original Message- From: Barrett Snyder [mailto:barret...@gmail.com] Sent: Monday, May 20, 2013 4:31 PM To: users@wicket.apache.org Subject: Re: Not redirecting to stateful URL after upgrade from 6.6.0 to 6.7.0 Yes, looks like this fixed it. Also looks like 6.8.0 was moved to the release folder in the middle of my testing this. Is it being released today? On Mon, May 20, 2013 at 11:59 AM, Sven Meier s...@meiers.net wrote: May be related to WICKET-5083. Please retry with the upcoming 6.8.0: https://dist.apache.org/repos/**dist/dev/wicket/6.8.0/https://dist.ap ache.org/repos/dist/dev/wicket/6.8.0/ Sven On 05/20/2013 06:53 PM, Barrett Snyder wrote: Is anyone else having problems where wicket is not redirecting to a stateful URL when going to a mounted URL for a stateful page? I have a page, which is stateful, mounted at /mypage. In wicket 6.6.0 when I went to that URL it would redirect to /mypage?0. With the upgrade to 6.7.0 it no longer does this and is causing problems with the back button because I have AJAX components on the page which update the page, but if a user navigates forward then tries to use the back button they get a new instance of the page due to wicket not appending the page id and redirecting on initial request. This appears to be due to changes in WebPageRenderer, but I'm not yet sure if that is the culprit. Just thought I'd check here quick before I dig into this too much further. --**--**-- --- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscribe@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: Has any one used the InMethod Grid DropDownChoiceColumn DropDownChoicePanel
Take your pick: http://www.wicket-library.com/wicket-examples-6.0.x/index.html More specifically the Ajax EditableTree: http://www.wicket-library.com/wicket-examples/ajax/tree/table/editable Just replace the EditablePanel with the form components you want. ~ Thank you, Paul Bors On Fri, May 17, 2013 at 3:27 PM, shashikant.kulkarn...@gmail.co shashikant.kulkarn...@gmail.com wrote: Hi All, Has anyone used InMethod Grid DropDownChoiceColumn DropDownChoicePanel? My requirement is I have 3 or more dropdown choices in a row. Now when I make selection changes in the dropdown and click on the submit icon, I am not able to get the changed values in the dropdown. Can someone put and example to do this. I tried but it is not working. Best regards, Shashikant -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Has-any-one-used-the-InMethod-Grid-DropDownChoiceColumn-DropDownChoicePanel-tp4658910.html Sent from the Users forum 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: Browser Back Button Question
StackTrace? ~ Thank you, Paul Bors On Thu, May 16, 2013 at 10:36 AM, dhongyt davidhtr...@gmail.com wrote: After two or three back button on the browser an error message displays session closed. The error returned is a bit confusing: I'm wondering if its because of hibernate? Its trying to get the query of the page to display but the query has been closed? It also talks about errors with wicket to so I'm not sure, but the top error is hibernate. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4658863.html Sent from the Users forum 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
Issue in 6.8.0
Hello All, sorry for the late report Just have updated wicket to be 6.8.0 in our project and it seems like adding AjaxFormValidatingBehavior.addToAllFormComponents(this, keydown, Duration.ONE_SECOND); To the form preventing text from being entered into text fields Can somebody test it? -- WBR Maxim aka solomax