How to pass values from one stage to other

I have two stage (say primary and secondary).The primary stage creates the secondary stage. When the secondary is opened i can access all the members(say bitNo) of 1st stage and try to set some value. But in the 1st stage i find the value not being set. I think it's because 1st is executed before the 2nd. I used showAndWait() in 1st then show() on 2nd then it is throwing exception.
So i want to use the values set by the 2nd stage in the 1st stage.
How do i synchronize them ?
Thanks .
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'll see the change to 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<ActionEvent>() {
      @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<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.showAndWait();
  }// showSecondaryWindow
}// classYou can also use an IntegerProperty to hold the variable, and listen for changes on it:
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<Number>() {
      @Override
      public void changed(ObservableValue<? extends Number> 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<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.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<MouseEvent>() {
      @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<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

Similar Messages

  • How to pass control from one component to other component

    Hi,
    I have a requirement to pass control from one component to other component.
    Here is my requirement.. l have two portal components, one is search component and other is result component. I have this search component as quick navigation iView where we can enter a value and results will display in results iView, it's a main iView.
    When search view gets the results, I will display the count in search view and result in results view. .i.e.. both the iviews are viewed at any time.
    Can any one advise me how to acheive this.
    Thanks,
    Chinna.

    Hi Sandeep,
    Thanks for the reply. I have gone through the EPCF API, and tried with doNavigate('iViewName').
    when I click on the button in search view (quikc navigation frame), instead of page getting refreshed in result iView, whole page is replaced by results iview. I want only search view and results view gets refreshed.
    can you please tell me which even should I use for this scenario...
    Thanks,
    Chinna

  • ESB  : How to Pass value from one RS to another RS

    Hi Gurus,
    I want to pass a value from one First Routing service to another to set the value for the last XSL transformation.
    How can I do this without creating specific XSDs??
    Rgs
    JO

    Data flowing through the ESB is XML-based (or opaque), so if the value you want to pass is in the XML result of RS1, you can use it in RS2. If you have a good reason why not too or this doesn't work for you, you could store data somewhere along the ESB process (database, stateful bean, etc.). Otherwise, you would need to let the ESB generate (or create you own) XSD describing the XML.
    Regards,
    Ronald

  • How to pass value from one method to another method

    Hi all,
    I have created a funtion module and i am calling this function module inside a method and it is exporting some value in a table, now i have to pass table value to another method where i have do some thing based upon this values.
    I think there a marco available to move the values from one method to another method.
    Please help me in this issue.
    Regards
    Balaji E.

    Hi,
    Let me make certain assumptions!
    Method 1 - You export the table values
    Method 2 - The method where you need the table values
    Once you create a method from a function module which has tables as one of the export parameters then the code automatically puts in the macro code which looks like : SWC_SET_TABLE CONTAINER 'Table' TABLE.
    The 'Table' in the above code is the container element which is created by the workflow once you use this method and the TABLE (The table that gets filled in the function module) is the variable to code automatically created.
    Now you can use the other function module in the workflow as a background step and pass the values from the 'Table' container to this method using the binding. When you use this then the method automatically has the macro SWC_GET_TABLE CONTAINER 'Table' ITABLE. Here the 'Table' is the same container table you used in the binding and the ITABLE would be the variable you can use in the other function module.
    Hope this helps,
    Sudhi

  • How to pass values from one section to another section in same dashboard..

    hi
    I am in need of designing a dashboard which contains 2 sections.In first section i will include a Dashboard prompt and in the second section, I have to display a jsp page by passing the result of prompt as a parameter.
    how to pass these values.....
    if possible send me some links regarding this
    thanks in advance...............

    Check my blog entry here http://oraclebizint.wordpress.com/2007/12/26/oracle-bi-ee-101332-drills-across-sections-in-a-dashboard/. It has an example.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • How to Pass Attachment from one process to other.

    Hi,
    Suppose there are two processes.I am starting 2nd process from 1st process through GP API.
    How to pass the attachments?
    Regards,
    Pratik

    Hi,
       I seems its GP related. Try out the link below hope u find the solution

  • How to set value from one view to other view's context node attr b4 save

    HI all,
    My requirement is as below:
    There are two views in component BP_CONT.
    BP_CONT/ContactDetails    IMPL class
    BP_CONT/SalesEmployee   SALESEMPLOYEE    STRUCT.SALESEMPLOYEE
    I want to set value from first view to second view's context node's attribute.
    i get Sales Employee BP number in ContactDetails view, from here i want to set that value in to STRUCT.SALESEMPLOYEE
    of second view in the same component.
    please send me code snippet for doing the same.
    Thanks in advance.
    seema

    Hi Seema
    You can access the fields from different views by either using custom controllers or by using component controllers, in your case you can access the Sales employee BP number from the Component controller.
    first access the component controller  as below in BP_CONT/SalesEmployee  (in do_prepare_output method) or in (specific setter method)
    lv_compcontroller type ref to CL_BP_CONT_BSPWDCOMPONENT_IMPL,
    lv_partner type ref to cl_crm_bol_entity,
    lv_role type string,
    lv_partner_no type string.
    lv_employee TYPE REF TO if_bol_bo_property_access,
    lv_compcontroller  = me->COMP_CONTROLLER.
    lv_partner ?= lv_compcontroller  ->typed_context->-partner->collection_wrapper->get_current( ).
    lv_role = lv_partner->get_property( iv_attr_name = 'BP_ROLE' )
    IF LV_ROLE = 'SALESEMPLOYEE'
      lv_partner_no ?= lv_current->get_property( iv_attr_name = 'BP_NUMBER' ).
    endif.
    now set the value
    lv_employee ?= me->typed_context->salesemployee->collection_wrapper->get_current( )
    CHECK lv_employee IS BOUND.
        lv_employee->set_property( iv_attr_name = 'SALESEMPLOYEE' iv_value =  lv_partner_no  )
    Thanks & Regards
    Raj

  • How to pass values from one function to another

    Hi,
    I am a middle school teacher and a newbie in Flash Actionscript. I am trying to create a countdown timer for use in my class during tests. The start and pause functions work as required, but not the pause button. When I click on the pause button, the timer is reset to 0:00:00. Please help. Here is the code 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 == 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 on,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 some time reducing your code to practical levels.  You seem to be passing everything in the book to every function and I would guess that probably none of it is necessary.  If you declared those variables at the beginning, then you don't need to pass them into any function because they are gobally available to any of the code/functions that follows them.  Similarly, if you have textfields on the stage, you do not need to pass those into any functions for the same reason.
    I see you making overuse of "delete" (and possibly errant use as well).  Probably the only thing you might want/need to use is...
    delete Subjectxtimer_mc.onEnterFrame;
    Which stops the enterframe activity from firing off, which I will guess is being used to update the textfields that indicate the time.
    And that conditional that uses == Nan isn't likely to do anything except wonder what an Nan is.  Textfields hold strings, which are quoted.  SO unless you have a variable named Nan somewhere that has a String value assigned to it, that conditional won't be doing anything for you.  You probably won't need it at all if you get this working properly.

  • How to pass values from one form to another.

    Dear all,
    i have a table A i want to double a text item and open another form B. then setting values or adding values in it. i want to close the form and open the form A. the values selected in form B. i want to send to the form A.
    please help me.
    Muhammad Nadeem

    Hi
    To send value to the form A from B, you do this action.
    1. Declare a parameter list:
    pl_id paramlist;
    2. Create the parameter list:
    pl_id := create_parameter_list('ParameterLilst_FormA');
    3. Add all value to the parameter list.
    add_parameter(pl_id, 'variable1', text_parameter, 'valueOfVariable');
    4. Open the form B and you send it the parameter list.
    open_form('B', activate, session, pl_id);
    NOTE: In there form B you might have some parameters having the same name of the variable added to the parameter list:
    e.g.: :parameter.variable1

  • How to pass values from one form to another form

    Hi,
    I have two forms. Say Form1 and Form2. I am having a field called employee number in form1. I have button named Next in form1.
    When the "Next" button is clicked I want to pass the employee number entered in form1 to form2 and display this number in form2.

    Hi,
    You can make use of the call/go api in the success procedure of the form. Here is a sample code.
    declare
    ticket_no varchar2(20);
    flight_no varchar2(20);
    blk varchar2(30) := 'DEFAULT';
    begin
    ticket_no := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_TICKET_NO');
    flight_no := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_FLIGHT_NO');
    go('<product_schema>.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1384225689&p_arg_names=_sessionid&p_arg_values=&p_arg_names=ticket_no&p_arg_values='||ticket_no||'&p_arg_names=flight_no&p_arg_values='||flight_no);
    end;
    This sample passes the values of ticket_no and flight_no to another form.
    Thanks,
    Sharmil

  • How to pass data from one component to other component.

    Hi,
      I have created a table view in Item Details Page Under Price Agreement Assignment Block. Price Agreement Assignment Block has one table as standard. I have created one more view Under the Assignment block of Price agreement(CRMCMP_CND). In that view I have an option to enter data when the user click on edit. In that custom view, If user cnages to edit mode and enter data. it has to save when user click's on save button in Quotation page(BT116QH_SRVQ). From Quotation page user clicks on item to get the Item details. In the Item details there is an Price Agreement Assignment Block. In that Custom view was created and assigned to it. Data entred in that view needs to be stored when user clciks on Save button on Quotation page when he comes back. How to get the custom view data from CRMCMP_CND to BT116QH_SRVQ). Please advice. Thanks In Advance.

    Hi Satish,
    Global custom controllers are not available everywhere. So before using them please make sure that they are available for your case.
    http://sapdiary.com/index.php?option=com_content&view=article&id=2402:sap-network-blog-interaction-center-global-custom-controllers&catid=81:data-services&Itemid=81
    if you find problems in navigating data using component controllers then you can also navigate it through navigation links.
    If you see your outbound plug method op_xxxxx, then there is a method call to navigate method. This method has an option to pass your data collection. Pass your data collection and also inbound plug so that in target component you can read and temporarily store data as soon as you hit target component.
    Hope that helps,
    BJ

  • Apex 4.2  passing value from one item to other page

    I have a page where i accept a starting date and ending date as a parameter
    its source i set it as preference or application item
    Now in the other page I calls a jasper report..
    so it refers the first page.. I am not able to access the start_date which is in other page
    start_date and end_date
    Start_date shows as null
    Am confused over what is preference and application item
    Where will we use preference as a source type.
    Again example
    page 103
    p103_start_issue - preferenec
    p103_end_issue -- preference
    A buttons calls other page
    The other page
    when i call jasper report I Pass the parameter value as :p103_start_issue and :p103_end_issue
    But the actual value is null for those fields..
    How can i acess the actual value..
    Do i need to use application item. ? I tried application item as source type but still the same issue.
    Thanks

    Am confused over what is preference and application item
    Where will we use preference as a source type.A Page item is the most short-lived way to store variables in session state. Page items are routinely (although not always) cleared when entering or leaving a page. They are generally used to store a value that changes most times that you enter a page. Page items are also generally intended for use primarily by code on that page. This is not to say that other pages can not or will not use them, but access from other pages has to be controlled so that they are not trying to reference a page item from a different pages after the cache for that page has been cleared.
    Application items are for data that is longer-lived and/or is intended to be accessed by multiple pages. Application Items are not cleared unless a session end or a specific call to clear them is made.
    Preferences are for data that is intended to be stored and retrieved for specific users across multiple sessions. Log out of an app and back in and the data is still available.
    That said, from your description of the problem, I would guess that the cache on page 103 was cleared and the page item values erased. I suspect that you should be using an application item from what you have posted.

  • ADF 10.1.3 - How to pass parameters from one region to other

    Hi
    I have a page, In a panel boarder, left hand side has a read only table and right hand side has a Form.
    WHen a user selects a row in the left, I need to pass some of the values to the right hand side form.
    How can I achiev the same?

    Hi,
    I guess you mean the frame border layout. You can share parameters using the sessionScope or processScope memory map. You then need to refresh the frame that holds the form to refresh and read the parameters
    Frank

  • Passing values from one iView to other iViews in the same page

    Hi all,
    I have one entry jsp+htmlb iView  and two other BW iViews( URL based). The entries made in one iView serves as the input for the other two iViews to generate BW reports.
    I know we should use EPCM event API but how do I dynamically change the URL (with application parameters) in the other two iViews?
    Thanks in advance.
    Rgds,
    Janvi

    Hi Janvi,
    look here:
    Permanent change of iView property programmatically
    Yoav.

  • Passing value from one jsp to another?

    how to pass value from one jsp to another? i have a value assigned in the link, i want to pass that value to another jsp page?
    please help with code?

    Instead of the value being passed, i am getting a null value.
    Here is my calendar code:
    <%@page import="java.util.*,java.text.*" %>
    <html>
    <head>
    <title>Print a month page.</title>
    </head>
    <body bgcolor="white">
    <%
                  boolean yyok = false;
                  int yy = 0, mm = 0;
                  String yyString = request.getParameter("year");
                  if (yyString != null && yyString.length() > 0)
                      try
                          yy = Integer.parseInt(yyString);
                                  yyok = true;
                       catch (NumberFormatException e)
                          out.println("Year " + yyString + " invalid" );
                  Calendar c = Calendar.getInstance( );
                  if (!yyok)yy = c.get(Calendar.YEAR);  
                         mm = c.get(Calendar.MONTH);
    %>
                  <table align="center">
                      <tr>
                  <td>
                       <form method=post action="calendar.jsp">
                          Enter Year : <select name="year">
    <%         
                 for(int i= yy;i<=2010;i++)
    %>
                  <OPTION VALUE= <%=i%> > <%=i%> </option>
    <%       
    %>
              </select>
                      <input type=submit value="Display">
                      </form>
                      </td>
                    </tr>
    <tr>
                     <table>
    <%!
    String[] months = {"January","February","March",
                    "April","May","June",
                    "July","August","September",
                    "October","November", "December"
    int dom[] =     {
                        31, 28, 31, 30,
                        31, 30, 31, 31,
                        30, 31, 30, 31
    %>
    <%
                int leadGap =0;
    %>
    <div id="t1" class="tip"><table border="4" cellpadding=3 cellspacing="3" width="250" align="center" bgcolor="lavender">
    <tr>
    <td halign="centre" colgroup span="7" style="color:#FF0000;">
    </colgroup>
    <tr>
    <td>
    <%
              GregorianCalendar calendar =null;
              for(int j=0;j<12;j++)
                        calendar = new GregorianCalendar(yy, j, 1);
                  int row = 1 ;
                  row = row + j;
        %>
              <table>
                <tr>
              <colgroup span="7" style="color:#FF0000;">
              </colgroup>
                </tr>
              <tr align="center">
              <th colspan=7>
                  <%= months[j] %>
                  <%= yy %>
              </th>
              </tr>
    <tr>
    <td>Sun</td><td>Mon</td><td>Tue</td><td>Wed</td><td>Thu</td><td>Fri</td><td>Sat</td>
    </tr>
    <%
        leadGap = calendar.get(Calendar.DAY_OF_WEEK)-1;
        int daysInMonth = dom[j];
        if ( calendar.isLeapYear( calendar.get(Calendar.YEAR) ) && j == 1)
        ++daysInMonth;
        out.print("<tr>");
        out.print(" ");
          for (int h = 0; h < leadGap; h++)
           out.print("<td>");
          out.print("</td>");
        for (int h = 1; h <= daysInMonth; h++)
          out.print("<td>");
          out.print("<a href=desc.jsp>" + h + "</a>" );
          out.print("</td>");
        if ((leadGap + h) % 7 == 0)
            out.println("</tr>");
    out.println("</tr></table></div>");
    if( row%3 != 0)
    out.println("</td><td>");
    else
    out.println("</td></tr>\n<tr><td>");
    %>
    </html>I need to pass the value in 'h' to the desc.jsp page.
    my code for desc.jsp is :
    <html>
    <head>
    </head>
    <body bgcolor="lightblue">
    <form method=post action="Calenda.jsp">
    <br>
    <%= request.getParameter("h") %>
    <h2> Description of the event <INPUT NAME="description" TYPE=TEXT SIZE=20> </h2>
    <BR> <INPUT TYPE=SUBMIT VALUE="submit">
    </form>
    </body>
    </html>But i am not able to pass the value. The 'h' value contains all the date. i want to pass only a single date, the user clicks to the other page. please help

Maybe you are looking for