How to pass values from a Java class to a class of JavaFX?

Hi Forum,
I get nuts on this problem:
I designed a program with Java and JavaFX classes. JavaFX classes handle the GUI and Java classes mix program logic. I think that's the way it is supposed to be. My program calculates something, so in my JavaFX GUI, I have a button to run this calculation. It's not a problem to call the start function calculation (which is in my Java class) on click of a button. But now I want to display the result of this calculation in my GUI. I can't just simply pass the result to my class of JavaFX GUI. I tried to import the JavaFX class in my Java class to call a set function, but I can't import them with the import statement. So my question is, how do I make the results to my GUI? What is the right way to do it?
I hope someone can help, thanks in advance :)

Two ways, either:

-your JavaFX class asks the Java class for the result once the task completed in exactly the same way he instantiated to start the task. Of course, you should regularly check the completion of the task (a mere PauseTransition).

- or your JavaFX class implements a Java INTERFACE and your Java class accepts (whether through the method or constructor) a variable of type of this interface. For example, you can set a reference to the subject of JavaFX itself in the Java object using the interface.
When the task is completed, your Java class calls a method defined in the INTERFACE to set the result in the object of JavaFX.

In addition, JavaFX 1.3.x provides an API to start asynchronous and be notified when a task is completed in the javafx.async package that allows you to run the task of basic Java (you mind that the class is named...) JavaTaskBase, see also the RunnableFutre interface) in a separate thread.

Tags: Oracle

