Nested forms ...
Hi there, to my understanding the forms in the bottom code are nested. But why is the value of the outer textbox submitted when I click the inner submit button only? According to this page https://cwiki.apache.org/WICKET/nested-forms.html only the value of the inner textbox should be submitted when the inner submit button is pressed. Would be great if someone could explain this. Most likely I do something wrong here. Thanks. Ralf public class HomePage extends WebPage { private static final long serialVersionUID = 1L; private Model innerModel= new Model(Inner); private Model outerModel= new Model(Outer); public HomePage() { add(new Label(labelOuter, outerModel)); add(new Label(labelInner, innerModel)); Form formA = new Form(outerForm){ @Override protected void onSubmit() { System.out.println(Outer form submitted); } }; add(formA); formA.add(new TextField(outerFormTF, outerModel)); Form formB = new Form(innerForm){ @Override protected void onSubmit() { System.out.println(Inner form submitted); } }; formA.add(formB); formB.add(new TextField(innerFormTF, innerModel)); } } HTML: !DOCTYPE html html xmlns:wicket=http://wicket.apache.org; head meta charset=utf-8 / titleApache Wicket Quickstart/title link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:regular,bold' rel='stylesheet' type='text/css' / link rel=stylesheet href=style.css type=text/css media=screen title=Stylesheet / /head body Outer value br/ Inner value form wicket:id=outerForm input wicket:id=outerFormTF type=text/ input type=submit value=Outer Form / form wicket:id=innerForm input wicket:id=innerFormTF type=text/ input type=submit value=Inner Form / /form /form /body /html -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Nested-forms-tp4657683.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: Nested forms ...
Hi, the values of all form components are submitted, but only the ones from the submitted nested form are processed. See Form#wantSubmitOnNestedFormSubmit() and the tests in NestedFormSubmitTest. Sven On 04/02/2013 12:40 PM, RalfButler wrote: Hi there, to my understanding the forms in the bottom code are nested. But why is the value of the outer textbox submitted when I click the inner submit button only? According to this page https://cwiki.apache.org/WICKET/nested-forms.html only the value of the inner textbox should be submitted when the inner submit button is pressed. Would be great if someone could explain this. Most likely I do something wrong here. Thanks. Ralf public class HomePage extends WebPage { private static final long serialVersionUID = 1L; private Model innerModel= new Model(Inner); private Model outerModel= new Model(Outer); public HomePage() { add(new Label(labelOuter, outerModel)); add(new Label(labelInner, innerModel)); Form formA = new Form(outerForm){ @Override protected void onSubmit() { System.out.println(Outer form submitted); } }; add(formA); formA.add(new TextField(outerFormTF, outerModel)); Form formB = new Form(innerForm){ @Override protected void onSubmit() { System.out.println(Inner form submitted); } }; formA.add(formB); formB.add(new TextField(innerFormTF, innerModel)); } } HTML: !DOCTYPE html html xmlns:wicket=http://wicket.apache.org; head meta charset=utf-8 / titleApache Wicket Quickstart/title link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:regular,bold' rel='stylesheet' type='text/css' / link rel=stylesheet href=style.css type=text/css media=screen title=Stylesheet / /head body Outer value br/ Inner value form wicket:id=outerForm input wicket:id=outerFormTF type=text/ input type=submit value=Outer Form / form wicket:id=innerForm input wicket:id=innerFormTF type=text/ input type=submit value=Inner Form / /form /form /body /html -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Nested-forms-tp4657683.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: close a modal window and setResponsePage
Moved the discussion of my issue to here since the problem is not really setResponsePage, but the callback behavior and how it does not re-read the model of the modal window: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-setWindowClosedCallback-has-access-to-old-model-or-change-to-modal-window-s-model-goes-a-td4657672.html -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/close-a-modal-window-and-setResponsePage-tp2074789p4657685.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: Free Wicket guide now available!
amazing work, thx Duto - Duto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Free-Wicket-guide-now-available-tp4657407p4657686.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: Nested forms ...
Thanks for the quick reply Sven! Still confusing to me; for wantSubmitOnNestedFormSubmit() it says By default, this is false, so when a nested form is submitted, this form will not be submitted. And since I did not overwrite wantSubmitOnNestedFormSubmit of the OuterForm to return true, I'd expect that OuterForm is not submitted when the inner form submit button is pressed. Could it be that 'submit' and 'process' got a bit confused in the JavaDoc? I reckon it has something to do with the code I wrote. I slightly modified it ... same result. But it would be great if you could skim through it. May aim is that outerModel does not get assigned a value of the outerTextField when the innser submit button is pressed. Thanks, Ralf JAVA: HTML: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Nested-forms-tp4657683p4657687.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: Nested forms ...
Ah, you're not using any button components, so there's no way for Wicket to know which form was submitted. Sven On 04/02/2013 01:48 PM, RalfButler wrote: Thanks for the quick reply Sven! Still confusing to me; for wantSubmitOnNestedFormSubmit() it says By default, this is false, so when a nested form is submitted, this form will not be submitted. And since I did not overwrite wantSubmitOnNestedFormSubmit of the OuterForm to return true, I'd expect that OuterForm is not submitted when the inner form submit button is pressed. Could it be that 'submit' and 'process' got a bit confused in the JavaDoc? I reckon it has something to do with the code I wrote. I slightly modified it ... same result. But it would be great if you could skim through it. May aim is that outerModel does not get assigned a value of the outerTextField when the innser submit button is pressed. Thanks, Ralf JAVA: HTML: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Nested-forms-tp4657683p4657687.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Nested forms ...
Ah! Thank you very much Sven. Yes, that makes sense!! In case anyone is interested: JAVA: HTML: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Nested-forms-tp4657683p4657689.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: Modal window and height
Just in case someone else still face same problem. Clear your cache from your browser. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-window-and-height-tp1861453p4657666.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: Proper resource versioning
Thanks for your help Dan. I made all images, css and js wicket resource references now. This helps a lot because I also want to prefix my website urls with the locale code which is pretty hard to do when some paths are context-relative and others are managed by Wicket. For anyone attempting this change, note that versioned resources can be both accessed through the versioned name (with -ver-) added and the original file name too. This can help for referencing images with relative paths in css. Regards, Bertrand On 28/03/2013 11:39 AM, Dan Retzlaff wrote: On Thu, Mar 28, 2013 at 7:27 AM, Pointbreak pointbreak+wicketst...@ml1.netwrote: I don't think there's anything wrong with serving resources from the webapp-folder, I agree, it can work well for some use cases. But if you want better control over caching, and the ability point all rendered resource references to a CDN with a little configuration code, then maybe serving through Wicket gives you more options. Dan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Serving wicket JS from CDN?
Is anyone thinking about serving JS required by wicket (eg., jquery etc) from a CDN? If we started serving commonly used JS used by wicket from a central CDN then more and more browsers visiting Wicket based sites would be starting to cache JS used commonly across the 'Wicketsphere' so further visits to other websites in the wicketsphere would require no download. Caching of these common, static resources would reduce the bandwidth usage/traffic on the webservers hosting wicket sites. Yours sincerely, Chris Colman Pagebloom Team Leader, Step Ahead Software pagebloom - your business your website growing together Sydney: (+61 2) 9656 1278 Canberra: (+61 2) 6100 2120 Email: chr...@stepahead.com.au mailto://chr...@stepahead.com.au Website: http://www.pagebloom.com blocked::http://www.pagebloom.com/ http://develop.stepaheadsoftware.com blocked::http://develop.stepaheadsoftware.com/
AjaxIndicatorAppender on a Panel
I have a panel with several controls, i would like to add a common AjaxIndicatorAppender for entire panel. It does work fine for individual controls but i have not found a way to add one common for all be able to position the location of loading message gif. Ideally i would like to achieve something like a 'Loading..' image layer takes over the panel until the Ajax Request is complete, could be triggered by any control in the panel. Is this possible in plain wicket, any help would be appreciated. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatorAppender-on-a-Panel-tp4657694.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: AjaxIndicatorAppender on a Panel
See IAjaxIndicatorAware On Tue, Apr 2, 2013 at 9:47 PM, saty satya...@gmail.com wrote: I have a panel with several controls, i would like to add a common AjaxIndicatorAppender for entire panel. It does work fine for individual controls but i have not found a way to add one common for all be able to position the location of loading message gif. Ideally i would like to achieve something like a 'Loading..' image layer takes over the panel until the Ajax Request is complete, could be triggered by any control in the panel. Is this possible in plain wicket, any help would be appreciated. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatorAppender-on-a-Panel-tp4657694.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 -- Regards - Ernesto Reinaldo Barreiro
Re: AjaxIndicatorAppender on a Panel
yeah, thanks I can have my panel implement the IAjaxIndicatorAware and use a AjaxIndicatorAppender as here, but unless i add this indicator to one of the component in the panel it does not show up and also in that case it shows rightly next to the component where i added it. how would i take it out from components in the panel and add it at the panel level itself. MyPanel implements IAjaxIndicatorAware { AjaxIndicatorAppender indicator = new AjaxIndicatorAppender (); @Override public String getAjaxIndicatorMarkupId() { return indicator.getMarkupId(); } } Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatorAppender-on-a-Panel-tp4657694p4657696.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: AjaxIndicatorAppender on a Panel
(I'm guessing here) but could you add the indicator to the panel (and expose it via a getter method). And then, with each sub-component, implement the IAjaxIndicatorAware and have getAjaxIndicatorMarkupId() reference the panel's indicator mark up ID. I honestly don't know if this will work, but it seems logical? Cheers, Col. -Original Message- From: saty [mailto:satya...@gmail.com] Sent: 03 April 2013 05:40 To: users@wicket.apache.org Subject: Re: AjaxIndicatorAppender on a Panel yeah, thanks I can have my panel implement the IAjaxIndicatorAware and use a AjaxIndicatorAppender as here, but unless i add this indicator to one of the component in the panel it does not show up and also in that case it shows rightly next to the component where i added it. how would i take it out from components in the panel and add it at the panel level itself. MyPanel implements IAjaxIndicatorAware { AjaxIndicatorAppender indicator = new AjaxIndicatorAppender (); @Override public String getAjaxIndicatorMarkupId() { return indicator.getMarkupId(); } } Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatorAppender-on-a-Panel-tp4657694p4657696.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 EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxIndicatorAppender on a Panel
Not following you... Whole setup should be quite simple. Please read http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-code/ On Tue, Apr 2, 2013 at 10:40 PM, saty satya...@gmail.com wrote: yeah, thanks I can have my panel implement the IAjaxIndicatorAware and use a AjaxIndicatorAppender as here, but unless i add this indicator to one of the component in the panel it does not show up and also in that case it shows rightly next to the component where i added it. how would i take it out from components in the panel and add it at the panel level itself. MyPanel implements IAjaxIndicatorAware { AjaxIndicatorAppender indicator = new AjaxIndicatorAppender (); @Override public String getAjaxIndicatorMarkupId() { return indicator.getMarkupId(); } } Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatorAppender-on-a-Panel-tp4657694p4657696.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 -- Regards - Ernesto Reinaldo Barreiro