How to disable button to avoid multiple clicks in zk java - zk

I am showing the message box on click on of the button. If I double click the message box is showing twice.
I tried by setting autodisable="self", But still the issue persists.
Is there any way I can check whether the Message box is displaying or not.If it is displaying I will not call it again.
Any ideas?

Related

Display popup on disabled link in ADF

I need to display popup on disabled link click in ADF. As soon as I click on disabled link or button. Popup should be displayed. I tried with Action and ActionListner. But it will work, if button or link is enabled.
I can give shortDesc property to hover the text. But I am searching a way for getting a popup on click.
I surfed so many places. But I could not find it. Please suggest me some input on it.
Try to add another link and add a css to make it like a disabled link.
Or on the show popupbehaviour make the triger type = hover

AEM issue in dialog of carousel component

I am a AEM developer, I have a issue in dialog of multifield. In carousel component(out of the box component) when we trying to add in the fixed list using path field, the selected path of image is saved if we click save. If u click cancel button and again trying to add image in the path field it is not getting added it is showing error.
I have tried to find a solution but we need to make changes in dialog.js I need a solution tat if i click the cancel button the dialog should not the save the things and it should open freshly again when the author opens again.

Show a non intrusive message to the user

I'm making a eclipse plugin and I was wondering is there any way I could display a message to the user which they do not need to dismiss?
Something like a message dialog but they do not need to press ok.
In a view you can set a message in the status line at the bottom of the Eclipse window with:
getViewSite().getActionBars().getStatusLineManager().setMessage(msg);
in an editor you can do something similar:
getEditorSite().getActionBars().getStatusLineManager().setMessage(msg);
If you want to show messages when you are displaying a popup dialog use TitleAreaDialog which has an area at the top of the dialog for messages.

Windows Forms Error Provider does not display in custom tab control

I'm trying to build a Wizard framework in Windows Forms. I've managed to glean a lot of useful tips from this and other sites which have gotten me very close to success. However, I'm having a problem with displaying an ErrorProvider on any tab page other than the first page of the wizard.
My Wizard control is a UserControl. It contains a custom tab control that I've derived from TabControl so that I can hide tabs and ignore attempts to navigate between tabs using keypresses, along with the usual collection of Back/Next/Finish/Cancel buttons at the bottom of the control.
I've used reflection to allow me to raise the validation events on a particular TabPage that belongs to the Wizard Control when I hit the Next button. (I don't want to validate the whole TabControl, only the currently active page.) When I do this, I see in the debugger that my Validating routine for the controls on the current tab page is correctly called and I see that I've called the ErrorProvider that I've attached to the particular control (a TextBox in this case) with a valid error message. I set Cancel to true for the CancelEventArgs in the validating routine and that's picked up by the code that uses the reflection mechanism so that I see that I've failed and don't change tabs. And I set the focus successfully to the control that failed validation.
So all that appears to be working just fine.
Unfortunately, I don't see the ErrorProvider's cheery blinking icon unless I'm on the first tab page. For all of the other tab pages, there's no message visible at all.
I'm baffled. Any thoughts? I can provide code snippets, if helpful.
Thanks!
I assume that in your case the button that moves to the next step of the wizard is placed outside (below) the TabControl
I noticed that the icon is displayed correctly if I pressed the button without releasing the mouse button. It seems that the button outside the container gets focused event though a validation error has occurred (normally you would not be able to leave the active control).
I worked around this issue by registering an event handler for the buttons MouseUp event to "refocus" the TabControl:
private void cmdOK_MouseUp(object sender, MouseEventArgs e)
{
tabControl1.Focus();
}
Note: you also need to set your forms ActiveControl property the one of the controls that failed validation.

GWT activity mayStop and Hyperlink issue

I have an activity with a mayStop() method. I am having two issues with it that pertain to a hyperlink on the page.
The first issue is that if I hit refresh or the window's X I get a dialog box that wraps my mayStop() text with "Are you sure you want to navigate away from this page?" and "Press OK to continue, or Cancel to stay on the current page." That is fine.
When I hit the hyperlink, I only see my mayStop() text without the wrapping text. Why is that?
The second issue is that if I hit Cancel in response to the hyperlink click, hitting the link again results in not getting the mayStop() challenge at all. It is as if I am not hitting the hyperlink.
Has anyone run into these issues?
Any thoughts?
Thanks,
Doug
The difference in "behavior" is that the first dialog box is the one from the browser when you try to prevent the user from navigating away, while the other is PlaceController calling Window.confirm(). Each browser uses a different dialog box for the first case, so there's no way to mimic it for everyone, and it's probably not a good thing either (navigating away from the app vs. navigating within the app).
As for your second issue, the events are generated by the browser "history" changing; if you prevent navigating away (from the Place), the URL stays the same (there's noway to know what to do to "rollback" the change: History.back(), History.next(), History.newItem() but then you destroy the existing "next" history ?), so when you click again on the link, you don't make the URL change, and no event is fired.
It's expected that you use PlaceController.goTo to navigate when you use places, not Hyperlink or History.