I need to fire Complete Order action of Production Order Maintenance screen from my custom screen, the issue is, when action is fired am getting an error saying, "Are you sure want to complete the order" this is the same confirmation message we get when we do from Production Order Maintenance screen as well, my question is, how we can avoid this popup or how i can pass value to this popup from my custom graph.
ProdMaintGraph.ProdMaintRecords.Current = ProdItem;
ProdMaintGraph.completeorder.Press();
You can try it like this!
ProdMaintGraph.ProdMaintRecords.Cache.Graph.Views["ProdMaintRecords"].Answer = WebDialogResult.Yes;
If in the popup form Message Buttoin is Yes, or one is this values which are None,OK ,Cancel,Abort,Retry ,Ignore,Yes,No
Related
The above pic consist of my popup image, Can anyone guide me how to handle this pop up?
This popup can be treated like any other alert. You can confirm the dialog (ie click Leave) using:
browser.alert.ok
If you do not know if the popup will or will not be there, you can add a check for its presence:
browser.alert.ok if browser.alert.present?
If this does not work, an alternative is to disable the function being called on unload. Make sure that you override the function before it is triggered.
# Remove the function
browser.execute_script("window.onbeforeunload = null")
# Then trigger the action that leaves the page
browser.link.click
I am trying j2me code in which i am putting to thingd a alert message and setCurrentItem()
function..
display.setCurrent(alert);
display.setCurrentItem(textBox)
the problem is that before we can see the alert msg it disappear and because of display.setCurrent(textBox). what should i do to see the alert message correctly and than move to the item which is placed im display.setCurrentItem??
I don't really do any High Level GUI coding (meaning Form stuff), so I'm no expert.
But looking at the docs, I can see a setTimeout(int time) function on the Alert object.
So my guess is that you should display the TextBox first, and then display the Alert afterwards with a timeout.
alert.setTimeout(5000); // 5 seconds
display.setCurrent(textBox);
display.setCurrent(alert);
That should display the alert for 5 seconds, and then when dismissed, the textBox should appear.
Looking at the Display object, I also notice another function called setCurrent(Alert alert, Displayable nextDisplayable) though, which seems to be even better.
Using that method you should be able to just do
Display.setCurrent(alert, textBox);
The docs says the following about that method: "Requests that this Alert be made current, and that nextDisplayable be made current after the Alert is dismissed. This call returns immediately regardless of the Alert's timeout value or whether it is a modal alert. The nextDisplayable must not be an Alert, and it must not be null."
Bookmark and use this page a lot:
http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/
In our JSF web application, we have an input field where the user can enter a numeric ID, which is then looked up by the app. To help the user, the lookup is bound to "onchange", thus it will be triggered as soon as the user tabs out of the field or clicks elsewhere.
So, user enters "123", presses tab (or clicks), lookup runs. This works fine; however, for usability reasons, we also want to provide a button that users can click on, for users who will otherwise wonder "where should I click to trigger a lookup?". To do this, we'd like to provide something that looks and feels like a HTML / JSF button, but does nothing (as the click will trigger the "onchange" event anyway).
Is there a way to make a JSF button that does nothing? I tried using h:commandButton without the "action" attribute, but it still fires a request.
p:commandButton type="button" will just provide a push button.
Since you tagged this question also as a usability issue, I would advise against a button in the first place if the onchange already triggers the lookup.
From a user's perspective it is confusing whether or not clicking the button is mandatory. After they have entered the field and skipped to the next, they see the lookup occur without clicking the button. If there is a button they will assume it's there for a reason.
The option that I favour in these cases is a onkeypress handler with a timeout of half a second, after which the value is looked up.
I've set my button to 'Submit'. The XPage is set to stay on the same page if save is successful. How do I create a messagebox to inform user the save is successful?
There are a number of options you can consider. A msgbox is the least desirable.
You could add an information message on top of the form that either fades after a few seconds or on change. The custom control would show when you set a viewScope variable (e.g. viewScope.saveSuccess ) and have a visibility formula for it. It also would register an event listener to hide when a field is altered. You also could consider redirecting to a different page.
This post already asks a similar question to do with how to call a client side script from server side, could be useful.
client message after SSJS routine how?
Here are two examples that I have used as inspiration to create a custom control for error messages and for info messages such as what you are asking for:
http://openntf.org/XSnippets.nsf/snippet.xsp?id=ssjs-form-validation-that-triggers-errormessage-controls
http://lotusnotus.com/lotusnotus_en.nsf/dx/xpages-tip-a-simple-cc-for-prompting-ssjs-messages-to-ui....htm
The easiest way to call csjs after running ssjs is to add code the event handler's onComplete event. The onStart, onComplete, and onError events run client side js before or after your ssjs, but are only executed during a partial page refresh.
The simplest way is to add this line of code (or the CSJS you prefer) in the postSaveDocument event:
view.postScript('alert("Document saved")');
In my application I am using UILocalNotification which works fine. But I need "Later" button in the alert instead of "Cancel". When the user clicks on the "Later" button I want to show the notification after sometime. Is that possible?
Thanks
No man, you are on the wrong way.Due to the limitations of iphoneSDK such thing is not possible.In local notification it will only show the two buttons in alert View.
1)Cancel
2)View
Still you can rename the View button to you wish:
localNotif.alertAction = #"Snooze";
rahter than renaming the Cancel button.