Similar Questions

  • How to pass values from one stage to the other

    I have two steps (called primary and secondary). The primary stage creates the secondary stage. When the school is open I can access all the members (say according to) of the 1st stage and try to set a value. But in the 1st stage, I think the value is not defined. I think it is because 1 is executed before the 2nd. I used showAndWait() in 1st then show() on 2nd, then it is thrown exception.

    So I want to use the values defined by the 2nd step of the 1st stage.
    How to synchronize their?
    Thank you.
    package test;
    
    import javafx.application.Application;
    import javafx.event.*;
    import javafx.scene.*;
    import javafx.scene.control.*;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.*;
    import javafx.stage.*;
    
    
    public class Test extends Application {
       
        private int bitNo;
        Stage primaryStage,secondaryStage;    
        TextField textField;    
        double x,y;
       
        public static void main(String[] args) { launch(args); }
    
        
        @Override 
        public void start(final Stage primaryStage) {
            
            this.primaryStage=primaryStage;
            Group rt=new Group();
            Scene sc= new Scene(rt,300,300);
            
            Button button =new Button("Click Me");
            button.setOnAction(new EventHandler<ActionEvent>() {
    
                @Override
                public void handle(ActionEvent event) {
                    secondaryStage=new Stage(StageStyle.TRANSPARENT);
                    secondaryStage.initModality(Modality.WINDOW_MODAL);
                    secondaryStage.initOwner(primaryStage);     
                    
                    showSecondaryWindow();
                }
            });
            
            rt.getChildren().add(button);           
            primaryStage.setScene(sc);
            primaryStage.show();
            
            //primaryStage.showAndWait();
            
            System.out.println("Bit no set= "+bitNo);       
    
     }//start
    
     public void showSecondaryWindow(){
         
         Pane root=new Pane();
         root.setStyle("-fx-background-color: rgb(0,50,70);");
         //root.setPrefSize(200,200);
         Scene scene=new Scene(root,200,300);
                
         Label label=new Label("Data");
         textField=new TextField();
         textField.setUserData("one");
                
         Button ok=new Button("Ok");
         ok.setDefaultButton(true);
         ok.setOnMouseClicked(new EventHandler<MouseEvent>() {
    
            @Override
            public void handle(MouseEvent event) {
                System.out.println("New Stage Mouse Clicked");
                bitNo=Integer.parseInt(textField.getText());
                System.out.println("Bit no set by Secondary= "+bitNo);
                primaryStage.getScene().getRoot().setEffect(null);
                secondaryStage.close();
            }
         });
         Button cancel=ButtonBuilder.create().cancelButton(true).text("Cancel").build();
         cancel.setOnMouseClicked(new EventHandler<MouseEvent>() {  
             @Override
             public void handle(MouseEvent event) {
                 System.out.println("New Stage Mouse Clicked");
                 primaryStage.getScene().getRoot().setEffect(null);
                 secondaryStage.close();
             }
         });
         //VBox vBox =new VBox();
         //vBox.getChildren().addAll(label,textField,ok);
         HBox dataFileds=new HBox(10);
         dataFileds.getChildren().addAll(label,textField);
         HBox buttons=new HBox(10);
         buttons.getChildren().addAll(cancel,ok);
         root.getChildren().add(VBoxBuilder.create().children(dataFileds,buttons).spacing(10).build());
         //scene.getStylesheets().add(Test.class.getResource("Modal.css").toExternalForm());
         secondaryStage.setScene(scene);
         //final Node root = secondaryStage.getScene().getRoot();
         root.setOnMousePressed(new EventHandler<MouseEvent>() {
             @Override public void handle(MouseEvent mouseEvent) {
                 // record distance for the drag and drop operation.
                 x = secondaryStage.getX() - mouseEvent.getScreenX();
                 y = secondaryStage.getY() - mouseEvent.getScreenY();
             }
         });
         root.setOnMouseDragged(new EventHandler<MouseEvent>() {
             @Override public void handle(MouseEvent mouseEvent) {
                 secondaryStage.setX(mouseEvent.getScreenX() +x);
                 secondaryStage.setY(mouseEvent.getScreenY() +y);
             }
         });
         //primaryStage.getScene().getRoot().setEffect(new BoxBlur());
         secondaryStage.show();
         
     }//showSecondaryWindow
        
    }//class

    You can use showAndWait() on your secondary stage. Then execution is blocked, and you will see the change in your variable:

    package test ;
    
    import javafx.application.Application;
    import javafx.event.*;
    import javafx.scene.*;
    import javafx.scene.control.*;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.*;
    import javafx.stage.*;
    
    public class Test extends Application {
    
      private int bitNo;
      Stage primaryStage, secondaryStage;
      TextField textField;
      double x, y;
    
      public static void main(String[] args) {
        launch(args);
      }
    
      @Override
      public void start(final Stage primaryStage) {
    
        this.primaryStage = primaryStage;
        Group rt = new Group();
        Scene sc = new Scene(rt, 300, 300);
    
        Button button = new Button("Click Me");
        button.setOnAction(new EventHandler() {
    
          @Override
          public void handle(ActionEvent event) {
            secondaryStage = new Stage(StageStyle.TRANSPARENT);
            secondaryStage.initModality(Modality.WINDOW_MODAL);
            secondaryStage.initOwner(primaryStage);
    
            // This calls showAndWait(), so execution blocks until the window is closed
            showSecondaryWindow();
            // secondary window is now closed, value should be updated:
            System.out.println("Bit no now: " + bitNo);
          }
        });
    
        rt.getChildren().add(button);
        primaryStage.setScene(sc);
        primaryStage.show();
    
        // primaryStage.showAndWait();
    
        System.out.println("Bit no set= " + bitNo);
    
      }// start
    
      public void showSecondaryWindow() {
    
        Pane root = new Pane();
        root.setStyle("-fx-background-color: rgb(0,50,70);");
        // root.setPrefSize(200,200);
        Scene scene = new Scene(root, 200, 300);
    
        Label label = new Label("Data");
        textField = new TextField();
        textField.setUserData("one");
    
        Button ok = new Button("Ok");
        ok.setDefaultButton(true);
        ok.setOnMouseClicked(new EventHandler() {
    
          @Override
          public void handle(MouseEvent event) {
            System.out.println("New Stage Mouse Clicked");
            bitNo = Integer.parseInt(textField.getText());
            System.out.println("Bit no set by Secondary= " + bitNo);
            primaryStage.getScene().getRoot().setEffect(null);
            secondaryStage.close();
          }
        });
        Button cancel = ButtonBuilder.create().cancelButton(true).text("Cancel")
            .build();
        cancel.setOnMouseClicked(new EventHandler() {
          @Override
          public void handle(MouseEvent event) {
            System.out.println("New Stage Mouse Clicked");
            primaryStage.getScene().getRoot().setEffect(null);
            secondaryStage.close();
          }
        });
        // VBox vBox =new VBox();
        // vBox.getChildren().addAll(label,textField,ok);
        HBox dataFileds = new HBox(10);
        dataFileds.getChildren().addAll(label, textField);
        HBox buttons = new HBox(10);
        buttons.getChildren().addAll(cancel, ok);
        root.getChildren().add(
            VBoxBuilder.create().children(dataFileds, buttons).spacing(10).build());
        // scene.getStylesheets().add(Test.class.getResource("Modal.css").toExternalForm());
        secondaryStage.setScene(scene);
        // final Node root = secondaryStage.getScene().getRoot();
        root.setOnMousePressed(new EventHandler() {
          @Override
          public void handle(MouseEvent mouseEvent) {
            // record distance for the drag and drop operation.
            x = secondaryStage.getX() - mouseEvent.getScreenX();
            y = secondaryStage.getY() - mouseEvent.getScreenY();
          }
        });
        root.setOnMouseDragged(new EventHandler() {
          @Override
          public void handle(MouseEvent mouseEvent) {
            secondaryStage.setX(mouseEvent.getScreenX() + x);
            secondaryStage.setY(mouseEvent.getScreenY() + y);
          }
        });
        // primaryStage.getScene().getRoot().setEffect(new BoxBlur());
        secondaryStage.showAndWait();
    
      }// showSecondaryWindow
    
    }// class
    

    You can also use an IntegerProperty to hold the variable and listening to the amendments on this subject:

    package test ;
    
    import javafx.application.Application;
    import javafx.beans.property.IntegerProperty;
    import javafx.beans.property.SimpleIntegerProperty;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.*;
    import javafx.scene.*;
    import javafx.scene.control.*;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.*;
    import javafx.stage.*;
    
    public class Test extends Application {
    
      private IntegerProperty bitNo;
      Stage primaryStage, secondaryStage;
      TextField textField;
      double x, y;
    
      public static void main(String[] args) {
        launch(args);
      }
    
      @Override
      public void start(final Stage primaryStage) {
    
        this.bitNo = new SimpleIntegerProperty();
    
        bitNo.addListener(new ChangeListener() {
    
          @Override
          public void changed(ObservableValue observable,
              Number oldValue, Number newValue) {
            System.out.printf("bit no changed from %d to %d%n", oldValue, newValue);
          }
    
        });
        this.primaryStage = primaryStage;
        Group rt = new Group();
        Scene sc = new Scene(rt, 300, 300);
    
        Button button = new Button("Click Me");
        button.setOnAction(new EventHandler() {
    
          @Override
          public void handle(ActionEvent event) {
            secondaryStage = new Stage(StageStyle.TRANSPARENT);
            secondaryStage.initModality(Modality.WINDOW_MODAL);
            secondaryStage.initOwner(primaryStage);
    
            showSecondaryWindow();
          }
        });
    
        rt.getChildren().add(button);
        primaryStage.setScene(sc);
        primaryStage.show();
    
        // primaryStage.showAndWait();
    
        System.out.println("Bit no set= " + bitNo.get());
    
      }// start
    
      public void showSecondaryWindow() {
    
        Pane root = new Pane();
        root.setStyle("-fx-background-color: rgb(0,50,70);");
        // root.setPrefSize(200,200);
        Scene scene = new Scene(root, 200, 300);
    
        Label label = new Label("Data");
        textField = new TextField();
        textField.setUserData("one");
    
        Button ok = new Button("Ok");
        ok.setDefaultButton(true);
        ok.setOnMouseClicked(new EventHandler() {
    
          @Override
          public void handle(MouseEvent event) {
            System.out.println("New Stage Mouse Clicked");
            bitNo.set(Integer.parseInt(textField.getText()));
            System.out.println("Bit no set by Secondary= " + bitNo);
            primaryStage.getScene().getRoot().setEffect(null);
            secondaryStage.close();
          }
        });
        Button cancel = ButtonBuilder.create().cancelButton(true).text("Cancel")
            .build();
        cancel.setOnMouseClicked(new EventHandler() {
          @Override
          public void handle(MouseEvent event) {
            System.out.println("New Stage Mouse Clicked");
            primaryStage.getScene().getRoot().setEffect(null);
            secondaryStage.close();
          }
        });
        // VBox vBox =new VBox();
        // vBox.getChildren().addAll(label,textField,ok);
        HBox dataFileds = new HBox(10);
        dataFileds.getChildren().addAll(label, textField);
        HBox buttons = new HBox(10);
        buttons.getChildren().addAll(cancel, ok);
        root.getChildren().add(
            VBoxBuilder.create().children(dataFileds, buttons).spacing(10).build());
        // scene.getStylesheets().add(Test.class.getResource("Modal.css").toExternalForm());
        secondaryStage.setScene(scene);
        // final Node root = secondaryStage.getScene().getRoot();
        root.setOnMousePressed(new EventHandler() {
          @Override
          public void handle(MouseEvent mouseEvent) {
            // record distance for the drag and drop operation.
            x = secondaryStage.getX() - mouseEvent.getScreenX();
            y = secondaryStage.getY() - mouseEvent.getScreenY();
          }
        });
        root.setOnMouseDragged(new EventHandler() {
          @Override
          public void handle(MouseEvent mouseEvent) {
            secondaryStage.setX(mouseEvent.getScreenX() + x);
            secondaryStage.setY(mouseEvent.getScreenY() + y);
          }
        });
        // primaryStage.getScene().getRoot().setEffect(new BoxBlur());
        secondaryStage.show();
    
      }// showSecondaryWindow
    
    }// class
    
  • How to pass values from one form to the other setting

    Hello

    I have created two forms Form_A and Form_A. Form_B, having a button "submit" and called the new form of B.
    I have done some calculations in form B. Now I want to spend this calculation value back to Form_A when I press
    My Exit in Form_B button.

    In FormA, just before calling FormB declare and initialize a global variable

    :GLOBAL.PASS_BACK := ''; -- declaration and initialization
    CALL_FORM(FORMB,....);
    --> At this point the :GLOBAL.PASS_BACK variable should have the calculated value from FormB
    

    In the B form to trigger after CHANGE calculated item or KEY of VALIDATION or WHEN - click the BUTTON to exit FormB write - anywhere after the calculation were made

    :GLOBAL.PASS_BACK := ;
    

    For more details, search for the global variables in the form builder help.

    Kind regards

  • How to pass values from method to method of CO AM return?

    Hello

    On my personal page, I have a method in the AM. This method calls a PL/SQL package to get some values in the database.
    I need to return values to my CO thos where I called the AM method. How to do that.
    Already, I did the following:

    in CO


    String ledgerId = null;
    String ledgerName = null;
    String countedLedgers = null;
    String budgetVersionId = null;
    String budgetName = null;

    [Serializable] parameters = {ledgerId
    ledgerName
    countedLedgers
    budgetVersionId
    budgetName
    };

    OAApplicationModule am = pageContext.getApplicationModule (webBean);
    am.invokeMethod ("getLedgerData", parameters);


    in AM

    public void getLedgerData (String LedgerId
    String LedgerName
    String CountedLedgers
    String BudgetVersionId
    String BudgetName
    )
    throws SQLException
    {

    ......
    After call to PL/SQL
    ......
    After running you can get the value of a pl/sql block production
    ledgerId = callPLSQLStmt.getString (1);
    ledgerName = callPLSQLStmt.getString (2);
    countedLedgers = callPLSQLStmt.getString (3);
    budgetVersionId = callPLSQLStmt.getString (4);
    budgetName = callPLSQLStmt.getString (5);
    callPLSQLStmt.close ();

    System.out.println ("AM Ledger Info: ledgerId:" + ledgerId);
    System.out.println ("AM Ledger Info: ledgerName:" + ledgerName);
    System.out.println ("AM Ledger Info: countedLedgers:" + countedLedgers);
    System.out.println ("AM Ledger Info: budgetVersionId:" + budgetVersionId);
    System.out.println ("AM Ledger Info: budgetName:" + budgetName);

    LedgerId = ledgerId;
    LedgerName = ledgerName;
    CountedLedgers = countedLedgers;
    BudgetVersionId = budgetVersionId;
    BudgetName = budgetName;
    ....



    Thus, upon his return in the central, what should I do to get these values on 'settings [Serializable]", which I've provided?
    The end result should be to bring them to the screen...

    Thank you
    Ronny

    He is sure to get the values using the hash table.

    The AM procedure would be something similar to

    public HashMap getLedgerData (String pLedgerId)
    )
    Can be used get pLedgerIdto results... If you already know the value so no need for this parameter
    Run your PL/SQL
    HashMap ledgerDetailsHash = new HasnMap();
    ledgerDetailsHash.put ("LedgerId", value1);
    ledgerDetailsHash.put ("LedgerName", value2);
    ledgerDetailsHash.put ("CountedLedgers", value3);
    .......

    Return ledgerDetailsHash;
    }

    Your call to CO's going to be

    HashMap resultMap = (HashMap) am.invokeMethod ("getLedgerData", parameters, where applicable);
    String LedgerName = resultMap.get ("LedgerName");
    ......

    Kind regards
    Stephanie.

  • How to pass values from one function to the other

    Hello

    I am a school teacher and a beginner in Flash Actionscript. I am creating a countdown for use in my classroom during testing. The beginning and break according to need, but not the pause button functions. When I click on the pause button, the timer is reset to 0:00:00. Help, please. Here is the code that I had written so far:

    var Subject1timeLeftHr;

    var Subject1timeLeftMin;

    var Subject1timeLeftSec;

    Subject1start_btn._visible = true;

    Subject1pause_btn._visible = false;

    Subject1rotor_mc.gotoAndStop (1);

    Subject1rotor_mc._visible = false;

    Subject1durationHr_txt. Text = "0";

    Subject1durationMin_txt. Text = "00";

    Subject1durationSec_txt. Text = "00";

    Selection.setFocus (Subject1durationHr_txt);

    function SubjectdurationHr (SubjectxdurationHr_txt, SubjectxdurationMin_txt)

    {

    if (SubjectxdurationHr_txt.length == 1)

    {

    Selection.setFocus (SubjectxdurationMin_txt);

    }

    }

    function SubjectdurationMin (SubjectxdurationMin_txt, SubjectxdurationSec_txt)

    {

    if (SubjectxdurationMin_txt.length == 2)

    {

    Selection.setFocus (SubjectxdurationSec_txt);

    }

    }

    function SubjectdurationSec (SubjectxdurationSec_txt, SubjectxdurationHr_txt)

    {

    if (SubjectxdurationSec_txt.length == 2)

    {

    Selection.setFocus (SubjectxdurationHr_txt);

    }

    }

    Subject1durationHr_txt. OnChanged = function()

    {

    SubjectdurationHr (Subject1durationHr_txt, Subject1durationMin_txt);

    };

    Subject1durationMin_txt. OnChanged = function()

    {

    SubjectdurationMin (Subject1durationMin_txt, Subject1durationSec_txt);

    };

    Subject1durationSec_txt. OnChanged = function()

    {

    SubjectdurationSec (Subject1durationSec_txt, Subject1durationHr_txt);

    };

    function startcountdown (SubjectxdurationLeft, SubjectxdurationHr, SubjectxdurationHr_txt, SubjectxdurationMin, SubjectxdurationMin_txt, SubjectxdurationSec, SubjectxdurationSec_txt, Subjectxduration, SubjectxstartTime, SubjectxendTime, Subjectxtimer_mc, Subjectxpause_btn, Subjectxstart_btn, Subjectxrotor_mc, SubjectxtimeLeft, SubjectxtimeLeftHr, SubjectxtimeLeftMin, SubjectxtimeLeftSec, SubjectxtimeLeftHr_txt, SubjectxtimeLeftMin_txt, SubjectxtimeLeftSec_txt)

    {

    delete SubjectxdurationLeft;

    delete SubjectxdurationHr;

    delete SubjectxdurationMin;

    delete SubjectxdurationSec;

    delete Subjectxduration;

    delete SubjectxdurationHr_txt.text;

    delete SubjectxdurationMin_txt.text;

    delete SubjectxdurationSec_txt.text;

    SubjectxstartTime = getTimer();

    Subjectxtimer_mc.onEnterFrame = function()

    {

    if (SubjectxdurationHr_txt.text == Nan |) SubjectxdurationMin_txt.text == Nan | SubjectxdurationSec_txt.text is Nan)

    {

    }

    else

    {

    SubjectxdurationHr = 60 * 60 * 1000 * Number (SubjectxdurationHr_txt.text).

    SubjectxdurationMin = 60 * 1000 * Number (SubjectxdurationMin_txt.text).

    SubjectxdurationSec = 1000 * Number (SubjectxdurationSec_txt.text).

    Subjectxduration = SubjectxdurationHr + SubjectxdurationMin + SubjectxdurationSec;

    SubjectxendTime = SubjectxstartTime + Subjectxduration;

    SubjectxdurationLeft = SubjectxendTime - getTimer();

    if (SubjectxdurationLeft > 0)

    {

    SubjectxdurationHr_txt._visible = false;

    SubjectxdurationMin_txt._visible = false;

    SubjectxdurationSec_txt._visible = false;

    Subjectxpause_btn._visible = true;

    Subjectxstart_btn._visible = false;

    Subjectxrotor_mc._visible = true;

    Subjectxrotor_mc.play ();

    SubjectxtimeLeft = SubjectxdurationLeft / (1000 * 60 * 60);

    SubjectxtimeLeftHr = Math.floor (SubjectxtimeLeft);

    SubjectxtimeLeftMin = Math.floor ((SubjectxtimeLeft-SubjectxtimeLeftHr) * 60);

    SubjectxtimeLeftSec = Math.floor (((SubjectxtimeLeft-SubjectxtimeLeftHr) * 60 - SubjectxtimeLeftMin) * 60);

    SubjectxtimeLeftHr_txt.text = String (SubjectxtimeLeftHr);

    if (SubjectxtimeLeftHr_txt.length < 1)

    {

    SubjectxtimeLeftHr_txt.text = '0' + SubjectxtimeLeftHr_txt.text;

    }

    SubjectxtimeLeftMin_txt.text = String (SubjectxtimeLeftMin);

    if (SubjectxtimeLeftMin_txt.length < 2)

    {

    SubjectxtimeLeftMin_txt.text = '0' + SubjectxtimeLeftMin_txt.text;

    }

    SubjectxtimeLeftSec_txt.text = String (SubjectxtimeLeftSec);

    if (SubjectxtimeLeftSec_txt.length < 2)

    {

    SubjectxtimeLeftSec_txt.text = '0' + SubjectxtimeLeftSec_txt.text;

    }

    }

    else

    {

    delete Subjectxtimer_mc.onEnterFrame;

    SubjectxtimeLeftHr_txt.text = "";

    SubjectxtimeLeftMin_txt.text = "";

    SubjectxtimeLeftSec_txt.text = "";

    SubjectxdurationHr_txt._visible = true;

    SubjectxdurationMin_txt._visible = true;

    SubjectxdurationSec_txt._visible = true;

    Subjectxrotor_mc.gotoAndStop (1);

    Subjectxrotor_mc._visible = false;

    SubjectxdurationHr_txt.text = '0 '.

    SubjectxdurationMin_txt.text = "00";

    SubjectxdurationSec_txt.text = "00";

    Subjectxpause_btn._visible = false;

    Subjectxstart_btn._visible = true;

    Selection.setFocus (SubjectxdurationHr_txt);

    }

    }

    };

    }

    function pausecountdown (SubjectxdurationHr_txt, SubjectxtimeLeftHr, SubjectxdurationMin_txt, SubjectxtimeLeftMin, SubjectxdurationSec_txt, SubjectxtimeLeftSec, Subjectxstart_btn, Subjectxpause_btn, Subjectxrotor_mc)

    {

    delete Subjectxtimer_mc.onEnterFrame;

    SubjectxdurationHr_txt.text = String (SubjectxtimeLeftHr);

    SubjectxdurationMin_txt.text = String (SubjectxtimeLeftMin);

    SubjectxdurationSec_txt.text = String (SubjectxtimeLeftSec);

    Subjectxstart_btn._visible = true;

    Subjectxpause_btn._visible = false;

    Subjectxrotor_mc.stop ();

    }

    Subject1pause_btn.onRelease = function()

    {

    pausecountdown (Subject1durationHr_txt, Subject1timeLeftHr, Subject1durationMin_txt, Subject1t, imeLeftMin, Subject1durationSec_txt, Subject1timeLeftSec, Subject1start_btn, Subject1pause_btn, Subject1rotor_mc);

    };

    Subject1start_btn.onRelease = function()

    {

    startcountdown (Subject1durationLeft, Subject1durationHr, Subject1durationHr_txt, Subject1dura, tionMin, Subject1durationMin_txt, Subject1durationSec, Subject1durationSec_txt, Subject1durati, Subject1startTime, Subject1endTime, Subject1timer_mc, Subject1pause_btn, Subject1start_btn, Subject1rotor_mc, Subject1timeLeft, Subject1timeLeftHr, Subject1timeLeftMin, Subject1timeLeftS ec, Subject1timeLeftHr_txt, Subject1timeLeftMin_txt, Subject1timeLeftSec_txt);

    };

    Subject1cancel_btn.onRelease = function()

    {

    Subject1timeLeftHr_txt.text = "";

    Subject1timeLeftMin_txt.text = "";

    Subject1timeLeftSec_txt.text = "";

    Subject1durationHr_txt._visible = true;

    Subject1durationMin_txt._visible = true;

    Subject1durationSec_txt._visible = true;

    Subject1durationHr_txt.text = '0 '.

    Subject1durationMin_txt.text = "00";

    Subject1durationSec_txt.text = "00";

    Subject1timeLeftHr_txt._visible = true;

    Subject1timeLeftMin_txt._visible = true;

    Subject1timeLeftSec_txt._visible = true;

    Subject1pause_btn._visible = false;

    Subject1start_btn._visible = true;

    Subject1rotor_mc._visible = false;

    Subject1rotor_mc.gotoAndStop (1);

    delete Subject1timer_mc.onEnterFrame;

    delete Subject1durationLeft;

    delete Subject1duration;

    delete Subject1durationHr_txt.text;

    delete Subject1durationMin_txt.text;

    delete Subject1durationSec_txt.text;

    };

    I think you need to spend time by reducing your code at a practical level.  You seem to be any passage in the book in each function and I think that probably none of this is necessary.  If you have declared these variables at the beginning, then you don't need to transfer them to any function, because they are gobally available to one of the functions/code that follows.  Similarly, if you have some textfields on stage, it is pointless to pass those in all functions for the same reason.

    I see you doing the overuse of 'delete' (and possibly errant use as well).  Is probably the only thing you might want or need to use...

    delete Subjectxtimer_mc.onEnterFrame;

    Which stops the enterframe trigger activity, which I think is used to update the textfields which indicate the time.

    And that conditional uses == Nan is not likely to do anything except wonder what is a Nan.  TextFields hold the strings, which are cited.  SO unless you have a variable named Nan somewhere that has a value of string assigned to her, this condition will do nothing for you.  You probably don't need it at all if you get this working properly.

  • How can I pass values from one node to the other

    Give a standard and efficient way to pass values of the child to the parent

    Hai Prathap

    You can use the custom event to pass values from the children to the parent

  • How to pass values to the page to the Page target?

    Hi all

    I want to pass values from the 10 column to a report page (page 1 of source) to a target page 2 HTML region and 10 fields.
    These 10 fields held values that are passing in the report.

    Please suggest a solution here!

    Thank you and best regards,
    Robette.

    source page IE 1, since I can navigate to page 3, and also on page 2, I can navigate to the target 3 page, when I click on the back button Go it will navigate page 1 only.
    That is why I want the Go back button must redirect the target page, hence it is called.

    Create an application called PREV_PAGE, item in the link of the page 3 col page 2 * 3 * as a parameter of the element PREV_PAGE.
    So when you're on page 2 you will know the previous page is the value of the point of application PREV_PAGE 3
    So would be the url in your Go Back button

    f?p=&APP_ID.:&PREV_PAGE.:&APP_SESSION.::NO::
    

    There is something really need it please send your comments to this requirement. It will be really useful.

  • Passing values from a CO of a page in the xml file of a field with LOV.

    Hello

    I have 2 pages in this CUSTOMIZATION and the 2nd page got fields that have their turn to LOV.

    The query behind the LOV is sitting in the XML file and as an amendment to this motion, he needs some dynamic values

    I got to a stage where in the Commander of the 2nd page I set up values using getparameters.

    But how to pass this value from the 2nd page to the XML FILE.

    Thank you

    Regis

    Hi Regis

    Leave; s first focus on your first build errors. You said very well reconstruction work but compilation error comes when you run the page.

    It's strange. Can you please confirm if you have added the OFA libraries to your project. Ideally, they should be there once you create an OA project

    Concerning

    Marie Lise S

  • How to pass variables from cursor to a job

    Hello

    begin
    for cur_1 in (select  tab1.c1  c1 from  tab1)
    loop 
    dbms_scheduler.create_job(......
    ..........
    job_type =>plsql_block,
    job_action => 'declare verrm varchar2(100); '||
                           ' begin   for cur_2 in (select col1,col2 from tab2)'||
                             'loop prc( cur_1. c1,cur2.col1,cur.col2  ); end loop;  end;' ,----- gettin gerror undeclared identifier cur_1.c1
    ........)               
    end loop;

    user8731258 wrote:

    When reading about dbms_parallel, I have seen examples where the task is running an sql statement.
    Now, can we run a pl sql also block?

    Why would you run a PL/SQL block in parallel?

    Yes, the DBMS_PARALLEL_EXECUTE. Run_Task() sql_stmt parameter can accept an anonymous PL/SQL block as statement. For example

    --// example of passing a PL/SQL anon block as statement
    declare
      ..
    begin
            ..code..
    
            parallelSql := 'declare
                                    t1      timestamp;
                            begin
                                    t1 := SysTimestamp;
                                    update foo_tab set obj_type = lower(obj_type)
                                    where rowid between :start_id and :end_id;
                                    ProcessLog( fromTime=>t1, toTime=>SysTimestamp, rowsProcessed=>SQL%RowCount );
                            end;';
    
            DBMS_PARALLEL_EXECUTE.Run_Task(
                    task_name => taskName,
                    sql_stmt => parallelSql,
                    language_flag => DBMS_SQL.NATIVE,
                    parallel_level => 5
            );
    
            ..code..
    end;
    

    However, if you want code PL/SQL real multithreaded (no SQL), then that can be done using a parallel pipeline table function (PL/SQL function).

    So, I'll go for dbms_Scheduler thing. But still when I'm stuck on how to pass the value of date to work...

    In the example I posted using DBMS_JOB - cursor loop identifies the days of treatment. The loop then call ScheduleJob() to schedule a task of process to date. This procedure should look something like the following:

    // schedules a job to run procedure ProcessDailyInvoices for the specified day
    create or replace procedure ScheduleJob( day date ) is
            jid             number;
            dateParam       varchar2(100) default 'to_date(''$DATE'',''$FORMAT'')';
            plsqlBlock      varchar2(1000);
    begin
            dateParam := replace( dateParam, '$DATE', to_char(day,'yyyy/mm/dd') );
            dateParam := replace( dateParam, '$FORMAT', 'yyyy/mm/dd' );
            plsqlBlock := 'begin ProcessDailyInvoices( day=>'||dateParam||' ); end;';
    
            DBMS_JOB.Submit(
                    job => jid,
                    next_date => sysdate,
                    what => plsqlBlock
            );
    end;
    
  • How accept/pass values as Oracle text multiline.

    Hi all

    Help, please!

    I'm trying to pass values of several lines of text in the form of Oracle to a stored procedure.

    To explain in detail, I have a text element (let's say Input_Text_item - a multiline value yes property) which would not. values as input (possibly by copy/paste), a button - pressed, it should take each value 'Input_text_item' (line by line) and pass the value to a stored procedure and display the result in another element of text (which has the property multiline set to Yes) I say "Output_text_item".

    Now the problem is to know how to read "Input_Text_item" multiline values I am only able to read the unique value. When I try the multi-line values, it gives me "FRM-50024: space run posts only" error.

    Is there a way to fix this?


    Thank you
    B

    Back to my original post, how to place multiple lines of a text element values to a stored procedure.

    I want to spend the value 10 (from the first line of item_1) to store procedure/function - get result.

    then pass the value 40 (from the second row of item_1) to a stored procedure again and so on... >
    If I understand correctly, you want to send each line (MLT) multiline text item as a separate parameter a stored procedure. If this is correct, then you will need analyze the different lines of the TRM in the values of the individual parameters. This can be done by analyzing the MLT using the Carrage return [Chr (13)] and line break characters [Chr (10)] in the MLT as separators and delimiters of each value. There are some good examples of how to cut a string multiple values (or an array). Here are a few good examples:

    PL/SQL: Splitting a string in a table?
    How to parse a string in Oracle.

    These two methods can be easily adapted to research on the characters of Chr (10) and Chr (13), so you can analyze your TRM.

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • Passing values from one scene to the other

    Hello, how can I pass a value from a textbox in scene1 to another area of text that is in scene2?

    In scene 1, you might have...

    var str:String = t1.text;

    and to scene 2, you might have...

    T2. Text = str;

  • How to pass values to external applications to guests of dashboard?

    Any idea is appreciated.

    How can I pass values of the guests dashboard from external applications to the dashboard inviting so that the dashboard is filtred based on the values sent by external applications.

    Thanks in advance!

    Kris

    Kris,

    I am able to change the session variable and able to call external application dashboard, but I identified the prompt value changes do not. but finally I am able to find a solution for you.

    Use the following URL and he explained here

    http://localhost:9704/Analytics/saw.dll?dashboard&nquser=administrator&nqpassword=administrator&PortalPath=/shared/ABCD/_portal/Dash1&options=RMF&DSN=Madan

    CheminPortail is your dashboard location. / Shared/ABCD is the folder in which I recorded dashboards. Dash1 is my dashboard name.

    internally, this dashboard includes a lot of reports that use the session variable. After above that, I am able to update the session variable to the value I have given in the URL, DSN = value.

    You can observe here called the dashboard and happening of value, but its not updated to the prompt value. so this workaround is change the prompt,

    Replace the default - SQL result and place the code sql

    SELECT CASE WHEN 1 = 0 THEN ANOTHER VALUEOF Markets.Region (NQ_SESSION. DSN) END saw_0 OF paint

    again here Market.Region is a column in the presentation layer and paint material. After you complete this step, the command prompt displays always value in the default session variable.

    Now include reports and dashboard invites in the dashboard and run this url from external applications.

    http://localhost:9704/Analytics/saw.dll?dashboard&nquser=administrator&nqpassword=administrator&PortalPath=/shared/ABCD/_portal/Dash1&options=RMF&DSN=Madan

    It worked for me and blog it soon. If it works for you question mark as answered and mark my answers as being correct.

    Thank you
    -Madan

  • How to pass variable from bean to resourceID for the document map?

    Hello experts, I have added WebCenter workflow Microsoft document explore task in my ADF which as a parameter called resourceId.   I want to pass variable bean to this setting, because the content ID (doc name or ID) are determined dynamically.

    When I provide ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} as a resource in the expression ID, it works very well.    But samething if I attribute to a bean bean variable and entitlement in the form ${sessionScope.MyBean.docName}, it evaluates the variable bean in the form ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} and then below throws the exception:

    [2013-10 - T 02, 14: 34:50.369 - 04:00] [DefaultServer] [WARNING] [WCS-07219] [oracle.webcenter.doclib.internal.view.backing.ContentProvider] [tid: [ASSETS].] [ExecuteThread: '10' for the queue: "(self-adjusting) weblogic.kernel.Default"] [username: anonymous] [ecid: d50192415c689920:-7d97126c:1417a5d6a49: - 8000 - 000000000000008 a, 0] [APP: CreateContactWSProxy] invalid parameter combination: the login name specified by resourceId = ${"UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI"} is not specified in the parameter connectionName = UCM57Server.

    Variable bean is defined as:

    private String Nomdoc = "${" UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI "} ;

    Please give me some advice on how to pass the value to resourceId dynamically via the variable of bean.

    Thank you.

    private String Nomdoc = "UCM57Server #dDocName:1379596941565_CONTACT_OPTREGI";

    Without $ {}

  • How to pass values to a variable of the file.

    Hello

    I want to pass values in a variable to a file. For example: I want to divide the records in the source based on the region and load a region at any given time. Is there a way I can tell ODI to load only one region at a time. Currently I think I have a varibale defined, pass the value from a file and use this variable in the source filter.

    All answers are appreciated.

    Thank you
    CHikk

    Hello

    Right thinking...

    Simply use the following command, to the updating of the ODI variable tab, to get the values directly in the file:

    Select REGION_NAME
    table
    / * $$ SNPS_START_KEYSNP$ CRDWG_TABLESNP$ CRTABLE_NAME = REGIONSNP$ CRLOAD_FILE = <%=odiRef.getSchemaName("D")%> \MY_FILE. TXTSNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=09SNP$CRFILE_SEP_LINE=0D0ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=REGION_NAMESNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=500SNP$CRPRECISION=500SNP$CR$$SNPS_END_KEY*/

    (the command between ' / * ' and ' * / ' must be in a single line)

    Change the 'MyFile' the real file name

    This help you?

  • Oracle apex 5.0: pass values from one page to the other as well save you can save same value in the table.

    I use oracle apex 5.0

    Issues related to the:

    (1) I created an application where I have a form on which I have a button named 'Add', now if I click on that button values need to be stored in table.how to create! I use the dynamic button that is created by the html tag < input type = "button" > need help with this.

    (2) if the value stored in the table how the same value will be on the agenda of the calling page. ?

    New to this world of Apex.

    concerning

    Pranav shah

    http://zderadicka.EU/Apex-dynamic-actions-with-report-region/

Maybe you are looking for

  • HP TouchSmart 15-j051ea ENVY: WiFi update

    Hello My laptop is a HP ENVY 15-j051ea TouchSmart and has an Intel® Centrino® Wireless - N standard 2230. I had a look online and thought that the Intel® Centrino® Advanced-N 6235 would be a decent upgrade. No problem with my current phone, but I try

  • How can I reinstall wlidcli.dll

    compture is not runn as befits a would like to know how can I reinstall the program

  • Error preventing printing HP 4000 series

    I get an error from windows saying print "stopped Spooler subsystem and has been closed." What I can do! Thank you

  • Part of the wireless card not for HP Pavilion DV2815ea

    Hello Could someone tell me the part number for the card wireless in a HP Pavilion DV2815ea? Trying to find the part number for tha a few weeks now (why I need it's a long story and I don't mind with it), but as my laptop is out of warranty HP refuse

  • How a loop shape in a misconfigured Etherchannel?

    Dear friends, It is a question frequently observed and practically proven that if both switches are interconnected by a number of parallel links that are grouped in an Etherchannel on a switch (of course, using the mode on ) while being unbundled on