RE: Customizing AjaxIndicatorAppender and indicator
See org.apache.wicket.ajax.IAjaxIndicatorAware. With this you can provide your own indicator which will be shown/hidden before/after the Ajax request I think the poster wants to use visibility: hidden instead of display: none for when it is not shown (the taking up space requirement). - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Customizing AjaxIndicatorAppender and indicator
On Tue, Mar 6, 2012 at 10:01 AM, Wilhelmsen Tor Iver toriv...@arrive.no wrote: See org.apache.wicket.ajax.IAjaxIndicatorAware. With this you can provide your own indicator which will be shown/hidden before/after the Ajax request I think the poster wants to use visibility: hidden instead of display: none for when it is not shown (the taking up space requirement). Oh. You are right. Even with custom indicator Wicket will use display CSS property again... The real problem is in wicket-ajax.js - wicketShow() and wicketHide() toggle 'display'. A workaround is to use AjaxCallDecorator that toggles 'visibility' before the request and in success/failure handlers. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Customizing AjaxIndicatorAppender and indicator
Ok I'll try that. Thanks for your responses! - Jouni -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Customizing-AjaxIndicatorAppender-and-indicator-tp4446266p4449027.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: wiQuery and ivy
If you can specify what I need to add in the pom.xml of WiQuery then I am happy to add it, however this Ivy is unknown to me so I have no idea what to do. Sources themselves are not a viable dependency for any java project using using dependency management or not, they are merely fetched so that an IDE can link the sources to the binaries so that the user can browse them or use them wihile debugging. Adding the sources as a required dependency seems odd to me... Maven knows what to do thanks to a plugin, perhaps this also available for Ivy? Hielke -Original Message- From: Dirk Forchel [mailto:dirk.forc...@exedio.com] Sent: maandag 5 maart 2012 13:55 To: users@wicket.apache.org Subject: wiQuery and ivy I've a qestion regarding ivy and wiQuery. I'd like to use the wiQuery jars (wiquery-core and wiquery-jquery-ui) in the same way I do with all the Wicket libraries. For example, a configuration dependency for the Wicket core library in my project ivy.xml is written like: This means, ivy is looking for the wicket-core jar in the defined repositories and downloads the sources jar as well. In order to download the wiQuery libs, I've added a URL resolver within my global ivysettings.xml: And in my ivy.xml I've added the following lines of code: This works fine. But I can't download the sources jar, although the sources jar can be found on the wiquery respository (https://wiquery.googlecode.com/svn/repo/org/odlabs/wiquery/wiquery-core/1.5.4/) too. What I miss is the dependency configuration for sources in the pom.xml. Can this be added from one of the projects member? Or exists another way to download the sources jar with ivy? Thank you. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wiQuery-and-ivy-tp4446057p4446057.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
double click on AjaxSubmitLink and page expired
Hello all, I have a page with a form and an AjaxSubmitLink on it. In the onSubmit() I do some business logic and redirect the user to the next page using setResponsePage(nextPage). Just before redirecting to the next page I do: getSession.untouch(firstPage); getSession.clear(); I do this in order to prevent the user from returning to this page. The problem is when the user clicks twice on the AjaxSubmitLink - the clear session logic get's called in the first click and then i get page expired in the second link. I tried to use AjaxCallDecorator to block the button in the second click, but still got the page expired. Can you help me here? Am I trying to do something that is not possible? thanks Rebecca -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/double-click-on-AjaxSubmitLink-and-page-expired-tp4449450p4449450.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: double click on AjaxSubmitLink and page expired
sorry - i forgot - I'm using wicket 1.4.18 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/double-click-on-AjaxSubmitLink-and-page-expired-tp4449450p4449457.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: double click on AjaxSubmitLink and page expired
How about something as easy as checking if the session has been cleared before calling set response page... e.g if(sessionNotClear...){ session.clear(); setResponsePage() } On Tue, Mar 6, 2012 at 2:16 PM, rebecca rivka.shis...@gmail.com wrote: sorry - i forgot - I'm using wicket 1.4.18 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/double-click-on-AjaxSubmitLink-and-page-expired-tp4449450p4449457.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: double click on AjaxSubmitLink and page expired
Hi, On Tue, Mar 6, 2012 at 1:26 PM, Josh Kamau joshnet2...@gmail.com wrote: How about something as easy as checking if the session has been cleared before calling set response page... e.g if(sessionNotClear...){ session.clear(); setResponsePage() } Wicket internals fail because Wicket cannot find the Link to click, so it doesn't even get to the application code. @rebecca: I told you (few months ago) that this #untouch() doesn't look like a good idea. It is still not reintroduced in 1.5+ On Tue, Mar 6, 2012 at 2:16 PM, rebecca rivka.shis...@gmail.com wrote: sorry - i forgot - I'm using wicket 1.4.18 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/double-click-on-AjaxSubmitLink-and-page-expired-tp4449450p4449457.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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Channel busy - postponing...
Thanks for posting back the solution. This will no doubt be helpful to someone else. Community! On Mar 6, 2012 2:29 AM, Arjun Dhar dhar...@yahoo.com wrote: I just realized all posts on this matter point to some Jquery or JavaScript related mischief. I had established jquery itself was not the culprit, however .. for the Dialog I was using jquery-ui plugin. I upgraded the plugin. Seems the copy of the plugin for this project was messed up in SVN. A fresh copy fixed the issue. - Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Channel-busy-postponing-tp4448932p4448944.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
How to get WebSession by Session ID
Hello, I'm developing a web application that is about to be displayed within a Facebook canvas page (app page). I have a problem which comes up whenever a user tries to make a payment through the app. Due to the usage of Facebook JS API and Facebook payments API it looks to me like the request made by Facebook is not via the user's http session (maybe due to security reasons) and therefore a new web session is created, which, of course, lacks all data that I've previously held for the user. The way I use to get the session is Session.get(). To avoid the current problem and still use the same session, I wonder if I can put the session ID in the call parameters and later retrieve the same session by its ID. I looked at Wicket's SessionStore, but didn't see way to get a session by id. Would you assist me on how to do that? Best regards, Martin
seo - canonical link element
Hi Wicketers, Do you use the Canonical Link Element in your page ? (A canonical page is the preferred version of a set of pages with highly similar content.) http://googlewebmastercentral.blogspot.com/2011/06/supporting-relcanonical-http-headers.html http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html http://support.google.com/webmasters/bin/answer.py?hl=enanswer=139394 François - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: double click on AjaxSubmitLink and page expired
hi Martin First, I understand that wicket internals fail, but why the javascript i added using AjaxCallDecorator (I used the example in the Apache Wicket Cookbook) to block the second submit - has no effect? I see the JS is added in the beginning of the onclick property of the button and is called before the request goes to the server, but i can still press the submit button right after the first click and it somehow arrives to the server again. Second, i use untouch() to remove the previous page from the session, in order to prevent the user from using the back button. Nothing else worked for me and i saw other similar posts in this forum, where other wicket users used the same hack. I'll be glad to use a better solution. thanks Rebecca -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/double-click-on-AjaxSubmitLink-and-page-expired-tp4449450p4449825.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 get WebSession by Session ID
Hi Martin, The Wicket Session is stored in the HttpSession, and the servlet spec does not allow retrieving HttpSessions by ID. You may need to store the relevant data in a more accessible location. For a simple non-distributed application (single server), you might just put a map keyed by session ID into the servlet context attribute, with a session listener to clear entries on expiration. See servlet's HttpSession#getServletContext().setAttribute(name, object) and Wicket's ISessionStore#registerUnboundListener. Dan On Tue, Mar 6, 2012 at 4:25 AM, Martin A wml...@gmail.com wrote: Hello, I'm developing a web application that is about to be displayed within a Facebook canvas page (app page). I have a problem which comes up whenever a user tries to make a payment through the app. Due to the usage of Facebook JS API and Facebook payments API it looks to me like the request made by Facebook is not via the user's http session (maybe due to security reasons) and therefore a new web session is created, which, of course, lacks all data that I've previously held for the user. The way I use to get the session is Session.get(). To avoid the current problem and still use the same session, I wonder if I can put the session ID in the call parameters and later retrieve the same session by its ID. I looked at Wicket's SessionStore, but didn't see way to get a session by id. Would you assist me on how to do that? Best regards, Martin
MountedMapper NullPointer
I'm seeing this exception from time to time and I'm not sure where it's coming from. java.lang.NullPointerException at org.apache.wicket.request.mapper.MountedMapper.checkHomePage(MountedMapper.java:459) at org.apache.wicket.request.mapper.MountedMapper.parseRequest(MountedMapper.java:242) at org.apache.wicket.request.mapper.HomePageMapper.parseRequest(HomePageMapper.java:98) at org.apache.wicket.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:263) at org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:131) at org.apache.wicket.protocol.https.HttpsMapper.mapRequest(HttpsMapper.java:91) at org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:184) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:550) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:970) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:414) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:187) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:904) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) at org.eclipse.jetty.server.Server.handle(Server.java:347) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:590) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1054) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411) at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:241) at org.eclipse.jetty.server.ssl.SslSocketConnector$SslConnectorEndPoint.run(SslSocketConnector.java:664) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529) at java.lang.Thread.run(Thread.java:680)
Re: How to get WebSession by Session ID
Hi, Dan, Thanks for your prompt response, I also had in mind that type of workaround, so obviously I don't have much options here :) Best regards, Martin On Tue, Mar 6, 2012 at 5:58 PM, Dan Retzlaff dretzl...@gmail.com wrote: Hi Martin, The Wicket Session is stored in the HttpSession, and the servlet spec does not allow retrieving HttpSessions by ID. You may need to store the relevant data in a more accessible location. For a simple non-distributed application (single server), you might just put a map keyed by session ID into the servlet context attribute, with a session listener to clear entries on expiration. See servlet's HttpSession#getServletContext().setAttribute(name, object) and Wicket's ISessionStore#registerUnboundListener. Dan On Tue, Mar 6, 2012 at 4:25 AM, Martin A wml...@gmail.com wrote: Hello, I'm developing a web application that is about to be displayed within a Facebook canvas page (app page). I have a problem which comes up whenever a user tries to make a payment through the app. Due to the usage of Facebook JS API and Facebook payments API it looks to me like the request made by Facebook is not via the user's http session (maybe due to security reasons) and therefore a new web session is created, which, of course, lacks all data that I've previously held for the user. The way I use to get the session is Session.get(). To avoid the current problem and still use the same session, I wonder if I can put the session ID in the call parameters and later retrieve the same session by its ID. I looked at Wicket's SessionStore, but didn't see way to get a session by id. Would you assist me on how to do that? Best regards, Martin
Re: MountedMapper NullPointer
Turns out my Application.getHomePage() was returning null. On Mar 6, 2012, at 10:37 AM, Douglas Ferguson wrote: I'm seeing this exception from time to time and I'm not sure where it's coming from. java.lang.NullPointerException at org.apache.wicket.request.mapper.MountedMapper.checkHomePage(MountedMapper.java:459) at org.apache.wicket.request.mapper.MountedMapper.parseRequest(MountedMapper.java:242) at org.apache.wicket.request.mapper.HomePageMapper.parseRequest(HomePageMapper.java:98) at org.apache.wicket.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:263) at org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:131) at org.apache.wicket.protocol.https.HttpsMapper.mapRequest(HttpsMapper.java:91) at org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:184) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:550) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:970) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:414) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:187) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:904) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) at org.eclipse.jetty.server.Server.handle(Server.java:347) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:590) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1054) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411) at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:241) at org.eclipse.jetty.server.ssl.SslSocketConnector$SslConnectorEndPoint.run(SslSocketConnector.java:664) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529) at java.lang.Thread.run(Thread.java:680)
Re: wicket wizard init
I think exception is thrown because you call your getTextFromDataBase inside step's constructor, when 'user.name' and 'user.surname' are still empty. You could try moving getAgreementText() from constructor to another method like Component.onConfigure. Andrea Del Bene-3 wrote Hi, which line of your code throws NullPointerException? can you elaborate a little more on the purpose of function getAgreementText() ? private String getTextFromDataBase() { agreementText = AGREEMENT + + someText #clientName# #clientSurname#, someText + someMoreAgreementText + andMore + End of Agreement return agreementText; private String replace(String replace, String value){ agreementText= agreementText.replace(replace, value); return agreementText; NullPointerException occurs in the line, where program tries to replace #clientName# with userModel.bind(user.name). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-wizard-init-tp4446076p4448935.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: java.lang.IllegalStateException: Can't call write(CharSequence) after write(byte[]) has been called.
Hi, thanks for the reply. I tried that but unfortunately I still get the same error. Resetting it did not alter anything. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/java-lang-IllegalStateException-Can-t-call-write-CharSequence-after-write-byte-has-been-called-tp4416819p4450786.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: Using Wicket with Adobe Forms (FDF)
Thanks. But we don't have Request Params, we have a binary Request Stream with Adobe's FDF. In HTTP, you can do request.getInputStream() to get it, can you do the same in Wicket? Thanks again. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-Wicket-with-Adobe-Forms-FDF-tp4446987p4450849.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: org.apache.wicket.WicketRuntimeException: There is no application attached to current thread
@Dan, Thank you so much for your help! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-There-is-no-application-attached-to-current-thread-tp4447781p4451269.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: Links with old PageID do not work
Hi, I tested my application and checked for the renderCount variable. I made a breakpoint and checked the variable in the Debugger. Surprisingly, the renderCount variable was not increased and remained 0 during the whole test. To verify my result, I made a System.out.println in the constructor of Page2 that showed the PageID and the value of renderCount variable. The result was the same. It looked like the following: (1) Tab1 starts with Page1, url is: localhost:8080/myapp?0 PageID: 2 renderCount: 0 (2) Tab2 starts with Page1, url is: localhost:8080/myapp?1 PageID: 2 renderCount: 0 (3) Tab1 makes a submit from Page1 to Page2, url is: localhost:8080/myapp?2q=word1 PageID: 2 renderCount: 0 (4) Tab2 makes a submit from Page1 to Page2, url is: localhost:8080/myapp?3q=word2 PageID: 3 renderCount: 0 (5) Tab1 clicks on a link, the link does not work, but the page is rerendered, url is: localhost:8080/myapp?4q=word1 PageID: 4 renderCount: 0 (6) Tab1 clicks on a link, the link works as expected and the page is rerendered, url is: localhost:8080/myapp?5q=word1filter=linkPage1 PageID: 5 renderCount: 0 (7) Tab2 clicks on a link, the link does not work, but the page is rerendered, url is: localhost:8080/myapp?6q=word2 PageID: 6 renderCount: 0 (8) Tab2 clicks on a link, the link works as expected and the page is rerendered, url is: localhost:8080/myapp?7q=word2filter=linkPage2 PageID: 7 renderCount: 0 (9) Tab2 clicks on another link, the link works as expected and the page is rerendered, url is: localhost:8080/myapp?8q=word2filter=linkPage2;linkPage2b PageID: 8 renderCount: 0 You can see, that the renderCount does not increase and the links need a rerender of the pages when the pageID is not the highest. Any ideas about such a constellation? Andre On Tue, 6 Mar 2012 09:13:26 +0200 Martin Grigorov mgrigo...@apache.org wrote: 2012/3/5 Andre Schütz andre-p...@gmx.de: Hi, thank you for the answer. I will test this and reply with my results. I have three questions depending on the test you have mentioned. (1) Can you tell me more about this o.a.w.Page? I did not really find something about it. org.apache.wicket.Page (2) Can you explain me a little bit more in detail, what I should try to find out with the breakpoint regarding the 'renderCount'. What could be the interesting parts regarding 'renderCount'? See why renderCount is incremented after the the html generation. (3) I have my .html files stored in src/main/html, my .properties files in src/main/resources and modified my pom.xml with: build resources resource filteringfalse/filtering directorysrc/main/resources/directory /resource resource directorysrc/main/html/directory /resource resource filteringfalse/filtering directorysrc/main/java/directory includes include**/include /includes excludes exclude**/*.java/exclude /excludes /resource /resources testResources testResource filteringfalse/filtering directorysrc/test/java/directory includes include**/include /includes excludes exclude**/*.java/exclude /excludes /testResource /testResources If I start the jetty server, I get a MarkupNotFoundException. After storing the .html files to the class files in the src/main/java path, it works and only the properties files are not found. Can you tell me, how I have to modify the pom.xml that it will find the .html and the .properties files in their different paths? I guess you need to reimport the project in your IDE so that it also knows about these additional source folders Thank you, Andre On Mon, 5 Mar 2012 09:49:38 +0200 Martin Grigorov mgrigo...@apache.org wrote: Hi, It sounds to be related to Page#renderCount. 'renderCount' is used to prevent using an obsolete version of a page instance. I.e. a page with a given page id counts how many times it has been rendered. If you have a tab/window which contains an earlier version of that page and you click on it then this click should be prevented because it will work with stale data. In your description I don't see how this may happen. There is something more which is not included in your description. I recommend you to put a break point in o.a.w.Page and see why 'renderCount' changes and another in PageProvider#getPageInstance() to see why the requested 'renderCount' is different than the current one. 2012/3/4 Andre Schütz andre-p...@gmx.de: Hello, i have a question about the behavior of links in two tabs. I have an application that I opened in two tabs. In Tab1, I make a submit from Page1 and get Page2. At the same time, I make a submit in Tab2 from Page1 to Page2. The two pages with the name Page2 in the two tabs display the
Re: Checkbox tree component
Hi all, I made some changes based on the CheckBoxIconPanel.java posted by Doug, basically I added behavior to update all parents or childrens when we check or uncheck a node: * When we check a node, we verify all its brothers, if they are all checked then we check its parent and recursively. * When we check a non leaf node we check all its children recursively. * When we uncheck a node we uncheck all its parents until the root. I hope it will useful for someone. /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the License); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import javax.swing.tree.TreeNode; import org.apache.wicket.MarkupContainer; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.tree.BaseTree; import org.apache.wicket.markup.html.tree.LabelIconPanel; import org.apache.wicket.model.IModel; /** * Simple panel that contains a link with icon and a link with a label. * * @author Matej Knopp */ public class CheckBoxIconPanel extends LabelIconPanel { private static final long serialVersionUID = 1L; /** * Constructs the panel. * * @param id *component id * @param model *model that is used to access the TreeNode * @param tree */ public CheckBoxIconPanel(String id, IModel model, CheckBoxTree tree) { super(id, model, tree); } /** * @see org.apache.wicket.markup.html.tree.LabelIconPanel#addComponents(org.apache.wicket.model.IModel, * org.apache.wicket.markup.html.tree.BaseTree) */ protected void addComponents(final IModel model, final BaseTree tree) { final CheckBoxTree cbTree = (CheckBoxTree)tree; CheckBoxTree.ICheckCallback callback = new CheckBoxTree.ICheckCallback() { private static final long serialVersionUID = 1L; public void onUpdate(AjaxRequestTarget target) { onNodeCheckUpdated((TreeNode)model.getObject(), cbTree, target); } }; add(newImageComponent(icon, tree, model)); IModel dataModel = cbTree.newCheckBoxModel((TreeNode)model.getObject()); MarkupContainer cb = null; add( cb = cbTree.newCheckBox(checkbox, dataModel, callback) ); add(newContentComponent(content, tree, model)); } /** * Handler invoked when the checkbox is clicked. By default makes the node selected * * @param node * @param tree * @param target */ protected void onNodeCheckUpdated(TreeNode node, CheckBoxTree tree, AjaxRequestTarget target) { if (tree.getTreeState().isNodeSelected(node)) { deselectAllParent(node, tree); selectAllChildren(node, tree, false); } else { selectAllChildren(node, tree, true); updateSelectionIfLastSelected(node, tree); } tree.updateTree(target); } /** * When a node of leaf is selected we search for all its brothers, if all are selected too we select the parent and recursively until the root. * * @param node * @param tree * @param target */ protected void updateSelectionIfLastSelected(TreeNode node, CheckBoxTree tree) { TreeNode parent = node.getParent(); while(parent != null) { int childCount = parent.getChildCount(); for (int i = 0; i childCount; i++) { if(!tree.getTreeState().isNodeSelected(parent.getChildAt(i))) { return; } } tree.getTreeState().selectNode(parent, true); parent = parent.getParent(); } } /** * When a node / leaf is deselected all its parent are deselected too. *
Re: Problem with setWindowClosedCallback
Does this problem still not documented? Does anyone know a solution to this problem? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-setWindowClosedCallback-tp3823361p4452543.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