AW: Wicketstuff REST-Annotations: error handling impossible?
Hi Maxim, You might wanna take a look at http://jsondoc.org/ We use that in our current project and it looks very good. Regards, Hans -Ursprüngliche Nachricht- Von: Maxim Solodovnik [mailto:solomax...@gmail.com] Gesendet: Dienstag, 24. Februar 2015 16:47 An: users@wicket.apache.org Betreff: Re: Wicketstuff REST-Annotations: error handling impossible? I have created issue [1] to record the idea [1] https://github.com/wicketstuff/core/issues/385 On Tue, Feb 24, 2015 at 9:10 PM, andrea del bene an.delb...@gmail.com wrote: Not at the moment. But it's a nice idea for future improvements :) Hello, have missed this useful component somehow Is there any way to get wsdl? and wadl? On Tue, Feb 24, 2015 at 4:20 PM, Hans Lesmeister hans.lesmeis...@lessy-software.de wrote: Hi Andrea, thank you for your quick response. Great to hear that the change will be committed :-) Regards, Hans -Ursprüngliche Nachricht- Von: andrea del bene [mailto:an.delb...@gmail.com] Gesendet: Dienstag, 24. Februar 2015 11:02 An: users@wicket.apache.org Betreff: Re: Wicketstuff REST-Annotations: error handling impossible? That's a simple but yet very useful improvement! I will commit it ASAP. Thank you. Andrea. Hi everybody, We are using the Wicketstuff REST-Annotations and we are very happy with it. Thank you very much :-) We have a small thingy however for which I would like to propose a minor change in the code. It is about the fact that it is very hard, if not impossible, to customize error handling. I have created a Ticket in GitHub for it: https://github.com/wicketstuff/core/issues/384 Thanks and regards, Hans --- -- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- WBR Maxim aka solomax - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Wicketstuff REST-Annotations: error handling impossible?
Hi Andrea, thank you for your quick response. Great to hear that the change will be committed :-) Regards, Hans -Ursprüngliche Nachricht- Von: andrea del bene [mailto:an.delb...@gmail.com] Gesendet: Dienstag, 24. Februar 2015 11:02 An: users@wicket.apache.org Betreff: Re: Wicketstuff REST-Annotations: error handling impossible? That's a simple but yet very useful improvement! I will commit it ASAP. Thank you. Andrea. Hi everybody, We are using the Wicketstuff REST-Annotations and we are very happy with it. Thank you very much :-) We have a small thingy however for which I would like to propose a minor change in the code. It is about the fact that it is very hard, if not impossible, to customize error handling. I have created a Ticket in GitHub for it: https://github.com/wicketstuff/core/issues/384 Thanks and regards, Hans - 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
Wicketstuff REST-Annotations: error handling impossible?
Hi everybody, We are using the Wicketstuff REST-Annotations and we are very happy with it. Thank you very much :-) We have a small thingy however for which I would like to propose a minor change in the code. It is about the fact that it is very hard, if not impossible, to customize error handling. I have created a Ticket in GitHub for it: https://github.com/wicketstuff/core/issues/384 Thanks and regards, Hans - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicketstuff Restannotations AbortWithHttpErrorCodeException always results in 500 Internal Server Error
Hi, We use the great rest-annotation from wicketstuff. One thing that bothers is if the AbortWithHttpErrorCodeException with a specific code (404, 402, etc) is thrown by the mapped method, those error codes do not make it to the calling client. The client always seems to get a 500. I debugged through the request/response and found this in AbstractRestResource: http://pastebin.com/NKNmNHv6 Is there any way of getting the correct error codes to the client? If not, how are other people handling this? I would be glad to invest some time and apply a patch if necessary -- Thanks and Cheers, Hans - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Wicketstuff Restannotations AbortWithHttpErrorCodeException always results in 500 Internal Server Error
Hi Warren, life can be so easy sometimes. Thanks :-) -- Cheers, Hans -Ursprüngliche Nachricht- Von: Warren Bell [mailto:warrenbe...@gmail.com] Gesendet: Donnerstag, 29. Januar 2015 05:53 An: users@wicket.apache.org Betreff: Re: Wicketstuff Restannotations AbortWithHttpErrorCodeException always results in 500 Internal Server Error Hans, I handle all exceptions and set status codes in my mapped method with AbstractRestResource#setResponseStatusCode(…). I don’t ever throw any exceptions from there. Setting a status code is the only thing that is really happening in AbstractRestResource#invokeMappedMethod(…) when an exception is caught anyway. Just spare the throwing of an exception and set the status code in your mapped method. throw new AbortWithHttpErrorCodeException(“500”, “Ouch”); versus setResponseStatusCode(“500”); Also, I believe AbortWithHttpErrorCodeException is part of Wicket core, not something meant to be used in rest-annotations. Hope this helps, Warren Bell On Jan 28, 2015, at 7:58 AM, Hans Lesmeister hans.lesmeis...@lessy-software.de wrote: Hi, We use the great rest-annotation from wicketstuff. One thing that bothers is if the AbortWithHttpErrorCodeException with a specific code (404, 402, etc) is thrown by the mapped method, those error codes do not make it to the calling client. The client always seems to get a 500. I debugged through the request/response and found this in AbstractRestResource: http://pastebin.com/NKNmNHv6 Is there any way of getting the correct error codes to the client? If not, how are other people handling this? I would be glad to invest some time and apply a patch if necessary -- Thanks and Cheers, Hans - 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
AW: passing parameters to wicket panel
Hi, You can pass the parameters to the panel via the panel's constructor. You can also access the pageparameters in the panel with panel.getPage ().getPageParameters () Regards Hans Ursprüngliche Nachricht Von: K kondetiudayki...@gmail.com Datum:08.01.2015 14:38 (GMT+01:00) An: users@wicket.apache.org Betreff: passing parameters to wicket panel firstly wish you all a very happy new year. i am moving my data tables in to a panel from webpage. i was using pageparameters to pass required parameters on clicking the link for retrieving data and displaying it in the next page. now that i have moved those tables in to a panel i am not sure how to forward those parameters in panels. My calling Method: My Panel Constructor: i have tried to replace PageParameters with IModel but it did not work. Please suggest. Thanks - K -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/passing-parameters-to-wicket-panel-tp4668939.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
target.prependJavaScript and JQuery-Animation in IE8
Hi Everybody, To enable animation with JQuery on replacing a component with Ajax, we have followed the construct with the |-Symbol (pipe) in the Javascript that is added with target.prependJavaScript (see http://wicketinaction.com/2013/02/replace-components-with-animation = Thank you, Martin) This does not seem to work in IE8. I pass a function like this: prependJavaScript(notify|myfunction(notify, ' + container.getMarkupId() + ')); The Function looks like this: function myfunction(notify, id) { Wicket.Log.info(this is not reached in IE8); JQuery(# + id).slideUp(500, notify); } In IE8, myfunction is not called at all. On FF and other Browsers everything works okay. Before I create a JIRA-Ticket with a Quick-Start, I wanted to ask here if the problem is known already (and hopefully there is even a solution/work-around for it) Thanks in advance - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-prependJavaScript-and-JQuery-Animation-in-IE8-tp4662008.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: target.prependJavaScript and JQuery-Animation in IE8
Hi Martin, Martin Grigorov-4 wrote AFAIK it is not known. The code looks pretty simple for IE8 to break. Which version of jQuery do you use ? It is 1.8.3., the one that is shipped with Wicket 6.8. I will try with Wicket 6.11 which is shipped with jQuery 1.10.1 - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-prependJavaScript-and-JQuery-Animation-in-IE8-tp4662008p4662010.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: target.prependJavaScript and JQuery-Animation in IE8
Hans Lesmeister 2 wrote Same behavior with jQuery 1.10.1. Okay, then I will create a ticket with a quick start then. Thanks for helping so far. https://issues.apache.org/jira/browse/WICKET-5397 - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-prependJavaScript-and-JQuery-Animation-in-IE8-tp4662008p4662012.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: target.prependJavaScript and JQuery-Animation in IE8
Martin Grigorov-4 wrote AFAIK it is not known. The code looks pretty simple for IE8 to break. Which version of jQuery do you use ? Hans Lesmeister 2 wrote It is 1.8.3., the one that is shipped with Wicket 6.8. I will try with Wicket 6.11 which is shipped with jQuery 1.10.1 Same behavior with jQuery 1.10.1. Okay, then I will create a ticket with a quick start then. Thanks for helping so far. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-prependJavaScript-and-JQuery-Animation-in-IE8-tp4662008p4662011.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
Mounted Dynamic Resource: IllegalStateException
Hi all, To deliver resources (mainly images) dynamically, we have created a custom ResourceReference and mounted that to a path: As long as the image is there and an inputstream can be retrieved from our service, everything works fine. However if a stream is not available, we throw an AbortException 404. In that case later on there is this stacktrace on the console: This again leads to Wicket trying to deliver the ErrorPage which is not wanted. So my question is: what do we do wrong? I guess I should not throw an AbortException here, but what do I do instead to get a 404 to the browser? Thank you in advance for any help. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mounted-Dynamic-Resource-IllegalStateException-tp4660927.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
AW: Mounted Dynamic Resource: IllegalStateException
Seems the code didn't make it: Hi all, To deliver resources (mainly images) dynamically, we have created a custom ResourceReference and mounted that to a path: // in our Application.init(): mountResource(assets/${path}/${name}, new CustomResourceReference()); // in CustomResourceReference: public IResource getResource() { return new AbstractResource() { @Override protected ResourceResponse newResourceResponse(Attributes attributes) { // (slightly simplified for readability) final String folder = parameters.get(folder).toString(); final String folder = parameters.get(name).toString(); ResourceResponse response = new ResourceResponse(); response.setWriteCallback(new WriteCallback() { @Override public void writeData(Attributes attributes) throws IOException { InputStream stream = null; try { log.debug(Getting stream for {}/{}, folder, name); stream = ourService.createStreamFromPath(folder, name); if (stream == null) { log.debug(Stream for {}/{} could not be retrieved. Returning 404, folder, name); throw new AbortWithHttpErrorCodeException(HttpServletResponse.SC_NOT_FOUND); } log.debug(Writing stream, folder, name); writeStream(attributes, stream); } finally { IOUtil.close(stream); } } }); return response; } }; } As long as the image is there and an inputstream can be retrieved from our service, everything works fine. However if a stream is not available, we throw an AbortException 404. In that case later on there is this stacktrace on the console: java.lang.IllegalStateException: Response is no longer buffering! at org.apache.wicket.protocol.http.HeaderBufferingWebResponse.reset(HeaderBuffe ringWebResponse.java:205) at org.apache.wicket.request.flow.ResetResponseException$ResponseResettingDecor ator.respond(ResetResponseException.java:87) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(Request Cycle.java:861) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.ja va:64) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.ja va:93) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.jav a:218) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(Request Cycle.java:289) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilte r.java:259) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.jav a:201) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) at com.cantaa.emb.ofsi.frontend.common.OFSIWebFilter.doFilter(OFSIWebFilter.jav a:28) This again leads to Wicket trying to deliver the ErrorPage which is not wanted. So my question is: what do we do wrong? I guess I should not throw an AbortException here, but what do I do instead to get a 404 to the browser? Thank you in advance for any help. -- Cheers, Hans - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mounted Dynamic Resource: IllegalStateException
Hi Martin, Martin Grigorov-4 wrote Please create a ticket with a quickstart and we will take a look. Thanks! Quickstart attached https://issues.apache.org/jira/browse/WICKET-5318 Thanks a lot - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mounted-Dynamic-Resource-IllegalStateException-tp4660927p4660930.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
AW: Mounted Dynamic Resource: IllegalStateException
Sorry, I had attached the WAR-file to the ticket. Now the ZIP-file is attached to the ticket. -Ursprüngliche Nachricht- Von: Hans Lesmeister 2 [mailto:hans.lesmeis...@lessy-software.de] Gesendet: Freitag, 16. August 2013 14:07 An: users@wicket.apache.org Betreff: Re: Mounted Dynamic Resource: IllegalStateException Hi Martin, Martin Grigorov-4 wrote Please create a ticket with a quickstart and we will take a look. Thanks! Quickstart attached https://issues.apache.org/jira/browse/WICKET-5318 Thanks a lot - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mounted-Dynamic-Resource-IllegalS tateException-tp4660927p4660930.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
html5-validation and Ajax Form Submit
Hi everybody, with HTML5 we now have this nice browser built in validation showing a bubble and a colored outline if a validation on a field does not pass. However if I add an AjaxSubmitLink to the form, then the html5-validation is no longer working. I have tried all kind of tricky things with pre-conditions and other javascript, calling form.checkValidity() manually, but I am stuck. Either the bubble doesn't show up or the form is non-ajax-submitted with a full page reload as the consequence. Does anybody of you got the html5-validation working with an Ajax-Form? Any help is highly appreciated - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/html5-validation-and-Ajax-Form-Submit-tp4660476.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: html5-validation and Ajax Form Submit
Hi Martin, thank you for the feedback. What I really mean is the nativ html5-validation. If an input-field has the required-attribute set and the user leaves the field blank, then the browser places an outline around the field and on submit a little balloon appears with a text like Please fill in this field. Similar happens on email- and other field-types. If I put an AjaxSubmitLink on the submit-button, then a click on that button is catched by Wicket and the form is serialized and send to the Wicket-Listener directly, short-cutting the html5-validation. What I want to achieve is that the normal html5-validation is processed and if failed, then the click-trigger should be stopped and no submit should take place. Like I said, this problem only occurs on Ajax-Forms, not on regular forms where a normal submit is followed by a page-reload. Martin Grigorov-4 wrote I'm not sure what problem you face but you can take a look at http://wicketinaction.com/2013/04/server-and-client-side-validation/ (may be broken for few more days until Martijn fix Wordpress). Its code is https://github.com/martin-g/blogs/tree/master/wicket-parsley-validation. And the improved version at: https://github.com/code-troopers/wicket-jsr303-parsley On Thu, Jul 25, 2013 at 10:22 AM, Hans Lesmeister 2 hans.lesmeister@ wrote: Hi everybody, with HTML5 we now have this nice browser built in validation showing a bubble and a colored outline if a validation on a field does not pass. However if I add an AjaxSubmitLink to the form, then the html5-validation is no longer working. I have tried all kind of tricky things with pre-conditions and other javascript, calling form.checkValidity() manually, but I am stuck. Either the bubble doesn't show up or the form is non-ajax-submitted with a full page reload as the consequence. Does anybody of you got the html5-validation working with an Ajax-Form? Any help is highly appreciated - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/html5-validation-and-Ajax-Form-Submit-tp4660476.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscribe@.apache For additional commands, e-mail: users-help@.apache - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/html5-validation-and-Ajax-Form-Submit-tp4660476p4660484.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
AW: html5-validation and Ajax Form Submit
Hi, I checked that code and I would be eager to use Parsley. Parsley supports the new html5-attributes for validation but does not make use of the native form.checkValidity()-function. For that reason Parsley needs you to set the novalidate-attribute on the form, which suppresses html5-validation so instead, Parsley can jump in. The trick with the pre-condition does not work. That would be too easy :-) Although failed validation is suppressing the form-submit, the user feedback (the balloons and colored outlines) do not appear. What I do now is: 1) set a JQuery trigger on form.submit 2) modify the click-event in AjaxFormSubmitBehavior used by AjaxSubmitLink to myclick 3) Set a JQuery click-event-Trigger on the Submit-Button. If the users tries to submit the form, following happens: a) click-event on Submit-Button is triggered and calls form.submit() manually b) The trigger that was set in 1) is executed and manually calls checkValidity() and then preventDefault so no further submission takes place. If Validation was okay (function returns a Boolean) then with JQuery the myclick-event is triggered to submit the form with Wicket-Ajax. c) the form is submitted and everybody is happy :-) This seems to work but to me it looks very tricky and fragile. In the mean time I have sent a note to the project team to take a look at Parsley and wicket-parsley integration (fingers crossed...) -- Cheers, Hans -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Donnerstag, 25. Juli 2013 15:11 An: users@wicket.apache.org Betreff: Re: html5-validation and Ajax Form Submit Hi Hans, I'm not sure whether you checked the demo code. See https://github.com/martin-g/blogs/blob/master/wicket-parsley-validation/src/main/java/com/mycompany/HomePage.java#L71 Maybe you need to do something similar. On Thu, Jul 25, 2013 at 4:04 PM, Hans Lesmeister 2 hans.lesmeis...@lessy-software.de wrote: Hi Martin, thank you for the feedback. What I really mean is the nativ html5-validation. If an input-field has the required-attribute set and the user leaves the field blank, then the browser places an outline around the field and on submit a little balloon appears with a text like Please fill in this field. Similar happens on email- and other field-types. If I put an AjaxSubmitLink on the submit-button, then a click on that button is catched by Wicket and the form is serialized and send to the Wicket-Listener directly, short-cutting the html5-validation. What I want to achieve is that the normal html5-validation is processed and if failed, then the click-trigger should be stopped and no submit should take place. Like I said, this problem only occurs on Ajax-Forms, not on regular forms where a normal submit is followed by a page-reload. Martin Grigorov-4 wrote I'm not sure what problem you face but you can take a look at http://wicketinaction.com/2013/04/server-and-client-side-validation/ (may be broken for few more days until Martijn fix Wordpress). Its code is https://github.com/martin-g/blogs/tree/master/wicket-parsley-validation. And the improved version at: https://github.com/code-troopers/wicket-jsr303-parsley On Thu, Jul 25, 2013 at 10:22 AM, Hans Lesmeister 2 hans.lesmeister@ wrote: Hi everybody, with HTML5 we now have this nice browser built in validation showing a bubble and a colored outline if a validation on a field does not pass. However if I add an AjaxSubmitLink to the form, then the html5-validation is no longer working. I have tried all kind of tricky things with pre-conditions and other javascript, calling form.checkValidity() manually, but I am stuck. Either the bubble doesn't show up or the form is non-ajax-submitted with a full page reload as the consequence. Does anybody of you got the html5-validation working with an Ajax-Form? Any help is highly appreciated - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/html5-validation-and-Ajax-F orm-Submit-tp4660476.html Sent from the Users forum mailing list archive at Nabble.com. --- -- To unsubscribe, e-mail: users-unsubscribe@.apache For additional commands, e-mail: users-help@.apache - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/html5-validation-and-Ajax-F orm-Submit-tp4660476p4660484.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
Re: Wicket free guide updated!
Hi Andrea, great job. Thank you very much! - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-free-guide-updated-tp4659158p4659179.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
Hi, dhongyt wrote 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? You have serialized an object which contains properties proxied by Hibernate. On deserializing, the proxy tries to resolve with the now closed embedded Hibernate Session. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4659180.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: Get the selected item in the DropDownChoice using Scala
Hi, you can pass a IModelCustomer to the constructor as well. This model will receive the currently selected Customer. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Get-the-selected-item-in-the-DropDownChoice-using-Scala-tp4658555p4658559.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: anything like AjaxEditableCheck?
Hi, you can put the checkbox in a panel and add the panel to the Column. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/anything-like-AjaxEditableCheck-tp4657730p4657732.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: how to create a new Session
you might be looking for Session.replaceSession() - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-create-a-new-Session-tp4657553p4657574.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!
Hi Andrea, fantastic work! Thank you very much for sharing this. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Free-Wicket-guide-now-available-tp4657407p4657435.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: Sending Data via Javascript and AJAX
https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Sending-Data-via-Javascript-and-AJAX-tp4657008p4657065.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: Fundamental forms/models issue
Hi Michael, Michael Chandler wrote To conclude, my issues stemmed from not properly linking from page to page. I did a lot of this: BookmarkablePageLink String (link, MyClass.class); Instead of this: Link String (link) { public void onClick() { setResponsePage(new MyClass()); } } Oopsy! Oopsy is not necessary :-) Depending on the Use Case, both ways are fully okay. If you pass MyClass.class then, as stated before, Wicket creates a fresh page for you. If you pass an instance, then wicket uses that instance. The 2nd approach can for instance be used if you have state (i.e. a model or something else) to pass to the new page, but not necessarily. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Fundamental-forms-models-issue-tp4656511p4656537.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: Applying jQuery Effects (fadeIn, fadeOut) to Wicket 6 components issue.
Hans, like Martin said, this doesn't work, and I already tried it. When you use those options, it just renders the element tag with no contents. Yes, I realised that too. I am sorry if my answer caused you effort. Thank you very much, guys! When you come to Brazil, the beer is on me :) Second round is on me, okay? :-) - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Applying-jQuery-Effects-fadeIn-fadeOut-to-Wicket-6-components-issue-tp4655187p4655207.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: Applying jQuery Effects (fadeIn, fadeOut) to Wicket 6 components issue.
Martin Grigorov-4 wrote I.e. at the server side add style='display:none' to the Panel. Wicket JS will replace the old with the new one and then your fadeIn effect will show it. And with: panel.setVisible(false); panel.setOutputMarkupPlaceholderTag(true); the style-attribute is added for you by Wicket - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Applying-jQuery-Effects-fadeIn-fadeOut-to-Wicket-6-components-issue-tp4655187p4655189.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
AW: How to reload a Wicket-page from Wicket-panel.
Hi, panel.getPage() gives you the current page which you can reload i.e. with setResponsePage() Cheers Hans -Ursprüngliche Nachricht- Von: vaibhav2012 [mailto:vaibhav.bit2...@gmail.com] Gesendet: Mittwoch, 20. Juni 2012 07:54 An: users@wicket.apache.org Betreff: How to reload a Wicket-page from Wicket-panel. Hi, I want to reload Wicket-page from a Wicket-panel. The scenario is like : 1) I have a SignInPanel. I am adding this panel in different pages, lets for example say PageA, PageB, PageC etc. 2) Now when user is in PageA, and user signs in from SignInPanel. I want the contents of PageA to change as per user's data. For this i need to reload PageA. 3) Step (2) is applicable for PageB, PageC and all other pages which holds this SignInPanel. But i am not able to access the Page instance from within the SignInPanel. One approach i have thought of, is to pass the Page class to the constructor of SignInPanel while initializing it. And i can use this Page class to reload the particular page. Can anyone suggest me of a cleaner approach to acheive this. Thanks, - Regards, Vaibhav Gupta -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-reload-a-Wicket-page-from- Wicket-panel-tp4650097.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: How to reload a Wicket-page from Wicket-panel.
Please post your code -Ursprüngliche Nachricht- Von: vaibhav2012 [mailto:vaibhav.bit2...@gmail.com] Gesendet: Mittwoch, 20. Juni 2012 08:20 An: users@wicket.apache.org Betreff: Re: AW: How to reload a Wicket-page from Wicket-panel. Hi Hans, I have already tried this, but it doesn't work. SignInPanel is a seperate class which extends *org.apache.wicket.markup.html.panel.Panel*, and it is having its seperate markup. I am adding this SignInPanel as a Component in different wicket pages, as mentioned in the scenario in my original question. SignInPanel has a form, and from onSubmit() of that form, i want to reload the page which holds this SignInPanel. I used this.getPage() in SignInPanel's constructor, but it gives this exception *org.apache.wicket.WicketRuntimeException: No Page found for component [SignInPanel [Component id = signInPanel]]* Can u suggest some other way? Thanks, - Regards, Vaibhav Gupta -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-reload-a-Wicket-page-from- Wicket-panel-tp4650097p4650099.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: How to reload a Wicket-page from Wicket-panel.
I used this.getPage() in SignInPanel's constructor In the constructor, the page is not yet set (See onInitialize and onConfigure) -Ursprüngliche Nachricht- Von: vaibhav2012 [mailto:vaibhav.bit2...@gmail.com] Gesendet: Mittwoch, 20. Juni 2012 08:20 An: users@wicket.apache.org Betreff: Re: AW: How to reload a Wicket-page from Wicket-panel. Hi Hans, I have already tried this, but it doesn't work. SignInPanel is a seperate class which extends *org.apache.wicket.markup.html.panel.Panel*, and it is having its seperate markup. I am adding this SignInPanel as a Component in different wicket pages, as mentioned in the scenario in my original question. SignInPanel has a form, and from onSubmit() of that form, i want to reload the page which holds this SignInPanel. I used this.getPage() in SignInPanel's constructor, but it gives this exception *org.apache.wicket.WicketRuntimeException: No Page found for component [SignInPanel [Component id = signInPanel]]* Can u suggest some other way? Thanks, - Regards, Vaibhav Gupta -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-reload-a-Wicket-page-from- Wicket-panel-tp4650097p4650099.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: how to debug MarkupNotFoundException
Hi, Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried As Wicket suggests: Please enable debug messages and check the console output. You will see a list of files Wicket is looking up which *might* lead you to the cause of your problem Cheers - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: how to debug MarkupNotFoundException
Hi, - do you have an HTML file with the same name as Panel-Class? (like MyPanel.java and MyPanel.html - case sensitiv). - Is the HTML-file in the same package? - Is it copied to the class-path after compiling? - there is a markup-setting which you can set to get more info on your console about how Wicket tries to find the HTML file -Ursprüngliche Nachricht- Von: cosmindumy [mailto:cosmind...@yahoo.com] Gesendet: Montag, 14. Mai 2012 16:57 An: users@wicket.apache.org Betreff: how to debug MarkupNotFoundException I've got the following exception. How can I know wich is the problem? I have a FormComponent that has inside a RepeatingView. I'm not sure that is the problem, but I coldn't find ogher cause. How can I start debugging the cause? Markup of type 'html' for component 'org.apache.wicket.markup.html.panel.Panel' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried.: [MarkupContainer [Component id = 1]] org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'org.apache.wicket.markup.html.panel.Panel' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried.: [MarkupContainer [Component id = 1]] Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-debug-MarkupNotFoundExcept ion-tp4632356.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
AW: AbstractAjaxBehavior and ModalWindow
Hi, if you are inside an Ajax-Request you can simply do AjaxRequestTarget.get() cheers Hans -Ursprüngliche Nachricht- Von: Brian Mulholland [mailto:blmulholl...@gmail.com] Gesendet: Mittwoch, 18. April 2012 18:34 An: users@wicket.apache.org Betreff: AbstractAjaxBehavior and ModalWindow I have a page where I show a javascript widget. Based on events in said widget, I may fire one of five different ajax events. On some of them, I am required to show a modal window with a form in it. I am using, based on advice found while googling, AbstractAjaxBehavior to handle the ajax events, which is working swell for the non-modal window events. But ModalWindow (the wicket extension) wants an AjaxRequestTarget passed to the show() method. Unlike the example which uses a link to trigger the modal window, AbstractAjaxBehavior does not pass an AjaxRequestTarget for me to pass along to the show() method. I tried to pass along the request from the RequestCycle, but that got me the following ClassCastException: java.lang.ClassCastException: org.apache.wicket.request.target.component.listener.BehaviorRequestTarget incompatible with org.apache.wicket.ajax.AjaxRequestTarget Brian Mulholland - 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: 1.5 Stared blind patterndateconverter
Hi, if I run your test, the result is just a space. If I change the Date-Pattern to HH:mm, the test goes green May be you are in the wrong time-zone... :-) - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-Stared-blind-patterndateconverter-tp4561565p4561641.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: I want update value in second textfield when i type something in second Textfield
Hi, showCalculatorModel.setTxtIntrinsicValueCE(txtLtpPriceCE.getInput()); txtIntrinsicValueCE.modelChanged(); // target.addComponent(txtIntrinsicValueCE); - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/I-want-update-value-in-second-textfield-when-i-type-something-in-first-Textfield-tp4465876p4466129.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: Package Not Found
Hi, seems to me that some of the classes moved to org.apache.wicket.request.resource - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Package-Not-Found-tp4466108p4466328.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: Very simple Wicket test to verify panel type...
Hi, panelid instead of :panelid? You can dump the Component-Tree to the console with tester.dumpXXX Am 09.02.12 21:59 schrieb Bjørn Grønbæk unter bjorn.gronb...@endomondo.com: Hi, I'm just starting out with Wicket and WicketTester... I have a page that adds one of several panels, depending of its PageParameter. I would like to verify that behaviour with WicketTester... but how to? The code is something like this: String type = null; Panel p = null; if(getPageParameters() != null) type = getPageParameters().getString(BRAND_TYPE); if(type != null type.equals(BRAND)) p = new PanelA(id); else p = new PanelB(id); add(p); I've tried something like this: wicketTester.startPage(CreatePage.class); wicketTester.assertRenderedPage(CreatePage.class); wicketTester.assertComponent(:panelid,PanelA.class); but that doesn't work. The test fails with this message: junit.framework.AssertionFailedError: component 'CreatePage' is not type:PanelA Am I using the AssertComponent in a wrong way? How else can I perform a test like that? Could you point me to a good resource on how I find the path to components? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wizard starting background task
Hi, 1) I start the background task in a lazy load panel, but haven't figured out yet how to display a progress bar while the lazy load is executing. Take a look at wicket-progressbar from Wicketstuff for background processing and showing a progressbar. Cheers Hans - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket on Google App Engine
Hi Daniel, Daniel Watrous-2 wrote I tried putting in this: getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND); GAE does not allow you to start additional threads and that's what setResourcePollFrequency(...) does I think - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-on-Google-App-Engine-tp4259205p4264458.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: Event or Notice when a ListView's Model changes
Hi, hfriederichs wrote I'm trying to do this, to send an Event in the DataView's onBeforeRender(), but now I encounter another issue. On the receiving side of the Event, in the onEvent(Component component, IEvent? event), I need a AjaxRequestTarget. Can I create an AjaxRequestTarget and pass it with the Event? I tried this with new AjaxRequestTarget(getPage()), but it doesn't work. Inside an Ajax-Request you can do AjaxRequestTarget.get() at any time - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Event-or-Notice-when-a-ListView-s-Model-changes-tp4157030p4164694.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: Dynamically choosing component to add
Hi, Thomas Götz wrote final TextField textField = new TextField(textField, new Model()); textField.setVisible(false); add(textField); ... Because textField is initially invisible, Don't forget to textField.setOutputMarkupPlaceholderTag(true); - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dynamically-choosing-component-to-add-tp3955869p4118782.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: IAjaxIndicatorAware/Busy Indicator Problems
Hi, you can add Javascript to the current AjaxRequestTarget in the onClose-Method of your Modal Window, i.e. like: AjaxRequestTarget.get().appendJavaScript(...) - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/IAjaxIndicatorAware-Busy-Indicator-Problems-tp4029525p4030568.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: Toggling Web markup container visibility
Hi, You should setOutputMaarkupPlaceholder to true (sorry probably not exactly the correct methode name but very similar...) Tip: do not override isVisible but override onConfigure and then call setvisible(...) in there Cheers Hans Am 30.10.11 21:14 schrieb Josh Kamau unter joshnet2...@gmail.com: Hi there; I want to toggle a visibility of a group of components. So i have put them in a WebMarkupContainer and overriden the isVisible method to return the value gotten from a check box. The webmarkupcontainer is not toggled as expected when i added it to the target object. The individual form components get toggled as expected. What could be the problem ? is there a better way of grouping form components other than a web makup container? in the html file i have a div. Regards. Josh. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxFormComponentUpdatingBehavior broken after invalid submit
Hi, did you already try a call to form.modelChanged() in onUpdate? - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-broken-after-invalid-submit-tp3945964p3946955.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: Jump to specific page of AjaxFallbackDefaultDataTable
DataTable.setCurrentPage(int) - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Jump-to-specific-page-of-AjaxFallbackDefaultDataTable-tp3878357p3878396.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: How to handle errors in RequestCycle.onEndRequest
Hi, maybe you can override WebRequestCycleProcessor.respond: but I did not try if that's too late as well - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-handle-errors-in-RequestCycle-onEndRequest-tp3824649p3846249.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: Apache Wicket releases Wicket 1.5
Congratulations! Thank you for this great Framework. Martijn Dashorst dasho...@apache.org schrieb: The Apache Wicket team is proud to announce the immediate availability of the newest release of their component oriented open source Java web framework. Apache Wicket 1.5 has been in development for the last two years and brings many improvements over previous versions. Downloading Apache Wicket 1.5 - You can download the release here: http://www.apache.org/dyn/closer.cgi/wicket/1.5.0 Or use this in your Maven POM to upgrade to the new version: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version1.5.0/version /dependency Please note that Wicket’s main artifact ID has been renamed to wicket-core. You will need to upgrade all modules (i.e. wicket, wicket-extensions, wicket-ioc, wicket-spring, etc) to 1.5.0. It is not possible to mix previous versions of Wicket with modules of this release. Most notable changes With this release the Wicket team has revised many of its internals. A short list: - HTML5 components added: EmailTextField, NumberTextField, UrlTextField and RangeTextField - New inter-component events (explained below) - Minimum required servlet API is servlet-api 2.5 - All standard validators now extend Behavior to allow for client side validations - IBehavior has been removed and AbstractBehavior has been deprecated, you should now extend Behavior instead - Simplified the request cycle processing and made it more extensible - URL handling is now in one place - Wicket’s rendering code has been greatly simplified - Improved browser caching support - ClientSideImageMap replaces old ImageMap - Better support for running behind proxies with x-forwarded-for header - Request cycle listeners make it easier to integrate frameworks in your Wicket application - Consistent naming: methods with Javascript in the name have been renamed to use proper capitalization: JavaScript - Switching to HTTPS is as simple as configuring a new root mapper to make Wicket HTTPS aware and annotating a page with @RequireHttps A longer list of changes and improvements can be found in our migration guide. Inter-component events -- Wicket 1.5 offers a simple, yet flexible, way for component to communicate with each other in a decoupled manner. The two major interfaces that facilitate this are: /** * Objects that can send events */ public interface IEventSource { T void send(IEventSink sink, Broadcast broadcast, T payload); } and /** * Objects that can receive events */ public interface IEventSink { /** * Called when an event is sent to this sink */ void onEvent(IEvent? event); } The classes that implement these interfaces, and can thus participate in the event mechanism are: Component, RequestCycle, Session, and Application. The mechanism allows for different event broadcast methods defined here: /** * Defines the event broadcast type. */ public enum Broadcast { BREADTH, DEPTH, BUBBLE, EXACT; } There is an example in wicket-examples which demonstrates the usage of this. Applications can register custom event dispatchers in FrameworkSettings; the dispatchers can be used to build custom event delivery mechanisms. For example a custom IEventDispatcher mechanism can route events to annotated methods, for example: public class MyComponent extends Component { @OnEvent private void onUserAdded(UserAddedEvent event) {...} } where UserAddedEvent is the event payload object. The default Component#onEvent method will be called even if custom dispatchers are registered. A default event is raised whenever Wicket begins to create an AJAX response. The payload of the event is the AjaxRequestTarget used for event. Sample implementation: // component that always adds itself to the ajax response public class MyCompo
Re: Loading items in repeater the facebook/twiiter way
Hi, Maybe this http://code.google.com/p/jquery-images-ondemand/ and this http://api.jquery.com/scroll/ help - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loading-items-in-repeater-the-facebook-twiiter-way-tp3780809p3780975.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: Cache Wicket Pages rather than Construct New Objects
The link's action is to setResponsePage(MyPage.class), but that creates a new object. Suppose we were keeping all our Page objects in a Session. Is there a way to setResponsePage() to an existing Page instance? You can replace or extend the DefaultPageFactory (IPageFactory) Regards Hans - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Handling futures
Did you already take a look at wicketstuff-progressbar? Regards Hans Am 23.07.11 17:02 schrieb Bertrand Guay-Paquet unter ber...@step.polymtl.ca: I haven't actually done it yet, but the 3 steps you list are what I have in mind. After these, I plan to use a javascript timer that polls the status of the request and updates a label (or icon). That ajax behavior would be the one polling the Future. What I can't wrap my head around is this: the ajax behavior can't directly hold a reference to the Future because it can be serialized with the page. On the other hand, if I store the Future in a map somewhere and keep a serializable handle in the behavior, there is a possibility that the user will navigate to another page before get() is called on the Future. To avoid running out of memory, this means that I would need to have a daemon that periodically nulls stale Futures from the map so they can be garbage collected. This kind of operation (submit + polling asynchronous result) seems rather common so I'm sure there's some (easy) way to handle it... On 23/07/2011 9:14 AM, Scott Swank wrote: What does your workflow look like? 1. submit form (or ajax event) 2. create Future 3. return response page (or ajax response) Now who checks the Future and what sort of UI result occurs? Scott On Fri, Jul 22, 2011 at 8:55 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hello, I can't find the correct way to handle java.util.concurrent.Future instances returned from asynchronous methods in Wicket. This interface does not extend Serializable so its instances can't be stored in components or pages. So what do you do with them? Do you store them in a map in the application and keep a handle (e.g. an int) in the Wicket component? I saw code on a github repository that implemented an ajax timer behavior that keeps a reference to a Future in a transient field to update a status. However, I can't understand how that would work. Wouldn't the transient field be nulled out if the behavior is serialized with the page and then deserialized? Essentially, my question is: what is the standard way to handle Futures in Wicket that run longer than the page rendering? (like processing an order or sending emails) I hope I'm not missing something obvious, but that might be the case... Regards, Bertrand - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forward to Bookmarkable
You can setResponePage or throw one of the RestartResponse*-Exceptions Regards Hans Am 21.07.11 11:19 schrieb Lurtz Nazgul unter lu...@ymail.com: I also tried WebRequestCycle cycle = (WebRequestCycle) RequestCycle.get(); ServletRequest httpRequest = cycle.getWebRequest().getHttpServletRequest(); ServletResponse httpResponse = cycle.getWebResponse().getHttpServletResponse(); ServletContext context = ((WebApplication) Application.get()).getServletContext(); context.getRequestDispatcher(/mywelcome).forward(httpRequest, httpResponse); where mywelcome url is BookmarkablePage, in MyWebApplication.java this.mountBookmarkablePageWithUrlCoding(/mywelcome, Welcome.class); Thanks. From: Lurtz Nazgul lu...@ymail.com To: users@wicket.apache.org Sent: Thu, July 21, 2011 12:15:19 PM Subject: Forward to Bookmarkable Hi; How can i forward user to a BookmarkablePage. I don't need redirection. I don't want user to see url. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Drop
Hi, FeanorsCurse wrote: Instead of using the getName()-method it's using toString, despite of what is set in the property model. As far as I understand, this is because getName() returns a String and not a UserAccountEntity itself. ... Any advice? You can use a IChoiceRenderer and pass that to the DropDownChoice along with your Model and the List. The renderer is used to get the String to be displayed. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Drop-tp3613805p3614012.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: Drop
FeanorsCurse wrote: However, I still feel like that is an unnecessary step; I don't see any reason why the PropertyModel should not be enough on its own. Please correct me if I am wrong: The model passed in tells the dropdown which object from the list should be the active one shown. If you don't apply a renderer then some default is used to render the options and that is obviously toString() on each object in the list. Ergo: The result object from evaluating the model should be the same type as the objects in the list. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Drop-tp3613805p3616016.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: fter 1 minute the Pagemap null is still locked by: Thread[[ACTIVE]
You can take a look at DataTable.onPageChanged() - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/fter-1-minute-the-Pagemap-null-is-still-locked-by-Thread-ACTIVE-tp3423610p3428429.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: flexible authentication
Take a look at IAuthorizationStrategy and ist implementations. It is extremely easy to create your own implementation and make it more dynamic. The existing implementations can be used as starting point. Cheers Hans Am 29.03.11 17:51 schrieb hrbaer unter herber.m...@gmail.com: it's not about to bash the framework. Because I'm still a beginner I just want to make sure that this approach is not working for me. It seems like the demo implementation just allows two options: - need authentication - don't need authentication but there is no option to make it more flexible. What I'm interested in is if there is any chance to use out of the box functionality of wicket to solve this issue. Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/flexible-authentication-tp3415413p3 415452.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: how to populate SortableDataProvider
Hi, shouldn't the provider implement a method count() which gives the total number of records? Regards Hans Am 22.03.2011 um 19:50 schrieb sonoerin humblec...@yahoo.com: Hello everyone, So I feel there is something I am overlooking in all my work on this. I have a Wicket 1.4/Spring2.5.6/hibernate 3.2/ app that I cannot get quite right. I have a SortableDataProvider that I am trying to populate by: public class ABCTablePanel extends Panel { public ABCTablePanel (String id) { super(id); ABCProvider abcProvider = new ABCProvider(); DefaultDataTable table = new DefaultDataTable(abctable, getColumns(), abcProvider , 10); add(table); } private Listlt;IColumnlt;Abcgt; getColumns() { Listlt;IColumnlt;Abcgt; result = new ArrayListlt;IColumnlt;Abcgt;(); result.add( new PropertyColumn(new Model(Abc Description), AbcDescription, AbcDescription )); result.add( new DatePropertyColumn(new Model(Abc Date), AbcDate, AbcDate )); ... } } Then my provider: public class AbcProvider extends SortableDataProvider { private List list = new ArrayList( ); private SortableDataProviderComparator comparator = new SortableDataProviderComparator( ); @SpringBean private AbcManager abcManager = null; public AbcProvider( ) { // The default sorting setSort( abc.abcDescription, true ); } public void refresh( List list ) { list.clear( ); list.addAll( abcManager.getAllGaps( ) ); } @Override public Iterator iterator( int first, int count ) { getAllAbcs( ); // method that calls a manager, calling hibernate, and populates list List newList = new ArrayList( list ); // Sort the data Collections.sort( newList, comparator ); // Return the data for the current page - this can be determined only after sorting return newList.subList( first, first + count ).iterator( ); } @Override public IModel model( final Abc object ) { return new AbstractReadOnlyModel( ) { @Override public AbcgetObject( ) { return (Abc) object; } }; } When I run this all appears well, except the call is never made to populate the table. I just get No Records Found beneath my column names, and the debug points are never hit when I refresh or load the page. Thank you in advance for any help you can offer. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-populate-SortableDataProvider-tp3397372p3397372.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: update label using (Ajax)Link
Ernesto Reinaldo Barreiro-4 wrote: final Label vorname = new Label( Vorname, new PropertyModel(selectedEintrag, vorname)); This option will not work because: selectedEintrag = item.getModelObject(); The reference selectedEintrag is overwritten. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/update-label-using-Ajax-Link-tp3356575p3356751.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: update label using (Ajax)Link
Ernesto Reinaldo Barreiro-4 wrote: Yes you are right... but I think new PropertyModel(this, selectedEintrag.vorname) will work I guess. I guess you are right. That will work, but it is not very elegant to put a reference to the page or panel into the model. He probably should not overwrite the reference on selectedEintrag or use the readonly model you suggested. I think I would put a new Model() into the label and then, instead of overwriting the variable selectedEintrag, call label.setModelObject(item.getModelObject().getVorname()) - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/update-label-using-Ajax-Link-tp3356575p3357001.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: [VOTE] WICKET-3218 - Component#onInitialize is broken for Pages
+1 for making Page.onInitialize() non-final. Since 1.4.12 we have migrated a lot of code moving construction of the component hierarchies to onInitialize. We are really very happy with the way it is now in 1.4. +1 for clear documentation/Javadoc explaining proper use of onInitialize. (Developers who don't want to follow that explanation do also not have to be protected agains themselves) -1 for throwing an exception if add(..) is called from within a constructor (but maybe logging a warning instead?) I would also not have a problem with an alternative onInitialize()-method for the Pages. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/VOTE-WICKET-3218-Component-onInitialize-is-broken-for-Pages-tp3341090p3341741.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: Attribute Inheritance or Copying?
I've to access the ComponentTag of my Panel but dont know how, except iam in onComponentTag. Yes, in onComponentTag of the surrounding WebmarkupContainer, you can get and preserve the desired attributes and then remove them. In onComponentTag of the TextArea you add the previously preserved attributes. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Attribute-Inheritance-or-Copying-tp3332828p014.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: Integrating jquery scripts with wicket
Maybe you can find something here: http://www.google.de/#q=wicket+jquery+integrationfp=1 - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Integrating-jquery-scripts-with-wicket-tp3332998p234.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: German umlauts in Wicket-Message Tag
MattyDE wrote: But we now realize that its not the umlauts which create problems. its the We was using but wicket interprets the first inside the key-Attribute as closing tag. This is a bug right? Hi, I think it is generally good practice to not use special characters like Umlauts inside technical aspects. Why not just or something similar? - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/German-umlauts-in-Wicket-Message-Tag-tp3331297p3331395.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: IHeaderContributor problem - How to render the page css after all css styles from components
Poko Booth wrote: Can't you just use !important at page CSS definition to override what the component defines as default? !important is not recognized by all browsers (IE6 for instance) - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/IHeaderContributor-problem-How-to-render-the-page-css-after-all-css-styles-from-components-tp3331401p3331534.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: IHeaderContributor problem - How to render the page css after all css styles from components
Ernesto Reinaldo Barreiro-4 wrote: Is that really a stopper? Well, that depends on the demands of the OP. IE6 is still used in many big companies (and because IE6 is buggy concerning !important, it can be (mis)used for nice CSS-hacks) But what if the !important-directive is already used somewhere and the user wants to override it? The result will be unpredictable: file1.css: width: 200px; !important; userfile.css: width: 150px; !important; file2.css width: 100px; What will be the result? And what happens if the order changes? - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/IHeaderContributor-problem-How-to-render-the-page-css-after-all-css-styles-from-components-tp3331401p3331677.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: how to access component values within a dynamic table?
Not tested, but this is the way it should work (more or less...) public class MyBean { String question; String answer; // plus Getters and Setters... } public class Test extends WebPage { public Test() { add( new TestForm( TestForm ) ); } @SuppressWarnings(serial) public final class TestForm extends FormMyBean { public TestForm( final String id ) { super(id); final ArrayListMyBean list = new ArrayListMyBean(); list.add(new MyBean(Frage 1); list.add(new MyBean(Frage 2); add( new ListViewMyBean( ListFragen, list ) { protected void populateItem(ListItemMyBean item) { item.add(new Label(Frage, new PropertyModel(item.getModel(), question)); item.add(new Input_Panel(Input, new PropertyModel(item.getModel(), answer))); } }); public final void onSubmit() { for (MyBean bean : list) { log.debug(bean); // See what the user entered } } } } } - -- Regards, Hans http://www.cantaa.de http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-access-component-values-within-a-dynamic-table-tp3310939p3318961.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: how to access component values within a dynamic table?
As already mentioned before: you don't have to care about it. Wicket does. The only thing you do is setting up the property models. In onSubmit you read the model resp the original list. The data entered by the user will be there. Try it! Am 21.02.2011 um 09:00 schrieb hrbaer herber.m...@gmail.com: No idea how to deal with multiple panels within a listView (because of the name clash)? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-access-component-values-within-a-dynamic-table-tp3310939p3316929.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: how to access component values within a dynamic table?
hrbaer wrote: In a fit of despair I tried to replace my ListView component with a RepeatingView component to access either my ListFragen or Frage/Input - unfortunatelly without success :( If you use a RepeatingView you can add any Component to it (I think) so erzeugeEingabeFeld(..) could then create the appropriate component. Alternatively you could create a panel for each possible component and let erzeugeEingabeFeld(..) return one of those panels (CheckboxPanel, TextInputPanel, etc). This is an approach we followed ourselves. Initially a lot of work, I know... I'm still wondering why I can't get the RepeatingView/ListView within the onSubmit method!? This component is defined the same way as e.g. the Textfield Vorname. But once I use getModelObject() within the onSubmit method I only see Vorname, Nachname and Email?! Why do you want to have access to that component? You have access to your katalog.getFragen() don't you? And that is where the entered data should be landed after the user pressed Submit. That is, if you use your components with the appropriate Models of course. PropertyModel is still your friend in my opinion. Instead of: String htmlCodeInputfield = erzeugeEingabefeld( q ); you get something like: FormComponent inputField = erzeugeEingabefeld(wicketId, q); item.add(inputField); private FormComponent erzeugeEingabefeld(id, Question q) { if (inputFieldNeeded()) { return new TextField(id, new PropertyModel(q, input)); } if (checkboxNeede()) { return new Checkbox(id, new PropertyModel(q, flag)); } ... etc } - -- Regards, Hans http://www.cantaa.de http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-access-component-values-within-a-dynamic-table-tp3310939p3312281.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: how to access component values within a dynamic table?
String htmlCodeInputfield = erzeugeEingabefeld( q ); Label label = new Label( Input, htmlCodeInputfield ); label.setEscapeModelStrings( false ); item.add( label ); Use a textfield instead of plain html. Bind it to a dynamic model like PropertyModel and the leave the rest to Wicket. In onSubmit the beans in your Katalog will contain the entered values. Something like: item.add(new TextItem(Input, new PropertyModel(q, antwort))); Apart from that how can I tell the components apart within my onSubmit method? Because of the fact that all have the same wicket:id (Frage or Input) how can I access each of them separate? I think there is no need for that if you use Models the right way. You are interested in what the user enters aren't you? You don't need to care about the components and getting/putting data from/to them. That's Wicket's concern. In onSubmit, just iterate through your FragenKatalog and you will see that every instance of Question has the entered answer filled in. - --nbsp; Regards, Hans http://www.cantaa.de http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-access-component-values-within-a-dynamic-table-tp3310939p3311134.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: how do I get the selected entity of a table
hrbaer wrote: ... protected void populateItem( ListItemEntity item ) { final Entity e = item.getModelObject(); item.add( new Label( text, e.getName() ) ); e not null? item.add( new Link( Details_Link ) { @Override public void onClick() { label.setVisible( true ); selectedEntity = e; // but e is null How is that possible if e not null before? selectedEntity = item.getModelObject(); (though I doubt if this is good practice. I prefer to use Models where possible) } }); } }); } --- - --nbsp; Regards, Hans http://www.cantaa.de http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-do-I-get-the-selected-entity-of-a-table-tp3306749p3308481.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: how do I get the selected entity of a table
hrbaer wrote: I'm trying to get the entity of the choosen row. Can someone provide me how do achieve that? Thanks in advance! protected void populateItem( ListItemEntity item ) { final Entity entity = item.getModelObject(); // cast not needed item.add( new Label( text, e.getName() ) ); item.add( new Link( Details_Link ) { @Override public void onClick() { label.setVisible( true ); // how do I get the selected entity? // selectedEntity = ??? entity.doSomethingWithMe(); // Use it here } }); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-do-I-get-the-selected-entity-of-a-table-tp3306749p3306816.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: how do I get the selected entity of a table
Hi, James Carman wrote: For safety, you probably want to get the entity from the item again, right? Why would that be safer? You mean in case the item's ModelObject has been replaced somewhere? Cheers Hans -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-do-I-get-the-selected-entity-of-a-table-tp3306749p3306995.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: how do I get the selected entity of a table
James Carman wrote: No, I mean in case the model is a LDM and they would be getting a fresh copy of the entity from the database, as opposed to a detached one. Thanks James, that's a good hint - -- Regards, Hans http://cantaa.de Voetbal is heel erg simpel. Het moeilijkste aan voetbal is, simpel te spelen (J.Cruyff) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-do-I-get-the-selected-entity-of-a-table-tp3306749p3307102.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: cleanup form values and feedback messages
Hi, hrbaer wrote: ... try { pm.makePersistent( ent ); modal.show( target ); target.add(feedback); === I guess this was missing } - You need to add the feedback to the target on success as well Cheers Hans -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/cleanup-form-values-and-feedback-messages-tp3275588p3297033.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: setResponsePage weirdness
syg6 wrote: ... setResponsePage(SecondPage.class) in FirstPage's constructor is called the url remains: http://localhost:8080/myapp/first when I am actually now on SecondPage? But when I call setResponsePage(ThirdPage.class) from SecondPageForm's onSubmit() (SecondPage contains SecondPageForm), the url is: http://localhost:8080/myapp/third I've tried sticking setRedirect(true) in a few places but that seems to mess up my custom session; my custom session is constantly reset, previous info stored in the session is wiped out. I've also tried using setResponsePage(new SecondPage()) but it doesn't seem to change the url and SecondPage.html breaks, it's telling me none of my form components are present! throw a RestartResponseException or a RestartResponseAtInterceptPageException (I always forget which is the right one) instead of setResponsePage Cheers Hans -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/setResponsePage-weirdness-tp3248650p3253687.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: Best practice on i18n
The only relevant technical point here is Inheritance. If Component A inherits Component B, then the properties would have to be repeated in the property file corresponding to the inherited Component as i don't think properties follow inheritance rules (imo). Component B inherits the resources of Component A as well. You do not have to repeat A's properties. Cheers Hans - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Best practice on i18n
Hi, After some trying we found a good practice is: - Self contained independant components have their own resource file - a page has its own file which also contains the keys for the panels on that page (as long as those panels are not being reused on other pages and are in the same package, otherwise those panels are treated as components) - common strings like save, cancel are stored in a resource file with the base page Cheers Hans Am 29.01.2011 um 09:03 schrieb Christian Grobmeier grobme...@gmail.com: Hello, I have read and understand about i18n but I am curious about best practices. Is it really a good option to have several language files per component? snip... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What already redirecting error?
I think Form.replace() is your friend Cheers Hans Am 13.01.2011 um 20:17 schrieb Arjun Dhar dhar...@yahoo.com: Hi, I have a very very Dynamic Form. In the public void onSubmit() {...}, due to some Change in a Drop Down the entire Form changes. To keep it simple I just decided to Re-Load the entire page. but looks like from onSumbit() you cannot call getRequestCycle().redirectTo(...) or you get the exception: Already redirecting to '?wicket:interface=:12'. Cannot redirect more than once. Frankly, I'd like to replace the Form Components in the OnSubmit() given a Choice instead of a redirect. But addOrReplace components in the Form doesnt have any effect. Apparently, only Changing the Model of Components already added works! Q1) So for starts whats the best way to re load the page in this case Q2) Even Better, can I Replace Form elements in onSubmit()? ..or somewhere close? (This is better as I can use the FeedbackPanel to convey messages after the form has changed) thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/What-already-redirecting-error-tp1890181p3216471.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: Localized mount points for BookmarkablePages?
Hi, you van pass a list with alternates to the mount-annotation. Same can be done on mounting programmatically. Regards Hans Am 23.12.2010 um 12:29 schrieb Thomas Götz t...@richmountain.de: Hi, is it possible to have localized mount points for BookmarkablePages? Example: I have a BookmarkablePage GeneralPage.java which should be available under http://my.domain.com/General and http://my.domain.com/Allgemein (german) ... depending on the current locale. Is this possible? If yes, could someone point me into the right direction? Cheers, -Tom - 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: Hellp for URL Mounting Strategy
Hi, I want to that: the ArticleFeedListPage must be served when url is /article/list the ArticleViewPage must be served when url is /article/view for the tagcloud, the url must be /article/tag/java You have 3 Pages and mount each one to a different URL: @MountPath(path = /article/tag/java) @MountPath(path = /article/view) @MountPath(path = /article/list) And eventuell extend with @MountMixedParam(parameterNames = {articleNo}) Regards Hans Am 19.12.10 15:51 schrieb Taner Diler unter jtdde...@gmail.com: Hi all, I have two pages: ArticleViewPage and ArticleFeedListPage. I have tag cloud component. When the tag is clicked, thhe ArtickeFeedListPage responses as filtered result. I mounted ArticleFeedListPage as mountBookmarkablePage(articles, ...) I mountes ArticleViewPage as mountBookmarkablePage(Article, ...) When the tag is clicked, request is being sent to /articles/tag/java. I want to that: the ArticleFeedListPage must be served when url is /article/list the ArticleViewPage must be served when url is /article/view for the tagcloud, the url must be /article/tag/java Which components should I use and how? Thank you - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Component wiring mess in 'HomePage'
Hi, Maybe consider something like this: interface ClickController { void click(); } class YourPage extends WebPage { protected void onInitialize() { ClickController clickController = new ClickController() { void click() { doSomething(); } } } add(new YourPanel(id, clickController)); } class YourPanel extends Panel { YourPanel(String id, ClickController clickController) { ... } protected void onInitialize() { add(new AjaxButton(btnId) { protected void onClick(...) { clickController.click(); } } } } Alternatively you can let the page implement the ClickController and pass this to the panel. With this scenario the panel is reusable and independant from any clients Cheers Hans Am 08.12.10 20:39 schrieb Peter Karich unter peat...@yahoo.de: but I have a way to many panels. Maybe I will simply pass in the homePageRef everywhere and if I really need a panel in another place I will use the extension method ... Regards, Peter. - 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: Component wiring mess in 'HomePage'
Hi, I have some components and I'm wiring them together directly within a 300 lines init method in the HomePage class ** Now this method is 'a bit' lengthy and unreadable. How would you make it more maintainable? I always try to identify logical groups and delegate creation of those to separat private methods. And use Panels for reusability. Cheers Hans - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
WicketTester clickLink: Ajax-Response not rendered into the page?
Hi, I have a page processed by the wicket-tester. On the page, there is an AjaxLink. Now I do a clickLink on that AjaxLink. If I do a pagedump after the clickLink, I can see the Ajax-Response which looks good. The Response contains markup to replace an exisiting Container. Unfortunately, the container is not actually replaced in the last rendered page. If I try to get the container with getByWicketId(..) but it returns null because now that method works on the Ajax-Response from the clickLink (before the clickLink, getByWicketId(...) gives me the correct container) I guess I oversee something obvious but I am stuck here. How can I simulate a series of ajax-clicks on a page? Regards Hans
Re: Avoid getObject on Model if component not rendered
Create and add the DropDownChoice in onInitialize(). If the component is not rendered then that method will not be called (untested) @Override protected void onInitialize() { super.onInitialize(); final DropDownChoiceCustomUser usersChoice = new DropDownChoiceCustomUser(usersList, customUserModel, usersListModel, new ChoiceRendererCustomUser(username)); usersChoice.setNullValid(false); usersChoice.setModelObject(usersChoice.getChoices().get(0)); usersChoice.add(new AjaxFormComponentUpdatingBehavior(onchange) { ... Regards Hans ___ WEB.DE DSL Doppel-Flat ab 19,99 euro;/mtl.! Jetzt auch mit gratis Notebook-Flat! http://produkte.web.de/go/DSL_Doppel_Flatrate/2 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org