APEX - passing values from one page to the other

Hello

I created a new page with a report. I put one of the columns as a link that opens another page. This page should contain other details of the particular line.

For example:
There is a page with a list of employee names and the number of employees in both columns. When I click on the name of employee, he must open another page with additional details of the employee in particular (such as date of birth, e-mail etc.).

What I'm trying at the moment is to create another page with a report inside. How do I pass the name of the employee as a parameter to this second page? And how do I do the query in the second page accept this setting?

Is there a better way to do this?

Kind regards
Santhosh Jose

Hello

on your detail page (2nd report) create a hidden page element called P2_EMPID
Now change the query on this page to use this page element in the where clause (such as a variable binding).
for example:

Select * from EMP
where empid =: P2_EMPID

On your first page, you need to set a link to the column for the chosen, employed at the point P2_EMP on the second page. This can easily be done via a column binding in the report on the first page (have it redirect to a page in the apex and set the page to the second page of the report, and also set the P2_EMPID value to the value of #EMPID #, correcting the names of these variables can be chosen in the selection lists when you set the link in the column).

concerning
Bottom

Tags: Database

Similar Questions

  • 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/

  • Passing values from one page to the other

    Hello

    I have two code coldfusion pages, a page how to display the form and another is the action of the form code. I want to create another page, so that if the user hits the edit button, it is taken to a page where the user of the same form with entries filled beforehand for some areas and the remaining fields are uneditable, i.e. they give the value in the database for the current entry, as it is.

    Should I access the values of the database, if so, HOW? And if not, HOW?

    Thank you

    vijayvijay77.

    IF you aready accessible data on the previous page, you can store the data in a persistent scope (session, application, server) where it can be reused on other pages without a trip back to the database.

    IF you have not yet accessed the data, then passing a key via a GET (URL alias) or variable POST (aka SHAPE) allows easy access to a query to retrieve the desired data from the database to fill in the form.

    The use cases have good discussion with examples in the ColdFusion Developer Guide.

    http://livedocs.Adobe.com/ColdFusion/8/htmldocs/Part_4_CF_DevGuide_1.html

  • Passing the value from one page to the other page

    Hi gurus,

    I need to pass the value from one page to the other page and two pages use different AMs.
    In the first page I have sellers results region table where the $vendor_name column is a hyperlink that navigates to the page Vendor_Sites. Now after accessing the second page, I want to excute the VendorSitesVO in PR of CO based on the value passed to VendorsVO (vendor_id) of first page.

    can someone help me on this?

    Thank you
    Vincent.

    Published by: user4933347 on December 4, 2009 12:19 AM

    You can set parameters of Pagecontext and transmit values through them. These values can be passed between pages, even if the AMs are different.

    Try:
    pageContext.putParameter ("Parameter1", value1);
    pagecontext.setForwardURL (second page)

    Concerning
    Sumit

  • Passing the value from one page to the other

    Hello

    I'm trying to display a page popup with an IR as below.

    1. There is a field next to a button.

    2 at the click of the button I want to get an Id and the value of a text field for step 1 on page popup and use them as a filter condition.

    3. I wrote a dynamic action that has the consequence of the "real" actions

    "a. the with action run PL/SQL code", which affects the value of the url a hidden point as below

    : P111_SHOWLOCATION_URL: = APEX_UTIL. PREPARE_URL ('f? p = & APP_ID.:112: & SESSION.: P112_PICKLISTID, P112_QUANTITY: & P111_PICKLISTID, & P111_QUANTITY.');

    "b. action run Javascript code" that displays an alert for one blank on the other shows the popup

    If {(apex.item("P111_QUANTITY").isEmpty ())}

    Alert ("Please enter the quantity to show locations.");

    }

    else {}

    popUp2 ($v ('P111_SHOWLOCATION_URL'), 700,300,0, 0);

    }

    When I change the value of the field in step 1 and press the button. There are only the old value not the new value. What's wrong with this code?

    Apex 4.2 | Windows | CROME browser

    Concerning

    Sanjaya

    Sanjaya Kumar Pradhan wrote:

    Yes, I mentioned as below in the Articles Page to submit

    P11198_PICKLISTID, P11198_QUANTITY

    : P111_SHOWLOCATION_URL: = APEX_UTIL. PREPARE_URL('f?p=&APP_ID.:112:&session.:::P112_PICKLISTID,P112_QUANTITY:&P111_PICKLISTID.,&P111_QUANTITY.');

    Why are the names of different elements?

    The new P111_SHOWLOCATION_URL value is specified to be returned in the Items property of the Page to return?

  • 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 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 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.

  • Passing parameter from one page to the other

    Hi all

    On the page asking for there is a ResultsTableRN that contains the number of columns as:

    Select: box IE, requisition: which shows the requisition number, Description: which shows a description of the application number and so on...

    This table contain also on top, as well as on the pannel 4 button background that's copy to the basket, Cancle requisition, change and Complete

    below are the items on this page are:

    / Oracle/Apps/ICX/por/reqmgmt/WebUI/ReqSummaryPG

    CO: ResultsTableCO and ReqSummaryCO oracle.apps.icx.por.reqmgmt.webui

    VO: oracle.apps.icx.por.reqmgmt.server.MyReqsVO MyReqsVO

    Here is my task when the user select any request table and click on a button, so I want to capture or save the requisition_header_id of demand

    Co... for that I extend ResultsTableCO and I write code in pfr() to capture this.

    Here, my question is how can I capture the requisition in PFR() of CO requisition_header_id?

    After selection, save or capture this requisition selected requisition_header_id then I will used it in:

    page/Oracle/Apps/ICX/por/req/WebUI/ShoppingCartPG it comes to the page where the navigation happens after clicking on any button.

    This page contains a

    Co: ShoppingCartCO

    VO: PoRequisitionLinesVO and view attribute: ItemDescription

    oracle.apps.icx.por.req.webui.ShoppingCartCO

    oracle.apps.icx.por.req.server.PoRequisitionLinesVO...

    Here, my job is I'm going to extend ShoppingCartCO CO and in its Graf I need to use this demand requisition_header_id seizures.

    How can I use the requisition_header_id of the application on this page?

    This ShoppingCartPG page also conatins as region table with columns:

    Line, the item Description, special info, unit, quantity, price, Amount (USD)

    Now, my work here, it is that I need to replace the text description of the item or the values of ShoppingCartPG the new requisition_header_id with that page captured requisition_header_id of the application.

    How can I achieve this?

    Please help me...

    Thank you

    HI Sumit,

    Thanks for the reply...

    You mean I should call this warning page I CO?

    If call this WARNING page in co, then how can I maintain that captured value for nxt page after page of warning?

  • 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;

  • transfer of value from one page to the other

    HIL.

    I use Apex 4.2

    I want to transfer value a page to another.

    Page 1: a report

    Page 2: contains a shape to update a line report.


    So I want to transfer for example name of the employee from page 2 to 1. And on page 1, I want to display a message with JS or Jquery like this: «...» ", the employee is updated.


    Thank you in advance.

    Best regards.

    982158 wrote:

    But I need also the value of the element in 1 page, since I have a treatment to the already modified line (background color changes of this line for example)

    Create a 1 page element and set its value to the branch page 2.

  • Passing variable from one page to the other

    Hello

    I'm probably missing the boat full of something because I tried everything I found on this forum and it still does not work. I am trying to pass a value entered in a text field (Item = P1_TXT_1) on page 1 to page 2 when I click on a button. The button is configured with the URL redirection as an option to the Page 2 with the "game of these values (P1_TXT_1) with these values (& P1_TXT_1)." In the end, I use this variable in a query in report on page 2 (emplid =: P1_TXT_1).

    Joe

    Published by: JoeCO on March 18, 2009 10:44

    >
    set these values (P1_TXT_1) with these values (& P1_TXT_1)

    the two above the variable seems to be... I think it must have been P2_TXT_1 WITH & P1_TXT_1 and emplid =: P2_TXT_1

  • 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
    
  • Pass data from one page to the other

    Hi all, I'm doing an upload of CSV file in a database application, and I wonder if it is possible to transmit the data from the file field to another php file that performs the command insert the data from the csv file into the database? Thank you!!

    Wanqi

    Hi, good news! I managed to solve the problem. It turns out that the bug was the connotation of the variable. Thanks a lot for your help!

  • Moving objects from one page to the other

    Hi all

    I need to move an image from one page to the other...

    For example, on page 1, I have an image that he be shifted to page 5 of the document. Is this possible?

    Vandy

    Click the page 1 picture to select it and run it:

    var doc = app.activeDocument;

    var r = app.selection [0];  'r' is the graphic image containing the image

    r.Move(doc.pages[4]);          on page '5 '.

Maybe you are looking for