Re: [Wicket-user] wicket-dojo StylingWebMarkupContainer / StyleAttribute
Hi, NateBot2000 a écrit : Alrighty, I figured it out. Clean and very simple (let me know if there's a better way to do this): package com.***.web.dashboard; import org.wicketstuff.dojo.markup.html.floatingpane.DojoFloatingPane; import org.wicketstuff.dojo.widgets.StyleAttribute; public class DashboardPane extends DojoFloatingPane { protected static final long serialVersionUID = 1L; private final static String LEFT = left; private final static String TOP = top; private String left = 0px; private String top = 0px; public DashboardPane( String id ) { super(id); } public final void setLeft(String left) { this.left = left; } public final void setTop(String top) { this.top = top; } protected void onStyleAttribute(StyleAttribute styleAttribute) { styleAttribute.put(LEFT, left); styleAttribute.put(TOP, top); } } Yes it is the good way if you want set top and left with java. Actually the style attribute priroty is the following : file.css style attribute in html styleAttribute added in java but maybe it would be great to add top and left setter on the StylingWebMarkupContainer ? -- Vincent - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] NPE in Session.cleanupFeedbackMessages in wicket 1.2.2
anyone ? Nili Adoram wrote: Hi all, The following error has occurred to a member of our QA team. He could not reproduce the scenario. If you look at the source files of 1.2.2 this is a very weird error, since a few lines ahead we verify that feedback messages are not null. Could this be a race between threads? (AJAX races a non-AJAX request?) Please advise, Thanks Nili P.S. I know 1.2.2 is an ancient version, however I cannot upgrade at the moment. java.lang.NullPointerException at wicket.Session.cleanupFeedbackMessages(Session.java:1015) at wicket.RequestCycle.detach(RequestCycle.java:817) at wicket.RequestCycle.steps(RequestCycle.java:1058) at wicket.RequestCycle.request(RequestCycle.java:454) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:216) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.qlusters.qrm.server.api.objects.transactions.TransactionFilter.doFilter(TransactionFilter.java:140) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] NPE in Session.cleanupFeedbackMessages in wicket 1.2.2
no one probably uses 1.2.2 still - like you said its ancient. -igor On 7/22/07, Nili Adoram [EMAIL PROTECTED] wrote: anyone ? Nili Adoram wrote: Hi all, The following error has occurred to a member of our QA team. He could not reproduce the scenario. If you look at the source files of 1.2.2 this is a very weird error, since a few lines ahead we verify that feedback messages are not null. Could this be a race between threads? (AJAX races a non-AJAX request?) Please advise, Thanks Nili P.S. I know 1.2.2 is an ancient version, however I cannot upgrade at the moment. java.lang.NullPointerException at wicket.Session.cleanupFeedbackMessages(Session.java:1015) at wicket.RequestCycle.detach(RequestCycle.java:817) at wicket.RequestCycle.steps(RequestCycle.java:1058) at wicket.RequestCycle.request(RequestCycle.java:454) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java :216) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:188) at com.qlusters.qrm.server.api.objects.transactions.TransactionFilter.doFilter (TransactionFilter.java:140) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:174) at org.apache.catalina.authenticator.AuthenticatorBase.invoke( AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :117) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java :151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Page lifetime in wicket
By default which temp directory does all the all pages stored into? Johan Compagner wrote: With wicket 1.3 (and the SecondLevelCacheSessionStore thats default in 1.3) only one page is kept in (session)memory this is the active page that is just rendered. All other pages (for backbutton) are saved to the hd. So wicket controls the memory for you so you don't forget stuff (what i see a lot in model2 frameworks) models should be detachable so that you only have a small state (an id) so that you can rebuild the real object you where working on. this way the pages are pretty small. If you don't want to have a page at all in the session then you can use Stateless Pages (StatelessForms and links) but don't use this for the wrong reasons... johan On 6/5/07, Matthieu Casanova [EMAIL PROTECTED] wrote: Hi, I wonder what was the lifetime of the page and related objects in Wicket ? For example if I create a link in a web page, if I click on it, my java method is called. But how many time do I have to click on it ? Isn't it possible to have memory problems because of those objects (the models too I suppose) that remains in memory and that I do not control ? Matthieu - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Page-lifetime-in-wicket-tf3870856.html#a11738019 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Browser not caching my images
On 7/20/07, Ayodeji Aladejebi [EMAIL PROTECTED] wrote: I recently upgraded to wicket 1.2.6 and although this time my application path is /* With a servlet? Sure that's a good idea? and i realized for each page refresh or event, the same sets of images seems to be loading all over again making loading appear slow How do you add these images? Any code you can share? Eelco - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Sessionless Wicket?
Yeah, you can give provide a HINT that they shouldn't be stored (that they are stateless) by overriding getStatelessHint on the components you put on the page. Note that if there is just one stateful component on the page, that'll trigger the page to be marked as stateful UNLESS you explicitly mark the page itself stateless (which is a bit cheaper by the way, as it won't iterate over it's children to find out whether it is stateless). i thought even if you explicitly mark a page as stateless that has stateful components ( link, form, etc ), it would still render as stateful ( creating session ) ? isn't that the behaviour? Eelco Hillenius wrote: Thanks to everyone for their help - I'm starting right away to convert everything to detachable models for all domain objects that are loaded into components... If you're only working with stateless pages, you don't detachable models as those pages won't be stored to start with. But if you want to reuse the models and components in stateful pages, it is better to have that. Eelco, I am curious about your statement when you have no callbacks, you're page will be stateless and not kept in memory... Most of my pages have no callbacks (by callback, I'm assuming that you mean a link that would have reference to wicket components in the URL, meaning that it is storing the state of that component so that it can further interact with it). Yep. Normal Links, Forms, ajax requests etc. I have taken great care to control the URLs of the application, so almost every page has only components that have standard URLs, with no references to any components, etc. The forms will obviously have a call back, and certain links (particularly if you are signed in as an administrator - a lot of links appear to edit and delete content that are all direct callbacks with obviously no direct URL encoding / decoding so that you can not use them outside of your session). Not sure what you're getting at... So, how do I know if it's storing the pages in memory? Is there something I can do to tell it not to? Yeah, you can give provide a HINT that they shouldn't be stored (that they are stateless) by overriding getStatelessHint on the components you put on the page. Note that if there is just one stateful component on the page, that'll trigger the page to be marked as stateful UNLESS you explicitly mark the page itself stateless (which is a bit cheaper by the way, as it won't iterate over it's children to find out whether it is stateless). The method where this all happens is Page#isPageStateless. Also, if you want to keep track of when user sessions are created, create a custom session store by overriding newSessionStore on Application and let your custom store extend HttpSessionStore or SecondLevelCacheSessionStore and then override onBind which will be called when (new) sessions are bound to the HttpSession. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Sessionless-Wicket--tf3684664.html#a11738136 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Sessionless Wicket?
i thought even if you explicitly mark a page as stateless that has stateful components ( link, form, etc ), it would still render as stateful ( creating session ) ? isn't that the behaviour? yes that is true. Eelco - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Page lifetime in wicket
By default which temp directory does all the all pages stored into? public FilePageStore() { this((File)((WebApplication)Application.get()).getServletContext().getAttribute( javax.servlet.context.tempdir)); } Eelco - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] content loading on page scroll
thoof.com has a very interesting feature - it loads more articles when you scroll down the page. Have you seen it ? Do you have any idea about how to implement it in wicket ? Some people have an idea, as Thoof is build with Wicket :) I wasn't one of them, so I don't know. I can imagine that you react on a scrolling event[1] in combination with a Wicket repeater, where you add elements and order redraw (though that's probably quite a blunt/ unoptimized way to do it). Eelco [1] http://codepunk.hardwar.org.uk/ajs02.htm - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user