Image File in CFGRID with Query

I have a flash CFGRID populated with data from a query. I
want to add a column to the grid that is not part of the query. I
want the column to hold a small image file of an x that when
clicked, deletes that row from the grid as well as the database
itself. I know I can just use the built in edit mode with the one
delete button at the bottom, but I prefer this way.
I can not figure out how to add a column to the grid that is
not part of the query to display the image.
Is this even possible.

One solution is to dynamically set the base href
String s = "test.txt"; // "dummy" file in current directory
File f = new File(s);
s = f.getAbsolutePath();
s = "file:\\"+s;
p("<BASE HREF='" + s + "'>");

Similar Messages

  • Adding image files to ApplicationController with initial letters "H"

    Hello.
    Whenever I add files (image, mostly png) with an initial letter of i or "bigger", they dont show up in the applicationController/ressources/images/... directory in the Application Navigator.
    Folders don't show up at all, and if there is a folder with a smaller letter than any image file, then all the following image files aren't shown.
    Weird bug i have to say..
    Kind regards,
    Pascal

    Pascal, what is your intent here? Are you going to use these images in a springboard or some other content? If so, they would go under the public_html folder on your drive which is visualized in JDev as your "Web Content" folder. If you place files or folders under the ApplicationController/src folder, they will show up under "Application Sources" in JDev.
    If you really want to include a specific folder as a resource, you can go to the project properties of the ApplicationController project, select "Project Source Paths", expand it and select "Resources". Then in the bottom section you can add a folder and it will then be included in your "Resources" of your ApplicationController project. I'm still not sure this is actually what you want though.
    I should note as well, I did not see or reproduce the problem you are seeing with filenames > H. Could you post exactly what you have in your directory structure on disk as well as what you see in JDev.
    Edited by: Denis T on Jul 26, 2012 9:00 AM

  • Displaying local image file in JEditorPane with relative path

    Hi All,
    I am showing an html inside JEditorPane. I have set its content type to text/html. The code goes like this,
    StringBuffer bf=new StringBuffer();
    bf.append("<html><head></head><body>");
    bf.append("<img src=\"calendar.gif\" width=\"10\" height=\"10\" border=\"0\">");
    bf.append(" <font face=\"Verdana\" size=\"3\">");
    bf.append("Hi All");
    bf.append("</font><br>");
    bf.append("</body></html>");
    jeditorpane.setContentType("text/html");
    jeditorpane.setText(bf.toString());
    The image calendar.gif is present at the base directory of the package. But still it is not shown in JEditorPane. But if i give full path like,
    <img src="file://C:/man/calendar.gif">
    then image appears.
    Any idea like what is the document root for JEditorPane??
    Thanks in Advance,
    Manjinder Singh

    One solution is to dynamically set the base href
    String s = "test.txt"; // "dummy" file in current directory
    File f = new File(s);
    s = f.getAbsolutePath();
    s = "file:\\"+s;
    p("<BASE HREF='" + s + "'>");

  • Saving PDF files as image files using the Preview application

    I'm converting PDF files into image files for use with OCR software. The problem is that changing the pixels/inch option from 150 to say 300 does not improve the resolution of the resulting image file. E.g. if I save at 150 p/i and then 300p/i both image files are the same size and resolution. I've tried JPG, JPG-2000, TIFF, and GIF. All produce the same fuzzy result. What am I doing wrong?

    The schematic file is made up from vector graphics. There are no images embedded in it. For some reason the OCR software (PDF pen) will not recognize the vector drawn characters near the various components. e.g. There may be a resistor with "R5" written next to it. This is the resistors designator. The designator is what I am trying to do the search on. Since PDF pen can perform OCR on scanned (image) documents I thought that turning the PDF schematic into an image file e.g. JPG using Preview would do the trick. Unfortunately as I have already mentioned I can not seem to get Preview to improve the resolution on the resulting image file - the OCR software struggles to recognize any print.

  • Problem in using different format for Image files

    We are generating a report wherein the logo (Image File) is changed with respect to the company's location.
    Here, we are making use of a Text field using a formula column as its source for getting the file path.
    When the Size is kept as "Expand" or "Variable", then, when the image size changes considerably, it gives problem, wherein the logo is not displayed.
    Then we increased the size of the logo field and kept thte size type as Fixed. But the probnlem which we face is because of the .bmp format which the report accepts.
    This is because, when the format type is bmp, upon increasing the resolution or size of the bmp increases the size by several folds( say from 70kb to almost 1000 or 1500kb) which leads to the error "Memory cannot be read" and leads to abrupt application termination.
    Is their any way by which i can make use of GIF format for the image file and at the same time change the file name at runtime.
    Eagarly waiting for an early solution.
    Thanking you in Advance,
    Ramnath Balasubramanian

    Hi,
    You can only use one Apple ID with iTunes match. Purchasing another match subscription using wife's Apple ID is not a solution. I can only suggest that you use your ID for match and all iTunes music purchases.
    Jim

  • How to flip through multiple image files in a folder using Preview?

    On windows a default image viewing program similar to preview allows a user to press the arrow keys to flip through images within the same folder as the image file originally opened with a Preview-like application.
    How can a person filp through images in the same folder with a few keystrokes using Preview?
    thanks

    hmm...you mean there isn't a way to simply skim
    through images in a folder using an arrow or page-up
    key?? That's kind of disappointing...especially
    being forced to pre-select images...
    oceanbluesky,
    There's no reason you can't use Preview to do what you're trying to do. And there's no need to pre-select images.
    The trick is to open Preview first, and then choose Open from the File menu (or Command + O on the keyboard). When Preview's Open dialog window appears, navigate to the folder which contains your pictures. Highlight the entire folder and then press the Open button. Once the folder is open in Preview you should be able to use your arrow keys to flip through...
    Note: To avoid a storm of images from opening on your desktop, go to Preview > Preferences > Images and make sure that the "Open each image in its own window" radio button is not selected.
    Good luck!
    Andrew99
    iMac 1 GHz Flat Panel 15" PPC 768 MB RAM   Mac OS X (10.4.10)  

  • Image file size in 1.1

    Hi folks
    Is it me, or is the problem with huge png image files no better with 1.1? I thought this was supposed to have been resolved, but having just republished my site, the files are back to their swollen size (I'd previously compressed them with Imageready).
    Great.....
    Or am I missing something?

    AFter updating to 1.1 and letting iWeb publish all to optimize my site, I haven't noticed any smaller file sizes either with previously published images or with subsequent updates. I think I do notice faster loading of pages, though. I'll continue to preprocess my files for iWeb.
    ==> www.DirtDoog.com <==</a>    
    Place A Virtual Pin On Putt-Putt's GuestMap!

  • Set System Image (File) Error 1097

    We have a built up PXI Chassis with RT OS running on it.  I used Get System Image (File).vi to grab the contents of the hard drive into a Zip file.
    I then have a LabVIEW project which builds our software into a startup.rtexe and the associated folders.   The PXI Chassis DIP switches are set up correct to launch the startup.rtexe.
    The System.zip file is unpacked and the project files are inserted into it.  The directory is then re-zipped to a new Zip file.
    I have a VI which deploys the new Zip file image (basically it runs on a PC connected to PXI Chassis via Ethernet).  It checks that PXI Chassis software has not been deployed or is a different version and uses Set System Image (File).vi to deploy the image. 
    If I run it on a different but identical PXI rack (chassis number is initially different), the zip file appears to deploy correctly.  The PXI Chassis reboots and launches our software.  Problem is “Set System Image (File).vi” always errors on exiting with a 1097 error.
    In addition the image was created from a PXI Chassis numbered 2.  The PXI Chassis I deploying to was initially configured as chassis number 1 (viewed in NI MAX).  After deployment it remains as “Chassis 1”.  If I change it to “Chassis 2” in NI MAX and then run the deployment, it reverts back to “Chassis 1”.  However I would have thought it would change based on the content of the Zip file?
    Any ideas why the VI is throwing an error?
    Christopher Povey
    Senior Test Systems Engineer for BAE Systems.

    LanxiZ wrote:
    Good Morning Chris,
    There are several possible reasons that can cause the error you are seeing:
    1. There is some problem with your code, below is a good example on how to get/set system image from a RT controller:
    "Get/Set Images From RT Controllers Using System Configuration API":
    https://decibel.ni.com/content/docs/DOC-34955
    2. Does this problem only happen when you deploy from the PXI chassis 2? everything works fine with the PC?
    I look forward to your reply.
    Thank you.
    Lanxi
    1. I have seen that page, but I cannot open that example as it is for LabVIEW 2013.  I am running LabVIEW 2012.  I have seen and implemented something similar to the built in examples in LabVIEW 2012 though.
    2. The deployment is not from a PXI chassis.  It is too one.  The deployment is performed from a rack mounted Windows XP PC.  It is connected to a PXI Chassis via Ethernet.
    Once the Set System Image (File) has completed (with the error), the PXI Chassis is up and running and I can see it is running my software successfully (I output test text to the PXI Chassis' monitor).  I can also call stub VI's on the rack mounted Windows XP PC which in turn connects too and runs the remote VI's successfully.
    I think I need to try the deployment on the original source of the System Image and see if it also errors.
    Thanks.
    Christopher Povey
    Senior Test Systems Engineer for BAE Systems.

  • Oracle depots in .iso image file format

    Hello All,
    Just curious to know why Oracle depots are not available in .iso image file format. With the advent CDROM emulators, it is much more easier to deal with .iso file than a .zip or .tgz in many OS platforms.
    Regards,
    Sushobhan

    The answer is as always ease of management compared to demand.
    I am guessing you are using Oracle on Windows as I think I would have more problems on a unix server dealing with an ISO file than I would with a tar or gzip file.
    John
    www.jhdba.wordpress.com

  • How do I find the aperture image files so that I can attach them to an email

    How do I find the aperture image files? I know that you can email images from aperture. But how would I attach an image using Mail?

    if you mean to go into the Aperture library in order to get image files to print with Canon's software it's not really possible. The best you would be able to do would be to get the master image and if you're shooting RAW that will be the RAW file. In any case no adjustments you made to the image in Aperture would be available, versions don't exist as files until you export them.
    If you want to print with the Canon software you would export the image from Aperture and then print that image file.
    If I've misunderstood your question post back,
    regards

  • Using Power Query to import image files for Power View

    I am trying to use Power Query to import image data from a SQL Azure database for use in Power View.  I've selected both the source image table and the ?images table in the workbook query.  The files seem to load as binary data in the Power
    Query editor but when loaded to the data model with Power Pivot, the field becomes "text" type rather than binary.  Does anyone know the procedure to use  PowerQuery to load image files into PowerPivot?

    Hi,
    We currently do not support loading binary data from Power Query into the Power Pivot data model. This is something we'd like to address soon. For now, you will need to use the Power Pivot import capabilities if you want to achieve this.
    Sorry about the inconvenience - we will try to enable this feature over the coming months.
    Faisal Mohamood | Program Manager | Data Platform Group - Microsoft

  • Image is not saved in jpeg/bmp file but ok with png

    Hi i am unable to save the image in disk in jpeg format.
    Here is the code.
    public void saveImage(){
    //if no filechooser is there means no image file opened.
            if(fileChooser==null){
                if(errorWindow==null)
                    errorWindow=new ErrorWindow(XXX.getPrimaryStage());
                errorWindow.showErrorWindow("There is no image to save !!\n");
            else{
                fileChooser.setTitle("Save The Image");
                File saveFile=fileChooser.showSaveDialog(XXX.getPrimaryStage());
                if(saveFile!=null){
                    System.out.println("saveFile path= "+saveFile);
                    //get the extension of output image to be saved.
                    //XXX: is the main class name(say)
                    outExtension=*XXX*.getImageExtension(saveFile);
                    //if user does not give extension: set default extension as jpg
                    if(outExtension.equalsIgnoreCase(saveFile.getName())){
                        outExtension="jpg";                   
                        String newPath=(saveFile.toString())+".jpg";
                        saveFile=new File(newPath);                   
                    Task task = new Task<Void>() {
                        @Override
                        public Void call() {
                            Platform.runLater(
                                    new Runnable() {
                                        public void run() {
                                            try {
                                                //The image is inside ImageView->inside ScrollPane-> inside TabPane.
                                                Image curImage=XXX.getCurrentImage();
                                                int width=(int)curImage.getWidth();
                                                int height=(int)curImage.getHeight();                              
                                                System.out.println("cur image width= "+width+" ht= "+height);
                                                bufferedImage=new BufferedImage(width, height,BufferedImage.TYPE_INT_ARGB );
                                                //set the current image to awt Buffered Image
                                                SwingFXUtils.fromFXImage(curImage, bufferedImage);
                                                    imageTabPane=xxx.getImageTabPane();
                                                    Tab tab=imageTabPane.getSelectionModel().getSelectedItem();                                    
                                                    TabPane childTabPane=(TabPane)tab.getContent();
                                                    ScrollPane sp=(ScrollPane)childTabPane.getSelectionModel().getSelectedItem().getContent();
                                                    final ImageView imageView=(ImageView)sp.getContent();
                                                    WritableImage wim = new WritableImage(width,height);
                                                    imageView.snapshot(null, wim);
                                                    System.out.println(" snapShot width= "+wim.getWidth()+" ht="+wim.getHeight());                             
                                                    *ImageIO.write(SwingFXUtils.fromFXImage(wim,null), outExtension, saveFile);*
                                                       //<------ its not working  for png,jpeg,bmp,gif                                          
                                                    // the below lines are working only for png and gif
                                                    OutputStream out = new FileOutputStream(saveFile);                                                
                                                    ImageIO.write((RenderedImage) bufferedImage, outExtension, out);
                                                    out.flush();
                                            } catch (Exception ex) {
                                                Logger.getLogger(FileMenuController.class.getName()).log(Level.SEVERE, null, ex);
                                                //ex.printStackTrace();
                                            System.out.println("finished");
                            return null;
                    Thread th = new Thread(task);
                    th.start();
                }else{
                    System.out.println("File is not saved");
        }//saveImageNote: The above code is executed in ubuntu(10.04) using Netbeans 7.2(Javafx(2.2), java(1.7.0_11).
    When i run(from terminal) separately in a new class with an image in an Imageview( inside a Vbox) and take the snapshot
    of the imageview and write into the file using ImageIO.write(SwingFXUtils.fromFXImage(wim,null), outExtension, saveFile);
    with any extension (jpeg,png etc) it is working fine.
    Please help me.
    Any small hint is also helpful.Please feel free to comment or give suggestion.
    Edited by: 963038 on Feb 17, 2013 7:14 PM

    When i omit the line OutputStream out = new FileOutputStream(saveFile);
    and write only
    ImageIO.write((RenderedImage) bufferedImage, outExtension,saveFile);
    //out.flush();
    then saving the image even in "png" also fails.
    The following is the error code:
    Note : FileMenuController is my file where the saveImage() is wrtten.
    javax.imageio.IIOException: I/O error writing PNG file!
    finished
         at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1168)
         at javax.imageio.ImageWriter.write(ImageWriter.java:615)
         at javax.imageio.ImageIO.doWrite(ImageIO.java:1612)
         at javax.imageio.ImageIO.write(ImageIO.java:1536)
         at *newciptk.controls.menu.file.FileMenuController$1$1.run(FileMenuController.java:205)*
         at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
         at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
         at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
         at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:82)
         at java.lang.Thread.run(Thread.java:722)
    Caused by: java.io.IOException: Operation not supported
         at java.io.RandomAccessFile.writeBytes(Native Method)
         at java.io.RandomAccessFile.write(RandomAccessFile.java:499)
         at javax.imageio.stream.FileImageOutputStream.write(FileImageOutputStream.java:124)
         at javax.imageio.stream.ImageOutputStreamImpl.writeInt(ImageOutputStreamImpl.java:91)
         at com.sun.imageio.plugins.png.ChunkStream.finish(PNGImageWriter.java:136)
         at com.sun.imageio.plugins.png.PNGImageWriter.write_IHDR(PNGImageWriter.java:401)
         at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1135)
         ... 9 more
    javax.imageio.IIOException: I/O error writing PNG file!
         at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1168)
         at javax.imageio.ImageWriter.write(ImageWriter.java:615)
         at javax.imageio.ImageIO.doWrite(ImageIO.java:1612)
         at javax.imageio.ImageIO.write(ImageIO.java:1536)
         at newciptk.controls.menu.file.FileMenuController$1$1.run(FileMenuController.java:205)
         at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
         at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
         at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
         at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:82)
         at java.lang.Thread.run(Thread.java:722)
    Caused by: java.io.IOException: Operation not supported
         at java.io.RandomAccessFile.writeBytes(Native Method)
         at java.io.RandomAccessFile.write(RandomAccessFile.java:499)
         at javax.imageio.stream.FileImageOutputStream.write(FileImageOutputStream.java:124)
         at javax.imageio.stream.ImageOutputStreamImpl.writeInt(ImageOutputStreamImpl.java:91)
         at com.sun.imageio.plugins.png.ChunkStream.finish(PNGImageWriter.java:136)
         at com.sun.imageio.plugins.png.PNGImageWriter.write_IHDR(PNGImageWriter.java:401)
         at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1135)
         ... 9 more

  • Problem with Image file

    Hi,
    Iam facing with one problem.I have one swing interface through which I can upload files(back end servlet programme).Now I can upload all types of file but problem with image file it uploading perfectly that means size of the uploaded file is ok but its format damaged.It can not be open.My backend servlet programme is ok coz i tested it with html form it is working perfectly.Problem with swing interface.Plz guide me where I done a mistake.Below r my codes:-
    ImageIcon Upload=new ImageIcon("images/Upload.gif");
         Button=new JButton(Upload);
         Button.setToolTipText("Upload");
    Button.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
              int returnVal = fc.showOpenDialog(ActionDemo4.this);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
              File file = fc.getSelectedFile();
    String aa=file.getAbsolutePath();
              textArea3.append(aa);
                   textArea2.append("Local URL:");
    long l=file.length();
              try
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff);
              String str1=textArea10.getText();
    url = new URL ("http://127.0.0.1:7001/servletUpload?x="+str1);
         urlConn = url.openConnection();
         urlConn.setDoInput (true);
         urlConn.setDoOutput (true);
         urlConn.setUseCaches (false);
         urlConn.setRequestProperty("Content-Type","multipart/form-data;boundry=-----------------------------7d11e410e500f2");
         printout = new DataOutputStream (urlConn.getOutputStream ());
    String content ="-----------------------------7d11e410e500f2\r\n"+"Content-Disposition: form-data;"+"name=\"upload\"; filename=\""+aa+"\"\r\n"+"Content-Type: application/octet-strem\r\n\r\n\r\n"+conffile+"-----------------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);
    printout.flush ();
    printout.close ();
    Best Regards
    Bikash

    The errors are here:
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff); (conffile is a String object containing the image)
    and here:
    String content ="-----------------------------7d11e410e500f2\r\n"+"Con
    ent-Disposition: form-data;"+"name=\"upload\";
    filename=\""+aa+"\"\r\n"+"Content-Type:
    application/octet-strem\r\n\r\n\r\n"+conffile+"--------
    --------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);conffie is sent to the server but
    it's non possible to treat binary data as String!
    Image files must be sent as byte[] NOT as String ......

  • Attempting to upgrade to Firefox 3.6 (using an ancient Mac OS 10.3), but received an error message (corrupt image file) when downloading - any way to correct this with my current OS?

    I'm currently trying to update a few programs on my good old (VERY old) Mac Powerbook, but I ran into an error when downloading Firefox version 3.6...I'm currently running Mac OS X 10.3.9, which isn't compatible with the most recent versions of Firefox (or anything, for that matter), but it should still allow an upgrade of version 3.6; however, once the file finished downloading, an error message popped up indicating there's a corrupt image file. Is there any way to work around/correct this problem, or am I stuck with my old version of Firefox until I bite the bullet and upgrade my OS??? Any help is greatly appreciated!!

    Firefox 3.6 requires at least OS X 10.4, the last version of Firefox that runs on OS X 10.3.9 is Firefox 2.0.0.20 available from https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.20/mac/en-US/

  • I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it.

    I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it. All of the files are going into the same zip file but I want them visually in the space that I put them and not at the bottom of the snap to grid folder location they are looking like.  I am trying to  drag and drop files in groups so that I can group them for now, but image files always do their own "sort by" when I drag them from my web pages. Links don't do it though.  I tried resetting the folder, and deleting the DS files. No luck.

    You keep asking variants on this same question. You've had replies in all your other threads. If you can't find them, go here and click where it says Activity:
    Thomas Cannon Jr.

Maybe you are looking for