Variable binding with javafx.ext.swing.SwingSlider

My first javafx program consists of a slider and a text box, the text box displays the current value of the slider. The problem is the text box does not display anything when the program just starts up, but only gets populated once I change the value of the slider. I am not sure what I am doing wrong. Here is the code:
import javafx.scene.control.*;
import javafx.scene.*;
import javafx.stage.*;
import  javafx.ext.swing.*;
import javafx.scene.layout.*;
var BPMSlider = SwingSlider {
    minimum: 10
    maximum: 250
    value: 60
}; //BPMSlider
var BPM = bind "{BPMSlider.value}";
var BPMDisplay = TextBox {
     text: bind BPM
    columns: 3
}; //BPMDisplay;
Stage  {
    title: "Slider";
    width: 1000
    height: 500
    visible: true
   // Set the scene
   scene:
       Scene {
       content:       
           HBox{ spacing: 10 content:[ BPMSlider, BPMDisplay ] }
       } // Scene
}Thanks!

Hi,
I don't know how to solve it with binding values, but I managed to solve it with temporary int value which contains Slider.value.
If any one can help us with solving this binding value we are waiting for answer.
Here is the code:
package slider;
import javafx.ext.swing.*;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.*;
import javafx.stage.*;
var tempSliderVal:Integer = 60; // temp BPMSlider value
var BPMSlider = SwingSlider {
    minimum: 10;
    maximum: 250;
    value: bind tempSliderVal with inverse;
    onMouseDragged: function (e:MouseEvent) {
        BPMDisplay.text = tempSliderVal.toString();
    onMouseClicked: function (e:MouseEvent) {
        BPMDisplay.text = tempSliderVal.toString();
}; //BPMSlider
var BPMDisplay = TextBox {
     text: tempSliderVal.toString();
    columns: 3;
}; //BPMDisplay;
Stage  {
    title: "Slider";
    width: 1000;
    height: 500;
    visible: true;
    // Set the scene
    scene: Scene {
        content: HBox{
            spacing: 10;
            content:[ BPMSlider, BPMDisplay ];
    } // Scene
}

Similar Messages

  • Import javafx.ext.swing.SwingToggleGroup not found in the classpath

    I am trying to run the example here
    Desktop profile
    http://java.sun.com/javafx/1/tutorials/ui/layout/index.html
    but
    import javafx.ext.swing.SwingToggleGroup;
    import javafx.ext.swing.SwingRadioButton;
    here i am having error because
    javafx.ext is not found in my classpath, I am using Netbeans 6.5

    While this shouldn't cause that error, your post is missing a final curly bracket.
    Adding that, it compiles ok in Windows.

  • How to customize a javafx.ext.swing.Panel

    Seid gegrüsst
    I want to customize a javafx.ext.Panel for a little testapplication. It's not possible to use something else, because the customized Panel should be in a ScrollPane.
    How ever, in ordinary java I simply override the public void paint(Graphics g) method and place my drawing routine into it.
    Is there a similar way in javafx to customize a Panel?
    carpe noctem
    livevil

    Hi.
    To answer your question: No.
    When you look into the sources of javafx.ext.swing:
    AbstractPanel (the base class for Panel) does not extend JPanel.
    Instead, it has an attribute of type JPanelImpl (basically a javax.swing.JPanel).
    So there is no chance to influence the paint method's behaviour in the Panel class.
    The only possibility would be to extend the original JPanelImpl (overriding its paint method) and to rewrite AbstractPanel and Panel.
    Regards,
    Jens

  • Javafx.ext.swing.* unable to import this package in netbeans 6.5

    Hi
    (1) I am not able to get the above package working in Netbeans 6.5. Do I need to install separate plugin to get it?
    When I try to import any swing component, I get error. Any solution to this?
    I tried update the JavaFX plugin, but no positive results. I am using netbeans-6_5-javafx-1_1-windows.
    (2) Is this package supported in mobile devices?
    Regards

    raindrop wrote:
    There are some swing components written on JavaFX on page [Custom Components|http://jfx.wikia.com/wiki/SwingComponents#Custom_Components]
    Well, the idea is to avoid the use of Swing, precisely, since it is not available in the Mobile profile.
    If you mean the Custom Components at the bottom of the page, I think:
    - They should be moved to another page (and linked from this page) as they don't belong to SwingComponents: it is confusing;
    - No offense intended, but they are simplistic (everybody has done such "custom button") and inflexible (hard-coded parameter);
    - Despite previous line, they are nice examples, good samples for beginners. :-) Hey, at least that's a starting point (and better than nothing).

  • Performance issue with JavaFX code

    Hi, I'm experienced in Java, but not in JavaFX. I wrote simple LIFE cellular automata, it has two options: randomize cells, and take a step forward in simulation. My problem is that following simulation steps are slower and slower. NetBeans profiler suggests that if I take more steps in simulation then get method's self time (get$impl$$bound$int__int method exactly) is getting slower in time -- at first it takes about 0.054 (270/5000) ms per call, but later the average jumps to 0.55 (12709/23000) ms per call. I don't really know how bind mechanism works, could this be a bind issue? Maybe I create many unneccessary objects? Here's the code:
    import java.lang.Math;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.paint.Color;
    import javafx.scene.Scene;
    import javafx.scene.shape.Rectangle;
    import javafx.stage.Stage;
    import javafx.ext.swing.SwingButton;
    import java.lang.System;
    var tab : CellTable = CellTable {
         width: 10
         height: 10
    def rects =
    for (i in [0..tab.width-1]) {
         for (j in [0..tab.height-1]) {
              Rectangle {
                   x: 20 * i + 1
                   y: 20 * j + 1
                   width: 17
                   height: 17
                   stroke: Color.RED
                   fill: bind if (tab.get(i, j)) Color.RED else Color.WHITE;
    def stage = Stage {
         title: "LIFE"
         resizable: false
         scene: Scene {
              width: 200
              height: 250
              content: [
                   rects,
                   SwingButton {
                        text: "random!"
                        translateX: 0
                        translateY: 210
                        width: 100
                        action: function() {
                             tab.random();
                   SwingButton {
                        text: "next>"
                        translateX: 100
                        translateY: 210
                        width: 100
                        action: function() {
                             tab.next();
    class CellTable {
         postinit {
              for (i in [0..width-1]) {
                   for (j in [0..height-1]) {
                        insert false into cells;
                        insert false into tmp;
              xrange = [0..width-1];
              yrange = [0..height-1];
         var cells : Boolean[];
         var tmp : Boolean[];
         var width : Integer;
         var height : Integer;
         var xrange : Integer[];
         var yrange : Integer[];
         function random() {
              for (x in [0..width-1]) {
                   for (y in [0..height-1]) {
                        set(x, y, Math.random() < 0.5);
         function next() {
              for (x in xrange) {
                   for (y in yrange) {
                        var ct = 0;
                        for (xx in [-1..1]) {
                             for (yy in [-1..1]) {
                                  if (get((x + width + xx) mod width, (y + height + yy) mod height)) {
                                       ++ct;
                        if (get(x,y)) {
                             --ct;
                             tmp[idx(x,y)] = (ct == 2 or ct == 3);
                        } else {
                             tmp[idx(x,y)] = (ct == 3);
              for (x in xrange) {
                   for (y in yrange) {
                        set(x, y, tmp[idx(x, y)]);
         function idx(x : Integer, y : Integer) : Integer {
              return x * height + y;
         bound function get(x : Integer, y : Integer) : Boolean {
              return cells[idx(x,y)];
         function set(x : Integer, y : Integer, b : Boolean) {
              cells[idx(x,y)] = b;
    }I would be very grateful if anyone could tell me what could be the issue or at least what should I check to figure it out.

    I tried to solve your problem.
    First, I eliminated the keyword 'bound' from the function in CellTable class. Then I rewrite the value of 'fill' attribute in the Rectangle as below :
    fill: bind if (tab.cells[tab.idx(i, j)]) Color.RED else Color.WHITE;As a result, I found your code ran faster than before. But I don't know why it became so.
    Could it be that the 'bound function' creates some new Boolean instances every time it was called ???
    Sorry, I can not help you.
    I hope anyone would tell me why the 'bound function' made the code slower.

  • Fxd format and ext.swing

    I am trying to load a fxd file from an url (in fact from an servlet) and add the loaded node to my stage. This to create a part of the ui which is very dynamic based on configuration.
    This works fine when I try to a, e.g., a Text node :
    Group {
        content: [
            Text {
                    font: Font {
                        size: 24
                    x: 20,
                    y: 30
                    content: "HelloWorld ------"
    }But when I try to add a swingbutton in the same way it gives me an error:
    Type 'SwingButton' not found. Is it not possible to include swing components into the fxd file format ? If that is the case, is there any other solution except building my own implementation (e..g. with json)
    Kind regards,
    Marco Laponder

    I tried your suggestion by sepcifying the full name :
    Group {
        content: [
            javafx.ext.swing.SwingButton {
                    text: "Button"
    }But this results in the following exception:
    Exception in thread "AWT-EventQueue-0" com.sun.javafx.tools.fxd.container.scene.fxd.FXDSyntaxErrorException: Expected a ',' or ']' found '{'! at [3,32]
            at com.sun.javafx.tools.fxd.container.scene.fxd.FXDReader.syntaxError(FXDReader.java:456)
            at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parseArray(FXDParser.java:224)
            at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.nextValue(FXDParser.java:262)
            at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parseObjectImpl(FXDParser.java:157)
            at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parseObject(FXDParser.java:127)
            at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parseObject(FXDParser.java:100)
            at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parse(FXDParser.java:306)
            at com.sun.javafx.tools.fxd.container.scene.fxd.FXDParser.parse(FXDParser.java:318)
            at com.sun.javafx.tools.fxd.container.AbstractFXDContainer.getRoot(AbstractFXDContainer.java:64)
            at com.sun.javafx.tools.fxd.LoaderExtended.load$impl(LoaderExtended.fx:95)
            at com.sun.javafx.tools.fxd.LoaderExtended.load(LoaderExtended.fx:45)
            at com.sun.javafx.tools.fxd.LoaderExtended.load$impl(LoaderExtended.fx:55)
            at com.sun.javafx.tools.fxd.LoaderExtended.load(LoaderExtended.fx:45)
            at javafx.fxd.FXDLoader.load(FXDLoader.fx:52)I also tried to add a moch swing button before using the fxd loader but this didn't resolve the error as well. Any other ideas ?
    Kind regards,
    Marco Laponder

  • Variable binding for a projection

    The 11.14. Projection Variables example shows how to bind a collection
    element variable in the query filter for enabling its projection :
    Query query = pm.newQuery (Magazine.class, "price < 5 "
    + "&& coverArticle.subtitles.contains (ttl)");
    query.setResult ("ttl.substring (0, 3)");
    It seems to me that :
    such a variable binding has nothing to do in the filter, as it is not usedin any predicate
    it would be better to extend the variable declarations, enabling to specifysuch a variable binding, with the two following syntax proposals (preference
    descending) :
    1) String variables = "coverArticle.subtitles(ttl)"
    2) String variables = "String ttl elementof coverArticle.subtitles"
    What do you think ?
    Regards.

    Patrice-
    Could you expand on this a bit? I'm afraid I don't really understand
    what you are trying to convey.
    In article <ckj5i5$ulg$[email protected]>, Patrice wrote:
    The 11.14. Projection Variables example shows how to bind a collection
    element variable in the query filter for enabling its projection :
    Query query = pm.newQuery (Magazine.class, "price < 5 "
    + "&& coverArticle.subtitles.contains (ttl)");
    query.setResult ("ttl.substring (0, 3)");
    It seems to me that :
    such a variable binding has nothing to do in the filter, as it is not usedin any predicate
    it would be better to extend the variable declarations, enabling to specifysuch a variable binding, with the two following syntax proposals (preference
    descending) :
    1) String variables = "coverArticle.subtitles(ttl)"
    2) String variables = "String ttl elementof coverArticle.subtitles"
    What do you think ?
    Regards.
    Marc Prud'hommeaux
    SolarMetric Inc.

  • JavaFx Mobile + Swing Problems

    {color:#000000}{color:#ff0000}{color:#003300}The application runs fine when Run As "Desktop(std. execution mode)" & when changed to Run In "Mobile Emulator" gives following Error :-->{color}
    {color}{color}{color:#ff0000}Error preverifying class javafx.ext.swing.JTextFieldImpl
    java/lang/NoClassDefFoundError: com/sun/javafx/scene/BackgroundSupport$BackgroundSupportable
    ERROR: preverify execution failed, exit code: 1
    {color}{color:#000000}{color:#0000ff}C:\Documents and Settings\pravin.patil\My Documents\NetBeansProjects\ColorSlider\nbproject\build-impl.xml:143: exec returned: -1
    {color}{color:#ff0000}BUILD FAILED (total time: 8 seconds){color}
    How to use Swing components in JavaFX Mobile apps??
    Thanks & Regards,
    Pravin{color}
    Edited by: pravinpatil23 on Mar 30, 2009 3:40 AM

    You can provide visual feedback of clicking.
    Here is a primitive (crude!), naive native button, as an example of such effect. I wanted to make it look like it was physically pressed.
    public class NativeButton extends CustomNode
      var arcSize: Number;
      var message: String;
      var width: Number;
      var height: Number;
      var hole: Rectangle;
      public var displacement: Number;
      override protected function create(): Node
        arcSize = height / 5.0;
        displacement = 3;
        hole = Rectangle
          x: 0, y: 0
          width: width
          height: height
          arcWidth: arcSize,  arcHeight: arcSize
          fill: Color.BLACK
        clip = hole;
        Group
          content:
            hole
            Rectangle
              x: 0, y: 0
              width: width
              height: height
              arcWidth: arcSize,  arcHeight: arcSize
              fill: LinearGradient
                startX: 0.0, startY: 0.0, endX: 1.0, endY: 1.0
                proportional: true
                stops:
                  Stop { offset: 0.0, color: Color.LIGHTBLUE }
                  Stop { offset: 1.0, color: Color.BLUE }
              onMousePressed: ShowPressed
              onMouseReleased: ShowReleased
            Rectangle
              x: height / 9.0, y: height / 9.0
              width: width - 2 * height / 9.0
              height: height * 7 / 9.0
              arcWidth: arcSize,  arcHeight: arcSize
              fill: LinearGradient
                startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0
                proportional: true
                stops:
                  Stop { offset: 0.0, color: Color.LIGHTBLUE }
                  Stop { offset: 1.0, color: Color.BLUE }
            Text
              x: width / 7, y: height / 1.4
              content: message
              fill: Color.YELLOW
              font: Font.font(null, FontWeight.BOLD, 36);
      function ShowPressed(e: MouseEvent): Void
        this.translateX = this.translateY = displacement;
        hole.translateX = hole.translateY = -displacement;
    //~     println("Clicked {this}");
      function ShowReleased(e: MouseEvent): Void
        this.translateX = this.translateY = 0;
        hole.translateX = hole.translateY = 0;
    //~     println("Released");
    function run()
    def BASE_SIZE = 300;
    Stage
      title: "Native JavaFX Button"
      scene: Scene
        width:  BASE_SIZE
        height: BASE_SIZE
        fill:   Color.web('#00BABE')
        content:
          Group
            translateX: 20
            translateY: 20
            content:
              NativeButton { message: "Click Me", width: 200, height: 50 }
    }You can add effects, do something on hovering, etc.

  • Binding a JavaFX variable to a Java class instance variable

    Hi,
    I am pretty new to JavaFX but have been developing in Java for many years. I am trying to develop a JavaFX webservice client. What I am doing is creating a basic scene that displays the data values that I am polling with a Java class that extends Thread. The Java class is reading temperature and voltage from a remote server and storing the response in an instance variable. I would like to bind a JavaFx variable to the Java class instance variable so that I can display the values whenever they change.
    var conn: WebserviceConnection; // Java class that extends Thread
    var response: WebserviceResponse;
    try {
    conn = new WebserviceConnection("some_url");
    conn.start();
    Thread.sleep(10000);
    } catch (e:Exception) {
    e.printStackTrace();
    def bindTemp = bind conn.getResponse().getTemperature();
    def bindVolt = bind conn.getResponse().getVoltage();
    The WebserviceConnection class is opening a socket connection and reading some data in a separate thread. A regular socket connection is used because the server is not using HTTP.
    When I run the application, the bindTemp and bindVolt are not updated whenever new data values are received.
    Am I missing something with how bind works? Can I do what I want to do with 'bind'. I basically want to run a separate thread to retrieve data and want my UI to be updated when the data changes.
    Is there a better way to do this than the way I am trying to do it?
    Thanks for any help in advance.
    -Richard

    Hi,
    If you don't want to constantly poll for value change, you can use the observer design pattern, but you need to modify the classes that serve the values to javafx.
    Heres a simple example:
    The Thread which updates a value in every second:
    // TimeServer.java
    public class TimeServer extends Thread {
        private boolean interrupted = false;
        public ValueObject valueObject = new ValueObject();
        @Override
        public void run() {
            while (!interrupted) {
                try {
                    valueObject.setValue(Long.toString(System.currentTimeMillis()));
                    sleep(1000);
                } catch (InterruptedException ex) {
                    interrupted = true;
    }The ValueObject class which contains the values we want to bind in javafx:
    // ValueObject.java
    import java.util.Observable;
    public class ValueObject extends Observable {
        private String value;
        public String getValue() {
            return this.value;
        public void setValue(String value) {
            this.value = value;
            fireNotify();
        private void fireNotify() {
            setChanged();
            notifyObservers();
    }We also need an adapter class in JFX so we can use bind:
    // ValueObjectAdapter.fx
    import java.util.Observer;
    import java.util.Observable;
    public class ValueObjectAdapter extends Observer {
        public-read var value : String;
        public var valueObject : ValueObject
            on replace { valueObject.addObserver(this)}
        override function update(observable: Observable, arg: Object) {
             // We need to run every code in the JFX EDT
             // do not change if the update method can be called outside the Event Dispatch Thread!
             FX.deferAction(
                 function(): Void {
                    value = valueObject.getValue();
    }And finally the main JFX code which displays the canging value:
    // Main.fx
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import threadbindfx.TimeServer;
    var timeServer : TimeServer;
    var valueObjectAdapter : ValueObjectAdapter = new ValueObjectAdapter();
    timeServer = new TimeServer();
    valueObjectAdapter.valueObject = timeServer.valueObject;
    timeServer.start();
    Stage {
        title: "Time Application"
        width: 250
        height: 80
        scene: Scene {
            content: Text {
                font : Font {
                    size : 24
                x : 10, y : 30
                content: bind valueObjectAdapter.value;
    }This approach uses less cpu time than constant polling, and changes aren't dependent on the polling interval.
    However this cannot be applied to code which you cannot change obviously.
    I hope this helps.

  • Newbie qs. JavaFx vs Swing?

    I looked through the JavaFx introduction and samples, but wish there could be clarification of the following which other developers too might wonder about:
    Should I write my app in Swing or Java Fx - what considerations should guide my choice?
    It seems that Fx is an alternative or competitor to applets or Google Web toolkit or Flash.
    Can you access the file system, work offline?
    thanks,
    Anil

    Yes you're right in that there are many considerations that involved in choosing between JavaFX or Swing (or some other technology) and for the most part a lot of it is just going to come down to opinions rather than hard and fast rules.
    First of all, JavaFX applications whether they are deployed as Applets, via Web Start, or with a standalone installer can access the file system, work offline, open sockets etc. The restriction is that if deployed as an Applet or via Web Start the application has to be "signed" and the user has to accept the signed application (click "Yes" on a security warning).
    Having said that even unsigned Applets/WebStart applications do have limited access to the file system (a private sandbox) and can open connections back to their originating server. Applets used to be restricted to running in the browser but now they can be dragged out of the browser and "installed" with a shortcut on the users system. The following link provides a good starting point for more information
    [http://java.sun.com/javase/6/docs/technotes/guides/jweb/index.html]
    Always remember that JavaFX sits on top of Java and often leverages tools, products and technologies to achieve tasks.
    In terms of Swing vs JavaFX some of the things you might want to consider are:
    Tolerance towards new technologies. Is you organisation able to take something "cutting-edge" and is prepared to work around problems or limitations. Or are the stakeholders in the project so risk-adverse that a more mainstream approach would be better.
    Willingness to write code. At this stage you will find that Swing has far more components (widgets) available to it, you can somewhat easily reuse Swing components within JavaFX application but you will need to write and maintain extra code to do so. Also there are other gaps in JavaFX where you'll probably need to write extra code like serialization or dealing with medium-complex event handling (action frameworks). More code appears to have more cost but sometimes you also get the benefit of a better fit to your problem.
    But then on the other hand JavaFX is a language dedicated to writing GUIs so you can also argue that even with the current relative immaturity having support within the language for "bind" will result in less code than the the same application written in Swing.
    What's the lifespan of this project for you organisation? A short-term one-off project might justify the use of JavaFX through it being not strategic to your organisation. But then on the other hand a large long-term project might also justify the use of JavaFX because it's easier to absorb specialists filling in the gaps of JavaFX in a larger team and also you might see how JavaFX is going to be important into the future (obviously a value based opinion).
    What level of "graphics" do you want? The Scene graph within JavaFX makes doing "fancy" graphics, video and animation easier than in Swing.
    Hope this helps.
    - Richard.

  • Why can I not create a PHP Form Variable binding in Dreamweaver CS6?

    I'm using Dreamweaver CS6 on Windows 7.
    Currently, I'm following along with Lynda.com tutorial:
    Dreamweaver with PHP and MySQL: Ch. 6. Building Data Entry Forms |  Handling form submissions with PHP
    I'm attempting to add a form variable binding to a PHP document, but after each time I open the menu, type in my name and press OK, it does not show up in my Bindings box.
    and then POOF:
    Can anyone tell me what I'm doing wrong here? Or what I haven't done yet?
    I haven't had a problem with the entire tutorial up until this point and I couldn't find any documentation anywhere else on how to fix my problem.

    I'm using Dreamweaver CS6 on Windows 7.
    Currently, I'm following along with Lynda.com tutorial:
    Dreamweaver with PHP and MySQL: Ch. 6. Building Data Entry Forms |  Handling form submissions with PHP
    I'm attempting to add a form variable binding to a PHP document, but after each time I open the menu, type in my name and press OK, it does not show up in my Bindings box.
    and then POOF:
    Can anyone tell me what I'm doing wrong here? Or what I haven't done yet?
    I haven't had a problem with the entire tutorial up until this point and I couldn't find any documentation anywhere else on how to fix my problem.

  • Data not getting bind with cursor

    Hi,
    Database: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit
    OS: Windows Server 2003
    Consider following procedure:
    Proc P1() as
    cursor c(in_par varchar2) is select distinct col1, col2 from Table1 where col3 = in_par;
    begin
    for rec_c in c('X') loop
    end loop;
    exception
    end;
    Problem: In most of the execution, the value 'X' passed in cursor c get bind with col3 in where clause and get the desired result. However, in some cases, the value 'X' does not get bind with col3 in where clause. I don't know the steps to re-produce the issue, but it occurs once in a while.
    On querying v$sql_bind_capture, i get 'NULL' in value_string whenever this problem occurs. Otherwise, I get 'X' in v$sql_bind_capture. No exception is thrown anytime.
    What may cause miss of binding constant literal 'X' to cursor?

    Have not seen this error before - PL/SQL not binding SQL statements containing PL/SQL variables, correctly. What at times happen is no bind at all due to name collision. Using the same name for a PL/SQL variable as a SQL column in the SQL statement and scope being such that with name resolution, the SQL column gets preference. This of course does not seem to be the case here.
    What could be happening is that a null variable is being passed as the bind value.
    You can also have a look at the Metalink/support.oracle.com for any notes or bugs on this behaviour. Knee-jerk reaction from my side that this is too a common issue to be an actual PL/SQL bug... (would have reared its head a long time ago)
    In cases like this I like to make sanity checks - reduce the problem to its bare basics with a test case and see if that works. Then gradually increase its complexity and see when it brakes, if at all.

  • NULL binds with dbms_xmlgen - exception raised

    Hi, I am using the following code extract to get an xml string
    xmlCtx := dbms_xmlgen.newContext(l_sql_str);
    dbms_xmlgen.setNullHandling(xmlCtx, dbms_xmlgen.empty_tag);
    dbms_xmlgen.setbindvalue(xmlCtx,'RUN_ID', p_run_id);
    dbms_xmlgen.getxml(xmlCtx, l_output_xml);
    The above code generates ORA-19202 and ORA-01008 "Not all variables bound" errors when I attempt to bind NULL values. Is anyone aware of any issues relating to NULL binds with dbms_xmlgen? I have attempted to substiture -1 for NULLS which seems to work OK.
    Steve Macleod
    Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bi
    PL/SQL Release 10.1.0.5.0 - Production

    ORA-01008 "Not all variables bound"Are you sure you have the bind :RUN_ID in your statement?
    The NULL value should cause no problem:
    SQL> declare
       xmlCtx    integer;
       l_sql_str long := 'select :RUN_ID RUN_ID from dual';
       p_run_id  integer;
    begin
       xmlCtx := dbms_xmlgen.newContext (l_sql_str);
       dbms_xmlgen.setNullHandling (xmlCtx, dbms_xmlgen.empty_tag);
       dbms_xmlgen.setbindvalue (xmlCtx, 'RUN_ID', p_run_id);
       dbms_output.put_line (dbms_xmlgen.getxml (xmlCtx));
    end;
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <RUN_ID/>
    </ROW>
    </ROWSET>
    PL/SQL procedure successfully completed.

  • How to programmatically Deploy Library of Variables binded to Custom IO Server?

    Hello,
    I'm developing an application where I've created a Custom Periodic IO Server  doing  special custom scaling of values read from  CompactFieldPoint module.  Then I've created a Library of Network-Published variables, where each variable is binded to a different item on Custom Server.
    Now I want to do a programmatic deployment of server and variable library at the start-up of application,because I need the customer to get a list of all variables from variable library to select which one he will be using in a measurement. The idea is to set various properties of selected variables, like enable logging, set alarm values etc. I can get a list of variables only from deployed libraries.
    The problem is that I can not deploy a library of binded variables neither with Deploy Library.vi or Libraryeploy method. I receive an error code 1, Invoke Node in PRC_Deploy.vi->Deploy Library.vi<APPEND>
    If I manually deploy the same library from Project Explorer, everything works as expected and no error is thrown. I'm using DSC 8.0.1 on XP Prof
    Can you give me some tips or advise how to achieve this. Is this approach OK or do you have better idea?
    Thank you,
    Roman

    Hello,
    I found the answer to my own question. Solution is very simple. When you create a data binding on a shared variable, you need to browse for item in Network Items and not on Project Items, doesn't matter if item is actually inside the same project.
    This solve my problem and I can now successfuly deploy library using Deploy Library.vi
    So far, my problems are solved, until the next one, of course
    Good luck,
    Roman

  • CDC Application with JavaFX

    Hello,
    I am trying to embed a JavaFX scene in swing JComponent as shown below:
    import java.awt.*;
    import javax.swing.*;
    import org.jfxtras.scene.SceneToJComponent;
    public class Main extends JFrame {
    public static JTextField tf = new JTextField("JavaFX for SWING");
    public Main() {
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("JavaFX in SWING Test");
    Container container = getContentPane();
    container.setLayout(new BorderLayout());
    String sceneClass = "cdcapplication13.MyScene";
    JComponent myScene = SceneToJComponent.loadScene(sceneClass);
    JLabel label = new JLabel(" Below is a JavaFX Animation: ");
    container.add(label, BorderLayout.NORTH);
    container.add(myScene, BorderLayout.CENTER);
    JPanel p = new JPanel();
    p.setLayout(new FlowLayout());
    tf.setColumns(28);
    p.add(tf);
    p.add(new JButton("SWING Button"));
    container.add(p, BorderLayout.SOUTH);
    pack();
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(
    new Runnable() {
    public void run() {
    new Main().setVisible(true);
    In the above cdcapplication13.MyScene is my JavaFX scene class. The above worksfine is a desktop application. However, when trying to do the same on a CDC application with Emulator platform - CDC Java(TM) Platform Micro Edition SDK 3.0, Device - SunVgaAGUIPhone1 and Device Profile - PBP-1.1, I get the following exception when running to app:
    nsicom-run:
    ODT agent stopped.
    java.lang.SecurityException: no manifiest section for signature file entry javax/crypto/KeyGeneratorSpi.class
    at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:278)
    at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:190)
    at java.util.jar.JarVerifier.processEntry(JarVerifier.java:259)
    at java.util.jar.JarVerifier.update(JarVerifier.java:214)
    at java.util.jar.JarFile.initializeVerifier(JarFile.java:270)
    at java.util.jar.JarFile.getInputStream(JarFile.java:332)
    at sun.misc.Launcher$AppClassLoader.defineClassPrivate(Launcher.java:544)
    at sun.misc.Launcher$AppClassLoader.access$500(Launcher.java:344)
    at sun.misc.Launcher$4.run(Launcher.java:565)
    at java.security.AccessController.doPrivileged(AccessController.java:351)
    at java.security.AccessController.doPrivileged(AccessController.java:320)
    at sun.misc.Launcher$AppClassLoader.doClassFind(Launcher.java:559)
    at sun.misc.Launcher$AppClassLoader.findClass(Launcher.java:607)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:349)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:420)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:338)
    at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:603)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:291)
    at com.sun.cdc.odt.CdcAppManager.runMain(CdcAppManager.java:168)
    at com.sun.cdc.odt.CdcAppManager.access$100(CdcAppManager.java:44)
    at com.sun.cdc.odt.CdcAppManager$1.run(CdcAppManager.java:90)
    at java.lang.Thread.startup(Thread.java:782)
    Can anyone please tell me how to fix this issue?
    Thanks!

    Welcome to the forum. Please don't post in threads that are long dead and don't hijack other threads. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    I'm locking this thread now.

Maybe you are looking for

  • Where is "Go" button on the keyboard in Bahasa Malaysia / Melayu (Safari)

    Whose idea is to replace "Go" button on the keyboardwith "Cari" (Search) in Bahasa Malaysia / Melayu? Making Safari almost unuseable in Bahasa Malaysia because you can't just "Go", you can only "Search", making it problematic with url without .com. F

  • Cannot expand IDM cluster due to unable to connect to Admin Server

    Hi everyone. When I was configuring HA on IDM node2 for ODS managed server and ASinstance, I met the strange situation: - I choose expand cluster on IDM configuration wizard windows (oim_11.1.1.7.0) - I entered the admin server address, port, usernam

  • Field dominance. upper, lower or none?

    Hi I am cutting some material in a dv pal project and am wondering about field dominance? Can someone shed some light on which is preferable for a sequence which combines material shot with different cameras, some of which having been converted in th

  • HT2582 Sleep or Shut-down?

    This is a very common question i'm sure but i am a newbie so bear with me. Whilst transporting my computer from place to place is it okay to leave it in sleep mode or should i shut it down completely. Isn't daily shut down/start-up okay for the hard

  • Please tell me in plain english how to stop the email from apple

    How do I stop all these email messages from appearing in my mailbox???