I want to show database output in table format by using javafx 1.2

this code is running in javafx 1.1,but this code is not running in javafx 1.2 . i don't know about the differrence between javafx 1.1 and javafx 1.2.so plz change the code in javafx 1.2 . Iam struggling to create in javafx 1.2
* Main.fx
* Created on Sep 27, 2007, 9:37:26 AM
package tablesample;
* @author Radhika Gehant
import javafx.ui.*;
import javafx.ui.*;
import java.lang.Thread;
import java.lang.Exception;
import java.sql.*;
class Customer {
attribute Name: String;
attribute Addressline1: String;
attribute Addressline2: String;
attribute City: String;
attribute Phone: String;
attribute Email: String;
class customerOperations {
attribute customer : Customer*;
public
operation getCustomer();
attribute datasource : DatabaseAccess;
customerOperations.datasource = null;
operation customerOperations.getCustomer() {
var rs = this.datasource.processDBQuery("SELECT * FROM CUSTOMER");
while(rs.next()) {
println("City: {rs.getString('City')} Name: {rs.getString('Name')}");
insert Customer{City: rs.getString('City') Name: rs.getString('Name') Addressline1: rs.getString('Addressline1') Addressline2: rs.getString('Addressline2') Phone: rs.getString('Phone')} into this.customer;
}// getCustomer
var db : DatabaseAccess = null;
var rs : ResultSet = null;
/*//Using JavaDB
db = DatabaseAccess{driverName: 'org.apache.derby.jdbc.ClientDriver'
jdbcUrl   : 'jdbc:derby://localhost:1527/sample'
user      : 'app'
password  : 'app'};
//Using MySQL
db = DatabaseAccess{driverName: 'com.mysql.jdbc.Driver'
jdbcUrl   : 'jdbc:mysql://localhost:3306/MyNewDatabase'
user      : 'root'
password  : 'nbuser'};
try {
// Connect to database
db.connect();
var Allcustomers = customerOperations {
datasource: bind lazy db
Allcustomers.getCustomer();
println("Name: {Allcustomers.customer.Name} ");
//Begin Frame code
Frame {
height: 120
width: 500
title: "Populating Table From Database"
onClose: function() {
return db.shutdown();
content: Table {
columns:
[TableColumn {
                text: "Name"
TableColumn {
text: "Addressline1"
TableColumn {
text: "Addressline2"
width: 100
TableColumn {
text: "City"
alignment: TRAILING
TableColumn {
text: "Phone"
alignment: CENTER
cells: bind foreach(p in Allcustomers.customer)
[TableCell {
                text:bind p.Name
TableCell {
text:bind p.Addressline1
TableCell {
text: bind p.Addressline2
TableCell {
text: bind p.City
TableCell {
text: bind p.Phone
visible: true
}//end Frame code
} catch(e:SQLException) {
e.printStackTrace();
* DataAccess.fx
* Created on Sep 27, 2007, 9:46:04 AM
package tablesample;
* @author Radhika Gehant
import javafx.ui.*;
import java.lang.Thread;
import java.lang.Exception;
import java.sql.*;
public class DatabaseAccess {
private attribute driverName: String;
private attribute jdbcUrl : String;
private attribute user : String;
private attribute password : String;
public attribute driver : Driver;
public attribute conn : Connection;
private attribute rs : ResultSet;
private attribute stmt : Statement;
public
operation connect();
public
operation shutdown();
public
operation tableExists(table: String);
public
operation processDBQuery(qry: String): ResultSet;
}// Database
attribute DatabaseAccess.conn = null;
attribute DatabaseAccess.stmt = null;
attribute DatabaseAccess.rs = null;
operation DatabaseAccess.connect() {
// Load driver class using context class loader
var thread = Thread.currentThread();
var classLoader = thread.getContextClassLoader();
var driverClass = classLoader.loadClass(this.driverName);
// Instantiate and register JDBC driver
this.driver = (Driver) driverClass.instantiate();
// JavaFX Class
DriverManager.registerDriver(driver);
// Connect to database
this.conn = DriverManager.getConnection(this.jdbcUrl, this.user, this.password);
}// Database.connect
operation DatabaseAccess.processDBQuery(qry: String) :ResultSet {
// process the query string
try{
if(null <> this.conn) { 
if (this.stmt <> null) {
this.stmt.close();
this.stmt = null;
if (this.rs <> null) {
this.rs.close();
this.rs = null;
stmt = this.conn.createStatement();
rs = stmt.executeQuery(qry);
catch(e:SQLException) {
e.printStackTrace();
return rs;
}//processDB

Do you really need to post three messages with identical topic?
You have an edit button, you know? That's the icon with a pencil, next to the envelope icon, on the top-right corner of your message (only for the last message of a thread).
You also have a CODE button above your edit area, it will make code you post much more readable, as asterisks and plus signs are interpreted by the forum...
i don't know about the differrence between javafx 1.1 and javafx 1.2See [JavaFX 1.2: Features and Enhancements|http://javafx.com/docs/articles/javafx1-2.jsp] for a good start.
(Funny, I just noticed they write "Java FX" (with a space) in all the titles of the site. Bad for consistency...)

Similar Messages

  • I want to display the Employee details in table format without using iGrid

    Hi all,
    Can anybody help me that I want to display the Employee details return by transaction in table  format without using iGrid.

    Hi, view the link below.
    http://help.sap.com/saphelp_xmii115/helpdata/en/Advanced_Topics/Customizing_Output/Customizing_Output.htm
    Hope this help.
    Danilo Santos

  • TS1474 I have already reset my ipod shut it off as well. I have upgraded Itunes and the ipod does not want to show up on Itunes anymore. It used to before but now it doesn't. How do I solve my problem?

    I have already reset my ipod shut it off as well. I have upgraded Itunes and the ipod does not want to show up on Itunes anymore. It used to before but now it doesn't. How do I solve my problem?

    See:
    iOS: Device not recognized in iTunes for Windows
    I would start with
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    or
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    Run this to help if it identifies the cause
    iTunes for Windows: Device Sync Tests
    Have you tried on another computer to help determine if you have a computer or iPod problem?

  • Xml report output in excel format without using options tab in EBS

    How to get xml publisher report output in excel format without using options tab in EBS?
    I am getting XML Publisher report output in excel format by using options tab while submitting the concurrent request .
    But i want to get excel output automatically.
    Can anyone give idea to get XML publisher Report output in excel without selecting options tab.
    Thanks in advance
    Sandeep V

    Hey Sandeep,
    I am working on a similar format for a report and if possible can you please give me some guidelines. I have initially created reports using XML Publisher, but for those , the output preview format was PDF. So, if I select the preview format as EXCEL will it give me output in Excel and for this to happen, how do I define the rtf template. I believe the working will be same as for PDF, create a rdf report, get output in XML and apply the template to get the data in Excel or there is something different to this.
    Thanks,
    Sunil

  • I want to show console output in my cmd prompt in C# winform application

    Hi,
    I'm launching the some process in C# .net Winform appliaction. But i couldn't able to see console output on the screen. The process is getting launched but inside cmd prompt window, it is showing nothing. I would like to show something on cmd prompt. Please
    help on this.
     using (Process comxdcProcess = new System.Diagnostics.Process())
                            comxdcProcess.StartInfo.FileName = fileName;
                            comxdcProcess.StartInfo.Arguments = args;
                            comxdcProcess.StartInfo.RedirectStandardError = true;
                            comxdcProcess.StartInfo.RedirectStandardOutput = true;
                            comxdcProcess.StartInfo.UseShellExecute = false;
                            comxdcProcess.Start();
                            this.errorComment = comxdcProcess.StandardError.ReadToEnd();
                            StreamReader myStreamReader = comxdcProcess.StandardOutput;
                            //// Read the standard output of the spawned process. 
                            this.errorComment = myStreamReader.ReadToEnd();
                            comxdcProcess.WaitForExit();
    click "Proposed As Answer by" if this post solves your problem or "Vote As Helpful" if a post has been useful to you Happy Programming! Hari

    @Hariprasadbrk
    Do you mean you have use process class to start "cmd prompt" And want to display some output in it?
    If so, there is no need to use RedirectStandardOutput property. This property means the output of an application is written to the
    Process.StandardOutput stream.
    // Setup the process with the ProcessStartInfo class.
    ProcessStartInfo start = new ProcessStartInfo();
    start.FileName = @"C:\7za.exe"; // Specify exe name not cmd exe.
    start.UseShellExecute = false;
    start.RedirectStandardOutput = true;
    // Start the process.
    using (Process process = Process.Start(start))
    // Read in all the text from the process with the StreamReader.
    using (StreamReader reader = process.StandardOutput)
    string result = reader.ReadToEnd();
    Console.Write(result);
    Output
    This section shows the output of the process.
    7-Zip (A) 4.60 beta Copyright (c) 1999-2008 Igor Pavlov 2008-08-19
    Usage: 7za <command> [<switches>...] <archive_name> [<file_names>...]
    [<@listfiles...>]
    So you can start a cmd exe.
    Please also take a look at the article from codeproject
    How to redirect Standard Input/Output of an application
    In summary, the shutdown proces is invoked from my application, and it displays the output from the process in RichTextBox control.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Want to pass DataBase output to RFC as an Input

    Hi All,
    Can you please let me know, How to pass the DataBase output to RFC as an Input.
    I am using JDBC Pooling to get the data from Oracle Databse.I want to pass output data(Which I got from the JDBC Pooling) to RFC as input parameters.

    Hi,
    Can you please elobrate your scenario and the meaning of JDBC Pooling as well? Are you writing some java jdbc program which will get the data from database and that data you want to send to RFC as input?
    If so then you need to use BPM
    Receive the request as output from jdbc.
    Map it to the RFC structure.
    Do the rest ....
    Thanks
    Amit
    Reward points if suggestion is helpful.

  • Displaying output in table format

    hi experts, 
    data in my z table is like this.
                          01.06.2006   02.06.2006       03.06.2006      04.06.2006
      01    
    001                  23                  32                   90                     43
    002                  32                  09                   48                     43
    004                  42                  34                   34                     23
    005                  76                  45                   67                     93
    now i want to generate a classical report to get the output in the same table format.
    01.06.2006 is the date field
    01 is the group field
    001 - 004 is the subgroup field
    23,32---- is the data
    please help me regarding this issue.

    hi ,  you can achieve this by using AT NEW key word, for every day u calculating the data  so
    AT NEW date field name .
    write : / group field name.
    ENDAT.
    AT NEW groupname.
    write : +sub groupname,
               datafield+.
    ENDAT.
    hope this will help you.
    regards
    chinnaiya

  • Extract the table formated data using itextsharp in c#

    I have one pdf file in which i need to extract table formated data in a specific format by each filed.I tried by using itextsharp but data comes in unspecified format. Can any one help me on this.This is very useful for me.
    please find attchement for pdf and their fields
    Field Name(as per RRC Records or wildcat): Block A-34(SAN ANDRES)
    LEASE NAME: SIGHT FOR SORE EYES
    OPERATOR'S NAME: RING ENERGY, INC.
    API No:42-003-39809
    like wise all fileds.

    Hello Manideep Lakkakula,
    As ITextSharp is a library from here
    http://sourceforge.net/projects/itextsharp/ and also PDF is third party product, I'm afraid you have to post on specific forum about ITextSharp library instead of here. C# is just a language forum.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Output in table format

    i created a procedure as
    create or replace procedure emp_output (v_empno in number)
    as
    cursor c1 is select ename,job,mgr,hiredate,sal,comm,deptno from emp where empno = v_empno;
    ENAME scott.emp.ename%type;
    JOB scott.emp.job%type;
    MGR scott.emp.mgr%type;
    HIREDATE scott.emp.hiredate%type;
    SAL scott.emp.sal%type;
    COMM scott.emp.comm%type;          
    DEPTNO scott.emp.deptno%type;
    begin
    open c1;
    loop
    fetch c1 into ename,job,mgr,hiredate,sal,comm,deptno;
    exit when c1%notfound;
    dbms_output.put_line(v_empno||','||ename||','||job||','||mgr);
    end loop;
    close c1;
    end;
    Its output will look like this
    7521,WARD,SALESMAN,7698
    i want my procedure to retur me the output similar the way it looks when we do select * from emp where empno = 7521
    table format

    Hi,
    Example:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> SELECT employee_id, first_name, last_name FROM employees where rownum < 2;
    EMPLOYEE_ID FIRST_NAME           LAST_NAME
            100 Steven               King
    SQL>
    SQL> SET SERVEROUTPUT ON
    SQL> BEGIN
      2     DBMS_OUTPUT.put_line('EMPLOYEE_ID FIRST_NAME           LAST_NAME');
      3     DBMS_OUTPUT.put_line('----------- -------------------- -------------------------');
      4     FOR reg IN (SELECT employee_id,
      5                        first_name,
      6                        last_name
      7                   FROM employees
      8                  WHERE rownum < 2) LOOP
      9        dbms_output.put_line(LPAD(reg.employee_id,
    10                                  11) || ' ' || RPAD(reg.first_name,
    11                                                     20) || ' ' ||
    12                             RPAD(reg.last_name,
    13                                  20));
    14     END LOOP;
    15  END;
    16  /
    EMPLOYEE_ID FIRST_NAME           LAST_NAME
            100 Steven               King               
    PL/SQL procedure successfully completed
    SQL> Regards,

  • How to show the data in table format when user click the Graph

    Hi,
    I have a graph in my report. If user click the graph is there a way to show
    the data behind it?
    Thanks.
    Regards,
    Jun

    Hi All,
    Any idea how to do this?
    Thanks.
    Jun

  • Show or Hide empty table based on If condition

    I want to show or hide empty table based on condition. The table will be empty with 5 rows,2 cols and should display if <?Rout_Information1_id1?> is blank or null or when XML field is not present. Actually the JDEdwards report will generate XML file. In the XML file if <?Rout_Information1_id1?> is present it will have definitely value like 'PULL' or 'Cut' otherwise sometimes XML field itself will not be present. Need to display the empty table when the <?Rout_Information1_id1?> is not present. I am trying to do as below but the table is not displayed. Can someone tell me how to resolve this.
    <?if:Rout_Information1_id1=' '?>
    5 rows,2 cols table
    <?end if?>
    Thanks,
    Vijay Vattiprolu

    Ok. I used the below syntax from other post and it resolved displaying empty table issue.
    <?if:not(XML_TAG_NAME)?>
    <?end if?>
    Thanks,
    Vijay

  • Output in a Table format

    Hi,
    In PL/SQL,I am having a requirement send a mail.
    That mail has the message in table format.
    How to have output in table format.
    Please help me out.

    Create the html mail body using HTML tags. There are numerous posts on internet, try searching. Basic is you create the HTML body using HTML syntax and the mail shoudl support HTML format.
    v_htmlbody VARCHAR2(32767);
    -- Header and Body
    v_htmlbody := '<HTML> <BODY>'
    -- Prepare HTML Table Header
    v_htmlbody := v_htmlbody  || '<table border="1" cellpadding="1">';
    v_htmlbody := v_htmlbody|| '<tr>'
                                                    || '<th>' || 'Company'      || '</th>'
                                                    || '<th>' || 'Name'           || '</th>'
                                                    || '<th>' ||'Amount'          || '</th>'
                                              || '</tr>' ;
    -- Prepare HTML Table Body
    FOR rec in <cursor> LOOP
    v_htmlbody := v_htmlbody|| '<tr>'
                                                    || '<td">' || rec.company     || '</th>'
                                                    || '<td>' ||  rec.name          || '</th>'
                                                    || '<td>' ||  rec.amount       || '</th>'
                                              || '</tr>' ;
    END LOOP;
    -- End HTML Table
    v_htmlbody := v_htmlbody|| '</table>'
    -- End Header
    v_htmlbody :=v_htmlbody ||  '</BODY> </HTML>'
    -- Finally sent the v_htmlbody using mail
    {code}
    Edited by: Himanshu Binjola on Apr 25, 2012 11:27 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Populate the links from a list in a table format and navigate to the target when on clicked

    hi,
     i want to read a list and few columns and in that one column is a hyperlink column and i want to show as a grid-table- kind of format and when on clicked , i want to navigate to the target.
    whats the best approach for this.
    i know, i can create a   repeater/ gridview and on click of the row databound event in my visual web part i can navigate to the target.
    but, is this possible with the help of OOTB features of  SP 2013? as i dont want to create  a  VWP, and a feature and included in the wsp!
    help is appreciated!

    When you will create the site collection, you can programmatially do the followings:
    Create your custom view for your list (with only selected columns)
    Add a list view webpart in a page, and configure the list view webpart to point to the custom view you have created earlier.
    Also set the JSLink of the list view webpart.
    So whatever, you can do in SharePoint UI, can be done programmatically... And with a single JS file, in future you can change the list-view styles/logic just by JSLink file. Also with list view, you will get the default functionalities - like sorting, filtering
    etc., if you needed
    So if you would like to utilize SharePoint list view features with minor changes in styles/behaviour, list view approach will be better. But if you are looking for totally new looks and styles, then you better go for your own implementation. But from my
    experience, users will look for same behaviour as they see in SharePoint list/libraries.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • How to open Report output in RTF format using concurrent request form.

    Hi
    I have created a report using BI publisher and RTF format. This report is working fine in PDF format. User can submit report using consurrent request form and can see report preview in PDF format.
    Now user wants to submit another request and wants to see report output in RTF format.
    User submitted a request, request successfully completed and generated a output RTF file in unix box but when user wants to see report output using concurrent request form (View Output) then window is showing raw data instead of RTF output.
    Can any body tell me about solutions?
    Thanks
    Ravi

    Hi Ravi
    I did little R&D on it and found following 2 solutions.I am sure that you also find something but for my shake i am putting it here.If you already find the solution then ignore it.
    I) 1st Solution
    1)Change the profiles 'Viewer: Application for Text' and put value as 'Browser'
    2) Change the profiles 'Viewer: Text' and put value as 'Browser'.Either change it system level or concerned user.
    3) Log out from Current session and close all internet explorer application.
    4) Log in again to check the result
    II) 2nd Solution
    1) Navigate to: Sys admin --> Install -> Viewer Options to open the Form "Viewer Options".
    Do the entry as shown below:
    File_Format     Mime Type               Description
    RTF          application/rtf Microsoft Word(.rtf)
    RTF          application/msword          Microsoft Word(.rtf)     
    2) Then ensure that the profile option Viewer: Application for Text is set to BLANK at the Site Level and User Level.
    3) Then ensure that the profile option Viewer: Text is set to 'browser' at the Site Level.
    -- It will pop-up the screen to choose application name from above two values.
    Hope this will work it for you. For me i replicated the scenario and both solutions were working for me.
    With Best Regards
    Darshan Bhavsar

  • Unable to View output in .rtf format

    Hi guys,
    I am new to BI publisher.
    I want to view the output in .rtf format
    When click on view output I am getting an error "Unable to find the published output for this request" and then "No output file exists for request xxxxxxxx"
    Do we need to apply any patch on the applications side in order to resolve this
    I am able the output in .pdf format on the serverside
    I am unable to view it in .rft or excel format
    Any suggestions

    Is the issue with XML/PDF concurrent requests or with all requests?
    Can you find any errors in Apache/Database log files?
    Is the application listener up and running? Can you find any errors in the listener log file?
    Have you tried to run AutoConfig and bounce the services and see if this helps?
    Thanks,
    Hussein

Maybe you are looking for

  • How can i use my iphone without a sim card

    I updated my iphone 3gs and now it wont let me use it without my sim card, is there a way to un-update it or something?

  • Can I download free apps from the iTunes store, without submitting a credit card number?

    I've tried to download free Apps from the iTunes store several times. It tells me to login, so I do. Then it says "This Apple ID has not yet been used with the iTunes Store. Please review your account information." When I click Review, then I click c

  • Reg Material get list...

    Hi all , Is there any BAPI or Function module to get the material data by passing the last change date. Regards, Krishnamoorthy.V.

  • How to find changes

    Hi, In my tax procedure it was tax usx assigned to country us now country us taxusj procedure assigned how to find who has chnaged this procedure and when i will assign points Thanks Chiru

  • Failed to install after down loading update to ipad 2

    Took about 3 hours downloading OS6.1 to IPAD 2 started install then just stopped.  Update was never installed.  Had closed all PC security and hard wired laptop directly into router before starting update from ITUNES..  Any one having same trouble?