Stop a script process with a "Cancel" button

Hi,
I display a progress bar with a "Cancel" button while the  script is running. I can stop the script by pressing the "Esc" key but I  would like to stop the script process with the "Cancel" button. What  kind of command/event can I add to the button for doing this ?
Thanks

-> Update All your Firefox Plugins
* https://www.mozilla.org/en-US/plugincheck/
* '''When Downloading Plugins Update setup files, Remove Checkmark from Downloading other Optional Softwares with your Plugins (e.g. Toolbars, McAfee, Google Chrome, etc.)'''
* Restart Firefox
Check and tell if its working.

Similar Messages

  • Today i made a gamecenter account and when i play a game like clash of clans it takes me to gamecenter and i log in then it takes me to a blank page with a cancel button so my question is how do i sign in to gamecenter when this happens

    today i made a gamecenter account and when i play a game like clash of clans it takes me to gamecenter and i log in then it takes me to a blank page with a cancel button so my question is how do i sign in to gamecenter when this happens

    Try:
    FaceTime, Game Center, Messages: Troubleshooting sign in issues

  • How do I create an input box with a cancel button that will end a loop in my script?

    I have been working on a script for my client and I am having trouble getting it to work properly. I stole most of the code from the PowerShell Tip of the Week "Creating a Custom Input Box". I also took someone's code for the Show-MessageBox function.
    I have slightly modified the original code with two parameters and an additional text box. The first field is for an e-mail address and the second is for an employee number.
    I need to know how I can get a Do Until loop to recognize when the cancel button is pushed and break the loop and effectively end the script. The work happens at the end but perhaps I need something added/modified in the InputBox function.
    I want the script to check to see if anything has been entered in the second text box. If empty it displays a message and calls the InputBox function again. Then if there is something I use elseif to check to see if it matches my RegEx (digits only). If
    it doesn't match it will loop and call the InputBox function again.
    This all works fine. The problem I am having is that I cannot cancel out of the form. I'd like the loop to continue until the second box matches my RegEx or Cancel is clicked. Clicking cancel doesn't break the loop. I need to know how I can stop the loop
    when cancel is pressed. I've seen Stack "Overflow: PowerShell Cancel Button Stop Script" but I don't think this will work in a loop.
    Any help would be awesome. As a note, I DO NOT want to use the VB Interaction stuff.
    function InputBox {
    param ($Name,$EN)
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
    $objForm = New-Object System.Windows.Forms.Form
    $objForm.Text = "Data Entry Form"
    $objForm.Size = New-Object System.Drawing.Size(300,200)
    $objForm.StartPosition = "CenterScreen"
    $objForm.KeyPreview = $True
    $objForm.Add_KeyDown({if ($_.KeyCode -eq "Enter")
    {$x=$objTextBox.Text;$objForm.Close()}})
    $objForm.Add_KeyDown({if ($_.KeyCode -eq "Escape")
    {$objForm.Close()}})
    $OKButton = New-Object System.Windows.Forms.Button
    $OKButton.Location = New-Object System.Drawing.Size(75,120)
    $OKButton.Size = New-Object System.Drawing.Size(75,23)
    $OKButton.Text = "OK"
    $OKButton.Add_Click({$objForm.Close()})
    $objForm.Controls.Add($OKButton)
    $CancelButton = New-Object System.Windows.Forms.Button
    $CancelButton.Location = New-Object System.Drawing.Size(150,120)
    $CancelButton.Size = New-Object System.Drawing.Size(75,23)
    $CancelButton.Text = "Cancel"
    $CancelButton.Add_Click({$objForm.Close()})
    $objForm.Controls.Add($CancelButton)
    $objLabel = New-Object System.Windows.Forms.Label
    $objLabel.Location = New-Object System.Drawing.Size(10,20)
    $objLabel.Size = New-Object System.Drawing.Size(280,20)
    $objLabel.Text = "Employee Email Address:"
    $objForm.Controls.Add($objLabel)
    $objTextBox = New-Object System.Windows.Forms.TextBox
    $objTextBox.Location = New-Object System.Drawing.Size(10,40)
    $objTextBox.Size = New-Object System.Drawing.Size(260,20)
    if ($Name) {
    $objTextBox.Text = $Name
    else {
    $objTextBox.Text = "@domain.com"
    $objLabel2 = New-Object System.Windows.Forms.Label
    $objLabel2.Location = New-Object System.Drawing.Size(10,70)
    $objLabel2.Size = New-Object System.Drawing.Size(280,20)
    $objLabel2.Text = "Employee Number:"
    $objForm.Controls.Add($objLabel2)
    $objTextBox2 = New-Object System.Windows.Forms.TextBox
    $objTextBox2.Location = New-Object System.Drawing.Size(10,90)
    $objTextBox2.Size = New-Object System.Drawing.Size(260,20)
    $objForm.Controls.Add($objTextBox)
    $objForm.Controls.Add($objTextBox2)
    $objForm.Topmost = $True
    $objForm.Add_Shown({$objForm.Activate()})
    [void] $objForm.ShowDialog()
    $Script:ButtonName = $objTextBox.Text
    $script:ButtonEN =$objTextBox2.Text
    $ButtonName; $ButtonEN
    Function Show-MessageBox{
    Param(
    [Parameter(Mandatory=$True)][Alias('M')][String]$Msg,
    [Parameter(Mandatory=$False)][Alias('T')][String]$Title = "",
    [Parameter(Mandatory=$False)][Alias('OC')][Switch]$OkCancel,
    [Parameter(Mandatory=$False)][Alias('OCI')][Switch]$AbortRetryIgnore,
    [Parameter(Mandatory=$False)][Alias('YNC')][Switch]$YesNoCancel,
    [Parameter(Mandatory=$False)][Alias('YN')][Switch]$YesNo,
    [Parameter(Mandatory=$False)][Alias('RC')][Switch]$RetryCancel,
    [Parameter(Mandatory=$False)][Alias('C')][Switch]$Critical,
    [Parameter(Mandatory=$False)][Alias('Q')][Switch]$Question,
    [Parameter(Mandatory=$False)][Alias('W')][Switch]$Warning,
    [Parameter(Mandatory=$False)][Alias('I')][Switch]$Informational)
    #Set Message Box Style
    IF($OkCancel){$Type = 1}
    Elseif($AbortRetryIgnore){$Type = 2}
    Elseif($YesNoCancel){$Type = 3}
    Elseif($YesNo){$Type = 4}
    Elseif($RetryCancel){$Type = 5}
    Else{$Type = 0}
    #Set Message box Icon
    If($Critical){$Icon = 16}
    ElseIf($Question){$Icon = 32}
    Elseif($Warning){$Icon = 48}
    Elseif($Informational){$Icon = 64}
    Else{$Icon = 0}
    #Loads the WinForm Assembly, Out-Null hides the message while loading.
    [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
    #Display the message with input
    $Answer = [System.Windows.Forms.MessageBox]::Show($MSG , $TITLE, $Type, $Icon)
    #Return Answer
    Return $Answer
    $num = "^\d+$"
    do {
    if (!($ButtonEN)) {
    Show-MessageBox -Msg "You must enter a numeric value for the employee number." -Title "Employee Number Missing" -Critical
    InputBox -Name $ButtonName
    elseif ($ButtonEN -notmatch $num) {
    Show-MessageBox -Msg "The employee number must contain numbers only!" -Title "Non-numerical characters found" -Critical
    InputBox -Name $ButtonName
    until ( ($ButtonEN -match $num) -or (<this is where I want to be able to use the cancel button>)

    Here is a simple validation method.
    function New-InputBox{
    param(
    $EmailAddress='',
    $EmployeeNumber=''
    Add-Type -AssemblyName System.Windows.Forms
    $Form=New-Object System.Windows.Forms.Form
    $Form.Text='Data Entry Form'
    $Form.Size='300,200'
    $Form.StartPosition='CenterScreen'
    $OKButton=New-Object System.Windows.Forms.Button
    $OKButton.Location='75,120'
    $OKButton.Size='75,23'
    $OKButton.Text='OK'
    $OKButton.DialogResult='Ok'
    $OKButton.CausesValidation=$true
    $Form.Controls.Add($OKButton)
    $CancelButton = New-Object System.Windows.Forms.Button
    $CancelButton.Location = New-Object System.Drawing.Size(150,120)
    $CancelButton.Size = New-Object System.Drawing.Size(75,23)
    $CancelButton.Text ='Cancel'
    $CancelButton.DialogResult='Cancel'
    $CancelButton.CausesValidation=$false
    $Form.Controls.Add($CancelButton)
    $Label1=New-Object System.Windows.Forms.Label
    $Label1.Location='10,20'
    $Label1.Size='280,20'
    $Label1.Text='Employee Email Address:'
    $Form.Controls.Add($Label1)
    $TextBox1=New-Object System.Windows.Forms.TextBox
    $TextBox1.Location='10,40'
    $TextBox1.Size='260,20'
    $textbox1.Name='EmailAddress'
    $textbox1.Text=$EmailAddress
    $Form.Controls.Add($textbox1)
    $Label2=New-Object System.Windows.Forms.Label
    $Label2.Location='10,70'
    $Label2.Size='280,20'
    $Label2.Text='Employee Number:'
    $Form.Controls.Add($Label2)
    $TextBox2=New-Object System.Windows.Forms.TextBox
    $TextBox2.Location='10,90'
    $TextBox2.Size='260,20'
    $TextBox2.Name='EmployeeNumber'
    $TextBox2.Text=$EmployeeNumber
    $Form.Controls.Add($TextBox2)
    $Form.AcceptButton=$OKButton
    $Form.CancelButton=$CancelButton
    $Form.Topmost = $True
    $form1_FormClosing=[System.Windows.Forms.FormClosingEventHandler]{
    if($Form.DialogResult -eq 'OK'){
    if($textbox1.Text -eq ''){
    [void][System.Windows.Forms.MessageBox]::Show('please enter an email address','Validation Error')
    $_.Cancel=$true
    }else{
    # Check empno is all digits
    if("$($TextBox2.Text)" -notmatch '^\d+$'){
    [void][System.Windows.Forms.MessageBox]::Show('please enter a number "999999"','Validation Error')
    $_.Cancel=$true
    $form.add_FormClosing($form1_FormClosing)
    $Form.Add_Shown({$Form.Activate()})
    if($Form.ShowDialog() -eq 'Ok'){
    # return the form contents
    $Form
    if($f=New-InputBox -EmailAddress [email protected]){
    'Email is:{0} for Employee:{1}' -f $f.Controls['EmailAddress'].Text,$f.Controls['EmployeeNumber'].Text
    }else{
    Write-Host 'From cancelled!' -ForegroundColor red
    ¯\_(ツ)_/¯

  • Strange Blank Services Page with a "Cancel" button

    Hi All!
    For some strange reason my Cisco IP Phone's "Services" button is associated, as default, to a blanck page with a single "Cancel" button as the 3rd softkey. For example, if I push the "Services" button, this default pag will be shown first and seconds later, the page I specified in Call Manager as associated to the "Services" button.
    Usually this is not a problem, only that when I try to push a CiscoIPPhoneImageFile object to the phone, in the 2-3 second while the phone is downloading the image, this blank page will be shown and it stays there untill the image is fully downloaded. It is especially annoying as my ImageFile object has a 3rd softkey button called "Exit", so the user will witness a button first appeared as "Cancel", and then suddenly changes to "Exit"!
    Any one know how do I remove this strange "default" blank page, or at least change its "Cancel" button to whatever I prefer? Thank you very much for your help!

    Could it be that on the phone you're using, you have signed up for a service that turns the service list into something the phone cannot handle (e.g. the application name is too long)? The empty page with a cancel suspciously reminds me of what you get when the phone chokes on an xml element.

  • I updated firefox hoping to stop a script problem with tabs, but it is still happening. When I go to close a tab at times I get a script error message. After choosing stop script, individual tabs won't close until I restart firefox.

    This is what the box says when it happens...
    A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
    Script: chrome://browser/content/tabbrowser.xml:1628

    -> Update All your Firefox Plugins
    * https://www.mozilla.org/en-US/plugincheck/
    * '''When Downloading Plugins Update setup files, Remove Checkmark from Downloading other Optional Softwares with your Plugins (e.g. Toolbars, McAfee, Google Chrome, etc.)'''
    * Restart Firefox
    Check and tell if its working.

  • Stop DIA work process with PRIV mode.

    Hi,
    How to stop DIA workprocess with PRIV mode. by searching notes, I find it is possible to setl the max time and max number of the private memory.
    Kind regards,
    Masaaki

    Hello Masaaki,
    Before deciding whether to wait for the process to finish by itself or not, i would suggest that you find out the program which is causing the work process to go into PRIV mode. Once this is done, as your technical guys (ABAP) to analyse why this is happening (is the program logic inefficient and hence using so much memory etc).
    You have to note that (Dialog) work processes going into PRIV mode is not a healthy sign for the SAP application server.
    This is beacuse once the WP goes into PRIV mode it is not available to any other transactions, and we only have a limited number of work processes.
    Please make sure the parameters below are defined in RZ10 instance profile:
    rdisp/max_priv_time - used to define the maximum time that a work process can remain in PRIV mode. (After this the work processes is terminated and restarted). This is reasonable because beyond the time limit set, it is imperative to assume that the program using the work process is in efficient. (in case a program really needs that much time, it needs to be scheduled as a background job).
    rdisp/wppriv_max_no- this parameter defines the maximum number of work processes that can be in PRIV mode. Very useful.
    Also, make sure that a parameter ABAP/heaplimit is defined. This ensures that if a program eats up a certain amount of heap memory, the work process being used can be terminated.
    And finally please do check if your extended memory allocation is not big enough. the parameter em/initial_size_mb defines the fixed size of extended memory. Increasing this size only if you find that a lot of processes are frequently going into PRIV mode.
    Hope this helps.
    Regards,
    Prashant

  • Paypal payment processing with Buy Now Button JSC component

    The "Buy Now Button" JSC component is having a property postBackUrl which is supposed to run a program to read (and process) the information from the Paypal server about the payment.
    Can this be a pagebean? (or it must be a Servlet?) Can anyone give sample codes for this implementation?(It is enough to show how to receive the POST data from the Paypal server)
    Any help from anyone is very much appreciated.
    Thank you very much.

    I used the following servlet to update my database with the information from Paypal. Any improvements (or criticism) to the codes are greatly wellcome !!
    public class Payment extends HttpServlet {
    public Payment() {
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void destroy() {
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    // read post from PayPal system and add 'cmd'
    Enumeration en = request.getParameterNames();
    String str = "cmd=_notify-validate";
    while(en.hasMoreElements()){
    String paramName = (String)en.nextElement();
    String paramValue = request.getParameter(paramName);
    try{
    str = str + "&" + paramName + "=" + URLEncoder.encode(paramValue, "UTF-8");
    }catch(UnsupportedEncodingException e){
    System.out.println(" ERROR !! (Payment.java Servlet/procesRequest()/catch block "+e.getMessage());
    // post back to PayPal system to validate
    // NOTE: change http: to https: in the following URL to verify using SSL (for increased security).
    // using HTTPS requires either Java 1.4 or greater, or Java Secure Socket Extension (JSSE)
    // and configured for older versions.
    URL u = new URL("http://www.paypal.com/cgi-bin/webscr");
    URLConnection uc = u.openConnection();
    uc.setDoOutput(true);
    uc.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
    PrintWriter pw = new PrintWriter(uc.getOutputStream());
    pw.println(str);
    pw.close();
    BufferedReader in = new BufferedReader(
    new InputStreamReader(uc.getInputStream()));
    String res = in.readLine();
    in.close();
    // assign posted variables to local variables
    String itemName = request.getParameter("item_name");
    String itemNumber = request.getParameter("item_number");
    String paymentStatus = request.getParameter("payment_status");
    String paymentAmount = request.getParameter("mc_gross");
    String paymentCurrency = request.getParameter("mc_currency");
    String txnId = request.getParameter("txn_id");
    String receiverEmail = request.getParameter("receiver_email");
    String payerEmail = request.getParameter("payer_email");
    String pk = request.getParameter("custom");
    //check notification validation
    if(res.equals("VERIFIED")) {
    //if(res.equals("INVALID")) {
    // check that txnId has not been previously processed
    // check that receiverEmail is your Primary PayPal email
    // check that paymentAmount/paymentCurrency are correct
    String membershipTypeValue="Please conform";
    if (itemNumber.equals("0")){
    membershipTypeValue="TEST" ;
    if (itemNumber.equals("1")){
    membershipTypeValue="BASIC" ;
    if (itemNumber.equals("2")){
    membershipTypeValue="GOLD" ;
    if (itemNumber.equals("3")){
    membershipTypeValue="PLATINUM" ;
    String query="INSERT INTO payment (PK, PAYMENT_ID, DATE_OF_PAYMENT, MEMBERSHIP_TYPE)" +
    // "PREVIOUS_PAYMENT_ID, PREVIOUS_DATE_OF_PAYMENT, PREVIOUS_MEMBERSHIP_TYPE ) " +
    "VALUES " +
    "("+pk+", \""+txnId+"\", NOW(), \""+membershipTypeValue+"\")";
    // check that paymentStatus=Completed, if so update database
    if (paymentStatus.equals("Completed")){
    updateDatabase(query);
    } else if(res.equals("INVALID")) {
    System.out.println("\"INVALID\" is returned by Paypal when processing payment for PK:"+pk);
    } else {
    System.out.println("Neither \"INVALID\" nor \"VALID\" is returned by Paypal when processing payment for PK:"+pk);
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    private void updateDatabase(String query){
    Statement sta=null;
    Connection con=null;
    // ResultSet rs=null;
    try {
    //Class.forName("com.mysql.jdbc.Driver")
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    Context initContext = new InitialContext();
    DataSource ds = (DataSource)initContext.lookup("jdbc/MySQLDataSource");
    Connection conn = ds.getConnection();
    sta = conn.createStatement();
    sta.executeUpdate(query);
    // rs.close();
    sta.close();
    conn.close();
    } catch (Exception e) {
    System.out.println(" ERROR!! (servlet/Payment.java/UpdateDatabase()/catch blok) "+e.getMessage());
    // e.printStackTrace();
    }

  • Stop DIA work process with PRIV mode in my program

    Hello,
    I  write Program that display in the end an alv report and when i display it after same time my dia wp get in PRIV mode
    I search about it and I didn't find the solution but it happend only with my program this reject the memory parameter that cause the problem
    Thanks for your help

    Hi,
    >I think this not the problem because in the dev and the qa system it won't get in priv thanks
    >mode and the have the same value in the parameter ztta/roll_extension and the qa is the copy of the prod but 3 month old
    And these 3 months difference can perfectly explain why you have the problemn on production and not on QA.
    Private modes are generated usually because of badly designed programs (including standard ones...).
    ALV is not designed to display a huge amoiunt of data.
    Beware also of internal tables : Abap programmer usually abuse internal tables thinking memory is an unlmimited ressource...
    Just a few ideas.
    Regards,
    Olivier

  • Processing Page with cancel button.

    Hi,
    I have implement Processing Page but client wants to have cancel button to cancel the process.
    Can anyone give suggestions how to implement this?
    SC

    My requirement is that i have a custom base page with submit button. When user clicks on submit button it would start long running process
    And I should show a dialog page with clock saying process in progress message and a cancel button. User should be able to stop the process by clicking cancel button and back to base page. OAF gives the processing page that i want but without cancel button.
    I try to add cancel button on the processing page programmatically but while it is processing and when i click on cancel button i cannot capture the event.
    how to add cancel button on it and capture event? Is this correct approach?
    Can any body could suggest the best approach and solution?
    Thanks
    SC

  • Creating a dialog box with OK and Cancel buttons without OADialogPage

    Hi Experts,
    i want to create a dialog box for Delete Confirmation means after clicking on delete it should pop up a small dialog box with OK/Cancel buttons
    and need code for the same to handle the buttons.
    i have created with OADialogPage but its showing in a complete page but i want to show those buttons in a small box.
    Plz help.
    THANKS IN ADVANCE.
    Thanks
    Raja.

    Hi,
    I have not tried using javascript in destination URI as suggested by Mukul.
    I have tried the below code for opening a page as dialog box.
    You can try it for your requirement by creating a dialog page of your own, say XXDialogPage (with OK and Cancel button)
    StringBuffer l_buffer = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    String url = "/OA_HTML/OA.jsp?page=/xx/oracle/apps/fnd/dialog/webui/OADialogPG";
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:500, height:500},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    In dialog page's controller, you can forward it to the page onc ethe user selects OK or Cancel.
    Pass the selected value back to the main page and further you can use it for deleting.
    Regards.

  • How to add Ok & Cancel Button--- [solved]

    Hi,
    i have two data blocks,M is master and D is detail
    if the user checks the check box in M and D,i want the user to have option of canceling the process by clicking cancel button or processed by clicking ok .
    i was able to create alert message for the user , but the user does not have the option of canceling the process when the message pop ups
              IF :M .CHECKBOX = 1 and D.CHECKBOX = 1 THEN
              message_handler_pkg.display_error('display message '||:M.dataitem,v_alert_response);
    thanks in advance
    Message was edited by:
    Rowdheer
    Message was edited by:
    Rowdheer

    Create an alert in your form with required no of buttons, u will have an option of upto 3 buttons . Use this alert along with your messaging options ..
    Provided your messaging package has options to include the alerts
    try this procedure !
    PROCEDURE disp_alert
              ( ALERT_NAME               IN     VARCHAR2,
              ALERT_MESSAGE          IN     VARCHAR2,
              ALERT_RETURN_VAL          OUT     NUMBER ) IS
         AL_ID ALERT;
         BEGIN
         AL_ID := FIND_ALERT(ALERT_NAME);
         SET_ALERT_PROPERTY(AL_ID,ALERT_MESSAGE_TEXT,ALERT_MESSAGE);
         ALERT_RETURN_VAL := SHOW_ALERT(AL_ID);
         IF IV_N_ALERT_RETURN_VAL = ALERT_BUTTON1 THEN
              ALERT_RETURN_VAL := 1;
         ELSIF IV_N_ALERT_RETURN_VAL = ALERT_BUTTON2 THEN
              ALERT_RETURN_VAL := 2;
         ELSIF IV_N_ALERT_RETURN_VAL = ALERT_BUTTON3 THEN
              ALERT_RETURN_VAL := 3;
         END IF;
    END;
    ssr

  • How to use a cancel button........

    hello everyone,
                  i have a selection screen, from where i am calling a selection-screen as a pop-up screen. the fields i am checking on the pop-up screen will get append on the previous screen. now the problem i am facing with the cancel button.
        if i am pressing the cancel button still the checked fields are getting appended.
    i want to exit from the screen and want to keep the previous screen as it is. it is a simple report program.
    please help me out.
    thanks i advance.

    I am using set screen 0. and leave screen.
    but still the problem persists.
    let me tell you in detail.
    i am going to pop-up screen to get the fields appended on my previous screen.
    if i check some checkboxes on it and click ok then according to those checked fields the corresponding select-options should come on previous screen. 
    because i have added set screen 0. to 'OK'.
    now what i am facing is if i check some checkboxes on the pop-up and say 'CANCEL' still the program is appending the those checkboxes and appending them on the previous screen.
    what i am expecting is, it should exit the pop-up screen and should maintain the previous screen as it is.
    thanks

  • ADF Dialog Framework Cancel Button

    Hi all,
    We're experiencing, in multiple applications, a problem with a Cancel button (immediate="true") on a page launched by the dialog framework. While the value does not change in the model layer (saving to the database confirms this), it does seem to appear in the application UI, even after clicking the cancel button, until you post data.
    Details follow:
    This code is all JHS-generated, but we've spoken to Steven Davelaar, and he's pretty sure it's not a JHS problem. I certainly can't see anything obviously wrong with the code.
    Here's the component that launches the dialog, minus attributes like "rows" and "columns":
    <af:panelLabelAndMessage label="MIS Notes: "
        id="RpReportDocHeaderVwMisNotesLabel">
        <af:inputText id="SomeAttr" value="#{bindings.SomeAttr.inputValue}"
            required="#{bindings.SomeAttr.mandatory}"
            simple="true" partialTriggers="SomeAttrEditorLink"
            binding="#{SomeAttrEditorItem.editorItem}">
        </af:inputText> 
        <f:facet name="end">
            <af:commandLink id="SomeAttrEditorLink"
                action="dialog:editor" immediate="true" useWindow="true"                           
                partialSubmit="true" windowHeight="320" windowWidth="670"
                returnListener="#{SomeAttrEditorItem.returnedFromEditor}"
                launchListener="#{SomeAttrEditorItem.launchEditor}">
                <af:objectImage source="/jheadstart/images/editor.gif"/>
            </af:commandLink>
        </f:facet>
    </af:panelLabelAndMessage />The editor window, minus layout, form, etc. elements, is as follows:
    <af:inputText rows="10" columns="100"
        value="#{processScope.editorValue}"
        maximumLength=
            "#{processScope.editorMaxLength==0 ? null : processScope.editorMaxLength}" />
    <af:panelButtonBar>
        <af:commandButton text="Cancel" immediate="true">
            <af:returnActionListener/>
        </af:commandButton>
        <af:commandButton text="OK">
            <af:returnActionListener value="#{processScope.editorValue}"/>
        </af:commandButton>
    </af:panelButtonBar>Now, SomeAttrEditorItem is a managed bean of type oracle.jheadstart.controller.jsf.bean.EditorItemBean, so it's JHS code, but nothing about it should really matter if the returnActionListener for the Cancel button doesn't contain a value and is immediate, should it?
    Any help much appreciated. Thanks much,
    Avrom

    Thanks, Frank. This looks like a JHS bug (albeit one we can work around by writing our own template)--JHS should probably not be generating code that leaves cancelled changes in place. I'll notify them on their forum.
    [Edit:] Actually, there's something I don't understand about the instructions. In a case like this, I really only want to undo changes to a particular attribute--whatever attribute the dialog changed. And ideally, I don't want to refresh to the last pre-commit point; I want to just discard the changes that were made by this particular dialog. So I don't really think Row.refresh() is going to work here.
    Now, I could do something like this: In the launch listener, store the relevant attribute in some transient location, and on return, refresh it. But that seems overly complicated; isn't there a way to just not submit a dialog's values upon returning to the original form, or, at least, to prevent them from updating the model?
    Message was edited by:
    Avrom
    [Further edit:] Wait, no, there's something even stranger going on here. Note that the text input in the dialog isn't bound to "#{bindings.SomeAttr.inputValue}"; it's bound to "#{processScope.editorValue}". And the cancel button doesn't even have a returnActionListener! So how is the value getting passed back to the original form?
    Message was edited by:
    Avrom

  • Cancel Button - Clear Input Values

    Hello,
    I have an input form and user can click the cancel button. When user returns later, I want emty input fields.
    But my code, does not work:
    public String cancelDugme_action() {
           DCBindingContainer dcBindings = (DCBindingContainer)getBindings();
           AttributeBinding id = (AttributeBinding)dcBindings.getControlBinding("idKorisnika");
           id.setInputValue(null);
           return "nazad";
    }I get null pointer exception...
    Why?
    Thanx
    Vanja

    Hi,
    Please find the explanation for the immediate property for a button found in the IDE Help section.
    If this property is selected, when the user activates the button, the code in the page bean is executed before the validation, updating of model values, and so on. Essentially, code execution happens right away on the server, which then returns the page.
    The most common example of an immediate action is a Cancel button. You make it immediate so that the normal validation and update steps can be skipped, but the action handler can still do whatever is necessary. Typically, the action handler will navigate back to some previous page. In some designs the action handler might also enqueue an informational message like "Transaction cancelled". It is possible to do more: for example, an application might record the fact that the user got partially through a form and then cancelled it.
    Setting immediate property to false for the submit button makes the application behave as one could expect.On reading this it appears that the immediate property on the Submit button was set to true along with the Cancel button. Please ensure that the immediate property is only set when the code in the page bean is to be executed bypassing the normal cycle.
    Hope this helps
    Cheers
    Giri

  • Workflow: Approve and Cancel Button

    Hi All,
    The requirement is:
    we have to build a custom workflow. Some supplier details (custom OAF Page) are filled by the requestor and is submitted (here the Workflow will fire).
    The notification will go to approver say XYZ. When XYZ logs in to Apps, the notification should be there in the home page,that's fine but all the details should also come to a custom OAF page with Approve/Cancel Button and a comment section so that If he Approve/Cancels, the Approve/Cancel notif should go to the requestor with the comments.
    The second part is a custom one, so I would like to know what API or program to call from Approve/Cancel button so that it is in sync with how we approve/Cancel a request from Standard Oracle notifications.
    Thanks
    Shanku

    Try WF_NOTIFICATION API.
    http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=WF_NOTIFICATION&c_owner=APPS&c_type=PACKAGE
    http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=WF_NOTIFICATION&c_owner=APPS&c_type=PACKAGE
    HOW TO PRINT ATTRIBUTE VALUES ON SUBJECT LINE [ID 351096.1]
    Is it Possible to Create on the Fly a Message Attribute for Showing it as a Document Attachement in a Notification? [ID 973710.1]
    API to reject APINV workflows when upgrading from 11.5.10.2 to R12
    Thanks,
    Hussein

Maybe you are looking for

  • Unable to update apps on iPad mini. I have even restored the iPad and now I can't download any of my previously purchased apps.

    Can someone help me. I am using an iPad mini with iOS 7.0.4 with wifi connection. Have had no problems until recently when I was unable to update apps and then noticed that some apps would open but no data would be available in apps like intelicast a

  • Email address from vendor master.

    Hai, Could any one guide me how to pull out the detials pertaining to email address  stored in Vendor Master . I tried in LFA1 table and ADRC table, but i could not get  the data.  Is there any other table from which i can extract the data Thanks.

  • One Line Item for More than one Ship to Party

    Dear Friends In one sales order which has only one Line Items for example P-101 qty-40 pcs. That 40pcs should shipt to my 4 ship-to-party. How I end user to do it. in one Line item in One Sales Order. Kindly Regards Arun

  • Country state drop down list oracle & php

    Hi all. I'm new in this forum. I have created two tables : create table countries country_id int not null, country_name varchar2(50), constraint countries_country_id_pk primary key (country_id) create table states state_id int not null, state_name va

  • ERP Instance start: Executabel copy: Could not be started

    Hello, during setup of the discovery server like described in 'SAP ESA Discovery Quick Guide' the SAP Instance ERP should be started. The instance does not start because the share for the executable copy cannot be reached. I did not change the hostna