Re: [Wicket-user] Strategy to avoid new instances of pages and panels
I have tried the suggestion, and am still having trouble. In my base page component, I have the following code at the end of the constructor: setVersioned(false); In addition, I have the following code in my extension of WebApplication.init: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); getPageSettings().setVersionPagesByDefault(false); Despite all of this, if I navigate to the URL for one of these pages, then navigate to that URL again with different parameters, I see two pages in my session. In fact, I always see between 1 and 5 pages in session. It seems to max out at 5: p:null:7 = [Page class = com.removed.wicket.page.search.SearchResultsPage, id = 7] p:null:8 = [Page class = com.removed.wicket.page.search.SearchResultsPage, id = 8] p:null:5 = [Page class = com.removed.wicket.page.search.SearchResultsPage, id = 5] p:null:9 = [Page class = com.removed.wicket.page.search.SearchResultsPage, id = 9] p:null:6 = [Page class = com.removed.wicket.page.search.SearchResultsPage, id = 6] I'm thinking that the original suggestion may not have been correct for the problem I'm trying to solve. How can I ensure that when they navigate to the same URL with new parameters, Wicket creates a new page and abandons the previous instance of that page? I'm guessing I would need to override whatever factory method creates pages so that it can check the page map and remove any previous instances of the page before creating and returning a new one. -Jason dukejansen wrote: Did not know about that functionality. Sounds perfect. Then for pages which must always have bookmarkable URL, we can always extend a base class that sets itself to unversioned, and for other non-bookmarkable pages we can still rely on the standard behavior with back button support. Thanks! -Jason Johan Compagner wrote: Ahh so you are using pages with state. (you use ajax) You just don't want to version them? Because for navigation you only use bookmarkable pages Just have one base page that does serVersioned(false) then all your pages are unversioned. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Sorry, guess I misunderstood. Still trying to wrap my head around these concepts. We have an app that is all bookmarkable pages so far, but we may encounter cases without them further down the road. But even for our bookmarkable pages, they may have lots of activity on them which is ajax actions which update the model behind the scenes. The way wicket wires components to their models is still very beneficial, as is the markup inheritance and java-centric development model, etc. As an example, we currently have a search results page which must always include all search criteria in the URL. So right now we have multiple panels with various search criteria. When the user updates the form elements and clicks search, we let wicket update all the backing models for us, then we assemble a new URL based on the updated models, and redirect to the new URL. This is instead of what might be a more familiar web model where the form data is simply submitted TO the new URL -- instead, we are submitting to wicket, letting wicket do all the updates to our backing state, and then we just construct a new URL to represent the new criteria and redirect to it. I won't deny that this is a bit wacky, but it was the only way I could find to ensure that my search criteria are included in the URL, but we still get wicket's free behavior of updating all model data. The trick is that we are abandoning the updated model data and redirecting to a new page... Not sure how well I've explained this. If there was a way to get wicket to simply use bookmarkable URLs when it does the form submission, I'd be happy to fall back on wicket. Also, FYI, we are using a lot of the Wicket ajax behavior for updating state which does NOT need to be in the URL. -Jason Johan Compagner wrote: But i was talking about the settings maxpageversions. thats not the same thing as how many there can be in the pagemap That depends on the page map that is used (in 1.3 or 2.0) AccessStackPageMap uses by default 5 because that is EvictionStrategy: private IPageMapEvictionStrategy pageMapEvictionStrategy = new LeastRecentlyAccessedEvictionStrategy(5); The PageMap of the secondlevelcache only has one active in the session. But you are making an app where all the urls are again bookmarkable and you don't use forms anywhere? or if you use for (with wicket 1.2) you handle the post in the constructor of the page itself? Thats not really where wicket is made for, your throw away pretty much 90% of what makes wicket. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: I think the current method name makes sense, but what is unclear is whether the CURRENT
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
hmm getSessionSettings().setPageMapEvictionStrategy(new IPageMapEvictionStrategy() { public void evict(IPageMap pageMap) { syncrhonized (Session.get()) {pageMap.clear();} } } -igor On 1/30/07, dukejansen [EMAIL PROTECTED] wrote: I have tried the suggestion, and am still having trouble. In my base page component, I have the following code at the end of the constructor: setVersioned(false); In addition, I have the following code in my extension of WebApplication.init: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); getPageSettings().setVersionPagesByDefault(false); Despite all of this, if I navigate to the URL for one of these pages, then navigate to that URL again with different parameters, I see two pages in my session. In fact, I always see between 1 and 5 pages in session. It seems to max out at 5: p:null:7 = [Page class = com.removed.wicket.page.search.SearchResultsPage, id = 7] p:null:8 = [Page class = com.removed.wicket.page.search.SearchResultsPage, id = 8] p:null:5 = [Page class = com.removed.wicket.page.search.SearchResultsPage, id = 5] p:null:9 = [Page class = com.removed.wicket.page.search.SearchResultsPage, id = 9] p:null:6 = [Page class = com.removed.wicket.page.search.SearchResultsPage, id = 6] I'm thinking that the original suggestion may not have been correct for the problem I'm trying to solve. How can I ensure that when they navigate to the same URL with new parameters, Wicket creates a new page and abandons the previous instance of that page? I'm guessing I would need to override whatever factory method creates pages so that it can check the page map and remove any previous instances of the page before creating and returning a new one. -Jason dukejansen wrote: Did not know about that functionality. Sounds perfect. Then for pages which must always have bookmarkable URL, we can always extend a base class that sets itself to unversioned, and for other non-bookmarkable pages we can still rely on the standard behavior with back button support. Thanks! -Jason Johan Compagner wrote: Ahh so you are using pages with state. (you use ajax) You just don't want to version them? Because for navigation you only use bookmarkable pages Just have one base page that does serVersioned(false) then all your pages are unversioned. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Sorry, guess I misunderstood. Still trying to wrap my head around these concepts. We have an app that is all bookmarkable pages so far, but we may encounter cases without them further down the road. But even for our bookmarkable pages, they may have lots of activity on them which is ajax actions which update the model behind the scenes. The way wicket wires components to their models is still very beneficial, as is the markup inheritance and java-centric development model, etc. As an example, we currently have a search results page which must always include all search criteria in the URL. So right now we have multiple panels with various search criteria. When the user updates the form elements and clicks search, we let wicket update all the backing models for us, then we assemble a new URL based on the updated models, and redirect to the new URL. This is instead of what might be a more familiar web model where the form data is simply submitted TO the new URL -- instead, we are submitting to wicket, letting wicket do all the updates to our backing state, and then we just construct a new URL to represent the new criteria and redirect to it. I won't deny that this is a bit wacky, but it was the only way I could find to ensure that my search criteria are included in the URL, but we still get wicket's free behavior of updating all model data. The trick is that we are abandoning the updated model data and redirecting to a new page... Not sure how well I've explained this. If there was a way to get wicket to simply use bookmarkable URLs when it does the form submission, I'd be happy to fall back on wicket. Also, FYI, we are using a lot of the Wicket ajax behavior for updating state which does NOT need to be in the URL. -Jason Johan Compagner wrote: But i was talking about the settings maxpageversions. thats not the same thing as how many there can be in the pagemap That depends on the page map that is used (in 1.3 or 2.0) AccessStackPageMap uses by default 5 because that is EvictionStrategy: private IPageMapEvictionStrategy pageMapEvictionStrategy = new LeastRecentlyAccessedEvictionStrategy(5); The PageMap of the secondlevelcache only has one active in the session. But you are making an app where all the urls are again bookmarkable and you don't use forms anywhere? or if you use for (with wicket 1.2) you handle the post in the constructor of the page itself? Thats not really where wicket is made
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
yes thats already fixed for a few days now! whiner! johan On 1/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote: ajax requests shouldnt create versions anyways! did you fix that in 2.0yet? -igor On 1/24/07, Johan Compagner [EMAIL PROTECTED] wrote: Ahh so you are using pages with state. (you use ajax) You just don't want to version them? Because for navigation you only use bookmarkable pages Just have one base page that does serVersioned(false) then all your pages are unversioned. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Sorry, guess I misunderstood. Still trying to wrap my head around these concepts. We have an app that is all bookmarkable pages so far, but we may encounter cases without them further down the road. But even for our bookmarkable pages, they may have lots of activity on them which is ajax actions which update the model behind the scenes. The way wicket wires components to their models is still very beneficial, as is the markup inheritance and java-centric development model, etc. As an example, we currently have a search results page which must always include all search criteria in the URL. So right now we have multiple panels with various search criteria. When the user updates the form elements and clicks search, we let wicket update all the backing models for us, then we assemble a new URL based on the updated models, and redirect to the new URL. This is instead of what might be a more familiar web model where the form data is simply submitted TO the new URL -- instead, we are submitting to wicket, letting wicket do all the updates to our backing state, and then we just construct a new URL to represent the new criteria and redirect to it. I won't deny that this is a bit wacky, but it was the only way I could find to ensure that my search criteria are included in the URL, but we still get wicket's free behavior of updating all model data. The trick is that we are abandoning the updated model data and redirecting to a new page... Not sure how well I've explained this. If there was a way to get wicket to simply use bookmarkable URLs when it does the form submission, I'd be happy to fall back on wicket. Also, FYI, we are using a lot of the Wicket ajax behavior for updating state which does NOT need to be in the URL. -Jason Johan Compagner wrote: But i was talking about the settings maxpageversions. thats not the same thing as how many there can be in the pagemap That depends on the page map that is used (in 1.3 or 2.0) AccessStackPageMap uses by default 5 because that is EvictionStrategy: private IPageMapEvictionStrategy pageMapEvictionStrategy = new LeastRecentlyAccessedEvictionStrategy(5); The PageMap of the secondlevelcache only has one active in the session. But you are making an app where all the urls are again bookmarkable and you don't use forms anywhere? or if you use for (with wicket 1.2) you handle the post in the constructor of the page itself? Thats not really where wicket is made for, your throw away pretty much 90% of what makes wicket. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: I think the current method name makes sense, but what is unclear is whether the CURRENT page is taking up one of the positions. I would think setting the max to 1 would ensure that the pagemap contains the current page and no others. If in fact the current page doesn't need room in the page map, then I guess 0 would make more sense. I think adding detail to the javadoc should be sufficient to clear up this ambiguity. Johan Compagner wrote: set the max to 0 then the change list of the version manager will really not ntain anything this is the test: (after the new one is added to the list) // If stack is overfull, remove oldest entry if (getVersions() maxVersions) { expireOldestVersion(); } What is logical? max versions is that also counting the current one? What is the best English for this?? should we better express it like: setMaxPageUndoBuffer() ?? johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. How can I instruct Wicket not to maintain the
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
The application I'm building must always have bookmarkable URLs which contain all page parameters needed to reconstruct the page. Achieved this currently by letting all page events update state/model, then redirect to a new URL based on that state, so that the URL includes the new state. But this has the downside of generating a new page every time, so I was trying to find a way to remove the old pages which I know I don't need, since the application is all bookmarkable URLs anyway. I realize we are killing Wicket back button support, but since our entire app has bookmarkable URLs anyway, I think we'll be fine. We don't need a whole lot of state preserved from one page to the next, and where we do we'll implement the flow with ajax anyway, probably, all on a single page. Still not sure if my approach makes sense, this is just what I've worked out so far. If anyone has any tips on how better to approach this, I'd love to hear them. I'm getting a sense that Wicket is built more to support stateful flows managed entirely by Wicket than to support a whole slew of bookmarkable URLs. If there is a way I can keep using the wicket event framework such that it posts page parameters in the URL somehow against bookmarkable URLs, it would be much easier than having to do it myself. -Jason igor.vaynberg wrote: you do realize that by doing this you are completely killing the back button support in your app -igor On 1/23/07, dukejansen [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. How can I instruct Wicket not to maintain the multiple versions of a given page within the session? I've tried the following but when I dump the session contents I still see multiple page versions: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); Am I missing the boat on this entirely? -Jason -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8553452 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8570548 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
I think the current method name makes sense, but what is unclear is whether the CURRENT page is taking up one of the positions. I would think setting the max to 1 would ensure that the pagemap contains the current page and no others. If in fact the current page doesn't need room in the page map, then I guess 0 would make more sense. I think adding detail to the javadoc should be sufficient to clear up this ambiguity. Johan Compagner wrote: set the max to 0 then the change list of the version manager will really not contain anything this is the test: (after the new one is added to the list) // If stack is overfull, remove oldest entry if (getVersions() maxVersions) { expireOldestVersion(); } What is logical? max versions is that also counting the current one? What is the best English for this?? should we better express it like: setMaxPageUndoBuffer() ?? johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. How can I instruct Wicket not to maintain the multiple versions of a given page within the session? I've tried the following but when I dump the session contents I still see multiple page versions: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); Am I missing the boat on this entirely? -Jason -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8553452 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8570594 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
But i was talking about the settings maxpageversions. thats not the same thing as how many there can be in the pagemap That depends on the page map that is used (in 1.3 or 2.0) AccessStackPageMap uses by default 5 because that is EvictionStrategy: private IPageMapEvictionStrategy pageMapEvictionStrategy = new LeastRecentlyAccessedEvictionStrategy(5); The PageMap of the secondlevelcache only has one active in the session. But you are making an app where all the urls are again bookmarkable and you don't use forms anywhere? or if you use for (with wicket 1.2) you handle the post in the constructor of the page itself? Thats not really where wicket is made for, your throw away pretty much 90% of what makes wicket. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: I think the current method name makes sense, but what is unclear is whether the CURRENT page is taking up one of the positions. I would think setting the max to 1 would ensure that the pagemap contains the current page and no others. If in fact the current page doesn't need room in the page map, then I guess 0 would make more sense. I think adding detail to the javadoc should be sufficient to clear up this ambiguity. Johan Compagner wrote: set the max to 0 then the change list of the version manager will really not ntain anything this is the test: (after the new one is added to the list) // If stack is overfull, remove oldest entry if (getVersions() maxVersions) { expireOldestVersion(); } What is logical? max versions is that also counting the current one? What is the best English for this?? should we better express it like: setMaxPageUndoBuffer() ?? johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. How can I instruct Wicket not to maintain the multiple versions of a given page within the session? I've tried the following but when I dump the session contents I still see multiple page versions: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); Am I missing the boat on this entirely? -Jason -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8553452 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8570594 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Sorry, guess I misunderstood. Still trying to wrap my head around these concepts. We have an app that is all bookmarkable pages so far, but we may encounter cases without them further down the road. But even for our bookmarkable pages, they may have lots of activity on them which is ajax actions which update the model behind the scenes. The way wicket wires components to their models is still very beneficial, as is the markup inheritance and java-centric development model, etc. As an example, we currently have a search results page which must always include all search criteria in the URL. So right now we have multiple panels with various search criteria. When the user updates the form elements and clicks search, we let wicket update all the backing models for us, then we assemble a new URL based on the updated models, and redirect to the new URL. This is instead of what might be a more familiar web model where the form data is simply submitted TO the new URL -- instead, we are submitting to wicket, letting wicket do all the updates to our backing state, and then we just construct a new URL to represent the new criteria and redirect to it. I won't deny that this is a bit wacky, but it was the only way I could find to ensure that my search criteria are included in the URL, but we still get wicket's free behavior of updating all model data. The trick is that we are abandoning the updated model data and redirecting to a new page... Not sure how well I've explained this. If there was a way to get wicket to simply use bookmarkable URLs when it does the form submission, I'd be happy to fall back on wicket. Also, FYI, we are using a lot of the Wicket ajax behavior for updating state which does NOT need to be in the URL. -Jason Johan Compagner wrote: But i was talking about the settings maxpageversions. thats not the same thing as how many there can be in the pagemap That depends on the page map that is used (in 1.3 or 2.0) AccessStackPageMap uses by default 5 because that is EvictionStrategy: private IPageMapEvictionStrategy pageMapEvictionStrategy = new LeastRecentlyAccessedEvictionStrategy(5); The PageMap of the secondlevelcache only has one active in the session. But you are making an app where all the urls are again bookmarkable and you don't use forms anywhere? or if you use for (with wicket 1.2) you handle the post in the constructor of the page itself? Thats not really where wicket is made for, your throw away pretty much 90% of what makes wicket. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: I think the current method name makes sense, but what is unclear is whether the CURRENT page is taking up one of the positions. I would think setting the max to 1 would ensure that the pagemap contains the current page and no others. If in fact the current page doesn't need room in the page map, then I guess 0 would make more sense. I think adding detail to the javadoc should be sufficient to clear up this ambiguity. Johan Compagner wrote: set the max to 0 then the change list of the version manager will really not ntain anything this is the test: (after the new one is added to the list) // If stack is overfull, remove oldest entry if (getVersions() maxVersions) { expireOldestVersion(); } What is logical? max versions is that also counting the current one? What is the best English for this?? should we better express it like: setMaxPageUndoBuffer() ?? johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. How can I instruct Wicket not to maintain the multiple versions of a given page within the session? I've tried the following but when I dump the session contents I still see multiple page versions: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); Am I missing the boat on this entirely? -Jason -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8553452 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Ahh so you are using pages with state. (you use ajax) You just don't want to version them? Because for navigation you only use bookmarkable pages Just have one base page that does serVersioned(false) then all your pages are unversioned. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Sorry, guess I misunderstood. Still trying to wrap my head around these concepts. We have an app that is all bookmarkable pages so far, but we may encounter cases without them further down the road. But even for our bookmarkable pages, they may have lots of activity on them which is ajax actions which update the model behind the scenes. The way wicket wires components to their models is still very beneficial, as is the markup inheritance and java-centric development model, etc. As an example, we currently have a search results page which must always include all search criteria in the URL. So right now we have multiple panels with various search criteria. When the user updates the form elements and clicks search, we let wicket update all the backing models for us, then we assemble a new URL based on the updated models, and redirect to the new URL. This is instead of what might be a more familiar web model where the form data is simply submitted TO the new URL -- instead, we are submitting to wicket, letting wicket do all the updates to our backing state, and then we just construct a new URL to represent the new criteria and redirect to it. I won't deny that this is a bit wacky, but it was the only way I could find to ensure that my search criteria are included in the URL, but we still get wicket's free behavior of updating all model data. The trick is that we are abandoning the updated model data and redirecting to a new page... Not sure how well I've explained this. If there was a way to get wicket to simply use bookmarkable URLs when it does the form submission, I'd be happy to fall back on wicket. Also, FYI, we are using a lot of the Wicket ajax behavior for updating state which does NOT need to be in the URL. -Jason Johan Compagner wrote: But i was talking about the settings maxpageversions. thats not the same thing as how many there can be in the pagemap That depends on the page map that is used (in 1.3 or 2.0) AccessStackPageMap uses by default 5 because that is EvictionStrategy: private IPageMapEvictionStrategy pageMapEvictionStrategy = new LeastRecentlyAccessedEvictionStrategy(5); The PageMap of the secondlevelcache only has one active in the session. But you are making an app where all the urls are again bookmarkable and you don't use forms anywhere? or if you use for (with wicket 1.2) you handle the post in the constructor of the page itself? Thats not really where wicket is made for, your throw away pretty much 90% of what makes wicket. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: I think the current method name makes sense, but what is unclear is whether the CURRENT page is taking up one of the positions. I would think setting the max to 1 would ensure that the pagemap contains the current page and no others. If in fact the current page doesn't need room in the page map, then I guess 0 would make more sense. I think adding detail to the javadoc should be sufficient to clear up this ambiguity. Johan Compagner wrote: set the max to 0 then the change list of the version manager will really not ntain anything this is the test: (after the new one is added to the list) // If stack is overfull, remove oldest entry if (getVersions() maxVersions) { expireOldestVersion(); } What is logical? max versions is that also counting the current one? What is the best English for this?? should we better express it like: setMaxPageUndoBuffer() ?? johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. How can I instruct Wicket not to maintain the multiple versions of a given page within the session? I've tried the following but when I dump the session contents I still see multiple page versions: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); Am I missing the boat on this entirely? -Jason -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8553452 Sent from the Wicket - User mailing list archive at Nabble.com.
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
ajax requests shouldnt create versions anyways! did you fix that in 2.0 yet? -igor On 1/24/07, Johan Compagner [EMAIL PROTECTED] wrote: Ahh so you are using pages with state. (you use ajax) You just don't want to version them? Because for navigation you only use bookmarkable pages Just have one base page that does serVersioned(false) then all your pages are unversioned. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Sorry, guess I misunderstood. Still trying to wrap my head around these concepts. We have an app that is all bookmarkable pages so far, but we may encounter cases without them further down the road. But even for our bookmarkable pages, they may have lots of activity on them which is ajax actions which update the model behind the scenes. The way wicket wires components to their models is still very beneficial, as is the markup inheritance and java-centric development model, etc. As an example, we currently have a search results page which must always include all search criteria in the URL. So right now we have multiple panels with various search criteria. When the user updates the form elements and clicks search, we let wicket update all the backing models for us, then we assemble a new URL based on the updated models, and redirect to the new URL. This is instead of what might be a more familiar web model where the form data is simply submitted TO the new URL -- instead, we are submitting to wicket, letting wicket do all the updates to our backing state, and then we just construct a new URL to represent the new criteria and redirect to it. I won't deny that this is a bit wacky, but it was the only way I could find to ensure that my search criteria are included in the URL, but we still get wicket's free behavior of updating all model data. The trick is that we are abandoning the updated model data and redirecting to a new page... Not sure how well I've explained this. If there was a way to get wicket to simply use bookmarkable URLs when it does the form submission, I'd be happy to fall back on wicket. Also, FYI, we are using a lot of the Wicket ajax behavior for updating state which does NOT need to be in the URL. -Jason Johan Compagner wrote: But i was talking about the settings maxpageversions. thats not the same thing as how many there can be in the pagemap That depends on the page map that is used (in 1.3 or 2.0) AccessStackPageMap uses by default 5 because that is EvictionStrategy: private IPageMapEvictionStrategy pageMapEvictionStrategy = new LeastRecentlyAccessedEvictionStrategy(5); The PageMap of the secondlevelcache only has one active in the session. But you are making an app where all the urls are again bookmarkable and you don't use forms anywhere? or if you use for (with wicket 1.2) you handle the post in the constructor of the page itself? Thats not really where wicket is made for, your throw away pretty much 90% of what makes wicket. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: I think the current method name makes sense, but what is unclear is whether the CURRENT page is taking up one of the positions. I would think setting the max to 1 would ensure that the pagemap contains the current page and no others. If in fact the current page doesn't need room in the page map, then I guess 0 would make more sense. I think adding detail to the javadoc should be sufficient to clear up this ambiguity. Johan Compagner wrote: set the max to 0 then the change list of the version manager will really not ntain anything this is the test: (after the new one is added to the list) // If stack is overfull, remove oldest entry if (getVersions() maxVersions) { expireOldestVersion(); } What is logical? max versions is that also counting the current one? What is the best English for this?? should we better express it like: setMaxPageUndoBuffer() ?? johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. How can I instruct Wicket not to maintain the multiple versions of a given page within the session? I've tried the following but when I dump the session contents I still see multiple page versions: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); Am I missing the boat on
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Did not know about that functionality. Sounds perfect. Then for pages which must always have bookmarkable URL, we can always extend a base class that sets itself to unversioned, and for other non-bookmarkable pages we can still rely on the standard behavior with back button support. Thanks! -Jason Johan Compagner wrote: Ahh so you are using pages with state. (you use ajax) You just don't want to version them? Because for navigation you only use bookmarkable pages Just have one base page that does serVersioned(false) then all your pages are unversioned. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Sorry, guess I misunderstood. Still trying to wrap my head around these concepts. We have an app that is all bookmarkable pages so far, but we may encounter cases without them further down the road. But even for our bookmarkable pages, they may have lots of activity on them which is ajax actions which update the model behind the scenes. The way wicket wires components to their models is still very beneficial, as is the markup inheritance and java-centric development model, etc. As an example, we currently have a search results page which must always include all search criteria in the URL. So right now we have multiple panels with various search criteria. When the user updates the form elements and clicks search, we let wicket update all the backing models for us, then we assemble a new URL based on the updated models, and redirect to the new URL. This is instead of what might be a more familiar web model where the form data is simply submitted TO the new URL -- instead, we are submitting to wicket, letting wicket do all the updates to our backing state, and then we just construct a new URL to represent the new criteria and redirect to it. I won't deny that this is a bit wacky, but it was the only way I could find to ensure that my search criteria are included in the URL, but we still get wicket's free behavior of updating all model data. The trick is that we are abandoning the updated model data and redirecting to a new page... Not sure how well I've explained this. If there was a way to get wicket to simply use bookmarkable URLs when it does the form submission, I'd be happy to fall back on wicket. Also, FYI, we are using a lot of the Wicket ajax behavior for updating state which does NOT need to be in the URL. -Jason Johan Compagner wrote: But i was talking about the settings maxpageversions. thats not the same thing as how many there can be in the pagemap That depends on the page map that is used (in 1.3 or 2.0) AccessStackPageMap uses by default 5 because that is EvictionStrategy: private IPageMapEvictionStrategy pageMapEvictionStrategy = new LeastRecentlyAccessedEvictionStrategy(5); The PageMap of the secondlevelcache only has one active in the session. But you are making an app where all the urls are again bookmarkable and you don't use forms anywhere? or if you use for (with wicket 1.2) you handle the post in the constructor of the page itself? Thats not really where wicket is made for, your throw away pretty much 90% of what makes wicket. johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: I think the current method name makes sense, but what is unclear is whether the CURRENT page is taking up one of the positions. I would think setting the max to 1 would ensure that the pagemap contains the current page and no others. If in fact the current page doesn't need room in the page map, then I guess 0 would make more sense. I think adding detail to the javadoc should be sufficient to clear up this ambiguity. Johan Compagner wrote: set the max to 0 then the change list of the version manager will really not ntain anything this is the test: (after the new one is added to the list) // If stack is overfull, remove oldest entry if (getVersions() maxVersions) { expireOldestVersion(); } What is logical? max versions is that also counting the current one? What is the best English for this?? should we better express it like: setMaxPageUndoBuffer() ?? johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. How can I instruct Wicket not to maintain the multiple versions of a given page within the session? I've tried the following but when I
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Eelco Hillenius wrote: Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. How can I instruct Wicket not to maintain the multiple versions of a given page within the session? I've tried the following but when I dump the session contents I still see multiple page versions: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); Am I missing the boat on this entirely? -Jason -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8553452 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
How can I instruct Wicket not to maintain the multiple versions of a given page within the session? I've tried the following but when I dump the session contents I still see multiple page versions: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); Am I missing the boat on this entirely? Nope, your not missing the point. That stuff needs to be worked on, see http://issues.apache.org/jira/browse/WICKET-201 I think Johan has been working on it recently. Don't know how far he got yet. Eelco - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
you do realize that by doing this you are completely killing the back button support in your app -igor On 1/23/07, dukejansen [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. How can I instruct Wicket not to maintain the multiple versions of a given page within the session? I've tried the following but when I dump the session contents I still see multiple page versions: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); Am I missing the boat on this entirely? -Jason -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8553452 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
set the max to 0 then the change list of the version manager will really not contain anything this is the test: (after the new one is added to the list) // If stack is overfull, remove oldest entry if (getVersions() maxVersions) { expireOldestVersion(); } What is logical? max versions is that also counting the current one? What is the best English for this?? should we better express it like: setMaxPageUndoBuffer() ?? johan On 1/24/07, dukejansen [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. How can I instruct Wicket not to maintain the multiple versions of a given page within the session? I've tried the following but when I dump the session contents I still see multiple page versions: getSessionSettings().setMaxPageMaps(1); getPageSettings().setMaxPageVersions(1); Am I missing the boat on this entirely? -Jason -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a8553452 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
As we creating new instantes of WebPage, Form and other web widgets for every request received for different pages, it will cause more garbages created. Will this going to be affect the server performance? I'm new to Wicket and probably this has been discussed before. I will be grateful if someone could point me in the right direction to find the answer. Thanks. Johan Compagner wrote: as martijn said. I am not talking about pooling pages over sessions That is a nogo in wicket. No i was talking about a single session reusing pages. So if you create a link that goes back to page X then hold that page there. pooling pages over sessions can't be done. Maybe for completely static pages that has no dynamic parts at all. But then you can just use pure html. ... -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a7673337 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Read this on the benefits of recent garbage collection strategies. http://www-128.ibm.com/developerworks/library/j-jtp01274.html Martijn On 12/4/06, TH Lim [EMAIL PROTECTED] wrote: As we creating new instantes of WebPage, Form and other web widgets for every request received for different pages, it will cause more garbages created. Will this going to be affect the server performance? I'm new to Wicket and probably this has been discussed before. I will be grateful if someone could point me in the right direction to find the answer. Thanks. Johan Compagner wrote: as martijn said. I am not talking about pooling pages over sessions That is a nogo in wicket. No i was talking about a single session reusing pages. So if you create a link that goes back to page X then hold that page there. pooling pages over sessions can't be done. Maybe for completely static pages that has no dynamic parts at all. But then you can just use pure html. ... -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a7673337 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- a href=http://www.thebeststuffintheworld.com/vote_for/wicket;Vote/a for a href=http://www.thebeststuffintheworld.com/stuff/wicket;Wicket/a at the a href=http://www.thebeststuffintheworld.com/;Best Stuff in the World!/a - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
subclass: DefaultRequestTargetResolverStrategy and then the method resolveBookmarkablePage(final RequestCycle requestCycle, final RequestParameters requestParameters) then create a new: public CompoundRequestCycleProcessor(IRequestCodingStrategy requestCodingStrategy, IRequestTargetResolverStrategy requestTargetResolverStrategy, IEventProcessorStrategy eventProcessorStrategy, IResponseStrategy responseStrategy, IExceptionResponseStrategy exceptionResponseStrategy) with your subclass of RequestTargetResolverStrategy And override the method in WebApplication protected IRequestCycleProcessor newRequestCycleProcessor() { return new CompoundRequestCycleProcessor(new WebRequestCodingStrategy(),new Your RequestTargetResolverStrategy(),null,null,null); } johan On 11/17/06, Wilson [EMAIL PROTECTED] wrote: Hi Johan, I am having problems with new instances caused by bookmarkable pages. I was unable to find how to provide my own implementation of IRequestTargetResolverStrategy. Probably I must override a method somewhere, but I was unable to find it. How do I provide my implementation to IRequestTargetResolverStrategy? Tks, Wilson subclass: DefaultRequestTargetResolverStrategy and then resolveBook and do what ever you want there. But don't just return a page from a application wide pool johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: John, when I use bookmarkable urls I get every time I reload the page a new instance. Is there a way to avoid this? Maciej -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a7407830 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Wouldn't a page factory be actually better solution? It could take an existing page from pagemap and return it. Seems to me easier than custom request target resolver strategy. -Matej Johan Compagner wrote: subclass: DefaultRequestTargetResolverStrategy and then resolveBook and do what ever you want there. But don't just return a page from a application wide pool johan On 11/3/06, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: John, when I use bookmarkable urls I get every time I reload the page a new instance. Is there a way to avoid this? Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net mailto:wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net mailto:wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels what do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with pooling pages. johan On 11/3/06, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- mfG Bednarz, Hannover - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
ahh ofcourse stupid me On 11/19/06, Matej Knopp [EMAIL PROTECTED] wrote: Wouldn't a page factory be actually better solution? It could take an existing page from pagemap and return it. Seems to me easier than custom request target resolver strategy. -Matej Johan Compagner wrote: subclass: DefaultRequestTargetResolverStrategy and then resolveBook and do what ever you want there. But don't just return a page from a application wide pool johan On 11/3/06, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: John, when I use bookmarkable urls I get every time I reload the page a new instance. Is there a way to avoid this? Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net mailto:wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net mailto:wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels what do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with pooling pages. johan On 11/3/06, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- mfG Bednarz, Hannover - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Hi Johan, I am having problems with new instances caused by bookmarkable pages. I was unable to find how to provide my own implementation of IRequestTargetResolverStrategy. Probably I must override a method somewhere, but I was unable to find it. How do I provide my implementation to IRequestTargetResolverStrategy? Tks, Wilson subclass: DefaultRequestTargetResolverStrategy and then resolveBook and do what ever you want there. But don't just return a page from a application wide pool johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: John, when I use bookmarkable urls I get every time I reload the page a new instance. Is there a way to avoid this? Maciej -- View this message in context: http://www.nabble.com/Strategy-to-avoid-new-instances-of-pages-and-panels-tf2566413.html#a7407830 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
One style of Wicket development is to use a single page for the entire application, switching components within the page. If you did that, your pages could be large components chosen by the single master page. You could keep these page components in application or session storage to be re-used. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, November 03, 2006 1:31 AM To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] Strategy to avoid new instances of pages and panels Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
what do you mean with reloads the page?A normal refresh (if url is wicket:interface=xxx) then a page is not recreated.Or do you mean bookmarkable urls?Other links like pageLinks or your own links you can do what ever you want with pooling pages. johanOn 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hi all!I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ?- some kind of page and/or factory or proxy to reuse instances?Any best practice or some examples would be nice. Thank you very much,Maciej Bednarz-Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Helo Johan, can you explain pooling pages in details and give me some short example? Do you mean putting pages into some kind of singleton or a synchronized pool which holds reuseable pages? How are those pages given back to the pool for reuse? Thank you very much, Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels what do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with (PortalSession)Session.get(). johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- mfG Bednarz, Hannover - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Martijn, isn`t this a problem of the framework itself? When I have page constcted from serveral subcomponents then my JVM will run out of memory after some user. What do you think about string components within the user session and reuse them? Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:38:11 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels Object pooling is considered baaaddd form with Wicket and Java in general. A page is constructed in the context of a user session and as such should not be shared between different sessions: each component is stateful for a particular session. You will enter a world of hurt if you embark on such a path. Martijn On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Helo Johan, can you explain pooling pages in details and give me some short example? Do you mean putting pages into some kind of singleton or a synchronized pool which holds reuseable pages? How are those pages given back to the pool for reuse? Thank you very much, Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels what do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with (PortalSession)Session.get(). johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- mfG Bednarz, Hannover - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- a href=http://www.thebeststuffintheworld.com/vote_for/wicket;Vote/a for a href=http://www.thebeststuffintheworld.com/stuff/wicket;Wicket/a at the a href=http://www.thebeststuffintheworld.com/;Best Stuff in the World!/a - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- mfG Bednarz, Hannover
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
John, when I use bookmarkable urls I get every time I reload the page a new instance. Is there a way to avoid this? Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels what do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with pooling pages. johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- mfG Bednarz, Hannover - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
as martijn said. I am not talking about pooling pages over sessionsThat is a nogo in wicket. No i was talking about a single session reusing pages.So if you create a link that goes back to page X then hold that page there. pooling pages over sessions can't be done. Maybe for completely static pagesthat has no dynamic parts at all. But then you can just use pure html.With the current jvm's you shouldn't pool objects because you don't want to make them pooling (caching) of objects should only be done if the object when created would do io kind of thingslike Database Connections or database objects.Maybe very very big objects could be pooled like large buffers, but i also don't know if that really would give you something.johanOn 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Helo Johan,can you explain pooling pages in details and give me some short example? Do you mean putting pages into some kind of singleton or a synchronizedpool which holds reuseable pages? How are those pages given back to thepool for reuse?Thank you very much,Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panelswhat do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with (PortalSession)Session.get(). johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user--mfGBednarz, Hannover -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
for such a things you have different SessionStores or you can do clustering.But even with one server you can handle quite some load. Memory is pretty cheap.johanOn 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Martijn,isn`t this a problem of the framework itself? When I have pageconstcted from serveral subcomponents then my JVM will runout of memory after some user. What do you think about stringcomponents within the user session and reuse them? Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:38:11 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels Object pooling is considered baaaddd form with Wicket and Java in general. A page is constructed in the context of a user session and as such should not be shared between different sessions: each component is stateful for a particular session. You will enter a world of hurt if you embark on such a path. Martijn On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Helo Johan, can you explain pooling pages in details and give me some short example? Do you mean putting pages into some kind of singleton or a synchronized pool which holds reuseable pages? How are those pages given back to the pool for reuse? Thank you very much, Maciej-Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels what do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with (PortalSession)Session.get(). johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED]wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- mfG Bednarz, Hannover - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- a href="" href="http://www.thebeststuffintheworld.com/vote_for/wicket">http://www.thebeststuffintheworld.com/vote_for/wicketVote/a for a href="" href="http://www.thebeststuffintheworld.com/stuff/wicket"> http://www.thebeststuffintheworld.com/stuff/wicketWicket/a at the a href="" href="http://www.thebeststuffintheworld.com/">http://www.thebeststuffintheworld.com/Best Stuff in the World!/a - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
subclass: DefaultRequestTargetResolverStrategyand then resolveBookand do what ever you want there. But don't just return a page from a application wide pooljohan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: John,when I use bookmarkable urls I get every time I reload the pagea new instance. Is there a way to avoid this?Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels what do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with pooling pages. johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user--mfGBednarz, Hannover -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Ok, I understand wickets aproach of pageobject bound to sessions. Do you have some trick to avoid new page instances for bookmarkable URLs as mentioned before? Thank you very much, Maciej PS: I am building a new community page using wicket. So I have to test if wicket can handle thousands of new user request a minute. -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:48:51 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels as martijn said. I am not talking about pooling pages over sessions That is a nogo in wicket. No i was talking about a single session reusing pages. So if you create a link that goes back to page X then hold that page there. pooling pages over sessions can't be done. Maybe for completely static pages that has no dynamic parts at all. But then you can just use pure html. With the current jvm's you shouldn't pool objects because you don't want to make them pooling (caching) of objects should only be done if the object when created would do io kind of things like Database Connections or database objects. Maybe very very big objects could be pooled like large buffers, but i also don't know if that really would give you something. johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Helo Johan, can you explain pooling pages in details and give me some short example? Do you mean putting pages into some kind of singleton or a synchronized pool which holds reuseable pages? How are those pages given back to the pool for reuse? Thank you very much, Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels what do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with (PortalSession)Session.get(). johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- mfG Bednarz, Hannover - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Perfect, this is what I need. Thanks, Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:55:14 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels subclass: DefaultRequestTargetResolverStrategy and then resolveBook and do what ever you want there. But don't just return a page from a application wide pool johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: John, when I use bookmarkable urls I get every time I reload the page a new instance. Is there a way to avoid this? Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels what do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with pooling pages. johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- mfG Bednarz, Hannover - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- mfG Bednarz, Hannover - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
with that new in new user request you don't mean really new users but new request?But thousands user requests per minute?That looks incredible high if every users does something every 10 seconds and you have 5000? request per minute = +/-80 requests per second. Then you have 800 live users at the same time? If every user really does every 10 seconds a click(which isn't very likely)Then i think you need to look at clustering.. And really look at your database because i think that that one will first crumble.johanOn 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Ok,I understand wickets aproach of pageobject bound to sessions. Do you have some trick to avoid new page instances for bookmarkable URLs asmentioned before?Thank you very much,MaciejPS: I am building a new community page using wicket. So I have to testif wicket can handle thousands of new user request a minute. -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:48:51 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panelsas martijn said. I am not talking about pooling pages over sessions That is a nogo in wicket. No i was talking about a single session reusing pages. So if you create a link that goes back to page X then hold that page there. pooling pages over sessions can't be done. Maybe for completely static pages that has no dynamic parts at all. But then you can just use pure html. With the current jvm's you shouldn't pool objects because you don't want to make them pooling (caching) of objects should only be done if the object when created would do io kind of things like Database Connections or database objects. Maybe very very big objects could be pooled like large buffers, but i alsodon't know if that really would give you something. johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Helo Johan, can you explain pooling pages in details and give me some short example? Do you mean putting pages into some kind of singleton or a synchronized pool which holds reuseable pages? How are those pages given back to the pool for reuse? Thank you very much, Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels what do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with (PortalSession)Session.get().johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user- - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 - ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- mfG Bednarz, Hannover - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
Exactly, you are right and my project will run into this direction. I think I have to do some kind of external loadbalancing and frontend filters to handly this huge traffic. Your calculation is similiar to my expectations and mirrors my previous experiences with public portals. My best, Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 17:03:46 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels with that new in new user request you don't mean really new users but new request? But thousands user requests per minute? That looks incredible high if every users does something every 10 seconds and you have 5000? request per minute = +/-80 requests per second. Then you have 800 live users at the same time? If every user really does every 10 seconds a click (which isn't very likely) Then i think you need to look at clustering.. And really look at your database because i think that that one will first crumble. johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Ok, I understand wickets aproach of pageobject bound to sessions. Do you have some trick to avoid new page instances for bookmarkable URLs as mentioned before? Thank you very much, Maciej PS: I am building a new community page using wicket. So I have to test if wicket can handle thousands of new user request a minute. -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:48:51 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels as martijn said. I am not talking about pooling pages over sessions That is a nogo in wicket. No i was talking about a single session reusing pages. So if you create a link that goes back to page X then hold that page there. pooling pages over sessions can't be done. Maybe for completely static pages that has no dynamic parts at all. But then you can just use pure html. With the current jvm's you shouldn't pool objects because you don't want to make them pooling (caching) of objects should only be done if the object when created would do io kind of things like Database Connections or database objects. Maybe very very big objects could be pooled like large buffers, but i also don't know if that really would give you something. johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Helo Johan, can you explain pooling pages in details and give me some short example? Do you mean putting pages into some kind of singleton or a synchronized pool which holds reuseable pages? How are those pages given back to the pool for reuse? Thank you very much, Maciej -Ursprüngliche Nachricht- Von: wicket-user@lists.sourceforge.net Gesendet: 03.11.06 16:30:22 An: wicket-user@lists.sourceforge.net Betreff: Re: [Wicket-user] Strategy to avoid new instances of pages and panels what do you mean with reloads the page? A normal refresh (if url is wicket:interface=xxx) then a page is not recreated. Or do you mean bookmarkable urls? Other links like pageLinks or your own links you can do what ever you want with (PortalSession)Session.get(). johan On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Re: [Wicket-user] Strategy to avoid new instances of pages and panels
On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Martijn, isn`t this a problem of the framework itself? When I have page constcted from serveral subcomponents then my JVM will run out of memory after some user. Well, every user (session) will use memory, correct. But only to a certain limit. Wicket 1.2 holds a couple of page/ versions in a session, and Wicket 2.0 by default only holds the current one. So the creation of a fresh instance (e.g. a bookmarkable page) will replace another one. Hence, how much memory you'll need is a simple function of the number of concurrent sessions times the size of your session and page(s) in it. Eelco - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Strategy to avoid new instances of pages and panels
Hi all! I am looking for a pattern, strategy or code example how to avoid creation of new page Instances when a user reloads a page. Can someone give my a hint how to achieve following behaviour: - static pages which have only a single instance during whole application lifecycle ? - some kind of page and/or factory or proxy to reuse instances? Any best practice or some examples would be nice. Thank you very much, Maciej Bednarz - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user