Re: Force page reload/re-render

2009-11-10 Thread Pedro Santos
if(userSetWasChanged){ target.appendJavascript(window.location.reload()); or setResponsePage(getPage()); or setResponsePage(getPage().getClass()); } On Tue, Nov 10, 2009 at 5:19 AM, pieter claassen pieter.claas...@gmail.comwrote: I have a link on a panel that is included in many pages. When

Re: Force page reload/re-render

2009-11-10 Thread pieter claassen
Hi Pedro, I tried setResponsePage(getPage()) but the problem is it does not re-render controls on the page. setResponsePage(getPage().getClass()) only works for stateless pages and on most of my pages, I pass params via the constructor. The javascript option will be a last resort, but it seems

Re: Force page reload/re-render

2009-11-10 Thread Ernesto Reinaldo Barreiro
Isn't AJAX refresh an option to consider here? For instance, defining some contexts which need to be re-rendered (e.g. marking them with an interface) and them having and IVisitor that collects all those contexts and add them to the AjaxRequestTarget? Best, Ernesto On Tue, Nov 10, 2009 at 8:19

Re: Force page reload/re-render

2009-11-10 Thread pieter claassen
Both of the suggestions I think requires me to modify the logic of the controls (either to keep track of which ones need to be updated or by placing the rendering logic in onBeforeRender()). I think this is a lot of work for something relative straight forward and also any changes to permission

Re: Force page reload/re-render

2009-11-10 Thread pieter claassen
Hi Ernesto, To recap, I have a control panel visible on each and every page and in that control panel, you can select the appropriate role you want to use. Based on that role some menu items will be visible or not (example below is correct). I am sure this problem has been solved before :-0 as

Re: Force page reload/re-render

2009-11-10 Thread Matthias Keller
Hi Pieter Due to the Java-Nature of Wicket, things done in the constructor are only executed once for this instance. Since F5 only re-renders the instance, the expression setVisible(whatever()) is only executed once. The most dynamic implementation would be to override isVisible() for

Re: Force page reload/re-render

2009-11-10 Thread Pedro
The page will be re-rendered... Implement your menu item componentes isVisible method to return true due your context Enviado de meu iPhone Em 10/11/2009, às 11:39, pieter claassen pieter.claas...@gmail.com escreveu: Hi Ernesto, To recap, I have a control panel visible on each and every

Re: Force page reload/re-render

2009-11-10 Thread Michael O'Cleirigh
Hi Pieter, Components that have .setVisible(false) will never be evaluated again automatically. You need to call .setVisible(true) on all that apply. One way would be control visibility in the base panel by overriding onBeforeRender() to handle all the cases in one place. e.g. class

Re: Force page reload/re-render

2009-11-10 Thread pieter claassen
Thanks for all the feedback. onBeforeRender() works like a charm. Pieter On Tue, Nov 10, 2009 at 2:51 PM, Michael O'Cleirigh michael.ocleir...@rivulet.ca wrote: Hi Pieter, Components that have .setVisible(false) will never be evaluated again automatically.  You  need to call

Force page reload/re-render

2009-11-09 Thread pieter claassen
I have a link on a panel that is included in many pages. When the user clicks on the link, I change something in the user settings that will affect what gets displayed on the page. However, for that to work, I need to reload the page after the user clicked on the link as by default the other