File dialog box when importing XML?
Quick and hopefully easy question:
What's the javascript format for selecting an XML file manually? I know it's not this:
/* imports XML manually
myDocument.importXML=File.openDialog("Choose the current XML file");
I have my project working well, but I've decided to get the user to manually select the XML in case they've downloaded a second version named (for example) data-1.xml and not data.xml. Then the onus is on them to select the most up-to-date XML and we can also name the xml with a datastamp.
Thanks for this any all other help on this forum - I have little enough hair to pull out as it is...
Simon.
HI Phil,
Lovely - the XML import works although I now need to get my head around XML story formatting. It's dropping all the XML into the first frame on the first page, which I understand to a degree, but also dropping the XML where I need it.
The issue I have with the XML import is the automated document creation has been built around a sort of hybrid flow- and frame-based XML import. Some of the XML drops into a couple of text frames on the first page (creation date, sections etc), then the rest of the document autoflows onto however many pages it requires.
It looks like I'll need to convert it to entirely flow-based XML import, which might be a bit of a head-scratch for me (being relatively new to this).
Thanks very much. No doubt I'll be back on here with more questions but this is a huge help.
<edit> I did 'fix' the XML, and it works a treat. The more I do, the more I understand.
Regards,
Simon.
Similar Messages
-
Problem with webutil file dialog box when trying to save/open
Approximately 12 months ago we had this same issue and I think we managed to resolve it with a one off patch. Were getting it on another site now so any info will be much appreicated.
Basically when using webutil file chooser Client_Get_File_Name to upload/download something to/from the database it works sporadically.
When we choose a location to upload from or download to. we then click the buttonon the webutil file chooser and the box disapears without doing anything. Sometimes it works ok but i cant find any pattern to it working/not working
Has anyone else experienced these problems?i found it
patch 6127521
thanks -
Files relinked incorrectly when importing xml to FCP??
I exported an XML file from premiere for FCP but when it came into FCP all the audio reconnected to the wrong part of the file and some of the clips were out of sequence. Does anyone have any experience with this?
Sorry, I was wrong on this. Just did a test with one shot and it worked fine.
Describe your workflow. What are your source formats, etc. -
Hi
I am using struts framework for my web application, and i am working on reports section,
i want File Dialog box like open,save when i click generate report button , so user can save generated report in his local system.how can we do this..currently i am able to generae the data bygiving the local file path.(String filename = "c:\\csv\\billreport.csv"; FileWriter fw = new FileWriter(filename);)
my action will call my dao mthod that it will get the qry data.so when i click generate report button i am calling java script mthod its calling my action.
so how can we get the File dialog box when i click buton.i have to write some code in my java script method?
plz help me.Just let the link point to some servlet which takes the file identifier as request parameter or pathinfo, then gets an InputStream of the file contents somehow, then writes it to the OutputStream of the response. That's basically all. If you want a 'Save As' dialogue all the time, then you need to set content-disposition header to "attachment" as well. Else you're dependent on the browser default configuration.
You can find here a (basic) example to get the idea [http://balusc.blogspot.com/2007/07/fileservlet.html]. -
Safari crashes when using the dialog box to import/save files, in facebook under windows 7
I've encountered the following errors in some PCs, running Safari 5.1.7 in MS-Windows 7 Pro:
Safari crashes when using the dialog box to import/save files. One doesn't have to actually upload or download any file, the mere invocation of the relevant dialog box brings down all open Safari windows after a couple of seconds.
Errors displayed in the Event Log are:
Όνομα ελαττωματικής εφαρμογής Safari.exe, έκδοση 5.34.57.2, χρονική σήμανση 0x4f982b5e
Όνομα ελαττωματικής λειτουργικής μονάδας CoreGraphics.dll, έκδοση 1.87.0.0, χρονική σήμανση 0x4f9739a0
Κωδικός εξαίρεσης: 0x40000015
Μετατόπιση σφάλματος: 0x0013a762
Αναγνωριστικό ελαττωματικής διεργασίας: 0x17f4
Χρόνος έναρξης ελαττωματικής εφαρμογής: 0x01cded6b09576023
Διαδρομή ελαττωματικής εφαρμογής: C:\Program Files\Safari\Safari.exe
Διαδρομή ελλατωματικής λειτουργικής μονάδας:C:\Program Files\Safari\Apple Application Support\CoreGraphics.dll
Αναγνωριστικό αναφοράς:ebe64ac9-595e-11e2-a977-0016356671d1
System
Provider
[ Name]
Application Error
EventID
1000
[ Qualifiers]
0
Level
2
Task
100
Keywords
0x80000000000000
TimeCreated
[ SystemTime]
2013-01-08T06:45:00.000000000Z
EventRecordID
95609
Channel
Application
Computer
computername
Security
EventData
Safari.exe
5.34.57.2
4f982b5e
CoreGraphics.dll
1.87.0.0
4f9739a0
40000015
0013a762
17f4
01cded6b09576023
C:\Program Files\Safari\Safari.exe
C:\Program Files\Safari\Apple Application Support\CoreGraphics.dll
ebe64ac9-595e-11e2-a977-0016356671d1
and
Ελαττωματικός κάδος (bucket) 2970527469, τύπος 1
Όνομα συμβάντος: APPCRASH
Απόκριση: Δεν υπάρχει
Αναγνωριστικό Cab: 0
Υπογραφή προβλήματος:
P1: Safari.exe
P2: 5.34.57.2
P3: 4f982b5e
P4: CoreGraphics.dll
P5: 1.87.0.0
P6: 4f9739a0
P7: 40000015
P8: 0013a762
P9:
P10:
Συνημμένα αρχεία:
C:\Users\username\AppData\Local\Temp\WER51A.tmp.WERInternalMetadata.xml
Αυτά τα αρχεία μπορεί να είναι διαθέσιμα εδώ:
C:\Users\username\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_Saf ari.exe_e273f639ef3d86d52c9d8e15dd2b42dce3e78061_1f86213d
Σύμβολο ανάλυσης:
Επανέλεγχος για λύση: 0
Αναγνωριστικό αναφοράς: ebe64ac9-595e-11e2-a977-0016356671d1
Κατάσταση αναφοράς: 0
+
System
Provider
[ Name]
Windows Error Reporting
EventID
1001
[ Qualifiers]
0
Level
4
Task
0
Keywords
0x80000000000000
TimeCreated
[ SystemTime]
2013-01-08T06:45:10.000000000Z
EventRecordID
95610
Channel
Application
Computer
computername
Security
EventData
2970527469
1
APPCRASH
Δεν υπάρχει
0
Safari.exe
5.34.57.2
4f982b5e
CoreGraphics.dll
1.87.0.0
4f9739a0
40000015
0013a762
C:\Users\username\AppData\Local\Temp\WER51A.tmp.WERInternalMetadata.xml
C:\Users\username\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_Saf ari.exe_e273f639ef3d86d52c9d8e15dd2b42dce3e78061_1f86213d
0
ebe64ac9-595e-11e2-a977-0016356671d1
0
I have tried in-installing safari but it seems not to help. I have tried installing it to a third, newly installed pc and come to the same result.
All PCs are fully up-to-date as it regards Microsoft and Apple patches. Any ideas as to why this might happen?Still having the same problem. Ever the optimist, I submit the following info.
Error window screenshot can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_01.JPG
Enent log entry can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_02.txt
Version info can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_03.JPG -
When I open the "open file" dialog box using the ctrl+O and then hit the escape key to exit the box, I get an error message which I'm not able to paste here.
it says something about a runtime problem and if I try the same thing again to reproduce the problem, it will sometimes just hang and windows vista will tell me the program is not responding.
I've checked to see if there are any crash IDs but none were found for this time frame.
I have even disabled all add ons.
I'm currently using vista 64 bit edition and Firefox 6, beta edition.Hi,
Please also try right-clicking on the link corresponding to the language version and '''Save Target As''' to save the Firefox installer. If the problem persists, posting [http://answers.microsoft.com/ here] would also be helpful.
[https://www.mozilla.org/en-US/firefox/all.html Firefox Latest] -
Just had help installing cc 2014. get this dialog box when i open the app. One or more files in the adobe folder necessary for running photoshop are missing. Help
Please Run the Cleaner tool to remove Ps CC 2014 :http://www.adobe.com/support/contact/cscleanertool.html .
Restart your system and then try installing Ps CC 2014 again.
Regards,
Ashutosh -
How do I get back to the newest file dialog box style in LabVIEW?
I have LabVIEW 7.1 and LabVIEW 6.0.2 installed on the same machine. When I doubleclick a .vi file it tries to open in LV602. Of course, if it is a LV71 VI I get an error and it doesn't open. Then I run LV71 and load the desired VI--in this case by using the Open arrow to find it in the "recently opened" list. Now, I've made this mistake before, especially when I don't remember whether I used LV602 or LV71 to create the VI, and nothing bad has happened.
But this time something undesirable did happen: all Open File dialog boxes are of the old funky style. How do I get the file dialog boxes back that I've grown used to seeing when I use LV71?
CLUES:
1. I get the old style dialog box even when I try to open a VI--not just when a running VI invokes it.
2. The built version of the VI brings up the correct, new style, file dialog box--unlike the development environment.
I haven't found any settings in the options area that would appear to affect the file dialog box style. Has anyone ever seen anything like this?RudyRed wrote:
Thanks for the response,
Warren. I think all my problems with LV versions coexisting
peacefully have been related to NIDAQ--and I think the workaround (for
supporting the different levels of LV DAQ VIs--see my response to
Benoit, above) shows that it is not NECESSARY for NI to orphan old LV
versions' DAQ functionality on the development computer, though it is
still painful to be able to have only one version of NIDAQ available on
a given target computer. It's probably a marketting decision
meant to encourage users to stay on the straight-and-narrow upgrade
path.
NI-DAQ has usually been working fine in
several different installed LabVIEW versions on my computer. What is
important is the order of installation. Start first with the lowest
LabVIEW version and install the latest NI-DAQ that supports that
LabVIEW version. Then go to the next LabVIEW version and install again
the latest NI-DAQ version that supported this LabVIEW version and so
on. I'm regularly working with 6.1 up to 7.1 and starting with 8.0
slowly and haven't had real show stoppers yet.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Open File Dialog Box (JS)
I know that in order to open a file dialog box and get a file I have to use this code:
myFile = File(File.openDialog("Import XML","XML Files: *.xml"))
This is what I use to open XML files. Now I want to be able to open a folder based on the label of the textFrame. I can get the label and build the file path. How can I open a dialog box that already points to a specific folder? Also, how can I check with the script if there are files within the folder?
Thanks,
Justin M.>How can I open a dialog box that already points to a specific folder?
var myFolder=Folder("/C/XYZ");
var myMask="INDD:*.indd";
var myFile=myFolder.openDlg("Select Files To Open", myMask, true);
>Also, how can I check with the script if there are files within the folder?
var myFolder = Folder.selectDialog("Please select path to files");
if (myFolder!=null) {
var fileList = myFolder.getFiles();
alert("The selected folder contains " + fileList.length + " files."); -
Hi,
could somebody help me with how to open a file dialog box.
I have 1 class which has a window with the relevant widgets on it, I want to be able to click a button on the form and pop up a file chooser form then select a file or type in a new filename and then use the selected filename path in the original form to write data out to the chosen file.
i understand that i need to use JFileChooser and it will need to be in a new class (like a dialog box would be).
So basically what i have is 2 classes (the main app and a class called FileOpen.class) so how would i display the fileopen class with the JFileChooser component in it and return what ever is chosen into a string.
e.g.
String fileName = <what would go here?>
kind regardsthats the example filechooser i have working
yet when i try and implement it in my program i just get countless exception errors, im not sure if its because my program extends Jframe and not JPanel
here is my code:-
package as4;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import java.util.*;
import javax.swing.filechooser.*;
import java.io.*;
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
public class Readap extends JFrame {
JPanel contentPane;
GridLayout gridLayout1 = new GridLayout();
JPanel jPanel3 = new JPanel();
GridLayout gridLayout3 = new GridLayout();
JPanel jPanel1 = new JPanel();
JTextArea txtaStatus = new JTextArea();
JLabel jLabel1 = new JLabel();
JTextField txtCon = new JTextField();
JButton btnConnect = new JButton();
JTextField txtPort = new JTextField();
JTextField txtUser = new JTextField();
GridLayout gridLayout2 = new GridLayout();
JLabel jLabel6 = new JLabel();
JPasswordField ptxtPass = new JPasswordField();
JLabel jLabel5 = new JLabel();
JLabel jLabel4 = new JLabel();
JLabel jLabel3 = new JLabel();
JLabel jLabel2 = new JLabel();
JTextField txtHost = new JTextField();
JPanel jPanel2 = new JPanel();
JPanel jPanel4 = new JPanel();
GridLayout gridLayout4 = new GridLayout();
GridLayout gridLayout5 = new GridLayout();
JCheckBox chbOracle = new JCheckBox();
JCheckBox chbOdbc = new JCheckBox();
JScrollPane jScrollPane1 = new JScrollPane();
JRadioButton rbtnComma = new JRadioButton();
JRadioButton rbtnTab = new JRadioButton();
JRadioButton rbtnSpace = new JRadioButton();
ButtonGroup delChoice = new ButtonGroup();
JPanel delPanel = new JPanel();
JFileChooser fc;
int dbChoice = 1;
int conStatus = 0 ;
String delimiter=",";
String output="";
JButton btnClear = new JButton();
Dbfuncs mydb=new Dbfuncs();
JPanel jPanel7 = new JPanel();
JPanel jPanel6 = new JPanel();
JPanel jPanel5 = new JPanel();
FlowLayout flowLayout1 = new FlowLayout();
JButton btnExecute = new JButton();
JTextField txtQuery = new JTextField();
JLabel jLabel7 = new JLabel();
JButton btnOutput = new JButton();
JLabel jLabel8 = new JLabel();
GridLayout gridLayout7 = new GridLayout();
BorderLayout borderLayout1 = new BorderLayout();
JButton btnExit = new JButton();
TitledBorder titledBorder1;
TitledBorder titledBorder2;
JCheckBox chbQuotes = new JCheckBox();
JPanel jPanel8 = new JPanel();
JCheckBox chbHeading = new JCheckBox();
JPanel jPanel9 = new JPanel();
ButtonGroup fileChoice = new ButtonGroup();
JRadioButton rbtnOverwrite = new JRadioButton();
JRadioButton rbtnAppend = new JRadioButton();
//Construct the frame
public Readap() {
fc = new JFileChooser();
fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
catch(Exception e) {
e.printStackTrace();
//Component initialization
private void jbInit() throws Exception {
//setIconImage(Toolkit.getDefaultToolkit().createImage(Readap.class.getResource("[Your Icon]")));
contentPane = (JPanel) this.getContentPane();
titledBorder1 = new TitledBorder("");
titledBorder2 = new TitledBorder("");
contentPane.setLayout(gridLayout1);
this.setSize(new Dimension(448, 434));
this.setTitle("Read Database");
gridLayout1.setColumns(1);
gridLayout1.setHgap(2);
gridLayout1.setRows(2);
gridLayout1.setVgap(2);
jPanel3.setLayout(gridLayout3);
gridLayout3.setColumns(2);
gridLayout3.setHgap(5);
gridLayout3.setVgap(5);
txtaStatus.setFont(new java.awt.Font("Dialog", 0, 10));
txtaStatus.setBorder(BorderFactory.createLoweredBevelBorder());
txtaStatus.setEditable(false);
txtaStatus.setText(">>Program Loaded...");
txtaStatus.setLineWrap(true);
txtaStatus.setRows(5);
txtaStatus.setWrapStyleWord(true);
jLabel1.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel1.setToolTipText("");
jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
jLabel1.setText("Please choose a database...");
txtCon.setText("Access");
btnConnect.setText("Connect");
btnConnect.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
btnConnect_actionPerformed(e);
txtPort.setEnabled(false);
txtPort.setToolTipText("");
txtPort.setText("1521");
gridLayout2.setColumns(2);
gridLayout2.setHgap(5);
gridLayout2.setRows(6);
gridLayout2.setVgap(2);
jLabel6.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel6.setText("Password");
jLabel5.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel5.setText("Username");
jLabel4.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel4.setText("ODBC Bridge");
jLabel3.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel3.setText("Port");
jLabel2.setHorizontalAlignment(SwingConstants.RIGHT);
jLabel2.setText("Host");
txtHost.setEnabled(false);
txtHost.setText("alfgar.coventry.ac.uk");
jPanel2.setLayout(gridLayout2);
contentPane.setMinimumSize(new Dimension(100, 110));
jPanel4.setLayout(gridLayout4);
gridLayout4.setColumns(1);
gridLayout4.setHgap(2);
gridLayout4.setRows(3);
gridLayout4.setVgap(2);
jPanel1.setLayout(gridLayout5);
gridLayout5.setColumns(1);
gridLayout5.setHgap(5);
gridLayout5.setRows(2);
gridLayout5.setVgap(5);
rbtnComma.setText("Comma");
rbtnComma.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
rbtnComma_actionPerformed(e);
rbtnTab.setText("Tab");
rbtnTab.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
rbtnTab_actionPerformed(e);
rbtnSpace.setText("Space");
rbtnSpace.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
rbtnSpace_actionPerformed(e);
rbtnComma.setSelected(true);
jLabel8.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel8.setHorizontalAlignment(SwingConstants.CENTER);
jLabel8.setText("Choose Delimiter Type");
jPanel7.setLayout(gridLayout7);
gridLayout7.setColumns(1);
gridLayout7.setRows(6);
jPanel6.setMinimumSize(new Dimension(434, 45));
jPanel6.setPreferredSize(new Dimension(434, 45));
btnExit.setText("Exit");
btnExit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
btnExit_actionPerformed(e);
jPanel5.setBorder(titledBorder2);
jPanel5.setMinimumSize(new Dimension(434, 187));
jPanel3.setBorder(titledBorder1);
btnExecute.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
btnExecute_actionPerformed(e);
chbQuotes.setText("Wrap Data In Quotes");
chbHeading.setText("Export Column Headings");
rbtnOverwrite.setSelected(true);
rbtnOverwrite.setText("Overwrite File");
rbtnAppend.setText("Append File");
jPanel7.setBorder(BorderFactory.createLineBorder(Color.black));
btnOutput.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
btnOutput_actionPerformed(e);
delChoice.add(rbtnComma);
delChoice.add(rbtnTab);
delChoice.add(rbtnSpace);
delPanel.add(rbtnComma);
delPanel.add(rbtnTab);
delPanel.add(rbtnSpace);
chbOracle.setAlignmentX((float) 10.0);
chbOracle.setHorizontalAlignment(SwingConstants.CENTER);
chbOracle.setText("Oracle");
chbOracle.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
chbOracle_actionPerformed(e);
chbOdbc.setAlignmentX((float) 10.0);
chbOdbc.setHorizontalAlignment(SwingConstants.CENTER);
chbOdbc.setSelected(true);
chbOdbc.setText("MS ODBC");
chbOdbc.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
chbOdbc_actionPerformed(e);
btnClear.setText("Clear Status");
btnClear.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
btnClear_actionPerformed(e);
jPanel6.setLayout(flowLayout1);
jPanel5.setLayout(borderLayout1);
btnExecute.setText("Execute");
txtQuery.setMinimumSize(new Dimension(280, 21));
txtQuery.setPreferredSize(new Dimension(285, 21));
jLabel7.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel7.setText("Enter Query");
btnOutput.setText("Output To File");
jPanel3.add(jPanel1, null);
jPanel1.add(jPanel4, null);
jPanel4.add(jLabel1, null);
jPanel4.add(chbOdbc, null);
jPanel4.add(chbOracle, null);
jPanel1.add(jScrollPane1, null);
jScrollPane1.getViewport().add(txtaStatus, null);
jPanel3.add(jPanel2, null);
jPanel2.add(jLabel2, null);
jPanel2.add(txtHost, null);
jPanel2.add(jLabel3, null);
jPanel2.add(txtPort, null);
jPanel2.add(jLabel4, null);
jPanel2.add(txtCon, null);
jPanel2.add(jLabel5, null);
jPanel2.add(txtUser, null);
jPanel2.add(jLabel6, null);
jPanel2.add(ptxtPass, null);
jPanel2.add(btnClear, null);
jPanel2.add(btnConnect, null);
jPanel6.add(jLabel7, null);
jPanel6.add(txtQuery, null);
jPanel6.add(btnExecute, null);
jPanel7.add(jLabel8, null);
jPanel7.add(delPanel, null);
jPanel7.add(jPanel8, null);
jPanel8.add(chbQuotes, null);
jPanel8.add(chbHeading, null);
jPanel7.add(jPanel9, null);
jPanel9.add(rbtnOverwrite, null);
jPanel9.add(rbtnAppend, null);
jPanel7.add(btnOutput, null);
jPanel7.add(btnExit, null);
jPanel5.add(jPanel6, BorderLayout.NORTH);
jPanel5.add(jPanel7, BorderLayout.SOUTH);
contentPane.add(jPanel3, null);
contentPane.add(jPanel5, null);
fileChoice.add(rbtnOverwrite);
fileChoice.add(rbtnAppend);
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
public static void main (String arguments[])
JFrame frame = new Readap();
WindowListener l = new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
frame.addWindowListener(l);
frame.pack();
frame.setVisible(true);
void chbOracle_actionPerformed(ActionEvent e) {
dbChoice=0;
chbOdbc.setSelected(false);
jLabel4.setText("Conn String");
txtCon.setText("acal");
txtCon.setEnabled(true);
txtPort.setEnabled(true);
txtHost.setEnabled(true);
txtaStatus.append("\n>>Oracle Database Selected");
void chbOdbc_actionPerformed(ActionEvent e) {
dbChoice=1;
chbOracle.setSelected(false);
jLabel4.setText("ODBC Bridge");
txtCon.setText("Access");
txtPort.setEnabled(false);
txtHost.setEnabled(false);
txtaStatus.append("\n>>MS ODBC Database Selected");
void btnConnect_actionPerformed(ActionEvent e) {
if (conStatus==0)
String url = new String();
String driver = new String();
if (dbChoice==0)
driver="oracle.jdbc.driver.OracleDriver";
url = "jdbc:oracle:thin:@"+txtHost.getText()+":"+txtPort.getText()+":"+txtCon.getText();
txtaStatus.append("\n>>Connecting to Oracle Database @ "+url+" via driver:"+driver);
else
driver = "sun.jdbc.odbc.JdbcOdbcDriver";
url = "jdbc:odbc:"+txtCon.getText();
txtaStatus.append("\n>>Connecting to MS ODBC Database @ "+url+" via driver:"+driver);
String dbStatus=mydb.openDb(url, driver, txtUser.getText(), ptxtPass.getText());
txtaStatus.append("\n>>"+dbStatus);
if (dbStatus=="Connection Successful")
btnConnect.setText("Disconnect");
conStatus=1;
else
mydb.dbClose();
txtaStatus.append("\n>>Database Connection Terminated");
btnConnect.setText("Connect");
conStatus=0;
void btnClear_actionPerformed(ActionEvent e) {
txtaStatus.setText(" ");
void rbtnComma_actionPerformed(ActionEvent e) {
delimiter=",";
void rbtnSpace_actionPerformed(ActionEvent e) {
delimiter=" ";
void btnExecute_actionPerformed(ActionEvent e) {
txtaStatus.append(mydb.runQuery(txtQuery.getText() ) );
void btnOutput_actionPerformed(ActionEvent e) {
if (chbHeading.isSelected()==true)
output=mydb.getAllColName(mydb.getColumnName())+"\n";
else
output="";
Vector mydata=mydb.getResultData();
int cnt=0;
for (int index = 0; index < mydata.size(); index++)
cnt+=1;
if (cnt>1) output=output+delimiter;
if (chbQuotes.isSelected()==true)
output=output+"\""+mydata.elementAt(index)+"\"";
else
output=output+mydata.elementAt(index);
if (cnt>=mydb.getNumCols())
output=output+"\n"; cnt=0;
txtaStatus.append("\n>>"+output);
int returnVal = fc.showOpenDialog(Readap.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();}
void rbtnTab_actionPerformed(ActionEvent e) {
delimiter="\t";
void btnExit_actionPerformed(ActionEvent e) {
System.exit(0);
} -
How to open a save file dialog box in form
hi
all
I have prob in form desing , i have open the save file dialog box , how to open a save dialog box
and path of the select file to save in disk
help
thxhi
user this query when-button-pressed trigger
:txtfile := GET_FILE_NAME(directory_name =>'d:\ali_raza\backup\', file_filter=> 'DMP Files (*.dmp)|*.dmp|');
Rizwan -
File dialog box: how get full path and filename (firefox 3.0 problem)
Hi,
I have a smilar problem then discussed in this thread: file dialog box: how get full path and filename
Now this solution doesn't seem to work in firefox 3.0,I only get the filename but not the full path.
I have tried to solve this problem by adding *"netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");"* in a javacript function but that doesn't do the trick
Although when i tested it local it does work.
Any idees how to solve this?
Best Regards
StijnActually, that is strange and scarry. With 20% of the browser market share they decide to behave like Microsoft did in the past - they want to decide what users need and what they do not need. With 3.0 I have a real problem with some of my applications. They are all tested in IE6, IE7, FF2.0 and they all work the same way (they even work with Opera and Safari). Now, I will for sure not go there and make it work for 3.0, just because 2 out of 200 users use FF3.0. Up to now I have always recomended FF as the best browser. 3.0 causes my opinion to change completely. Competition is always good but it is a question if it is good if we have 20 different browsers out there with equal market shares.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
File dialog box: how get full path and filename
Hello All
i have a problem to save the full path and filename with file dialog box.
I want to save full path and filename in the database for creating a link to a file.
I use a file-dialogbox to choose a file.
I see in the textfiled something like this
\FULLPATH\filename.ppt
but when i save the textvalue in the database or look at the seesionvalue I see
this:
F2087258868/filename.ppt
but I need the full path to create a link. How I can get?
I use version 2.2.1..
Thanks
PutchoHi Putcho,
You can create some javascript that puts it into a hidden item.
In HTML Form Element Attributes: onChange="$x('P15_X').value=$x('P15_FILE').value;" Then create another process that stores the value of the hidden item in your own table...
I quickly made an example with a normal text item, so you see it copies itself to the other box: http://apex.shellprompt.net/pls/apex/f?p=286:15
Hope that helps,
Dimitri
http://dgielis.blogspot.com -
How to displays the standard open file dialog box in Oracle Apps Server
Hi,
I am having a form, where i am opening a file and putting that file content in a text box.
This is my code written in WHEN-BUTTON-PRESSED trigger:
declare
in_file Text_IO.File_Type;
linebuf VARCHAR2(8000);
filename VARCHAR2(30);
BEGIN
filename:=GET_FILE_NAME('d:\Rajesh\Practice', File_Filter=>'Text Files (*.txt)|*.txt|',select_file=>false);
in_file := Text_IO.Fopen(filename, 'r');
LOOP
Text_IO.Get_Line(in_file, linebuf);
:text_item5:=substr(:text_item5||linebuf||chr(10),1,5000);
END LOOP;
EXCEPTION
WHEN no_data_found THEN
Text_IO.Put_Line('Closing the file...');
Text_IO.Fclose(in_file);
END;
I have posted this in ORacle Apps Server.Where i was not able to get the Open Dialoq Box.It is giving an error as
"FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-302000.".
I think the GET_FILE_NAME function is not supported in the Apps Server.
Is there any alternative solution for getting the OPEN DIALOG WINDOW in Oracle Apps Server?
Pls let me know.Hi!
waldemar.hersacher wrote:
"It seems that the VIs called by the clients are running in the user interface thread.
A call to the file dialog box will call a modal system dialog. So LV can't go on executing VIs in the user interface thread."
Are you sure? I think, that File Dialog, called by LabVIEW File Dialog from Advanced File Functions Palette doesn't blocking any cycles in subVI, which running in UI Thread. Look in my old example (that was prepared for other topic, but may be good for this topic too).
2 linus:
I think, you must a little bit reorganize you application for to do this. You must put your File Dialog into separated cycle. This cycle, of course, will be blocked when File Dialog appear on the screen. But other cy
cle, which responsible for visualization will run continuosly at the same time...
Attachments:
no_block_with_file_open_dialog.zip 42 KB -
Problem using the File Dialog Box in a Client/Server application
I am developping a client-server application using Labview 5.1 . The application on the server acquires data from some instruments and saves it on file, while the application on the clients displayes such acquired data. For doing this I call some routines on the server via the "Open Application vi" (remote connection). All goes well except when I open on the server the "File Dialog Box vi" : in this case the application on the clients is blocked (is blocked the execution of the called vi on the server). Only when
the File Dialog Box on the server is closed, the execution of the called vi on the server starts again.
I need to use the File Dialog Box on the server, but I don' t want to stop at the same time
the clients !!
I need help for resolving such problem.
Many thanks in advance !!!Hi!
waldemar.hersacher wrote:
"It seems that the VIs called by the clients are running in the user interface thread.
A call to the file dialog box will call a modal system dialog. So LV can't go on executing VIs in the user interface thread."
Are you sure? I think, that File Dialog, called by LabVIEW File Dialog from Advanced File Functions Palette doesn't blocking any cycles in subVI, which running in UI Thread. Look in my old example (that was prepared for other topic, but may be good for this topic too).
2 linus:
I think, you must a little bit reorganize you application for to do this. You must put your File Dialog into separated cycle. This cycle, of course, will be blocked when File Dialog appear on the screen. But other cy
cle, which responsible for visualization will run continuosly at the same time...
Attachments:
no_block_with_file_open_dialog.zip 42 KB
Maybe you are looking for
-
Migrating photos from PC to MacBook - Does metadata come too?
I have approximately 12,000 photos on a PC that I want to transfer to my MacBook Pro. My concern primarily involves the "date taken" info for each photo. Will that data transfer from PC to Mac, allowing me to organize my photos by date without having
-
TS1702 I have logged in to my uk apple account and it tells me to log in to the Spanish site
I am trying to update my apps and having logged into the uk apple site it is telling me to log into the Spanish one before the updates can take place I have checked my address details and they are UK how can I fix this issue
-
I have Photoshop 7.0 on my laptop and want to install on my desktop
I have Photoshop 7.0 on my laptop and want to install it on my desktop but i can't locate the serial number. Adobe can't locate it either. Is there another way to transfer it from my laptop to my desktop?
-
MTS / COM+ distributed transactions
How much support for Microsoft's MTS / COM+ distributed transactions is contained within the ODBC driver for Oracle that is distributed with Oracle9i for Windows? Does the ODBC driver support the Oracle Services for MTS that comes with the 9i client?
-
Can't run NMCAP on Server 2012 R2 - "This app can't run on your PC"
Hi all, For some reason it would appear Microsoft have blocked NMCAP running on Windows 2012 R2 and 8.1 in the last week or so. When running NMCAP at the command line I get "This app can't run on your PC" Does anyone know how to get around this? Than