Re: org.apache.wicket.WicketRuntimeException: Submit Button ... is not visible

2010-07-11 Thread vov
Thanks. It working. But the button visibility will never be changed and button will be visible in this case even if 'visibleFlag' changed to false. This mean that is your change 'visibleFlag' to false than method onSubmit() will be call -- View this message in context: http://apache-wicket.18429

Re: org.apache.wicket.WicketRuntimeException: Submit Button ... is not visible

2010-07-09 Thread Sven Meier
callOnBeforeRenderIfNotVisible() ? On 07/09/2010 12:26 PM, vov wrote: It can't work. Please, see org.apache.wicket.Component.internalBeforeRender() method. Method onBeforeRendering() colling only in case when visibility of component is true. In our example boolean variable 'available' false by d

Re: org.apache.wicket.WicketRuntimeException: Submit Button ... is not visible

2010-07-09 Thread vov
It can't work. Please, see org.apache.wicket.Component.internalBeforeRender() method. Method onBeforeRendering() colling only in case when visibility of component is true. In our example boolean variable 'available' false by default. This mean that component never be rendered. Can someone explai

Re: org.apache.wicket.WicketRuntimeException: Submit Button ... is not visible

2010-07-09 Thread Conny Kühne
vov wrote: > > But question is still open:) > > Look to example > > public static boolean visibleFlag = true; > > public VisibilityButtonTest() > { > Form form = new Form("form"); > add(form); > AjaxButton ajaxButton = new AjaxButton("button1") > { > @Override >

Re: org.apache.wicket.WicketRuntimeException: Submit Button ... is not visible

2010-07-08 Thread vov
But question is still open:) Look to example public static boolean visibleFlag = true; public VisibilityButtonTest() { Form form = new Form("form"); add(form); AjaxButton ajaxButton = new AjaxButton("button1") { @Override public boolean isVisible() {

Re: org.apache.wicket.WicketRuntimeException: Submit Button ... is not visible

2010-07-08 Thread Conny Kühne
Thanks. That would have solved it. I am using setVisible(someFlag) now. Doh! ;) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-Submit-Button-is-not-visible-tp2282413p2282534.html Sent from the Wicket - User mailing list archiv

Re: org.apache.wicket.WicketRuntimeException: Submit Button ... is not visible

2010-07-08 Thread Sven Meier
new AjaxButton() { private boolean available; onBeforeRender() { available = someFlag(); } isVisible() { return available; } onSubmit() { if (!available) { error("no longer available"); } } } Sven On 07/08/2010 04:48 PM, Conny Kühne wrote: I have an AjaxBut

Re: org.apache.wicket.WicketRuntimeException: Submit Button ... is not visible

2010-07-08 Thread Conny Kühne
Pedro Santos wrote: > > someFlag is an static variable? > someFlag is actually a business method that queries the database. But for the sake of this argument you could model it as static variable. Doesn't change the problem. -- View this message in context: http://apache-wicket.1842946.n4.na

Re: org.apache.wicket.WicketRuntimeException: Submit Button ... is not visible

2010-07-08 Thread Pedro Santos
someFlag is an static variable? 2010/7/8 Conny Kühne > > I have an AjaxButton with > > @Override > public boolean isVisible() { > return someFlag; > } > > In a race condition, if user B sets someFlag to false, and then user A > clicks the button A gets the following exception > > org.apache.wi

Re: org.apache.wicket.WicketRuntimeException: Submit Button ... is not visible

2010-07-08 Thread vov
Hi! It is not a best solutions but you can try it ajaxButton.add(new AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(1))); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-Submit-Button-is-not-visible-tp2282413p2282506.html

org.apache.wicket.WicketRuntimeException: Submit Button ... is not visible

2010-07-08 Thread Conny Kühne
I have an AjaxButton with @Override public boolean isVisible() { return someFlag; } In a race condition, if user B sets someFlag to false, and then user A clicks the button A gets the following exception org.apache.wicket.WicketRuntimeException: Submit Button buttonName ... is not visible A