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
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
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
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
>
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()
{
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
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
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
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
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
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
11 matches
Mail list logo