Re: Show Stacktrace in ErrorPage
You can add a RequestCycle listener that returns your custom page when an exception is thrown: http://blog.wizche.ch/2011/12/wicket-15custom-exception-page.html Hello, my application runs in deployment-mode and if an exception is thrown, wicket shows his internal error page without the stacktrace. Is there any possibility to show this stacktrace in this wicket error page? How can I get the stacktrace of an exception to show it in a custom error page? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 - 209 email: christoph.ma...@t-systems.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Components can no longer be added
Hi, once rendering of components via Ajax has started, you cannot update components. AbstractTree#expand() is a convenience method that updates the expanded branch automatically, hence you get the IllegalStateException. You should just add all expanded nodes to your tree's model. That's faster and won't trigger any updates: tree.getModel().addAll(addNodes); If you always start with all nodes expanded, you might want to use a custom set, which inverses its contents. See org.apache.wicket.examples.tree.FooExpansion for inspiration. Regards Sven On 12/09/2013 06:28 AM, Colin Rogers wrote: Wicketeers, I have another hard-to-track down issue. To make matters worse, I've actually taken this code/pattern, put it into a quickstart - and what do you know - it works fine...! This means I have no way to recreate this error in a demonstrable way. Hopefully if I throw this out there, someone might be able to describe the error and I can then determine what I'm doing to cause it. Unfortunately google has zero results for; +Components can no longer be added +wicket Anyway... the exception I'm getting is; java.lang.IllegalStateException: Components can no longer be added at org.apache.wicket.ajax.AbstractAjaxResponse.assertNotFrozen(AbstractAjaxResponse.java:740) at org.apache.wicket.ajax.AbstractAjaxResponse.assertComponentsNotFrozen(AbstractAjaxResponse.java:733) at org.apache.wicket.ajax.AbstractAjaxResponse.add(AbstractAjaxResponse.java:358) at org.apache.wicket.ajax.AjaxRequestHandler.add(AjaxRequestHandler.java:239) at org.apache.wicket.ajax.AjaxRequestHandler.add(AjaxRequestHandler.java:232) at org.apache.wicket.extensions.markup.html.repeater.tree.TableTree.updateBranch(TableTree.java:178) at org.apache.wicket.extensions.markup.html.repeater.tree.AbstractTree.expand(AbstractTree.java:204) at myapp.TreeUtils.expandNode(TreeUtils.java:25) at myapp.TreeUtils.expandAll(TreeUtils.java:19) It is caused when refreshing a table-tree component, that had previous rendered correctly and had successfully expanded the nodes. This problem happens when the table-trees parent component is refreshed, in which the table is rebuilt from new, and replaced the old table. Having debugged the code, it's something to do with the AjaxRequestHandler that has been retrieved - in that it's components are 'frozen'. It's odd as I'm in the onConfigure() part of the lifecycle, and therefore components should be okay to be added - especially as they are brand new components. Could the AjaxRequestHandler being retrieved be the wrong one, stale one? List I said - I can't recreate it in a Quickstart, so there is obviously something else in the 100k+s of the projects code that is doing something else to mess it up. The 'Tree Utils' class looks like this; public class TreeUtils { @SuppressWarnings(unchecked) public static void expandAll( AbstractTree? tree ) { // stupid cast!! Has to happen for use to retrieve the roots, generically. AbstractTreeObject castTree = (AbstractTreeObject) tree; Iterator? roots = tree.getProvider().getRoots(); while( roots.hasNext() ) { Object root = roots.next(); expandNode( castTree, root ); } } private static void expandNode( AbstractTreeObject tree, Object node) { tree.expand(node); Iterator? children = tree.getProvider().getChildren(node); while( children.hasNext() ) { Object child = children.next(); expandNode( tree, child ); } } } Any pointers and tips would be greatly appreciated. Cheers, Col. 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: Thanks!
We are glad you like Wicket! Keep making good software with it and spread the word! Also don't hesitate to say a good or bad word about it at Twitter, just mention #ApacheWicket. Negative feedback is also very welcome! On Fri, Dec 6, 2013 at 4:18 PM, Peter Henderson peter.hender...@starjar.com wrote: Totally agree too!. After trying several Java web frameworks, finally selected Wicket. ~2 years later and I've ported a huge legacy swing client to a very nice web app. (in Scala too. but that's another story). Many thanks guys. Peter. On 6 December 2013 13:49, Bas Gooren b...@iswd.nl wrote: Hi *, I have to say, the more I work with wicket, the happier I become. A big thank you! to both the excellent developers and those helping others on the mailing list! Wicket is a truly amazing piece of kit. Having recently played with a number of other frameworks for real production apps, wicket continues to impress me. Even after using it for years in rather big projects. I love the whole less magic is better-attitude and configurability. -- Met vriendelijke groet, Kind regards, Bas Gooren
Re: Example for presenting pdf in modal window
hey Ernesto, I could not find a new example for embedding a Pdf in wicket so i tried your code from 2009.But i always get a Null Pointer at this.resourceListener.onResourceRequested(); using your Code. Caused by: java.lang.NullPointerException at org.apache.wicket.Resource.onResourceRequested(Resource.java:120) at DocumentInlineFrame.DocumentInlineFrame.onResourceRequested(DocumentInlineFrame.java:63) ... 33 more The only thing i had to change in your example was urlFor(IResourceListener.INTERFACE, null). I am using wicket Version 6.XX Greetings, Patrick Ps.: my IDE is not filtering pdfs -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-for-presenting-pdf-in-modal-window-tp1879547p4662859.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: Example for presenting pdf in modal window
Hi, https://github.com/reiern70/antilia-bits/tree/master/content-iframe I think this is the same example ported to Wicket 6 On Mon, Dec 9, 2013 at 1:51 PM, MyScheme katerc...@web.de wrote: hey Ernesto, I could not find a new example for embedding a Pdf in wicket so i tried your code from 2009.But i always get a Null Pointer at this.resourceListener.onResourceRequested(); using your Code. Caused by: java.lang.NullPointerException at org.apache.wicket.Resource.onResourceRequested(Resource.java:120) at DocumentInlineFrame.DocumentInlineFrame.onResourceRequested(DocumentInlineFrame.java:63) ... 33 more The only thing i had to change in your example was urlFor(IResourceListener.INTERFACE, null). I am using wicket Version 6.XX Greetings, Patrick Ps.: my IDE is not filtering pdfs -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-for-presenting-pdf-in-modal-window-tp1879547p4662859.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: Example for presenting pdf in modal window
According to POM wicket.version6.6.0/wicket.version I guess it will work as well for latest wicket. On Mon, Dec 9, 2013 at 4:50 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi, https://github.com/reiern70/antilia-bits/tree/master/content-iframe I think this is the same example ported to Wicket 6 On Mon, Dec 9, 2013 at 1:51 PM, MyScheme katerc...@web.de wrote: hey Ernesto, I could not find a new example for embedding a Pdf in wicket so i tried your code from 2009.But i always get a Null Pointer at this.resourceListener.onResourceRequested(); using your Code. Caused by: java.lang.NullPointerException at org.apache.wicket.Resource.onResourceRequested(Resource.java:120) at DocumentInlineFrame.DocumentInlineFrame.onResourceRequested(DocumentInlineFrame.java:63) ... 33 more The only thing i had to change in your example was urlFor(IResourceListener.INTERFACE, null). I am using wicket Version 6.XX Greetings, Patrick Ps.: my IDE is not filtering pdfs -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-for-presenting-pdf-in-modal-window-tp1879547p4662859.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 -- Regards - Ernesto Reinaldo Barreiro
Re: Show Stacktrace in ErrorPage
In your application init() method add : getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_EXCEPTION_PAGE); Regards, Gabriel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Show-Stacktrace-in-ErrorPage-tp4662842p4662863.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
response headers in Wicket 6
Hi, I'm converting one of our apps from 1.4.7 to 6.12. the old code extended WebResource. I changed it to extend ByteArrayResource. I changed setheaders to setResponseHeaders. But the code inside, I am not sure how to change to Wicket 6 as the parameters are very different. @Override protected void setResponseHeaders(AbstractResource.ResourceResponse data, IResource.Attributes attributes) { super.setResponseHeaders(data, attributes); response.setAttachmentHeader(defaultFileName); response.setHeader(Cache-Control, No-Cache); response.setHeader(Cache-Control, No-Store); } How can I adapt the last three lines to Wicket 6? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/response-headers-in-Wicket-6-tp4662864.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: response headers in Wicket 6
Second question (the first is still open), in 1.4.7 the page object supported a removePersistedFormData() method and the TextField has a method setPersistent() on it. Both appear gone, and I don't see anything in the6 or 1.5 conversion guides about them. What is the replacement? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/response-headers-in-Wicket-6-tp4662864p4662866.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: response headers in Wicket 6
For the last two lines : data.getHeaders().addHeader(key, value); or ((WebResponse) attributes.getResponse()).addHeader(key, value); for response.setAttachmentHeader(defaultFileName); (from WebResponse.java) setHeader(Content-Disposition, attachment + ((!Strings.isEmpty(filename)) ? (; filename=\ + filename + \) : )); François Meillet Formation Wicket - Développement Wicket Le 9 déc. 2013 à 20:46, Entropy blmulholl...@gmail.com a écrit : Hi, I'm converting one of our apps from 1.4.7 to 6.12. the old code extended WebResource. I changed it to extend ByteArrayResource. I changed setheaders to setResponseHeaders. But the code inside, I am not sure how to change to Wicket 6 as the parameters are very different. @Override protected void setResponseHeaders(AbstractResource.ResourceResponse data, IResource.Attributes attributes) { super.setResponseHeaders(data, attributes); response.setAttachmentHeader(defaultFileName); response.setHeader(Cache-Control, No-Cache); response.setHeader(Cache-Control, No-Store); } How can I adapt the last three lines to Wicket 6? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/response-headers-in-Wicket-6-tp4662864.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