Multiple wicket applications in a single WAR
Hi I have a web app where clients can log in as well as third party users. To do this I implemented 2 wicket applications (both extending AuthenticatedWebApplication) to keep the authentication and sessions separate from each other. The two are separated in web.xml with separate servlet mappings like so: servlet servlet-namewicket.servlet/servlet-name servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valueza.co.MyNormalWebApplication/param-value /init-param /servlet servlet servlet-namewicket.servlet.thirdParty/servlet-name servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valueza.co.MyThirdPartyWebApplication/param-value /init-param /servlet servlet-mapping servlet-namewicket.servlet/servlet-name url-pattern/app/*/url-pattern /servlet-mapping servlet-mapping servlet-namewicket.servlet.thirdParty/servlet-name url-pattern/thirdParty/*/url-pattern /servlet-mapping It all works fine and I am happy with how It works But for some wierd reason wicket gets confused. It starts mapping incorrectly, and if I come in on /app it serves up the third party application/session/login screen and vice versa This happens with no apparent reason and once its stars doing it, it doesn't stop. So the app will work fine for days, with no issues, then out of the blue it starts doing it and only recovers after a server restart We are running WebSphere Application Server 6.1 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-wicket-applications-in-a-single-WAR-tp3066793p3066793.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: Concerning changing image onsubmit
Hi Igor, Thanks for the reply...i found IndicatingAjaxButton that i could use. It almost does what i want, it adds the busy button next to the submit button. I now need to disable the original button. I tried this without any luck: http://wicketbyexample.com/disabling-an-ajax-submit-button/ Do you know how to add an attribute like: style=display: none; to the original submit button on the fly, when click. I mean what behavior to use/implement? Best Regards Muro On Tue, Nov 30, 2010 at 5:27 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: write a behavior that adds javascript to the button that does that. -igor On Tue, Nov 30, 2010 at 3:07 AM, Muro Copenhagen copenha...@gmail.com wrote: Hi, I want to change the button image to a ajaxloader image, after the user clicks on submit, and there are no feedback errors. It has to work both on a regular button and on a ajax button. Any suggestions on how to make this work? Best Regards Muro - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
URLs using wicket wizard
I am rather new to Wicket, still I am building an application using the Wizard-functionality, since this is very suitable for the app. The app consists of several modules, implemented as wizards. Each wizard obviously has a number of steps, using the WizardStep, which is a panel. This works fine, but as an example I would like to have the url for a single step look like this: /module1/step1, instead of /?wicket:interface=:26. I mount each wizard as a page, so the url then looks nice. But when step two is accessed, the url is the strange one. I do not want to destroy the functionality that Wicket gives such as regarding the pagemap, therefore I am reluctant to making too much on my own. I have searched the forum, but haven't found anything that really helps me. I would be grateful for any help. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/URLs-using-wicket-wizard-tp3066862p3066862.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: Concerning changing image onsubmit
ajaxButton.add(new AttributeAppender(onclick, true, this.disabled='disabled')); On Wed, Dec 1, 2010 at 9:53 AM, Muro Copenhagen copenha...@gmail.comwrote: Hi Igor, Thanks for the reply...i found IndicatingAjaxButton that i could use. It almost does what i want, it adds the busy button next to the submit button. I now need to disable the original button. I tried this without any luck: http://wicketbyexample.com/disabling-an-ajax-submit-button/ Do you know how to add an attribute like: style=display: none; to the original submit button on the fly, when click. I mean what behavior to use/implement? Best Regards Muro On Tue, Nov 30, 2010 at 5:27 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: write a behavior that adds javascript to the button that does that. -igor On Tue, Nov 30, 2010 at 3:07 AM, Muro Copenhagen copenha...@gmail.com wrote: Hi, I want to change the button image to a ajaxloader image, after the user clicks on submit, and there are no feedback errors. It has to work both on a regular button and on a ajax button. Any suggestions on how to make this work? Best Regards Muro - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: URLs using wicket wizard
What type of URLCodingStrategy do you use? IMHO the HybridURLCodingStrategy should do what you want Best Am 01.12.10 10:13, schrieb bamse: I am rather new to Wicket, still I am building an application using the Wizard-functionality, since this is very suitable for the app. The app consists of several modules, implemented as wizards. Each wizard obviously has a number of steps, using the WizardStep, which is a panel. This works fine, but as an example I would like to have the url for a single step look like this: /module1/step1, instead of /?wicket:interface=:26. I mount each wizard as a page, so the url then looks nice. But when step two is accessed, the url is the strange one. I do not want to destroy the functionality that Wicket gives such as regarding the pagemap, therefore I am reluctant to making too much on my own. I have searched the forum, but haven't found anything that really helps me. I would be grateful for any help. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: URLs using wicket wizard
Even better IndexedHybridUrlCodingStrategy to see stepN as parameter On Wed, Dec 1, 2010 at 10:17 AM, Korbinian Bachl - privat korbinian.ba...@whiskyworld.de wrote: What type of URLCodingStrategy do you use? IMHO the HybridURLCodingStrategy should do what you want Best Am 01.12.10 10:13, schrieb bamse: I am rather new to Wicket, still I am building an application using the Wizard-functionality, since this is very suitable for the app. The app consists of several modules, implemented as wizards. Each wizard obviously has a number of steps, using the WizardStep, which is a panel. This works fine, but as an example I would like to have the url for a single step look like this: /module1/step1, instead of /?wicket:interface=:26. I mount each wizard as a page, so the url then looks nice. But when step two is accessed, the url is the strange one. I do not want to destroy the functionality that Wicket gives such as regarding the pagemap, therefore I am reluctant to making too much on my own. I have searched the forum, but haven't found anything that really helps me. I would be grateful for any help. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: URLs using wicket wizard
Thanks for a really quick aswer. For mounting the wizards I use QueryStringUrlCodingStrategy. I'll take a closer look at HybridURLCodingStrategy and will come back. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/URLs-using-wicket-wizard-tp3066862p3066877.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: UrlRewrite rule and Wicket
The code in Wicket 1.4.14 is the same. There is still lines that causes problem: if (!Strings.isEmpty(forwardUrl)) { // If this is an error page, this will be /mount or /?wicket:foo relativeUrl = forwardUrl.substring(1); relativeUrl = relativeUrl.substring(filterPath.length()); } And I still need my workaround. It seems that nothing outside wicket can redirect links - without breaking Wicket lifecycle. Even with workaround I cannot create outbound rule, because then pages lose state. I would prefer not to create my own url coding strategy, as the exact form of the link is constructed outside Wicket... On Tue, Nov 30, 2010 at 6:11 PM, Krzysztof Kowalczyk kowalczyk.krzysz...@gmail.com wrote: Ok, thanks, I will try it tomorrow On Tue, Nov 30, 2010 at 6:07 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: upgrade to 1.4.14 because that code looks different for me. -igor On Tue, Nov 30, 2010 at 9:03 AM, Krzysztof Kowalczyk kowalczyk.krzysz...@gmail.com wrote: We use Wicket 1.4.12. On Tue, Nov 30, 2010 at 5:43 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: you must be using an old wicket version...upgrade to latest 1.4.x -igor On Tue, Nov 30, 2010 at 8:34 AM, Krzysztof Kowalczyk kowalczyk.krzysz...@gmail.com wrote: As I have already written in previous mail (pointing to exact line that cause the errors) - Wicket is falling because it handles forwardUrl in incorrect way. It tries to remove / and filterPath from forwardUrl even though forwardUrl does not contain filterPath. I guess that it is because of an assumption that only wicket exists in application and no other framework has influence on forwardUrl. I don't know what are other cases that are handled by those lines, but forwardUrl can have any value and Wicket assume some concrete value. On Tue, Nov 30, 2010 at 5:24 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: first figure out why its failing - why is wicket generating a wrong url, and then you can determine if its a bug in wicket or somewhere in your configuration. -igor On Tue, Nov 30, 2010 at 2:21 AM, Krzysztof Kowalczyk kowalczyk.krzysz...@gmail.com wrote: Hi, We have existing urls in a form: /long,and,complex,title,id/new_opinion /long,and,complex,title,id/something or sometimes /long,title/id/new_opinion The links like /long,and,complex,title are managed by fast and scalable view, and are stateless. Now we are using Wicket in the same war. It is mounted to /cms. We are trying to replace forms, that are pure evil in the first technology with wicket based forms. But we need to keep the links untouched. So I created UrlRewrite (http://www.tuckey.org/urlrewrite/) rules: urlrewrite use-query-string=true rule from^/(.*),(\d+)/new_opinion$/from to/cms/new_opinion/id/$2/url/$1/to /rule rule from^/(\?wicket.*)/from to/cms/$1/to /rule ... I have a wicket page - that is mounted on /new_opinion with enhanced HybridUrlCodingStrategy with: - redirectOnBookmarkableRequest = false First rule forwards the request to proper place. Wicket gets the correct requestUri and all the stuff. But the rule does not work if we have redirectOnBookmarkableRequest = true because Wicket constructs wrong urls in ServletWebRequest.getRelativePathPrefixToWicketHandler : if (!Strings.isEmpty(forwardUrl)) { // If this is an error page, this will be /mount or /?wicket:foo relativeUrl = forwardUrl.substring(1); relativeUrl = relativeUrl.substring(filterPath.length()); } before this fragment Wicket has correct link, after this we get: g,and,complex,title,id/new_opinion, or errors (sometimes the link is shorter and I get array index out of bounds). If method does not throw exception it returns wrong number of ../ . Unfortunately redirectOnBookmarkableRequest = false does not solve the problem as the second rule catches Wicket that are redirected if they hit bookmarkable page. So this fragment need to be fixed in order to have working bookmarkable links with UrlRewrite. My temporary workaround is custom delegating WebRequest with small hack: public String getRelativePathPrefixToWicketHandler() { HttpServletRequest httpRequest = getHttpServletRequest(); String forwardUrl = (String)httpRequest.getAttribute(javax.servlet.forward.servlet_path); final String filterPath = (String)httpRequest.getAttribute(WicketFilter.FILTER_PATH_ATTR); if (!Strings.isEmpty(forwardUrl)) { int count = forwardUrl.split(/).length; String string = ; for (int i = 1; i count; i++) { string += ../; } return string + filterPath; }else {
Re: [OT] Plugin WicketForge 0.8.1 available for IDEA 9+
cool! this is definitely not off topic :) On Tue, Nov 30, 2010 at 8:27 PM, Minas Manthos minas.mant...@gmail.comwrote: WicketForge 0.8.1 is available for download. -Facet detection implemented -Highlight Wicket components -... full change notes http://plugins.intellij.net/plugin/?id=1545 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/OT-Plugin-WicketForge-0-8-1-available-for-IDEA-9-tp3066018p3066018.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 -- Best regards, Paul Szulc http://www.paulszulc.com
Re: How to enable/disable an hierarchy?
Using onConfigure doesn't help much. If I disable the common parent, and call setEnabled in onConfigure in the few components I want visible, the components will still be disabled during the rendering phase because onComponentTag calls isEnabledInHierarchy. I could override onConfigure in every component, and read the field that controls the enabling/disabling, but that would create a lot of boilerplate code for the 80-90% of FormComponents/links that should be disabled. It would be a lot cleaner to disable the parent, and only handle the ones I want enabled. --einar On Wed, Dec 1, 2010 at 1:21 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: have a field in the page that controls whether or not these components should be enabled/disabled, then override their onconfigure() methods and setenable/disabled based on the field. -igor On Tue, Nov 30, 2010 at 3:17 PM, Einar Bjerve einar.bje...@gmail.com wrote: Hi all, How can we enable/disable almost an entire hierarchy under certain circumstances, while still keeping some of them open for editing/clicking? The obvious solution would be to enable/disable the ancestor and override isEnabledInHierarchy for the few components that should still be enabled, but it's final so can't do that. We also tried writing a behavior that traversed all children and set the affected FormComponents/Links to disabled. But that didn't work either. We can't do it in beforeRender() because the render phase has started when it is called and then setDisabled will fail. And we can't do it in bind() since some of the children to be disabled is FormComponents in a DataView, and children of a DataView isn't added until onBeforeRender - so they aren't available yet. Overriding isEnabled in every component that should be disabled isn't really an option either, due to the amount of components affected. Any suggestions? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to enable/disable an hierarchy?
I could override onConfigure in every component, and read the field that controls the enabling/disabling, but that would create a lot of boilerplate code for the 80-90% of FormComponents/links that should be disabled. It would be a lot cleaner to disable the parent, and only handle the ones I want enabled. Sounds like you want to use a Component.IVisitor on the parent, which deals with enanbling/disabling subcomponents based on some state. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Two AutoCompleteTextFields and ajax.
Hello everyone. I have problem with two AutoCompleteTextFields and ajax. There is form which contains only two AutoCompleteTextFields. The list of values on the second field is limited depending on the value of the first field. So if you change value of first field, the second field should be refresh. Below is source code of this form: final ModelString m1 = new ModelString(); AutoCompleteTextFieldString t1 = new AutoCompleteTextFieldString(t1, m1, settings) { ListString values; @Override protected IteratorString getChoices(String input) { values = new LinkedListString(); for (int i = 0; i 20; i++) {// I create the list of example values values.add(input + + i); } return values.iterator(); } }; final ModelString m2 = new ModelString(); final AutoCompleteTextFieldString t2 = new AutoCompleteTextFieldString(t2, m2, settings) { ListString values; @Override protected IteratorString getChoices(String input) { values = new LinkedListString(); // I create the second list of example values which are depedent on the value of the first field for (int i = 0; i 20; i++) { values.add(input + + i + - + m1.getObject()); } return values.iterator(); } }; t1.add(new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(AjaxRequestTarget art) { m2.setObject(null); art.addComponent(t2); } }); The problem occurs when I am executing the following scenario: 1. I write some text into the first field. 2. I write some text into the second field. 3. I clear first field's input and I click 'Tab' to set foucs on the second textfield. 4. I write some text into the second field. Now, there is impossible to select value from list of values using mouse. Could you have any Idea how to resolve this problem with mouse? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Two-AutoCompleteTextFields-and-ajax-tp3067005p3067005.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
implicit key in PageParameter ?
Hi , I wonder how to build an implicit key when a Page is mountBookmarkablePage() ? Suppose I have a TagPage , that accepts a parameter : name , and if the TagPage is mounted to /tag prefix The url will look like : http://foobar.com/app/tag/name/abc I feel the name is redundant I hope I can achieve shorter url like this : http://foobar.com/app/tag/abc http://foobar.com/app/tag/other Is is possible ?
WebMarkupContainer update affecting scrollbar which is outside container
I have an issue whereby an ajax update on a WebMarkupContainer is having unexpected effect on content outside the container. The page in question consists of two parts: 1. on the left hand side, a menu, composed of a list of AjaxFallbackLink objects. This is contained in a DIV. 2. on the right hand side, a panel, which itself is contained in a WebMarkupContainer. Here is standard behavior: When a link is clicked, it's color changes to indicate it is selected (achieved by using AttributeModifier to change the css class). Also, the content of the panel changes. Works fine. Here is the issue: when the ul/ul list is long, a scrollbar appears in the DIV surrounding it (which is correct). I want to avoid the scrollbar moving back to the top of the list when an item is clicked, so rather than doing an update on the whole page, I use ajax to update just: 1. The selected link 2. The previously selected link 3. The WebMarkupContainer containing the panel (which will now have new content). If I just do an update on the two AjaxFallbackLink objects, there is no problem, and the DIV does not scroll back to the top. However, when I do an update on the WebMarkupContainer, the DIV does scroll back to the top - even though the DIVulli/il/ulDIV is outside the WebMarkupContainer. Here is the snippet from the html: wicket:panel div wicket:id=pageContainerdiv class=mainPageDiv wicket:id=mainPage/div/div div class=menuDiv ul li class=mainMenuItem wicket:id=topItem_CM_Information/li li class=subMenuItem wicket:id=subItem_holdings # /li li class=subMenuItem wicket:id=subItem_holdings_at_day_end # /li li class=subMenuItem wicket:id=subItem_holdings_update # /li /ul /div /wicket:panel (I have removed most of the list items for the sake of brevity). Here is a snippet from the java: Panel mainPage = new SimplePage(mainPage); mainPageContainer = new WebMarkupContainer(pageContainer); mainPageContainer.setOutputMarkupId(true); add(mainPageContainer); mainPageContainer.add(mainPage); The list items are then added as AjaxFallbackLink objects. As always, help greatly appreciated ! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WebMarkupContainer-update-affecting-scrollbar-which-is-outside-container-tp3067035p3067035.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
Wicket link with no server side consequences
Hello there; I would like to create a wicket link (it has a client side and a serverside component) that only executes a javascript code but never sends any requests to the server, is it possible. Am thinking of adding a javascript function that returns false , and on serverside implementation, i just put nothing to be executed. It smells like a hack though. Is there a way of doing this? hope the question is clear . Regards. Josh.
Re: implicit key in PageParameter ?
See Indexed** UrlCodingStrategies On Wed, Dec 1, 2010 at 11:52 AM, smallufo small...@gmail.com wrote: Hi , I wonder how to build an implicit key when a Page is mountBookmarkablePage() ? Suppose I have a TagPage , that accepts a parameter : name , and if the TagPage is mounted to /tag prefix The url will look like : http://foobar.com/app/tag/name/abc I feel the name is redundant I hope I can achieve shorter url like this : http://foobar.com/app/tag/abc http://foobar.com/app/tag/other Is is possible ?
Re: Wicket link with no server side consequences
use a webmarkupcontainer and a attribute modifier, or if you want to reuse it, extend webmarkupcontainer and modify the attributes directly. Martijn On Wed, Dec 1, 2010 at 12:04 PM, Josh Kamau joshnet2...@gmail.com wrote: Hello there; I would like to create a wicket link (it has a client side and a serverside component) that only executes a javascript code but never sends any requests to the server, is it possible. Am thinking of adding a javascript function that returns false , and on serverside implementation, i just put nothing to be executed. It smells like a hack though. Is there a way of doing this? hope the question is clear . Regards. Josh. -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to enable/disable an hierarchy?
Thanks, finally got it to work. By overriding parentPanel.onBeforeRender(), and visit the children I was able to enable/disable child components. It is important to call super.onBeforeRender() before visiting children to populate the ListView first. I could not use onConfigure() because some of the components that should be enabled/disabled is part of a ListView, and the ListView isn't populated yet when onConfigure is called. -- Einar On Wed, Dec 1, 2010 at 11:12 AM, Wilhelmsen Tor Iver toriv...@arrive.nowrote: I could override onConfigure in every component, and read the field that controls the enabling/disabling, but that would create a lot of boilerplate code for the 80-90% of FormComponents/links that should be disabled. It would be a lot cleaner to disable the parent, and only handle the ones I want enabled. Sounds like you want to use a Component.IVisitor on the parent, which deals with enanbling/disabling subcomponents based on some state. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket link with no server side consequences
Why do you need a Link component for it if you are going to do nothing on server side? Cant you just use WebMarkupContainer if you happen to need generating JavaScipt on server side? E.g. a wicket:id=bla href=javascript:void(0) onclick=Bla/a WebMarkupContainer bla = new WebMarkupContainer(bla) bla.add(new AttributeModifier(onclick,Whatever JavaScript); ? Regards, Ernesto On Wed, Dec 1, 2010 at 12:04 PM, Josh Kamau joshnet2...@gmail.com wrote: Hello there; I would like to create a wicket link (it has a client side and a serverside component) that only executes a javascript code but never sends any requests to the server, is it possible. Am thinking of adding a javascript function that returns false , and on serverside implementation, i just put nothing to be executed. It smells like a hack though. Is there a way of doing this? hope the question is clear . Regards. Josh. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket link with no server side consequences
Thanks Ernesto, Martjn The WebMarkupContainer worked . I didnt know i would use it on a link. regards. On Wed, Dec 1, 2010 at 2:19 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Why do you need a Link component for it if you are going to do nothing on server side? Cant you just use WebMarkupContainer if you happen to need generating JavaScipt on server side? E.g. a wicket:id=bla href=javascript:void(0) onclick=Bla/a WebMarkupContainer bla = new WebMarkupContainer(bla) bla.add(new AttributeModifier(onclick,Whatever JavaScript); ? Regards, Ernesto On Wed, Dec 1, 2010 at 12:04 PM, Josh Kamau joshnet2...@gmail.com wrote: Hello there; I would like to create a wicket link (it has a client side and a serverside component) that only executes a javascript code but never sends any requests to the server, is it possible. Am thinking of adding a javascript function that returns false , and on serverside implementation, i just put nothing to be executed. It smells like a hack though. Is there a way of doing this? hope the question is clear . Regards. Josh. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OT] Plugin WicketForge 0.8.1 available for IDEA 9+
cool, looking forward to test the new versions once i 'm home ; thank you On Wed, Dec 1, 2010 at 10:43, Paul Szulc paul.sz...@gmail.com wrote: cool! this is definitely not off topic :) On Tue, Nov 30, 2010 at 8:27 PM, Minas Manthos minas.mant...@gmail.comwrote: WicketForge 0.8.1 is available for download. -Facet detection implemented -Highlight Wicket components -... full change notes http://plugins.intellij.net/plugin/?id=1545 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/OT-Plugin-WicketForge-0-8-1-available-for-IDEA-9-tp3066018p3066018.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 -- Best regards, Paul Szulc http://www.paulszulc.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: implicit key in PageParameter ?
Hi , thanks . But it seems that IndexedParamUrlCodingStrategy only accepts integer parameters. I need String value ... 2010/12/1 Martin Grigorov mgrigo...@apache.org See Indexed** UrlCodingStrategies On Wed, Dec 1, 2010 at 11:52 AM, smallufo small...@gmail.com wrote: Hi , I wonder how to build an implicit key when a Page is mountBookmarkablePage() ? Suppose I have a TagPage , that accepts a parameter : name , and if the TagPage is mounted to /tag prefix The url will look like : http://foobar.com/app/tag/name/abc I feel the name is redundant I hope I can achieve shorter url like this : http://foobar.com/app/tag/abc http://foobar.com/app/tag/other Is is possible ?
Re: implicit key in PageParameter ?
Hi I found the solution , it is MixedParamUrlCodingStrategy Thanks. 2010/12/1 smallufo small...@gmail.com Hi , thanks . But it seems that IndexedParamUrlCodingStrategy only accepts integer parameters. I need String value ... 2010/12/1 Martin Grigorov mgrigo...@apache.org See Indexed** UrlCodingStrategies On Wed, Dec 1, 2010 at 11:52 AM, smallufo small...@gmail.com wrote: Hi , I wonder how to build an implicit key when a Page is mountBookmarkablePage() ? Suppose I have a TagPage , that accepts a parameter : name , and if the TagPage is mounted to /tag prefix The url will look like : http://foobar.com/app/tag/name/abc I feel the name is redundant I hope I can achieve shorter url like this : http://foobar.com/app/tag/abc http://foobar.com/app/tag/other Is is possible ?
Re: UrlRewrite rule and Wicket
You can try the approach from http://blog.jteam.nl/2010/02/24/wicket-root-mounts/ This allows you to install a URL mounter that implements the following interface: interface RootMountedUrlCodingStrategy { boolean accepts(String rawPath); } Regards, Erik. Op 30-11-10 11:21, Krzysztof Kowalczyk wrote: Hi, We have existing urls in a form: /long,and,complex,title,id/new_opinion /long,and,complex,title,id/something or sometimes /long,title/id/new_opinion The links like /long,and,complex,title are managed by fast and scalable view, and are stateless. Now we are using Wicket in the same war. It is mounted to /cms. We are trying to replace forms, that are pure evil in the first technology with wicket based forms. But we need to keep the links untouched. So I created UrlRewrite (http://www.tuckey.org/urlrewrite/) rules: urlrewrite use-query-string=true rule from^/(.*),(\d+)/new_opinion$/from to/cms/new_opinion/id/$2/url/$1/to /rule rule from^/(\?wicket.*)/from to/cms/$1/to /rule ... I have a wicket page - that is mounted on /new_opinion with enhanced HybridUrlCodingStrategy with: - redirectOnBookmarkableRequest = false First rule forwards the request to proper place. Wicket gets the correct requestUri and all the stuff. But the rule does not work if we have redirectOnBookmarkableRequest = true because Wicket constructs wrong urls in ServletWebRequest.getRelativePathPrefixToWicketHandler : if (!Strings.isEmpty(forwardUrl)) { // If this is an error page, this will be /mount or /?wicket:foo relativeUrl = forwardUrl.substring(1); relativeUrl = relativeUrl.substring(filterPath.length()); } before this fragment Wicket has correct link, after this we get: g,and,complex,title,id/new_opinion, or errors (sometimes the link is shorter and I get array index out of bounds). If method does not throw exception it returns wrong number of ../ . Unfortunately redirectOnBookmarkableRequest = false does not solve the problem as the second rule catches Wicket that are redirected if they hit bookmarkable page. So this fragment need to be fixed in order to have working bookmarkable links with UrlRewrite. My temporary workaround is custom delegating WebRequest with small hack: public String getRelativePathPrefixToWicketHandler() { HttpServletRequest httpRequest = getHttpServletRequest(); String forwardUrl = (String)httpRequest.getAttribute(javax.servlet.forward.servlet_path); final String filterPath = (String)httpRequest.getAttribute(WicketFilter.FILTER_PATH_ATTR); if (!Strings.isEmpty(forwardUrl)) { int count = forwardUrl.split(/).length; String string = ; for (int i = 1; i count; i++) { string += ../; } return string + filterPath; }else { return wrappedReqest.getRelativePathPrefixToWicketHandler(); } } I guess it will not work in all cases though... If there is a different way of doing url rewriting? If not, I consider it a bug in Wicket. Regards, Krzysztof Kowalczyk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.4.14 Bug with panels updated by Ajax rendering a CSS
Let me know how it goes. I can't help but think this bug is related to the problem I'm seeing. -Original Message- From: Antoine Angénieux Sent: Tuesday, November 30, 2010 7:05 AM To: users@wicket.apache.org Subject: Re: Wicket 1.4.14 Bug with panels updated by Ajax rendering a CSS Nobody has any idea on the subject ? OK, I'll come up with a quickstart this WE ! Cheers, Antoine. Le 29/11/2010 15:42, Antoine Angenieux a écrit : Hi all, I have just upgraded my dev environment from Wicket 1.4.13 to 1.4.14 this morning and discovered a bug related to CSS. On a page, I have a panel containing a listview, itself populated with panels that have in their constructor: add(CSSPackageResource.getHeaderContribution(CSS)); When browsing to this page, the listview is initially empty. When the panel is updated by an Ajax Link making the listview model list not empty, the list view contents are rendered, but the CSS is not (and the reference to the css script does not appear in the Wicket Ajax Debug Window), and thus the presentation is all messed up. I just downgraded back to Wicket 1.4.13, and all is fine. I don't have time to prepare a Quickstart yet, but if anyone who has been fixing bugs on Wicket 1.4.14 has a brilliant intuition on what can cause this regression, it would be great ;) Otherwise, I'll try to find sometime later this week to file a JIRA issue with a Quickstart. Cheers, Antoine. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.4.14 Bug with panels updated by Ajax rendering a CSS
Hi Brad, I think Johan Compagner has found the issue, see the thread in dev list started a few hours ago: svn commit: r1031432 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java It looks like this is all related to that commit. I'll be waiting for Wicket 1.4.15 before upgrading my current applications from Wicket 1.4.13. Cheers, Antoine. Le 01/12/2010 15:01, Brad Grier a écrit : Let me know how it goes. I can't help but think this bug is related to the problem I'm seeing. -Original Message- From: Antoine Angénieux Sent: Tuesday, November 30, 2010 7:05 AM To: users@wicket.apache.org Subject: Re: Wicket 1.4.14 Bug with panels updated by Ajax rendering a CSS Nobody has any idea on the subject ? OK, I'll come up with a quickstart this WE ! Cheers, Antoine. Le 29/11/2010 15:42, Antoine Angenieux a écrit : Hi all, I have just upgraded my dev environment from Wicket 1.4.13 to 1.4.14 this morning and discovered a bug related to CSS. On a page, I have a panel containing a listview, itself populated with panels that have in their constructor: add(CSSPackageResource.getHeaderContribution(CSS)); When browsing to this page, the listview is initially empty. When the panel is updated by an Ajax Link making the listview model list not empty, the list view contents are rendered, but the CSS is not (and the reference to the css script does not appear in the Wicket Ajax Debug Window), and thus the presentation is all messed up. I just downgraded back to Wicket 1.4.13, and all is fine. I don't have time to prepare a Quickstart yet, but if anyone who has been fixing bugs on Wicket 1.4.14 has a brilliant intuition on what can cause this regression, it would be great ;) Otherwise, I'll try to find sometime later this week to file a JIRA issue with a Quickstart. Cheers, Antoine. - 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 - Aucun virus trouvé dans ce message. Analyse effectuée par AVG - www.avg.fr Version: 10.0.1170 / Base de données virale: 426/3290 - Date: 30/11/2010 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.4.14 Bug with panels updated by Ajax rendering a CSS
http://apache-wicket.1842946.n4.nabble.com/Re-svn-commit-r1031432-wicket-branches-wicket-1-4-x-wicket-src-main-java-org-apache-wicket-ajax-Ajaxa-tt3067178.html Ernesto On Wed, Dec 1, 2010 at 3:01 PM, Brad Grier brad.gr...@salusnovus.com wrote: Let me know how it goes. I can't help but think this bug is related to the problem I'm seeing. -Original Message- From: Antoine Angénieux Sent: Tuesday, November 30, 2010 7:05 AM To: users@wicket.apache.org Subject: Re: Wicket 1.4.14 Bug with panels updated by Ajax rendering a CSS Nobody has any idea on the subject ? OK, I'll come up with a quickstart this WE ! Cheers, Antoine. Le 29/11/2010 15:42, Antoine Angenieux a écrit : Hi all, I have just upgraded my dev environment from Wicket 1.4.13 to 1.4.14 this morning and discovered a bug related to CSS. On a page, I have a panel containing a listview, itself populated with panels that have in their constructor: add(CSSPackageResource.getHeaderContribution(CSS)); When browsing to this page, the listview is initially empty. When the panel is updated by an Ajax Link making the listview model list not empty, the list view contents are rendered, but the CSS is not (and the reference to the css script does not appear in the Wicket Ajax Debug Window), and thus the presentation is all messed up. I just downgraded back to Wicket 1.4.13, and all is fine. I don't have time to prepare a Quickstart yet, but if anyone who has been fixing bugs on Wicket 1.4.14 has a brilliant intuition on what can cause this regression, it would be great ;) Otherwise, I'll try to find sometime later this week to file a JIRA issue with a Quickstart. Cheers, Antoine. - 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: AjaxButton + Form
That sounds strange. AjaxButton implements IFormSubmittingComponent interface, hence it should first invoke its onsubmit method and then parent form's onSubmit (as described in Form class JavaDoc). Is your AjaxButton inside form's hierarchy? It is public final void onFormSubmitted() No, Form#onSubmit is not called at all. After successful execution of internal submission trace proceed to AjaxButton#onSubmit(AjaxRequestTarget target, Form? form) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.4.14 and WiQuery Tabs
This is from another thread but it sounds like the devs have found the problem (and a fix). I'm hopeful anyway! http://apache-wicket.1842946.n4.nabble.com/Re-svn-commit-r1031432-wicket-branches-wicket-1-4-x-wicket-src-main-java-org-apache-wicket-ajax-Ajaxa-tt3067178.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Updating DataTable help
I have a DataTable that lists the file names of a user as stored on the database. Once these are listed, the user has an option to upload/delete files and displaying the names of the files on the table (before I even update the database, similar to the way Multi Upload field works). At the moment I am using ajax call backs on the upload file to try to update the list that controls the datatable (this is not working) So on: void respond (final AjaxRequestTarget target) { // I add more items to the list } Is this the correct approach to do this or is there a better alternative? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Feedback panel on modal window
Hi, I have one model window with a panel atached. I added a validator to one form in model window. But when I try to submit I can't show errors. Whatching the console I found it: WARN - WebSession - Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page. I have a feedback panel on page, however I would like to have another one on modal window. But now I'm not getting any kind of message. Thanks Tito
Re: [OT] Plugin WicketForge 0.8.1 available for IDEA 9+
On Dec 1, 2010, at 4:43 AM, Paul Szulc wrote: this is definitely not off topic :) Have to agree 110%. The IntelliJ experience is made whole with this plugin. Congrats guys, and thanks for all the work! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket question
I have this wicket form I want to use wicket to pass the phone number and contact email. wicket:extend form wicket:id=test method=post action=http://www.mypage.com; input type=hidden wicket:id =phoneNumber name=phoneNumber input type=hidden wicket:id =contactEmail name=email /form /wicket:extend my question is my java code passes the correct parameters for the phone number and the contact email. but overwrites the form action and places wicket:interface=:10:opcForward::IFormSubmitListener:: I don't want this to happen I need to post these values to www.mypage.com is there a way to do this? I am using wicket 1.4.5, jdk6 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-question-tp3067609p3067609.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 HTML output of a page
cache your business logic. wicket rendering is pretty fast, i doubt that is your bottleneck. -igor On Wed, Dec 1, 2010 at 3:03 AM, andrea.castello a.castello.pronet...@gmail.com wrote: Hi, is there a way to get the HTML output of a page component and cache it somewhere (ie: a custom cache or and Ehcache object or somethink similar? I need to pre-cache HTML in order to speed up the page rendering on Ajax requests. Thanks you, Andrea -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Cache-HTML-output-of-a-page-tp3067050p3067050.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: wicket question
I took a look at the site and I have started implementing something similar. I use a normal non-wicket form on the home page that posts to my mounted wicket page with the login form on it. I mounted my login registration page to memberRegistration form method=post action=memberRegistration label for=userUser/label input id=user type=text name=user label for=pwdPassword/label input id=pwd type=password name=pwd input class=button value=Log in type=submit /form http://croptrak.emalan.com/Home -- Eugene On 01 Dec 2010, at 11:23 AM, 96silvia wrote: I have this wicket form I want to use wicket to pass the phone number and contact email. wicket:extend form wicket:id=test method=post action=http://www.mypage.com; input type=hidden wicket:id =phoneNumber name=phoneNumber input type=hidden wicket:id =contactEmail name=email /form /wicket:extend my question is my java code passes the correct parameters for the phone number and the contact email. but overwrites the form action and places wicket:interface=:10:opcForward::IFormSubmitListener:: I don't want this to happen I need to post these values to www.mypage.com is there a way to do this? I am using wicket 1.4.5, jdk6 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-question-tp3067609p3067609.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: wicket question
Hi. What's wrong with wicket's form? Best regards, Alexander. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket question
there is nothing wrong with the wicket form. what is wrong is when wicket renders the page it replaces the form action that I have (which is a url ) with wicket ?wicket:interface=:17:opcForward::IFormSubmitListener:: this isn't what I want to have happen. the action needs to be the url -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-question-tp3067609p3067716.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: wicket question
the problem is the hidden input values are coming from a wicket session. so if I use a non wicket form how do I get the values from a wicket session to the non wicket form? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-question-tp3067609p3067719.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: wicket question
I see your problem... In my case I am posting from a simple form (no validation or pre-populated values) that just needs to pass the parameters to my wicket form on a secure page. So.. it is back to your main question, how to stop the wicket form from posting to itself, but to get it to post to different url. You could try something suggested by Igor http://apache-wicket.1842946.n4.nabble.com/RelativePathPrefixHandler-and-form-quot-action-quot-attributes-td1867803.html override oncomponenttag() of the form and call super followed by tag.put(action, whateverurl); -igor - On 01 Dec 2010, at 12:26 PM, 96silvia wrote: the problem is the hidden input values are coming from a wicket session. so if I use a non wicket form how do I get the values from a wicket session to the non wicket form? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-question-tp3067609p3067719.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
Logout (Session destroy) on the last (stateful) page?
Hi I've got the following problem: After a user completes a wizard, he sees a last confirmation page containing some data, thus it must be a stateful page called by the following code from the wizard: setResponsePage(new ConfirmationPage(myBean)); This ConfirmationPage must only be displayed once, thus if the user does a refresh it must not be available anymore. I expected that I would be able to call session.invalidate() from somewhere within the ConfirmationPage's onAfterRender or onDetach methods. Unfortunately, whenever I do this, the user is automatically redirected to the home page without a trace in the logs Any idea how to do that? Thanks Matt smime.p7s Description: S/MIME Cryptographic Signature
Re: Logout (Session destroy) on the last (stateful) page?
Hi! I am curious too. For this reason we had to build our logoutpage so that it invalidtes session logically but not in httpsession sense. Only clicking something from login page will do that. But it's a hack, I would like to know what's the proper way ;) ** Martin 2010/12/1 Matthias Keller matthias.kel...@ergon.ch: Hi I've got the following problem: After a user completes a wizard, he sees a last confirmation page containing some data, thus it must be a stateful page called by the following code from the wizard: setResponsePage(new ConfirmationPage(myBean)); This ConfirmationPage must only be displayed once, thus if the user does a refresh it must not be available anymore. I expected that I would be able to call session.invalidate() from somewhere within the ConfirmationPage's onAfterRender or onDetach methods. Unfortunately, whenever I do this, the user is automatically redirected to the home page without a trace in the logs Any idea how to do that? Thanks Matt - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: component not visible exception
We don't override isVisible() and we don't call setVisible() on the save button. But we do on the container. The container starts off hidden and an AjaxTimer is used to set it visible. On Nov 30, 2010, at 1:57 AM, Matthias Keller wrote: One other thing to check is, do you have a custom isVisible() override in the container or do you explicitly set it to visible/invisible using setVisible()? If the former, this logic will usually be re-evaluated upon form submission and if that logic depends on some state which might change upon submission, you might get exactly that error. Matt On 2010-11-29 20:21, Igor Vaynberg wrote: another possibility, if this page is using hybrid url coding strategy, is that the session expires and the form is submitted against a new instance of the page - where the button is not visible. -igor On Mon, Nov 29, 2010 at 11:05 AM, Douglas Ferguson doug...@douglasferguson.us wrote: The problem is that I can't recreate this error, but I see it in production alot. So I have no way of looking at the action url. D/ On Nov 29, 2010, at 12:59 PM, Igor Vaynberg wrote: easy. the form's action url points to a version of the page where the button is not visible. so when the button is clicked and the form is submitted wicket rolls back the version of the page to one where button is not visible and you get the error. not sure that is what is happening in your app, but its one possible explanation. look at form's url and make sure none of your ajax actions are changing the page version. -igor On Mon, Nov 29, 2010 at 10:41 AM, Douglas Ferguson doug...@douglasferguson.us wrote: We do toggle the visibility of the web markup container that contains the button. Here's how it works. 1) Page loads and the container is hidden 2) An ajax timer is used to watch for state to change 3) When state changes we make the container visible (which then makes the submit button visible) How could they user manage to click on the save button when is it not visible? The only thing I can think of is that this could be some back button issue. But then again, I'm not sure how that would manifest... D/ On Nov 29, 2010, at 11:25 AM, Igor Vaynberg wrote: in order for component to be visible all of its parents have to be visible from the page down to the component. same for the enabled state. -igor On Mon, Nov 29, 2010 at 9:21 AM, Douglas Ferguson doug...@douglasferguson.us wrote: Hmm... even if we aren't changing the visibility of the button? On Nov 29, 2010, at 10:42 AM, Marco Mancini wrote: try to set mybutton.setOutputMarkupPlaceholderTag(true); bye marco 2010/11/29 Martin Grigorovmgrigo...@apache.org On Mon, Nov 29, 2010 at 4:46 PM, Douglas Ferguson doug...@douglasferguson.us wrote: We have not overridden isVisible, nor have we do we have a popup modal. That's why I was asking if this could be a back button issue. The only thing we do is set the button enabled. Could this be the problem even thought he message it talking about visibility? No. There is a separate check for enabled state. It is definitely for visibility. D/ On Nov 29, 2010, at 3:15 AM, Martin Grigorov wrote: Here is another scenario: Ajax request sets the visibility of the submit button (or its parent) to false but forgets to repaint the button so it is still visible for the user. Then the user clicks on this button, it fires and then the backend shows this message - the button is invisible so it cannot be clicked. On Mon, Nov 29, 2010 at 9:04 AM, Chris Colman chr...@stepaheadsoftware.comwrote: A back button where? The form is on a page and has a submit button only. If there is an error a ModalWindow pops up - it only has an OK button which is meant to make the ModalWindow simply disappear and thus re-enable the page beneath - the one with the form on it. Chris -Original Message- From: Douglas Ferguson [mailto:doug...@douglasferguson.us] Sent: Monday, 29 November 2010 6:53 PM To: users@wicket.apache.org Subject: Re: component not visible exception Could this be happening because of the back button? D/ On Nov 28, 2010, at 4:54 AM, Chris Colman wrote: I had a similar problem. In my scenario it occurred when a ModalWindow was brought up when a form failed validation. When they clicked ok to close the ModalWindow and then clicked Submit on the form again I got a similar message saying that the Submit button was no longer visible. It doesn't happen if I use the normal validation 'feedback' panel to display the validation error messages. Chris -Original Message- From: Douglas Ferguson [mailto:doug...@douglasferguson.us] Sent: Saturday, 27 November 2010 3:13 AM To: Wicket Mailing List List Subject: component not visible exception I have an error I've been seeing in the production logs for awhile now and haven't been
Re: wicket question
Simply put them there with a Label. Regards, Erik. Op 01-12-10 18:26, 96silvia write: the problem is the hidden input values are coming from a wicket session. so if I use a non wicket form how do I get the values from a wicket session to the non wicket form? -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
common links
all my pages extend from BasePage, this page has some links which are common to all pages , right now I am creating these Ajax and non Ajax Links everytime the sub class page is instantiated by calling super. instead of creating them every time can I create them only once and add these Links ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/common-links-tp3067767p3067767.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: wicket question
after doing some thinking I tried removing the form here is my solution wicket:extend form method=post action=http://www.mypage.com; input type=hidden wicket:id =phoneNumber name=phoneNumber input type=hidden wicket:id =contactEmail name=email /form /wicket:extend I can now pass my values from the wicket session to the form and the action is not over written by wicket. problem solved. thanks for the input guys. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-question-tp3067609p3067802.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: Logout (Session destroy) on the last (stateful) page?
Does the redirect to the home page happen because of Wicket's default render strategy (REDIRECT_TO_BUFFER) that causes two requests? You invalidate session on the first which redirects to the buffered response. When the second request comes in expecting to get the already-rendered response, you get a new session. On Wed, Dec 1, 2010 at 11:53 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I am curious too. For this reason we had to build our logoutpage so that it invalidtes session logically but not in httpsession sense. Only clicking something from login page will do that. But it's a hack, I would like to know what's the proper way ;) ** Martin 2010/12/1 Matthias Keller matthias.kel...@ergon.ch: Hi I've got the following problem: After a user completes a wizard, he sees a last confirmation page containing some data, thus it must be a stateful page called by the following code from the wizard: setResponsePage(new ConfirmationPage(myBean)); This ConfirmationPage must only be displayed once, thus if the user does a refresh it must not be available anymore. I expected that I would be able to call session.invalidate() from somewhere within the ConfirmationPage's onAfterRender or onDetach methods. Unfortunately, whenever I do this, the user is automatically redirected to the home page without a trace in the logs Any idea how to do that? Thanks Matt - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DropDownChoice with tooltip
I needed tooltip functionality on a dropdownchoice component and I have a work around but it involved copying a bunch of existing code because I couldn't figure out an easy way to add title to an html select-option. The IChoiceRenderer passed into the DropDownChoice only has getter/setters for Value and id. It would have been nice for the AbstractChoice to call getToolTip or loop through behaviors at the option level in the AbstractChoice.appendOptionHtml() function, this would allow us to override the html output a little easier. Is there a better way to do this? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-with-tooltip-tp3067946p3067946.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: WebMarkupContainer issue
issue solved - I found another place in the code I was referencing the panel from the page itself directly, not via the WebMarkupContainer. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WebMarkupContainer-issue-tp3063886p3067980.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 loading image
Thanks for the help guys. I've got it all working correctly now. For other people's future reference. I think this is the page that Igor was referring to which I pretty much copied : https://cwiki.apache.org/WICKET/uploaddownload.html I am retrieving the images from a db as a byte array //heres a simplified version of my code. Hope this helps someone! //this is the class that serves up the images public class ImageResource extends DynamicWebResource { private static final long serialVersionUID = 1L; public ImageResource() { super(); } @Override protected ResourceState getResourceState() { ValueMap params = getParameters(); String id = params.getString(id); if (id.equals(image1)) { //show image 1 return new ResourceState() { @Override public byte[] getData() { //get the image1 from server return image; } @Override public String getContentType() { return image/jpeg; } } } else (id.equals(image2)) { //show image 2 return new ResourceState() { @Override public byte[] getData() { //get the image2 from server return image; } @Override public String getContentType() { return image/jpeg; } } } } } //this is how I access the image from wicket add(new Label(profileImage, ) { private static final long serialVersionUID = 1L; @Override protected void onComponentTag(ComponentTag tag) { ResourceReference imageResource = new ResourceReference(imageResource); tag.put(src, RequestUtils.toAbsolutePath(getRequestCycle().urlFor(imageResource).toString())+?id=image1); super.onComponentTag(tag); } }); //and this needs to be added to the wicket application init method getSharedResources().add(imageResource, new ImageResource()); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dynamically-loading-image-tp3064795p3068044.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
webapp shutdown listeners
Hi, is there a generic way to add one or multiple wicket app shutdown listener to a wicket application instance without having to override the onDestroy method and roll my own listener registration code? Regards, Seb - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OT] Plugin WicketForge 0.8.1 available for IDEA 9+
Thanks guys! I'm glad you like it... It's nice to get some positive feedback... :-) PS: ok, next time i will post it as [ANN] ;-) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/OT-Plugin-WicketForge-0-8-1-available-for-IDEA-9-tp3066018p3068223.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
Problem on wicket-auth-role ve Spring-security integration
Hi, I'm trying to integrate Wicket-auth-roles 1.4.9 and Spring Security 3.0.4 by following https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html. @AuthorizeAction and @AuthorizeInstantiation annotations are not working. The blog says The only filter we need defined from Acegi is the HttpSessionContextIntegrationFilter. This filter will ensure that the SecurityContext is transported to and from the HttpSession onto the Thread context. All authorization is delegated to the wicket-auth-roles module which uses Annotations (@AuthorizeInstantiation). So how can I make configuration to provide this?
Data Sharing with InlineFrame Pages
Hello, I have a page with an embedded InlineFrame which is used to submit a multipart form. I would like the InlineFrame's page to share a model object with the parent page. This way the parent page can control the workflow after the form is submitted. However, something is preventing model changes made during the form submission from being visible in subsequent requests to the parent page. My guess is that issue stems from the way in which the child page (with its reference to the parent page) is being serialized into the page store because the subsequent parent requests see the *unmodified*model object. Further confusing me is the fact that I use the same upload panel with the InlineFrame in two different pages, and in one of the two the model change * is* seen by the parent. I'm no PageMap expert, but I debugged into Session enough to see that the page versions are the same between the form submission request and the subsequent parent page request in both cases. There is obviously some gotcha that I've stumbled into on one page and not the other. Can anyone decipher what may be going on? Or recommend a best practice for sharing data with an embedded iframe page? I am using Wicket 1.4.13. Thanks, Dan
Wicket-Hibernate Related LazyInitializationException
Hi All I am guessing this is more of a Hibernate thing/issue but if some one has encountered this and has a explanation that I can probably use from the Wicket front would be great. https://forum.hibernate.org/viewtopic.php?f=1t=1008473 I have a LazyIntializationException when i page through some items. I use the PageableListView, the List item(s) are entities that are retrieved via an association Person.phones which is a Set type. The funny thing is, the LIException is intermittent. I am also using OpenSessionInViewFilter. Any thoughts? By the way the this is the load() implemenation, I have set the Model Object's phoneList with a list of values fetched via the Service-DAO. I have used this with other entities without association and it works but I guess is a different scenario(not associations) Model = new LoadableDetachableModelObject() { @Override protected Object load() { return containerForm.getModelObject().getPhoneList(); } }; } If someone has any thoughts would appreiciate hearing from you. Cheers
Re: Wicket-Hibernate Related LazyInitializationException
Hi Nivedan, Even though the subsequent requests have a Session open, the entities with the uninitialized collections don't know about it. I'm sure if you track it down, you can explain the intermittent behavior by prior access to the collection when the original session is open. I'd say you can either (1) configure Hibernate to load the collections to load unlazily, (2) manually access the collections to force them to initialize in the specific cases you're encountering LIEs, or (3) employ some kind of AOP hack to reinject the new session right before the collection is accessed. They're all kind of ugly, and I've never heard of anyone else doing the last, but it's been working well for my team. For your reference, here is the AspectJ aspect I wrote. (We use Guice for dependency injection.) /** * Reattaches entities whose lazy collections are about to be initialized * p * Can we keep track of all lazy relationships that get initialized, and * uninitialize them at the end of the request? This would prevent referenced * entities from being serialized and replicated (unless separate references * were created to them). * * @author dan */ @Aspect public class ReattachAspect { private static final Logger LOG = Logger.getLogger(ReattachAspect.class); private ProviderSession sessionProvider; @Before(call(public final void org.hibernate.proxy.AbstractLazyInitializer.initialize()) target(initializer)) public void reattachLazyInitializer(LazyInitializer initializer) { if (initializer.getSession() == null sessionProvider != null) { if (LOG.isDebugEnabled()) { LOG.debug(reattaching session to lazy initializer for + initializer.getEntityName()); } Session session = sessionProvider.get(); initializer.setSession((SessionImplementor) session); } } @Before(call(private void org.hibernate.collection.AbstractPersistentCollection + .throwLazyInitializationExceptionIfNotConnected()) target(collection)) public void reattachPersistentCollection(PersistentCollection collection) { SessionImplementor session = ((AbstractPersistentCollection) collection).getSession(); if ((session == null || !session.isOpen()) sessionProvider != null) { if (LOG.isDebugEnabled()) { LOG.debug(reattaching session to collection); } session = (SessionImplementor) sessionProvider.get(); CollectionPersister persister = session.getFactory().getCollectionPersister(collection.getRole()); collection.setCurrentSession(session); session.getPersistenceContext().addInitializedDetachedCollection(persister, collection); } } @Inject public void setSessionProvider(ProviderSession sessionProvider) { this.sessionProvider = sessionProvider; } } On Wed, Dec 1, 2010 at 9:23 PM, Nivedan Nadaraj shravann...@gmail.comwrote: Hi All I am guessing this is more of a Hibernate thing/issue but if some one has encountered this and has a explanation that I can probably use from the Wicket front would be great. https://forum.hibernate.org/viewtopic.php?f=1t=1008473 I have a LazyIntializationException when i page through some items. I use the PageableListView, the List item(s) are entities that are retrieved via an association Person.phones which is a Set type. The funny thing is, the LIException is intermittent. I am also using OpenSessionInViewFilter. Any thoughts? By the way the this is the load() implemenation, I have set the Model Object's phoneList with a list of values fetched via the Service-DAO. I have used this with other entities without association and it works but I guess is a different scenario(not associations) Model = new LoadableDetachableModelObject() { @Override protected Object load() { return containerForm.getModelObject().getPhoneList(); } }; } If someone has any thoughts would appreiciate hearing from you. Cheers
Re: Wicket-Hibernate Related LazyInitializationException
Just make sure your form's model is a LDM too. On Thu, Dec 2, 2010 at 12:23 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Hi All I am guessing this is more of a Hibernate thing/issue but if some one has encountered this and has a explanation that I can probably use from the Wicket front would be great. https://forum.hibernate.org/viewtopic.php?f=1t=1008473 I have a LazyIntializationException when i page through some items. I use the PageableListView, the List item(s) are entities that are retrieved via an association Person.phones which is a Set type. The funny thing is, the LIException is intermittent. I am also using OpenSessionInViewFilter. Any thoughts? By the way the this is the load() implemenation, I have set the Model Object's phoneList with a list of values fetched via the Service-DAO. I have used this with other entities without association and it works but I guess is a different scenario(not associations) Model = new LoadableDetachableModelObject() { �...@override protected Object load() { return containerForm.getModelObject().getPhoneList(); } }; } If someone has any thoughts would appreiciate hearing from you. Cheers - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-Hibernate Related LazyInitializationException
Hi Dan, Thanks for your time most appreciated. 1. Option 1 as you may agree, not always is a good thing to do so I would drop that. 2. Option 2 - I have tried this in the following manner. As part of the look up for the Subjects via the DAO, I iterate through the list of Person.Phones collection and assign them into a CollectionPhones and set it into a value Object with has a List. This is because i cannot use the Set in the PageableListView. In doing so, I have forced the entities in the collection/proxy to be intialised isn't it? Looks like even with this it beats me. 3. Option 3 - I have to read up more on how I can use this code/or something similar, we use Spring for DI. Further, each time I want to view a Person detail, I do a second look up when the user clicks from a list of Persons. I send issue a lookup into the DAO to get the Person's details afresh(the exact same method I used to list all Subjects in the first place), so this again would have refreshed the Phones collection on the Person in context. I will try to track it down I guess it has to do with session anyway. I also use the CPM to hold the Model for the whole page. Not a LDM. Thanks again for the time Cheers Niv On Thu, Dec 2, 2010 at 1:47 PM, Dan Retzlaff dretzl...@gmail.com wrote: Hi Nivedan, Even though the subsequent requests have a Session open, the entities with the uninitialized collections don't know about it. I'm sure if you track it down, you can explain the intermittent behavior by prior access to the collection when the original session is open. I'd say you can either (1) configure Hibernate to load the collections to load unlazily, (2) manually access the collections to force them to initialize in the specific cases you're encountering LIEs, or (3) employ some kind of AOP hack to reinject the new session right before the collection is accessed. They're all kind of ugly, and I've never heard of anyone else doing the last, but it's been working well for my team. For your reference, here is the AspectJ aspect I wrote. (We use Guice for dependency injection.) /** * Reattaches entities whose lazy collections are about to be initialized * p * Can we keep track of all lazy relationships that get initialized, and * uninitialize them at the end of the request? This would prevent referenced * entities from being serialized and replicated (unless separate references * were created to them). * * @author dan */ @Aspect public class ReattachAspect { private static final Logger LOG = Logger.getLogger(ReattachAspect.class); private ProviderSession sessionProvider; @Before(call(public final void org.hibernate.proxy.AbstractLazyInitializer.initialize()) target(initializer)) public void reattachLazyInitializer(LazyInitializer initializer) { if (initializer.getSession() == null sessionProvider != null) { if (LOG.isDebugEnabled()) { LOG.debug(reattaching session to lazy initializer for + initializer.getEntityName()); } Session session = sessionProvider.get(); initializer.setSession((SessionImplementor) session); } } @Before(call(private void org.hibernate.collection.AbstractPersistentCollection + .throwLazyInitializationExceptionIfNotConnected()) target(collection)) public void reattachPersistentCollection(PersistentCollection collection) { SessionImplementor session = ((AbstractPersistentCollection) collection).getSession(); if ((session == null || !session.isOpen()) sessionProvider != null) { if (LOG.isDebugEnabled()) { LOG.debug(reattaching session to collection); } session = (SessionImplementor) sessionProvider.get(); CollectionPersister persister = session.getFactory().getCollectionPersister(collection.getRole()); collection.setCurrentSession(session); session.getPersistenceContext().addInitializedDetachedCollection(persister, collection); } } @Inject public void setSessionProvider(ProviderSession sessionProvider) { this.sessionProvider = sessionProvider; } } On Wed, Dec 1, 2010 at 9:23 PM, Nivedan Nadaraj shravann...@gmail.com wrote: Hi All I am guessing this is more of a Hibernate thing/issue but if some one has encountered this and has a explanation that I can probably use from the Wicket front would be great. https://forum.hibernate.org/viewtopic.php?f=1t=1008473 I have a LazyIntializationException when i page through some items. I use the PageableListView, the List item(s) are entities that are retrieved via an association Person.phones which is a Set type. The funny thing is, the LIException is intermittent. I am also using OpenSessionInViewFilter. Any thoughts? By the way the this is the load() implemenation, I have set the Model Object's phoneList with a list of values fetched via the Service-DAO. I have used this with other entities without association and it works but I guess is a different scenario(not associations) Model = new LoadableDetachableModelObject() { @Override
Re: Wicket-Hibernate Related LazyInitializationException
Hi James Thanks for the time. I use the CPM for the whole use case. Mmm..is LDM mandatory for such a use case? Am open for thoughts just want the best way to implement it. Can you explain a bit further what your thought was please? Thank you Regards On Thu, Dec 2, 2010 at 2:13 PM, James Carman ja...@carmanconsulting.comwrote: Just make sure your form's model is a LDM too. On Thu, Dec 2, 2010 at 12:23 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Hi All I am guessing this is more of a Hibernate thing/issue but if some one has encountered this and has a explanation that I can probably use from the Wicket front would be great. https://forum.hibernate.org/viewtopic.php?f=1t=1008473 I have a LazyIntializationException when i page through some items. I use the PageableListView, the List item(s) are entities that are retrieved via an association Person.phones which is a Set type. The funny thing is, the LIException is intermittent. I am also using OpenSessionInViewFilter. Any thoughts? By the way the this is the load() implemenation, I have set the Model Object's phoneList with a list of values fetched via the Service-DAO. I have used this with other entities without association and it works but I guess is a different scenario(not associations) Model = new LoadableDetachableModelObject() { @Override protected Object load() { return containerForm.getModelObject().getPhoneList(); } }; } If someone has any thoughts would appreiciate hearing from you. Cheers - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org