I used the NewSearchUI.runSearchInBackground(query) to run a search query. This causes a Progress dialog to pop up, where user have the button "Run in Background". The Job.setUser() is set to true for the Job in InternalSaerchUI.runSearchInBackgound, which is why the dialog always pops up.
However I would like to hide the dialog from the beginning, so that the user can look at the search results quickly, without having to minimize the progress dialog. Is there a way to achieve that? Aside from the setting it in the preferences options and checking the run always in background checkbox.
References:
Search example
Whether a progress dialog shows up or not isn't really meant to be controlled by the initiator of a user job.
As you already pointed out, the workspace-wide preference controls if a progress dialog is shown or not.
Apart from disabling the progress dialog in general, there is no way that I know of to prevent the progress dialog from appearing.
If you think it is generally useful to hide the progress dialog for search jobs, you may want to file an enhancement request here: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform
Related
In GTK+'s official reference, the GtkMessageDialog page, it says,
Note Please note that GTK_BUTTONS_OK, GTK_BUTTONS_YES_NO and
GTK_BUTTONS_OK_CANCEL are discouraged by the GNOME HIG.
I read the latest version of GNOME HIG and found this page.
Place the affirmative button in the lower right
corner of the alert.
If the alert was produced in response to a user's
action, place a Cancel button immediately to the left of the
affirmative button.
I can figure out why GTK_BUTTONS_YES_NO and GTK_BUTTONS_OK_CANCEL are discouraged(because the negitive button is to the right of the affirmative one). But this has nothing to do with just one OK button on the dialog window. So, why GTK_BUTTONS_OK is discouraged?
And sorry about the title. I didn't actually see GNOME HIG discourages it.
On the very same page you linked to:
Button Phrasing
Write button labels as imperative verbs, for example Save, Print. This
allows users to select an action with less hesitation. An active
phrase also fits best with the button's role in initiating actions, as
contrasted with a more passive phrase. For example Find and Log In are
better buttons than Yes and OK.
This is for your Yes/No and OK/Cancel point.
I plan to add a menu that pop ups when a user performs a certain action. This menu will include some fields that the user will fill out and then hit "Submit" which will close the dialog box and update the client based on information inputed.
However, I want the user to be able to close the dialog window by hitting cancel or submit, and not by clicking on the screen outside of the dialog box.
How can i do this? Or maybe I should just use a PopupPanel?
It's as easy as setting the auto-hide behavior to false, either at construction time or later.
I've been digging all over Jasper documentation and can't find the answer.
Currently for our reports, we have a simple input control, Date. When this launches, I am given a date control and at the bottom, I get series of useless button choices...
Apply, OK, Reset, Cancel, Save
Can anyone help me get these removed? Just want OK and Cancel. I looked at DefaultParametersForm.jsp but am having a hard time finding anything useful there. I'm an amateur jsp programmer.
We removed the Cancel button from the input control popup, we found it in the file inputControls.jsp in the jsp/templates directory.
You should find the apply, ok, reset and save button here also.
I do not know off-hand how to remove the buttons, but these buttons are not all useless. Reset clears your fields back to their defaults (blank if no default).
When you are using the Control Layout 1, you may think the Apply and OK button do the same thing but they don't. Apply will run the report with the set parameters, but will not get rid of the dialog box. OK runs apply and removes the dialog as well. (Note that the dialog can be dragged out of the way.)
If you switch to one of the other Control Layouts (I like 4), then the OK button goes away b/c there is no longer a dialog. You will only get Apply, Reset, and Cancel.
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.
I have doubt regarding GWT .In Gwt if i click one button than it shows one dialog box at th same time the form outside the dialog box disabled.What component can be used for this task?
Thanks in advance
So, you want to open a popup dialog box, and at the same time disable the rest of the page until the user closes the dialog box?
If so, you can simply use gwt's DialogBox.
Use the constructor with the autohide flag set to false, and the box will not close until the user responds, thus disabling the rest of the page. If you want to make this even more clear, use the glass effect:
yourBox.setGlassEnabled(true);
You can also use the PopupPanel directly and build your own custom dialog box.
Now, if I got it wrong and you want to disable the form so it remains disabled after the popup, just disable it in the onClick handler of the button that opens the box.