Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Download file from SQL datasource with binary field

    Hi all,

    I'm using SmartGWT Pro 3.0 (SmartClient Version: v8.2p_2012-08-15/Pro Deployment (built 2012-08-15)) and I'm trying to download/view an image stored in a MSSQL database as a binary field. I have added a "_filename", "_filesize" and "_date_created" field within my table but the browser (Firefox 15) does not get the MIME type nor the filename of the image.

    I have a simple DMI class (DMIRequestPrinter) which logs the requests and responses on the server side. It shows that those 3 additional field are read but not used by the smartgwt server to detect the MIME type or the filename. Firefox does always interpret the binary stream as a text file with the filename "IDACall".

    I thought this would be done automatically!? Am I mistaken, do I have to do something special to set the filename and MIME type?

    The content type of the HTTP response header is always "text/plain" and it doesn't make a difference if I'm downloading the file or using the URL (DataSource.getFileURL(data)).

    Sample code:
    Code:
    final DataSource PictureDS = DataSource.getDataSource("Picture");
    
    final Record data = new Record();
    data.setAttribute("PictureID", 10005);
    PictureDS.downloadFile(data);
    My "Picture.ds.xml":
    Code:
    <DataSource ID="Picture" serverType="sql" dataSourceVersion="1" dbName="SQLServer" schema="dbo">
        <fields>
            <field name="PictureID" type="integer" primaryKey="true"/>
            <field name="PictureFile" type="binary" encodeInResponse="true" />
        </fields>
        <serverObject lookupStyle="new" className="de.infoteam.server.DMIRequestPrinter" />
        <operationBindings>
            <binding operationType="viewFile">
                <serverObject lookupStyle="new" className="de.infoteam.server.DMIRequestPrinter" />
            </binding>
            <binding operationType="downloadFile">
                <serverObject lookupStyle="new" className="de.infoteam.server.DMIRequestPrinter" />
            </binding>
        </operationBindings>
    </DataSource>
    The DMIRequestPrinter class:
    Code:
    package de.infoteam.server;
    
    import org.apache.commons.logging.impl.Log4JLogger;
    
    import com.isomorphic.datasource.DSRequest;
    import com.isomorphic.datasource.DSResponse;
    
    public class DMIRequestPrinter {
    
        Log4JLogger log = new Log4JLogger("DMIRequestPrinter");
    
        private void logDSRequest(final DSRequest dsRequest) {
            this.log.info(dsRequest.getCriteria().size() + " criteria(s):");
            for (final Object key : dsRequest.getCriteria().keySet()) {
                this.log.info(key + " -> " + dsRequest.getCriteria().get(key));
            }
        }
    
        private void logDSResponse(final DSResponse dsResponse) {
            this.log.info(dsResponse.getRecords().size() + " record(s):");
            this.log.info(dsResponse.getRecords().toString());
        }
    
        public DSResponse fetch(final DSRequest dsRequest) throws Exception {
            this.log.info("fetch() called");
    
            this.logDSRequest(dsRequest);
            final DSResponse dsResponse = dsRequest.execute();
            this.logDSResponse(dsResponse);
            return dsResponse;
        }
    
        public DSResponse add(final DSRequest dsRequest) throws Exception {
            this.log.info("add() called");
    
            this.logDSRequest(dsRequest);
            final DSResponse dsResponse = dsRequest.execute();
            this.logDSResponse(dsResponse);
            return dsResponse;
        }
    
        public DSResponse update(final DSRequest dsRequest) throws Exception {
            this.log.info("update() called");
    
            this.logDSRequest(dsRequest);
            final DSResponse dsResponse = dsRequest.execute();
            this.logDSResponse(dsResponse);
            return dsResponse;
        }
    
        public DSResponse remove(final DSRequest dsRequest) throws Exception {
            this.log.info("remove() called");
    
            this.logDSRequest(dsRequest);
            final DSResponse dsResponse = dsRequest.execute();
            this.logDSResponse(dsResponse);
            return dsResponse;
        }
    
        public DSResponse viewFile(final DSRequest dsRequest) throws Exception {
            this.log.info("viewFile() called");
    
            this.logDSRequest(dsRequest);
            final DSResponse dsResponse = dsRequest.execute();
            this.logDSResponse(dsResponse);
            return dsResponse;
        }
    
        public DSResponse downloadFile(final DSRequest dsRequest) throws Exception {
            this.log.info("downloadFile() called");
    
            this.logDSRequest(dsRequest);
            final DSResponse dsResponse = dsRequest.execute();
            this.logDSResponse(dsResponse);
            return dsResponse;
        }
    }
    Log messages:
    Code:
    DEBUG 13:52:08.731 [main           ] [JspRuntimeContext        ] Parent class loader is: ContextLoader@null
    DEBUG 13:52:08.732 [main           ] [JspServlet               ] Scratch dir for the JSP engine is: C:\Users\TWEISS~1.NTD\AppData\Local\Temp\Jetty_127_0_0_1_8888_war____-g0qk00\jsp
    DEBUG 13:52:08.732 [main           ] [JspServlet               ] IMPORTANT: Do not modify the generated servlets
    ISC: Configuring log4j from: file:/D:/SVN/GraphicTool/GraphicTool/war/WEB-INF/classes/log4j.isc.config.xml
    === 2012-09-12 13:52:08,795 [main] INFO  ISCInit - Isomorphic SmartClient Framework - Initializing
    === 2012-09-12 13:52:08,795 [main] INFO  ConfigLoader - Attempting to load framework.properties from CLASSPATH
    === 2012-09-12 13:52:08,919 [main] INFO  ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/D:/SVN/GraphicTool/GraphicTool/war/WEB-INF/lib/isomorphic_core_rpc.jar!/framework.properties
    === 2012-09-12 13:52:08,919 [main] INFO  ConfigLoader - Attempting to load project.properties from CLASSPATH
    === 2012-09-12 13:52:08,919 [main] INFO  ConfigLoader - Unable to locate project.properties in CLASSPATH
    === 2012-09-12 13:52:08,919 [main] INFO  ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/D:/SVN/GraphicTool/GraphicTool/war/WEB-INF/lib/isomorphic_core_rpc.jar!/isc_interfaces.properties
    === 2012-09-12 13:52:08,919 [main] INFO  ConfigLoader - Attempting to load server.properties from CLASSPATH
    === 2012-09-12 13:52:08,919 [main] INFO  ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/D:/SVN/GraphicTool/GraphicTool/war/WEB-INF/classes/server.properties
    === 2012-09-12 13:52:08,935 [main] INFO  Logger - Logging system started.
    === 2012-09-12 13:52:08,935 [main] INFO  ISCInit - Isomorphic SmartClient Framework (v8.2p_2012-08-15/Pro Deployment 2012-08-15) - Initialization Complete
    === 2012-09-12 13:52:08,935 [main] INFO  ISCInit - Auto-detected webRoot - using: D:\SVN\GraphicTool\GraphicTool\war
    === 2012-09-12 13:52:12,975 [l0-0] INFO  PoolManager - SmartClient pooling disabled for 'Customer' objects
    === 2012-09-12 13:52:12,992 [l0-0] DEBUG XML - Parsed XML from D:\SVN\GraphicTool\GraphicTool\war\graphictool\sc\system\schema\builtinTypes.xml: 0ms
    === 2012-09-12 13:52:13,054 [l0-0] DEBUG XML - Parsed XML from D:\SVN\GraphicTool\GraphicTool\war\ds\Customer.ds.xml: 0ms
    === 2012-09-12 13:52:13,070 [l0-0] DEBUG XML - Parsed XML from D:\SVN\GraphicTool\GraphicTool\war\graphictool\sc\system\schema\DataSource.ds.xml: 16ms
    === 2012-09-12 13:52:13,117 [l0-0] DEBUG XML - Parsed XML from D:\SVN\GraphicTool\GraphicTool\war\graphictool\sc\system\schema\DataSourceField.ds.xml: 0ms
    === 2012-09-12 13:52:13,195 [l0-0] DEBUG XML - Parsed XML from D:\SVN\GraphicTool\GraphicTool\war\ds\Picture.ds.xml: 0ms
    === 2012-09-12 13:52:13,210 [l0-0] DEBUG XML - Parsed XML from D:\SVN\GraphicTool\GraphicTool\war\graphictool\sc\system\schema\ServerObject.ds.xml: 0ms
    === 2012-09-12 13:52:13,210 [l0-0] DEBUG XML - Parsed XML from D:\SVN\GraphicTool\GraphicTool\war\graphictool\sc\system\schema\OperationBinding.ds.xml: 0ms
    === 2012-09-12 13:52:13,226 [l0-0] DEBUG XML - Parsed XML from D:\SVN\GraphicTool\GraphicTool\war\ds\IDCounter.ds.xml: 0ms
    === 2012-09-12 13:52:22,196 [l0-4] INFO  RequestContext - URL: '/graphictool/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1': Moz (Gecko) with Accept-Encoding header
    === 2012-09-12 13:52:22,228 [l0-4] DEBUG XML - Parsed XML from (in memory stream): 0ms
    === 2012-09-12 13:52:22,228 [l0-4] DEBUG XML - Parsed XML from D:\SVN\GraphicTool\GraphicTool\war\graphictool\sc\system\schema\List.ds.xml: 0ms
    === 2012-09-12 13:52:22,228 [l0-4] DEBUG RPCManager - Processing 1 requests.
    === 2012-09-12 13:52:22,244 [l0-4] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
            PictureID:10005,
            download_fieldname:"PictureFile"
        },
        operationConfig:{
            dataSource:"Picture",
            operationType:"downloadFile"
        },
        appID:"builtinApplication",
        operation:"Picture_downloadFile",
        oldValues:{
            PictureID:10005,
            download_fieldname:"PictureFile"
        }
    }
    === 2012-09-12 13:52:22,244 [l0-4] INFO  IDACall - Performing 1 operation(s)
    INFO  13:52:22.259 [btpool0-4      ] [DMIRequestPrinter        ] downloadFile() called
    INFO  13:52:22.259 [btpool0-4      ] [DMIRequestPrinter        ] 2 criteria(s):
    INFO  13:52:22.259 [btpool0-4      ] [DMIRequestPrinter        ] PictureID -> 10005
    INFO  13:52:22.259 [btpool0-4      ] [DMIRequestPrinter        ] download_fieldname -> PictureFile
    === 2012-09-12 13:52:22,259 [l0-4] DEBUG AppBase - [builtinApplication.Picture_downloadFile] No userTypes defined, allowing anyone access to all operations for this application
    === 2012-09-12 13:52:22,259 [l0-4] DEBUG AppBase - [builtinApplication.Picture_downloadFile] No public zero-argument method named '_Picture_downloadFile' found, performing generic datasource operation
    INFO  13:52:22.259 [btpool0-4      ] [DMIRequestPrinter        ] fetch() called
    INFO  13:52:22.259 [btpool0-4      ] [DMIRequestPrinter        ] 2 criteria(s):
    INFO  13:52:22.259 [btpool0-4      ] [DMIRequestPrinter        ] PictureID -> 10005
    INFO  13:52:22.259 [btpool0-4      ] [DMIRequestPrinter        ] download_fieldname -> PictureFile
    === 2012-09-12 13:52:22,259 [l0-4] DEBUG AppBase - [builtinApplication.Picture_downloadFile, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
    === 2012-09-12 13:52:22,259 [l0-4] DEBUG AppBase - [builtinApplication.Picture_downloadFile, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
    === 2012-09-12 13:52:22,259 [l0-4] INFO  SQLDataSource - [builtinApplication.Picture_downloadFile, builtinApplication.null] Performing fetch operation with
    	criteria: {PictureID:10005,download_fieldname:"PictureFile"}	values: {PictureID:10005,download_fieldname:"PictureFile"}
    === 2012-09-12 13:52:22,275 [l0-4] INFO  SQLDataSource - [builtinApplication.Picture_downloadFile, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
    DEBUG 13:52:22.306 [btpool0-4      ] [Velocity                 ] SimpleLog4JLogSystem using category 'org.apache.Velocity'
    DEBUG 13:52:22.306 [btpool0-4      ] [Velocity                 ] *******************************************************************
    DEBUG 13:52:22.306 [btpool0-4      ] [Velocity                 ] Starting Apache Velocity v1.6.1 (compiled: 2008-12-09 10:57:23)
    DEBUG 13:52:22.306 [btpool0-4      ] [Velocity                 ] RuntimeInstance initializing.
    DEBUG 13:52:22.306 [btpool0-4      ] [Velocity                 ] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties
    DEBUG 13:52:22.306 [btpool0-4      ] [Velocity                 ] Trying to use logger class org.apache.velocity.runtime.log.SimpleLog4JLogSystem
    DEBUG 13:52:22.306 [btpool0-4      ] [Velocity                 ] LogSystem has been deprecated. Please use a LogChute implementation.
    DEBUG 13:52:22.306 [btpool0-4      ] [Velocity                 ] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
    DEBUG 13:52:22.322 [btpool0-4      ] [Velocity                 ] ResourceLoader instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader
    DEBUG 13:52:22.322 [btpool0-4      ] [Velocity                 ] FileResourceLoader : initialization starting.
    DEBUG 13:52:22.322 [btpool0-4      ] [Velocity                 ] Do unicode file recognition:  false
    DEBUG 13:52:22.322 [btpool0-4      ] [Velocity                 ] FileResourceLoader : adding path ''
    DEBUG 13:52:22.322 [btpool0-4      ] [Velocity                 ] FileResourceLoader : initialization complete.
    DEBUG 13:52:22.322 [btpool0-4      ] [Velocity                 ] ResourceCache: initialized (class org.apache.velocity.runtime.resource.ResourceCacheImpl) with class java.util.Collections$SynchronizedMap cache map.
    DEBUG 13:52:22.322 [btpool0-4      ] [Velocity                 ] Default ResourceManager initialization complete.
    DEBUG 13:52:22.322 [btpool0-4      ] [Velocity                 ] Loaded System Directive: org.apache.velocity.runtime.directive.Define
    DEBUG 13:52:22.322 [btpool0-4      ] [Velocity                 ] Loaded System Directive: org.apache.velocity.runtime.directive.Break
    DEBUG 13:52:22.322 [btpool0-4      ] [Velocity                 ] Loaded System Directive: org.apache.velocity.runtime.directive.Evaluate
    DEBUG 13:52:22.322 [btpool0-4      ] [Velocity                 ] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
    DEBUG 13:52:22.337 [btpool0-4      ] [Velocity                 ] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
    DEBUG 13:52:22.337 [btpool0-4      ] [Velocity                 ] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
    DEBUG 13:52:22.337 [btpool0-4      ] [Velocity                 ] Loaded System Directive: org.apache.velocity.runtime.directive.Include
    DEBUG 13:52:22.337 [btpool0-4      ] [Velocity                 ] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
    DEBUG 13:52:22.353 [btpool0-4      ] [Velocity                 ] Created '20' parsers.
    DEBUG 13:52:22.369 [btpool0-4      ] [Velocity                 ] Velocimacro : initialization starting.
    DEBUG 13:52:22.369 [btpool0-4      ] [Velocity                 ] Velocimacro : "velocimacro.library" is not set.  Trying default library: VM_global_library.vm
    DEBUG 13:52:22.369 [btpool0-4      ] [Velocity                 ] Velocimacro : Default library not found.
    DEBUG 13:52:22.369 [btpool0-4      ] [Velocity                 ] Velocimacro : allowInline = true : VMs can be defined inline in templates
    DEBUG 13:52:22.369 [btpool0-4      ] [Velocity                 ] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
    DEBUG 13:52:22.369 [btpool0-4      ] [Velocity                 ] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
    DEBUG 13:52:22.369 [btpool0-4      ] [Velocity                 ] Velocimacro : autoload off : VM system will not automatically reload global library macros
    DEBUG 13:52:22.369 [btpool0-4      ] [Velocity                 ] Velocimacro : Velocimacro : initialization complete.
    DEBUG 13:52:22.369 [btpool0-4      ] [Velocity                 ] RuntimeInstance successfully initialized.
    === 2012-09-12 13:52:22,369 [l0-4] INFO  SQLDataSource - [builtinApplication.Picture_downloadFile, builtinApplication.null] Executing SQL query on 'SQLServer': SELECT Picture.PictureFile, Picture.PictureFile_date_created, Picture.PictureFile_filename, Picture.PictureFile_filesize, Picture.PictureID FROM dbo.Picture WHERE (Picture.PictureID='10005')
    === 2012-09-12 13:52:22,478 [l0-4] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Picture_downloadFile, builtinApplication.null] Initializing SQL config for 'SQLServer' from system config - using DriverManager:  com.microsoft.sqlserver.jdbc.SQLServerDriver
    === 2012-09-12 13:52:22,509 [l0-4] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Picture_downloadFile, builtinApplication.null] com.microsoft.sqlserver.jdbc.SQLServerDriver lookup successful
    === 2012-09-12 13:52:22,509 [l0-4] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Picture_downloadFile, builtinApplication.null] DriverManager fetching connection for SQLServer via jdbc url jdbc:sqlserver://Boschix;instanceName=Bugtracker;databaseName=GraphicToolDB;User=GraphicTool;Password=GraphicTool
    === 2012-09-12 13:52:22,509 [l0-4] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Picture_downloadFile, builtinApplication.null] Passing JDBC URL only to getConnection
    === 2012-09-12 13:52:34,162 [l0-4] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Picture_downloadFile, builtinApplication.null] Returning pooled Connection
    === 2012-09-12 13:52:34,178 [l0-4] INFO  SQLDriver - [builtinApplication.Picture_downloadFile, builtinApplication.null] Executing SQL query on 'SQLServer': SELECT Picture.PictureFile, Picture.PictureFile_date_created, Picture.PictureFile_filename, Picture.PictureFile_filesize, Picture.PictureID FROM dbo.Picture WHERE (Picture.PictureID='10005')
    === 2012-09-12 13:52:34,226 [l0-4] INFO  DSResponse - [builtinApplication.Picture_downloadFile, builtinApplication.null] DSResponse: List with 1 items
    INFO  13:52:34.226 [btpool0-4      ] [DMIRequestPrinter        ] 1 record(s):
    INFO  13:52:34.226 [btpool0-4      ] [DMIRequestPrinter        ] [{PictureFile_date_created=2012-11-09 10:00:00.0, PictureID=10005, PictureFile_filesize=4479, PictureFile=java.io.ByteArrayInputStream@5720e4e2, PictureFile_filename=Test.png}]
    === 2012-09-12 13:52:34,226 [l0-4] INFO  DSResponse - [builtinApplication.Picture_downloadFile] DSResponse: Map with 5 keys
    INFO  13:52:34.226 [btpool0-4      ] [DMIRequestPrinter        ] 1 record(s):
    INFO  13:52:34.226 [btpool0-4      ] [DMIRequestPrinter        ] [{PictureFile_date_created=2012-11-09 10:00:00.0, PictureID=10005, PictureFile_filesize=4479, PictureFile=java.io.ByteArrayInputStream@5720e4e2, PictureFile_filename=Test.png}]
    Any idea?

    #2
    Setting the mime type is normally automatic, but it's done by SmartGWT, rather it's done by your servlet engine. In Tomcat and other engines, this is usually controlled by the mime.types file.

    Normally the URL used for a download contains the filename as part of it in order to help the server get the right mime type. It looks like you've done some configuration (not shown in your code sample) to break this mechanism - it's on by default if you just follow the normal installation.

    Comment


      #3
      You mean the URL returned by DataSource.getFileURL(data)? This is what I get:

      Code:
      http://127.0.0.1:8888/graphictool/sc/IDACall?isc_rpc=1&isc_v=v8.2p_2012-08-15&isc_tnum=0&_transaction=%3Ctransaction%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2F10%2FXMLSchema-instance%22%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CtransactionNum%20xsi%3Atype%3D%22xsd%3Along%22%3E0%3C%2FtransactionNum%3E%3Coperations%20xsi%3Atype%3D%22xsd%3AList%22%3E%3Celem%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3Ccriteria%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CPictureID%20xsi%3Atype%3D%22xsd%3Along%22%3E10005%3C%2FPictureID%3E%3Cdownload_fieldname%3EPictureFile%3C%2Fdownload_fieldname%3E%3C%2Fcriteria%3E%3CoperationConfig%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CdataSource%3EPicture%3C%2FdataSource%3E%3CoperationType%3EviewFile%3C%2FoperationType%3E%3C%2FoperationConfig%3E%3CappID%3EbuiltinApplication%3C%2FappID%3E%3Coperation%3EPicture_viewFile%3C%2Foperation%3E%3ColdValues%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CPictureID%20xsi%3Atype%3D%22xsd%3Along%22%3E10005%3C%2FPictureID%3E%3Cdownload_fieldname%3EPictureFile%3C%2Fdownload_fieldname%3E%3C%2FoldValues%3E%3C%2Felem%3E%3C%2Foperations%3E%3C%2Ftransaction%3E
      Can you point me to the configuration files which could contain something to break this mechanism?

      Comment


        #4
        No, we meant the URL of the request when you call downloadFile() or otherwise trigger this API (eg clicking on the automatically generated download link in a ListGrid).

        There's really no way for us to list off all the ways you might have broken this. Some kind of server-side redirect that drops parts of the path would be one.

        Comment


          #5
          You're talking about the server configuration, not the smartgwt/gwt configuration? I'm currently running everything locally and I didn't change anything I know of. I don't even know where Jetty stores its configuration files.

          Is there a way to debug that kind of issue?! I mean, I'm kinda lost here as I have no idea where to start looking for the problem...

          Comment


            #6
            This all works in the default installation instructions, so you should think carefully about what additional settings you have applied.

            The default behavior is that a download will use a URL that starts with IDACall but adds your filename at the end of the URL. In your logs it seems the filename has been added. This indicates either that you haven't successfully delivered the data for the filename or there is a server-side redirect of some kind stripping off the filename from the URL.

            Comment


              #7
              Well, I guess I have to start from scratch and work my way step by step to my current configuration... annoying, but theres probably no other way.

              Comment


                #8
                Actually, I spent some time over the weekend updating the maven archetype and find that I'm having a similar problem. Well, sort of.

                Hosted mode on a default embedded Jetty, compiled mode on a default Tomcat 7, HSQLDB 2.2.9, Firefox 15.0.1, SmartGWT eval 3.1.p20121129.

                I have a little table

                Code:
                CREATE TABLE ProductLines(productLine VARCHAR(50) PRIMARY KEY, textDescription VARCHAR(4000), htmlDescription CLOB, IMAGE BLOB, IMAGE_FILENAME VARCHAR(255), IMAGE_FILESIZE BIGINT, IMAGE_DATE_CREATED DATE);
                and corresponding datasource

                Code:
                <DataSource 
                    ID="ProductLines"
                	schema="PUBLIC"
                	dbName="TestCaseData"
                	tableName="ProductLines"
                	serverType="sql"
                	autoDeriveSchema="false"
                >
                	<fields>
                		<field primaryKey="true" name="PRODUCTLINE" type="sequence" />
                		<field name="TEXTDESCRIPTION" type="text"/>
                		<field name="HTMLDESCRIPTION" type="text"/>
                		<field name="IMAGE" type="imageFile"/>
                	</fields>
                </DataSource>
                I dumbed the web.xml way down

                Code:
                <?xml version="1.0" encoding="UTF-8"?>
                <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
                
                    <listener>
                        <listener-class>com.islandpacific.testcase.server.hsqldb.HSQLServletContextListener</listener-class>
                    </listener>
                
                    <!-- // ISC init: initializes ISC framework -->
                    <servlet>
                        <servlet-name>Init</servlet-name>
                        <servlet-class>com.isomorphic.base.Init</servlet-class>
                        <load-on-startup>1</load-on-startup>
                    </servlet>
                
                    <!-- // The IDACall servlet handles all Built-in DataSource operations -->
                    <servlet>
                        <servlet-name>IDACall</servlet-name>
                        <servlet-class>com.isomorphic.servlet.IDACall</servlet-class>
                    </servlet>
                
                    <servlet>
                        <servlet-name>DataSourceLoader</servlet-name>
                        <servlet-class>com.isomorphic.servlet.DataSourceLoader</servlet-class>
                    </servlet>
                
                    <servlet-mapping>
                        <servlet-name>IDACall</servlet-name>
                        <url-pattern>/TestCase/sc/IDACall/*</url-pattern>
                    </servlet-mapping>
                
                    <servlet-mapping>
                        <servlet-name>DataSourceLoader</servlet-name>
                        <url-pattern>/TestCase/sc/DataSourceLoader</url-pattern>
                    </servlet-mapping>
                
                    <welcome-file-list>
                        <welcome-file>TestCase.html</welcome-file>
                    </welcome-file-list>
                
                </web-app>
                I just load up a little grid

                Code:
                public void onModuleLoad() {
                    	
                    	VLayout layout = new VLayout(15);  
                        layout.setHeight100();  
                        layout.setWidth100();  
                  
                        final ListGrid grid = new ListGrid();  
                        grid.setDataSource(DataSource.get("ProductLines"));  
                        grid.setAutoFetchData(true);
                        grid.setCanEdit(true);
                        
                        layout.addMember(grid);
                        
                        layout.draw();
                    }
                The first thing I notice is that the 'image' column metadata is present in the grid instead of being hidden. Click on the view or download file icons and I get a text file back (named IDACall). You can see in the following logs that the download_filename is null so clearly there's something wrong with my meta columns - but what? You can see that IMAGE_FILENAME is returned from the fetch and looks correct...


                Complete Server log
                Code:
                === 2012-12-03 09:42:15,595 [ad-1] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework initialization called from com.isomorphic.base.Init
                === 2012-12-03 09:42:15,596 [ad-1] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework - Initializing
                === 2012-12-03 09:42:15,601 [ad-1] INFO  ConfigLoader - Attempting to load framework.properties from CLASSPATH
                === 2012-12-03 09:42:15,694 [ad-1] INFO  ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/C:/Development/apache-tomcat-7.0.27/webapps/testcase/WEB-INF/lib/isomorphic-core-rpc-3.1.p20121129.jar!/framework.properties
                === 2012-12-03 09:42:15,695 [ad-1] INFO  ConfigLoader - Attempting to load project.properties from CLASSPATH
                === 2012-12-03 09:42:15,696 [ad-1] INFO  ConfigLoader - Unable to locate project.properties in CLASSPATH
                === 2012-12-03 09:42:15,699 [ad-1] INFO  ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/C:/Development/apache-tomcat-7.0.27/webapps/testcase/WEB-INF/lib/isomorphic-core-rpc-3.1.p20121129.jar!/isc_interfaces.properties
                === 2012-12-03 09:42:15,700 [ad-1] INFO  ConfigLoader - Attempting to load server.properties from CLASSPATH
                === 2012-12-03 09:42:15,703 [ad-1] INFO  ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/C:/Development/apache-tomcat-7.0.27/webapps/testcase/WEB-INF/classes/server.properties
                === 2012-12-03 09:42:15,709 [ad-1] INFO  Logger - Logging system started.
                === 2012-12-03 09:42:15,710 [ad-1] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework (v8.3p_2012-11-29/EVAL Deployment 2012-11-29) - Initialization Complete
                === 2012-12-03 09:42:15,714 [ad-1] INFO  ISCInit - Auto-detected webRoot - using: C:\Development\apache-tomcat-7.0.27\webapps\testcase
                === 2012-12-03 09:43:18,467 [ec-6] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework initialization called from com.isomorphic.base.Base
                === 2012-12-03 09:43:18,468 [ec-6] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework is already initialized
                === 2012-12-03 09:43:18,511 [ec-6] INFO  PoolManager - SmartClient pooling disabled for 'Customers' objects
                === 2012-12-03 09:43:18,551 [ec-6] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\TestCase\sc\system\schema\builtinTypes.xml: 6ms
                === 2012-12-03 09:43:18,624 [ec-6] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\ds\Customers.ds.xml: 3ms
                === 2012-12-03 09:43:18,631 [ec-6] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\TestCase\sc\system\schema\DataSource.ds.xml: 6ms
                === 2012-12-03 09:43:18,684 [ec-6] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\TestCase\sc\system\schema\DataSourceField.ds.xml: 3ms
                === 2012-12-03 09:43:18,751 [ec-6] INFO  SQLDataSource - Deriving dataSource Customers from table: Customers
                === 2012-12-03 09:43:18,789 [ec-6] INFO  PoolManager - SmartClient pooling started for 'TestCaseData' objects
                === 2012-12-03 09:43:18,796 [ec-6] DEBUG PoolableSQLConnectionFactory - Initializing SQL config for 'TestCaseData' from system config - using DriverManager:  org.hsqldb.jdbcDriver
                === 2012-12-03 09:43:18,804 [ec-6] DEBUG PoolableSQLConnectionFactory - org.hsqldb.jdbcDriver lookup successful
                === 2012-12-03 09:43:18,804 [ec-6] DEBUG PoolableSQLConnectionFactory - DriverManager fetching connection for TestCaseData via jdbc url jdbc:hsqldb:hsql://localhost/isomorphic
                === 2012-12-03 09:43:18,805 [ec-6] DEBUG PoolableSQLConnectionFactory - Passing JDBC URL only to getConnection
                === 2012-12-03 09:43:18,939 [ec-6] DEBUG PoolableSQLConnectionFactory - makeObject() created a pooled Connection '218940734'
                === 2012-12-03 09:43:18,947 [ec-6] DEBUG SQLConnectionManager - Returning borrowed connection '218940734'
                === 2012-12-03 09:43:18,951 [ec-6] INFO  SQLDSGenerator - Fetching column metadata for table: Customers
                === 2012-12-03 09:43:18,951 [ec-6] INFO  SQLDSGenerator - =============Using catalog: PUBLIC
                === 2012-12-03 09:43:19,026 [ec-6] INFO  SQLDSGenerator - Fetching column metadata for Customers complete
                === 2012-12-03 09:43:19,035 [ec-6] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "218940734"
                === 2012-12-03 09:43:19,060 [ec-6] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\ds\Employees.ds.xml: 2ms
                === 2012-12-03 09:43:19,076 [ec-6] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\ds\Offices.ds.xml: 2ms
                === 2012-12-03 09:43:19,090 [ec-6] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\ds\OrderDetails.ds.xml: 2ms
                === 2012-12-03 09:43:19,103 [ec-6] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\ds\Orders.ds.xml: 2ms
                === 2012-12-03 09:43:19,125 [ec-6] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\ds\Payments.ds.xml: 2ms
                === 2012-12-03 09:43:19,137 [ec-6] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\ds\ProductLines.ds.xml: 2ms
                === 2012-12-03 09:43:19,145 [ec-6] INFO  SQLDataSource - Deriving dataSource ProductLines from table: ProductLines
                === 2012-12-03 09:43:19,148 [ec-6] DEBUG SQLConnectionManager - Returning borrowed connection '218940734'
                === 2012-12-03 09:43:19,149 [ec-6] INFO  SQLDSGenerator - Fetching column metadata for table: ProductLines
                === 2012-12-03 09:43:19,150 [ec-6] INFO  SQLDSGenerator - =============Using catalog: PUBLIC
                === 2012-12-03 09:43:19,176 [ec-6] INFO  SQLDSGenerator - Fetching column metadata for ProductLines complete
                === 2012-12-03 09:43:19,180 [ec-6] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "218940734"
                === 2012-12-03 09:43:19,193 [ec-6] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\ds\Products.ds.xml: 2ms
                === 2012-12-03 09:43:22,081 [ec-8] DEBUG IDACall - Header Name:Value pair: host:localhost:8080
                === 2012-12-03 09:43:22,081 [ec-8] DEBUG IDACall - Header Name:Value pair: user-agent:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
                === 2012-12-03 09:43:22,082 [ec-8] DEBUG IDACall - Header Name:Value pair: accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
                === 2012-12-03 09:43:22,083 [ec-8] DEBUG IDACall - Header Name:Value pair: accept-language:en-us,en;q=0.5
                === 2012-12-03 09:43:22,083 [ec-8] DEBUG IDACall - Header Name:Value pair: accept-encoding:gzip, deflate
                === 2012-12-03 09:43:22,084 [ec-8] DEBUG IDACall - Header Name:Value pair: connection:keep-alive
                === 2012-12-03 09:43:22,084 [ec-8] DEBUG IDACall - Header Name:Value pair: content-type:application/x-www-form-urlencoded; charset=UTF-8
                === 2012-12-03 09:43:22,085 [ec-8] DEBUG IDACall - Header Name:Value pair: referer:http://localhost:8080/testcase/
                === 2012-12-03 09:43:22,085 [ec-8] DEBUG IDACall - Header Name:Value pair: content-length:1020
                === 2012-12-03 09:43:22,086 [ec-8] DEBUG IDACall - Header Name:Value pair: cookie:JSESSIONID=53D92ECEABC0BAC4917301BDF3430D9B; GLog=%7B%0D%20%20%20%20left%3A1814%2C%20%0D%20%20%20%20top%3A142%2C%20%0D%20%20%20%20width%3A636%2C%20%0D%20%20%20%20height%3A478%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A4%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%0D%7D
                === 2012-12-03 09:43:22,087 [ec-8] DEBUG IDACall - Header Name:Value pair: pragma:no-cache
                === 2012-12-03 09:43:22,088 [ec-8] DEBUG IDACall - Header Name:Value pair: cache-control:no-cache
                === 2012-12-03 09:43:22,088 [ec-8] DEBUG IDACall - session exists: null
                === 2012-12-03 09:43:22,088 [ec-8] DEBUG IDACall - remote user: null
                === 2012-12-03 09:43:22,099 [ec-8] INFO  RequestContext - URL: '/testcase/TestCase/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1': Moz (Gecko) with Accept-Encoding header
                === 2012-12-03 09:43:22,113 [ec-8] DEBUG XML - Parsed XML from (in memory stream): 1ms
                === 2012-12-03 09:43:22,116 [ec-8] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\TestCase\sc\system\schema\List.ds.xml: 1ms
                === 2012-12-03 09:43:22,121 [ec-8] DEBUG RPCManager - Processing 1 requests.
                === 2012-12-03 09:43:22,133 [ec-8] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                    criteria:{
                    },
                    operationConfig:{
                        dataSource:"ProductLines",
                        operationType:"fetch",
                        textMatchStyle:"substring"
                    },
                    startRow:0,
                    endRow:75,
                    componentId:"isc_ListGrid_0",
                    appID:"builtinApplication",
                    operation:"ProductLines_fetch",
                    oldValues:{
                    }
                }
                === 2012-12-03 09:43:22,142 [ec-8] INFO  IDACall - Performing 1 operation(s)
                === 2012-12-03 09:43:22,143 [ec-8] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                === 2012-12-03 09:43:22,143 [ec-8] DEBUG DeclarativeSecurity - DataSource ProductLines is not in the pre-checked list, processing...
                === 2012-12-03 09:43:22,156 [ec-8] DEBUG AppBase - [builtinApplication.ProductLines_fetch] No userTypes defined, allowing anyone access to all operations for this application
                === 2012-12-03 09:43:22,157 [ec-8] DEBUG AppBase - [builtinApplication.ProductLines_fetch] No public zero-argument method named '_ProductLines_fetch' found, performing generic datasource operation
                === 2012-12-03 09:43:22,158 [ec-8] INFO  SQLDataSource - [builtinApplication.ProductLines_fetch] Performing fetch operation with
                	criteria: {}	values: {}
                === 2012-12-03 09:43:22,170 [ec-8] INFO  SQLWhereClause - [builtinApplication.ProductLines_fetch] empty condition
                === 2012-12-03 09:43:22,172 [ec-8] INFO  SQLDataSource - [builtinApplication.ProductLines_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                === 2012-12-03 09:43:22,291 [ec-8] DEBUG SQLDataSource - [builtinApplication.ProductLines_fetch] Executing row count query: SELECT COUNT(*) FROM $defaultTableClause WHERE $defaultWhereClause
                === 2012-12-03 09:43:22,292 [ec-8] DEBUG SQLDataSource - [builtinApplication.ProductLines_fetch] Eval'd row count query: SELECT COUNT(*) FROM PUBLIC.ProductLines WHERE ('1'='1')
                === 2012-12-03 09:43:22,293 [ec-8] DEBUG SQLConnectionManager - [builtinApplication.ProductLines_fetch] Returning borrowed connection '218940734'
                === 2012-12-03 09:43:22,293 [ec-8] DEBUG SQLDriver - [builtinApplication.ProductLines_fetch] About to execute SQL query in 'TestCaseData' using connection '218940734'
                === 2012-12-03 09:43:22,294 [ec-8] INFO  SQLDriver - [builtinApplication.ProductLines_fetch] Executing SQL query on 'TestCaseData': SELECT COUNT(*) FROM PUBLIC.ProductLines WHERE ('1'='1')
                === 2012-12-03 09:43:22,298 [ec-8] DEBUG SQLDataSource - [builtinApplication.ProductLines_fetch] Using SQL Limit query
                === 2012-12-03 09:43:22,299 [ec-8] DEBUG SQLDataSource - [builtinApplication.ProductLines_fetch] SQL windowed select rows 0->75, result size 75. Query: SELECT LIMIT 0 75  ProductLines.HTMLDESCRIPTION, ProductLines.IMAGE, ProductLines.IMAGE_DATE_CREATED, ProductLines.IMAGE_FILENAME, ProductLines.IMAGE_FILESIZE, ProductLines.PRODUCTLINE, ProductLines.TEXTDESCRIPTION FROM PUBLIC.ProductLines WHERE ('1'='1')
                === 2012-12-03 09:43:22,299 [ec-8] DEBUG SQLConnectionManager - [builtinApplication.ProductLines_fetch] Returning borrowed connection '218940734'
                === 2012-12-03 09:43:22,313 [ec-8] INFO  DSResponse - [builtinApplication.ProductLines_fetch] DSResponse: List with 7 items
                === 2012-12-03 09:43:22,313 [ec-8] DEBUG SQLConnectionManager - [builtinApplication.ProductLines_fetch] About to close PoolableConnection with hashcode "218940734"
                === 2012-12-03 09:43:22,314 [ec-8] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                === 2012-12-03 09:43:22,316 [ec-8] DEBUG RPCManager - non-DMI response, dropExtraFields: false
                === 2012-12-03 09:43:22,365 [ec-8] DEBUG SQLTransaction - Returning transactional connection for TestCaseData (connection is null)
                === 2012-12-03 09:43:22,365 [ec-8] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "218940734"
                === 2012-12-03 09:43:35,480 [ec-7] DEBUG IDACall - Header Name:Value pair: host:localhost:8080
                === 2012-12-03 09:43:35,481 [ec-7] DEBUG IDACall - Header Name:Value pair: user-agent:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
                === 2012-12-03 09:43:35,481 [ec-7] DEBUG IDACall - Header Name:Value pair: accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
                === 2012-12-03 09:43:35,482 [ec-7] DEBUG IDACall - Header Name:Value pair: accept-language:en-us,en;q=0.5
                === 2012-12-03 09:43:35,483 [ec-7] DEBUG IDACall - Header Name:Value pair: accept-encoding:gzip, deflate
                === 2012-12-03 09:43:35,483 [ec-7] DEBUG IDACall - Header Name:Value pair: connection:keep-alive
                === 2012-12-03 09:43:35,483 [ec-7] DEBUG IDACall - Header Name:Value pair: content-type:application/x-www-form-urlencoded; charset=UTF-8
                === 2012-12-03 09:43:35,484 [ec-7] DEBUG IDACall - Header Name:Value pair: referer:http://localhost:8080/testcase/TestCase/sc/system/helpers/Log.html
                === 2012-12-03 09:43:35,484 [ec-7] DEBUG IDACall - Header Name:Value pair: content-length:677
                === 2012-12-03 09:43:35,485 [ec-7] DEBUG IDACall - Header Name:Value pair: cookie:JSESSIONID=AE6B5398A06AC1496E9C11888CFBD2AA; GLog=%7B%0D%20%20%20%20left%3A1814%2C%20%0D%20%20%20%20top%3A142%2C%20%0D%20%20%20%20width%3A636%2C%20%0D%20%20%20%20height%3A478%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A4%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%0D%7D
                === 2012-12-03 09:43:35,486 [ec-7] DEBUG IDACall - Header Name:Value pair: pragma:no-cache
                === 2012-12-03 09:43:35,486 [ec-7] DEBUG IDACall - Header Name:Value pair: cache-control:no-cache
                === 2012-12-03 09:43:35,487 [ec-7] DEBUG IDACall - session exists: AE6B5398A06AC1496E9C11888CFBD2AA
                === 2012-12-03 09:43:35,488 [ec-7] DEBUG IDACall - remote user: null
                === 2012-12-03 09:43:35,488 [ec-7] INFO  RequestContext - URL: '/testcase/TestCase/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1': Moz (Gecko) with Accept-Encoding header
                === 2012-12-03 09:43:35,490 [ec-7] DEBUG XML - Parsed XML from (in memory stream): 1ms
                === 2012-12-03 09:43:35,492 [ec-7] DEBUG RPCManager - Processing 1 requests.
                === 2012-12-03 09:43:35,493 [ec-7] DEBUG RPCManager - Request #1 (RPCRequest) data: {
                    appID:"isc_builtin",
                    className:"builtin",
                    methodName:"getAvailableScriptEngines",
                    arguments:[
                    ],
                    is_ISC_RPC_DMI:true
                }
                === 2012-12-03 09:43:35,493 [ec-7] INFO  IDACall - Performing 1 operation(s)
                === 2012-12-03 09:43:35,505 [ec-7] DEBUG XML - Parsed XML from jar:file:/C:/Development/apache-tomcat-7.0.27/webapps/testcase/WEB-INF/lib/isomorphic-core-rpc-3.1.p20121129.jar!/isc_builtin.app.xml: 4ms
                === 2012-12-03 09:43:35,507 [ec-7] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\TestCase\sc\system\schema\Application.ds.xml: 1ms
                === 2012-12-03 09:43:35,512 [ec-7] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\TestCase\sc\system\schema\ServerObject.ds.xml: 1ms
                === 2012-12-03 09:43:35,517 [ec-7] DEBUG XML - Parsed XML from C:\Development\apache-tomcat-7.0.27\webapps\testcase\TestCase\sc\system\schema\Method.ds.xml: 1ms
                === 2012-12-03 09:43:35,524 [ec-7] DEBUG RPCDMI - appConfig: isc.Application.create({
                    rpcBindings:[
                        {
                            ID:"builtin",
                            className:"com.isomorphic.rpc.BuiltinRPC",
                            visibleMethods:[
                                {
                                    name:"downloadWSDL"
                                },
                                {
                                    name:"downloadClientContent"
                                },
                                {
                                    name:"downloadClientExport"
                                },
                                {
                                    name:"xmlToJS"
                                },
                                {
                                    name:"uploadProgressCheck"
                                },
                                {
                                    name:"saveFile"
                                },
                                {
                                    name:"appendToFile"
                                },
                                {
                                    name:"loadFile"
                                },
                                {
                                    name:"deleteFile"
                                },
                                {
                                    name:"loadSharedXML"
                                },
                                {
                                    name:"saveSharedXML"
                                },
                                {
                                    name:"getAvailableScriptEngines"
                                },
                                {
                                    name:"devConsoleEvalServerScript"
                                },
                                {
                                    name:"evalJava"
                                },
                                {
                                    name:"getLogNames"
                                },
                                {
                                    name:"getLogEntries"
                                },
                                {
                                    name:"getLogThresholds"
                                },
                                {
                                    name:"setLogThreshold"
                                },
                                {
                                    name:"getPdfObject"
                                }
                            ]
                        },
                        {
                            ID:"builtin_tools",
                            className:"com.isomorphic.tools.BuiltinRPC",
                            visibleMethods:[
                                {
                                    name:"getDataSourceFromTable"
                                },
                                {
                                    name:"getDataSourceJSONFromTable"
                                },
                                {
                                    name:"getDataSourceFromHibernateMapping"
                                },
                                {
                                    name:"getDataSourceJSONFromHibernateMapping"
                                },
                                {
                                    name:"getTables"
                                },
                                {
                                    name:"getFieldsFromTable"
                                },
                                {
                                    name:"getBeanFields"
                                },
                                {
                                    name:"getHibernateBeans"
                                },
                                {
                                    name:"getDatabaseProductNameAndVersion"
                                },
                                {
                                    name:"getDatabaseTableTypes"
                                },
                                {
                                    name:"setAttributes"
                                },
                                {
                                    name:"clearAttributes"
                                },
                                {
                                    name:"getAttributes"
                                },
                                {
                                    name:"getAttribute"
                                },
                                {
                                    name:"getDataSourceConfigFromJavaClass"
                                },
                                {
                                    args:"cName",
                                    language:"groovy",
                                    name:"getJavaSource",
                                    script:"\n                    if (!com.isomorphic.auth.DevModeAuthFilter.devModeAuthorized(request)) throw new Exception(\"Not Authorized\");                    \n                    //import org.apache.bcel.Repository;\n\n                    try {\n                        return org.apache.bcel.Repository.lookupClass(cName).toString();\n                    } catch (Throwable e) {\n                        return \"Unable to reverse engineer class \"+cName+\": \"+e.getMessage();\n                    }\n                "
                                },
                                {
                                    name:"loadDataSource"
                                },
                                {
                                    name:"dsFromXML"
                                },
                                {
                                    name:"dsConfigFromXML"
                                },
                                {
                                    name:"getDefinedDataSources"
                                }
                            ]
                        },
                        {
                            ID:"builtin_adminconsole",
                            className:"com.isomorphic.tools.AdminConsole",
                            visibleMethods:[
                                {
                                    name:"getDefinedDatabases"
                                },
                                {
                                    name:"testDB"
                                },
                                {
                                    name:"saveDBConfig"
                                },
                                {
                                    name:"setDefaultDB"
                                },
                                {
                                    name:"importDataSources"
                                },
                                {
                                    name:"discoverJNDIDatabases"
                                }
                            ]
                        }
                    ]
                })
                
                === 2012-12-03 09:43:35,537 [ec-7] DEBUG RPCDMI - rpc returned data
                === 2012-12-03 09:43:35,538 [ec-7] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                === 2012-12-03 09:45:27,545 [ec-6] DEBUG IDACall - Header Name:Value pair: host:localhost:8080
                === 2012-12-03 09:45:27,545 [ec-6] DEBUG IDACall - Header Name:Value pair: user-agent:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
                === 2012-12-03 09:45:27,546 [ec-6] DEBUG IDACall - Header Name:Value pair: accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
                === 2012-12-03 09:45:27,546 [ec-6] DEBUG IDACall - Header Name:Value pair: accept-language:en-us,en;q=0.5
                === 2012-12-03 09:45:27,546 [ec-6] DEBUG IDACall - Header Name:Value pair: accept-encoding:gzip, deflate
                === 2012-12-03 09:45:27,546 [ec-6] DEBUG IDACall - Header Name:Value pair: connection:keep-alive
                === 2012-12-03 09:45:27,546 [ec-6] DEBUG IDACall - Header Name:Value pair: referer:http://localhost:8080/testcase/
                === 2012-12-03 09:45:27,546 [ec-6] DEBUG IDACall - Header Name:Value pair: cookie:JSESSIONID=AE6B5398A06AC1496E9C11888CFBD2AA; GLog=%7B%0D%20%20%20%20left%3A1814%2C%20%0D%20%20%20%20top%3A142%2C%20%0D%20%20%20%20width%3A634%2C%20%0D%20%20%20%20height%3A477%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A4%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%0D%7D
                === 2012-12-03 09:45:27,547 [ec-6] DEBUG IDACall - Header Name:Value pair: content-type:application/x-www-form-urlencoded
                === 2012-12-03 09:45:27,547 [ec-6] DEBUG IDACall - Header Name:Value pair: content-length:1506
                === 2012-12-03 09:45:27,547 [ec-6] DEBUG IDACall - session exists: AE6B5398A06AC1496E9C11888CFBD2AA
                === 2012-12-03 09:45:27,547 [ec-6] DEBUG IDACall - remote user: null
                === 2012-12-03 09:45:27,548 [ec-6] INFO  RequestContext - URL: '/testcase/TestCase/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1': Moz (Gecko) with Accept-Encoding header
                === 2012-12-03 09:45:27,550 [ec-6] DEBUG XML - Parsed XML from (in memory stream): 1ms
                === 2012-12-03 09:45:27,553 [ec-6] DEBUG RPCManager - Processing 1 requests.
                === 2012-12-03 09:45:27,555 [ec-6] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                    criteria:{
                        PRODUCTLINE:"Classic Cars",
                        download_fieldname:"IMAGE"
                    },
                    operationConfig:{
                        dataSource:"ProductLines",
                        operationType:"downloadFile"
                    },
                    appID:"builtinApplication",
                    operation:"ProductLines_downloadFile",
                    oldValues:{
                        PRODUCTLINE:"Classic Cars",
                        download_fieldname:"IMAGE"
                    }
                }
                === 2012-12-03 09:45:27,555 [ec-6] INFO  IDACall - Performing 1 operation(s)
                === 2012-12-03 09:45:27,556 [ec-6] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                === 2012-12-03 09:45:27,556 [ec-6] DEBUG DeclarativeSecurity - DataSource ProductLines is not in the pre-checked list, processing...
                === 2012-12-03 09:45:27,557 [ec-6] DEBUG AppBase - [builtinApplication.ProductLines_downloadFile] No userTypes defined, allowing anyone access to all operations for this application
                === 2012-12-03 09:45:27,557 [ec-6] DEBUG AppBase - [builtinApplication.ProductLines_downloadFile] No public zero-argument method named '_ProductLines_downloadFile' found, performing generic datasource operation
                === 2012-12-03 09:45:27,568 [ec-6] DEBUG DeclarativeSecurity - [builtinApplication.ProductLines_downloadFile] Processing security checks for DataSource null, field null
                === 2012-12-03 09:45:27,568 [ec-6] DEBUG DeclarativeSecurity - [builtinApplication.ProductLines_downloadFile] DataSource ProductLines is not in the pre-checked list, processing...
                === 2012-12-03 09:45:27,569 [ec-6] DEBUG AppBase - [builtinApplication.ProductLines_downloadFile, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
                === 2012-12-03 09:45:27,569 [ec-6] DEBUG AppBase - [builtinApplication.ProductLines_downloadFile, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
                === 2012-12-03 09:45:27,569 [ec-6] INFO  SQLDataSource - [builtinApplication.ProductLines_downloadFile, builtinApplication.null] Performing fetch operation with
                	criteria: {PRODUCTLINE:"Classic Cars",download_fieldname:"IMAGE"}	values: {PRODUCTLINE:"Classic Cars",download_fieldname:"IMAGE"}
                === 2012-12-03 09:45:27,572 [ec-6] INFO  SQLDataSource - [builtinApplication.ProductLines_downloadFile, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                === 2012-12-03 09:45:27,572 [ec-6] INFO  SQLDataSource - [builtinApplication.ProductLines_downloadFile, builtinApplication.null] Executing SQL query on 'TestCaseData': SELECT ProductLines.HTMLDESCRIPTION, ProductLines.IMAGE, ProductLines.IMAGE_DATE_CREATED, ProductLines.IMAGE_FILENAME, ProductLines.IMAGE_FILESIZE, ProductLines.PRODUCTLINE, ProductLines.TEXTDESCRIPTION FROM PUBLIC.ProductLines WHERE (ProductLines.PRODUCTLINE='Classic Cars')
                === 2012-12-03 09:45:27,573 [ec-6] DEBUG SQLConnectionManager - [builtinApplication.ProductLines_downloadFile, builtinApplication.null] Returning borrowed connection '218940734'
                === 2012-12-03 09:45:27,573 [ec-6] DEBUG SQLDriver - [builtinApplication.ProductLines_downloadFile, builtinApplication.null] About to execute SQL query in 'TestCaseData' using connection '218940734'
                === 2012-12-03 09:45:27,574 [ec-6] INFO  SQLDriver - [builtinApplication.ProductLines_downloadFile, builtinApplication.null] Executing SQL query on 'TestCaseData': SELECT ProductLines.HTMLDESCRIPTION, ProductLines.IMAGE, ProductLines.IMAGE_DATE_CREATED, ProductLines.IMAGE_FILENAME, ProductLines.IMAGE_FILESIZE, ProductLines.PRODUCTLINE, ProductLines.TEXTDESCRIPTION FROM PUBLIC.ProductLines WHERE (ProductLines.PRODUCTLINE='Classic Cars')
                === 2012-12-03 09:45:27,576 [ec-6] INFO  DSResponse - [builtinApplication.ProductLines_downloadFile, builtinApplication.null] DSResponse: List with 1 items
                === 2012-12-03 09:45:27,576 [ec-6] INFO  DSResponse - [builtinApplication.ProductLines_downloadFile] DSResponse: Map with 7 keys
                === 2012-12-03 09:45:27,579 [ec-6] DEBUG SQLTransaction - Returning transactional connection for TestCaseData (connection is null)
                === 2012-12-03 09:45:27,580 [ec-6] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "218940734"
                === 2012-12-03 09:45:27,581 [ec-6] DEBUG SQLTransaction - Returning transactional connection for TestCaseData (connection is null)
                === 2012-12-03 09:45:34,782 [ec-5] DEBUG IDACall - Header Name:Value pair: host:localhost:8080
                === 2012-12-03 09:45:34,783 [ec-5] DEBUG IDACall - Header Name:Value pair: user-agent:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
                === 2012-12-03 09:45:34,783 [ec-5] DEBUG IDACall - Header Name:Value pair: accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
                === 2012-12-03 09:45:34,783 [ec-5] DEBUG IDACall - Header Name:Value pair: accept-language:en-us,en;q=0.5
                === 2012-12-03 09:45:34,783 [ec-5] DEBUG IDACall - Header Name:Value pair: accept-encoding:gzip, deflate
                === 2012-12-03 09:45:34,784 [ec-5] DEBUG IDACall - Header Name:Value pair: connection:keep-alive
                === 2012-12-03 09:45:34,784 [ec-5] DEBUG IDACall - Header Name:Value pair: referer:http://localhost:8080/testcase/
                === 2012-12-03 09:45:34,784 [ec-5] DEBUG IDACall - Header Name:Value pair: cookie:JSESSIONID=AE6B5398A06AC1496E9C11888CFBD2AA; GLog=%7B%0D%20%20%20%20left%3A1814%2C%20%0D%20%20%20%20top%3A142%2C%20%0D%20%20%20%20width%3A634%2C%20%0D%20%20%20%20height%3A477%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A4%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%0D%7D
                === 2012-12-03 09:45:34,784 [ec-5] DEBUG IDACall - Header Name:Value pair: content-type:application/x-www-form-urlencoded
                === 2012-12-03 09:45:34,784 [ec-5] DEBUG IDACall - Header Name:Value pair: content-length:1506
                === 2012-12-03 09:45:34,785 [ec-5] DEBUG IDACall - session exists: AE6B5398A06AC1496E9C11888CFBD2AA
                === 2012-12-03 09:45:34,785 [ec-5] DEBUG IDACall - remote user: null
                === 2012-12-03 09:45:34,785 [ec-5] INFO  RequestContext - URL: '/testcase/TestCase/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1': Moz (Gecko) with Accept-Encoding header
                === 2012-12-03 09:45:34,793 [ec-5] DEBUG XML - Parsed XML from (in memory stream): 5ms
                === 2012-12-03 09:45:34,794 [ec-5] DEBUG RPCManager - Processing 1 requests.
                === 2012-12-03 09:45:34,796 [ec-5] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                    criteria:{
                        PRODUCTLINE:"Classic Cars",
                        download_fieldname:"IMAGE"
                    },
                    operationConfig:{
                        dataSource:"ProductLines",
                        operationType:"viewFile"
                    },
                    appID:"builtinApplication",
                    operation:"ProductLines_viewFile",
                    oldValues:{
                        PRODUCTLINE:"Classic Cars",
                        download_fieldname:"IMAGE"
                    }
                }
                === 2012-12-03 09:45:34,797 [ec-5] INFO  IDACall - Performing 1 operation(s)
                === 2012-12-03 09:45:34,797 [ec-5] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                === 2012-12-03 09:45:34,797 [ec-5] DEBUG DeclarativeSecurity - DataSource ProductLines is not in the pre-checked list, processing...
                === 2012-12-03 09:45:34,797 [ec-5] DEBUG AppBase - [builtinApplication.ProductLines_viewFile] No userTypes defined, allowing anyone access to all operations for this application
                === 2012-12-03 09:45:34,797 [ec-5] DEBUG AppBase - [builtinApplication.ProductLines_viewFile] No public zero-argument method named '_ProductLines_viewFile' found, performing generic datasource operation
                === 2012-12-03 09:45:34,799 [ec-5] DEBUG DeclarativeSecurity - [builtinApplication.ProductLines_viewFile] Processing security checks for DataSource null, field null
                === 2012-12-03 09:45:34,800 [ec-5] DEBUG DeclarativeSecurity - [builtinApplication.ProductLines_viewFile] DataSource ProductLines is not in the pre-checked list, processing...
                === 2012-12-03 09:45:34,800 [ec-5] DEBUG AppBase - [builtinApplication.ProductLines_viewFile, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
                === 2012-12-03 09:45:34,800 [ec-5] DEBUG AppBase - [builtinApplication.ProductLines_viewFile, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
                === 2012-12-03 09:45:34,801 [ec-5] INFO  SQLDataSource - [builtinApplication.ProductLines_viewFile, builtinApplication.null] Performing fetch operation with
                	criteria: {PRODUCTLINE:"Classic Cars",download_fieldname:"IMAGE"}	values: {PRODUCTLINE:"Classic Cars",download_fieldname:"IMAGE"}
                === 2012-12-03 09:45:34,802 [ec-5] INFO  SQLDataSource - [builtinApplication.ProductLines_viewFile, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                === 2012-12-03 09:45:34,803 [ec-5] INFO  SQLDataSource - [builtinApplication.ProductLines_viewFile, builtinApplication.null] Executing SQL query on 'TestCaseData': SELECT ProductLines.HTMLDESCRIPTION, ProductLines.IMAGE, ProductLines.IMAGE_DATE_CREATED, ProductLines.IMAGE_FILENAME, ProductLines.IMAGE_FILESIZE, ProductLines.PRODUCTLINE, ProductLines.TEXTDESCRIPTION FROM PUBLIC.ProductLines WHERE (ProductLines.PRODUCTLINE='Classic Cars')
                === 2012-12-03 09:45:34,803 [ec-5] DEBUG SQLConnectionManager - [builtinApplication.ProductLines_viewFile, builtinApplication.null] Returning borrowed connection '218940734'
                === 2012-12-03 09:45:34,803 [ec-5] DEBUG SQLDriver - [builtinApplication.ProductLines_viewFile, builtinApplication.null] About to execute SQL query in 'TestCaseData' using connection '218940734'
                === 2012-12-03 09:45:34,804 [ec-5] INFO  SQLDriver - [builtinApplication.ProductLines_viewFile, builtinApplication.null] Executing SQL query on 'TestCaseData': SELECT ProductLines.HTMLDESCRIPTION, ProductLines.IMAGE, ProductLines.IMAGE_DATE_CREATED, ProductLines.IMAGE_FILENAME, ProductLines.IMAGE_FILESIZE, ProductLines.PRODUCTLINE, ProductLines.TEXTDESCRIPTION FROM PUBLIC.ProductLines WHERE (ProductLines.PRODUCTLINE='Classic Cars')
                === 2012-12-03 09:45:34,807 [ec-5] INFO  DSResponse - [builtinApplication.ProductLines_viewFile, builtinApplication.null] DSResponse: List with 1 items
                === 2012-12-03 09:45:34,808 [ec-5] INFO  DSResponse - [builtinApplication.ProductLines_viewFile] DSResponse: Map with 7 keys
                === 2012-12-03 09:45:34,813 [ec-5] DEBUG SQLTransaction - Returning transactional connection for TestCaseData (connection is null)
                === 2012-12-03 09:45:34,817 [ec-5] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "218940734"
                === 2012-12-03 09:45:34,817 [ec-5] DEBUG SQLTransaction - Returning transactional connection for TestCaseData (connection is null)
                DSResponse for initial fetch
                Code:
                [
                    {
                        data:[
                            {
                                IMAGE_FILESIZE:5184, 
                                HTMLDESCRIPTION:"<html><h4><font face=\"Verdana\">Classic Cars</font></h4><p><span style=\"font-family: Times New Roman\">Attention car enthusiasts: Make your wildest car ownership dreams come true. Whether you are looking for <i><b>classic muscle cars</b></i>, <i><b>dream sports cars</b></i> or <i><b>movie-inspired miniatures</b></i> </span><font face=\"Times New Roman\">from the early</font> <b><font face=\"Arial\" size=\"2\">1940s</font></b> <font face=\"Times New Roman\">through the</font> <b><font face=\"Arial\" size=\"2\">1980s </font></b><span style=\"font-family: Times New Roman\">you will find great choices in this category. These replicas feature superb attention to detail and craftsmanship and offer features such as working steering system, opening forward compartment, opening rear trunk with removable spare wheel, 4-wheel independent spring suspension, and so on.<span style=\"color:black\"> The models range in size from</span><b><font face=\"Arial\" size=\"2\">1:10</font></b><span style=\"font-family: Times New Roman\"> to </span><b><font face=\"Arial\" size=\"2\">1:24</font></b><span style=\"font-family: Times New Roman\"> scale and include numerous <i><b>limited edition</b></i> and several <i><b>out-of-production vehicles</b></i>.</span></span><span style=\"font-family: Times New Roman\"><span style=\"color:#111111\"></span></span> <font face=\"Times New Roman\">All models include a<i><b>certificate of authenticity</b></i> from their manufacturers and <i><b>come fully assembled</b></i> and ready for display in the home or office. Prices range from </font><b> <font face=\"Arial\" size=\"2\" color=\"#009933\">$35</font></b><font face=\"Times New Roman\"> to </font><b><font size=\"2\" face=\"Arial\" color=\"#009933\">$220</font></b><font face=\"Times New Roman\">.</font></p><font face=\"Times New Roman\"><u><b>Additional Information</b></u></font><ul>\t<li><font face=\"Times New Roman\">No Toxic Materials</font></li>\t<li><font face=\"Times New Roman\">Monogram Service Available</font></li>\t<li><font face=\"Times New Roman\">Suitable for Children Above 7 Years of Age</font></li>\t<li><font color=\"#FF0000\" face=\"Times New Roman\"><i><b>45 Day Money Back Guarantee</b></i></font></li></ul></html>", 
                                IMAGE_FILENAME:"classiccars.jpg", 
                                PRODUCTLINE:"Classic Cars", 
                                TEXTDESCRIPTION:"Attention car enthusiasts: Make your wildest car ownership dreams come true. Whether you are looking for classic muscle cars, dream sports cars or movie-inspired miniatures, you will find great choices in this category. These replicas feature superb attention to detail and craftsmanship and offer features such as working steering system, opening forward compartment, opening rear trunk with removable spare wheel, 4-wheel independent spring suspension, and so on. The models range in size from 1:10 to 1:24 scale and include numerous limited edition and several out-of-production vehicles. All models include a certificate of authenticity from their manufacturers and come fully assembled and ready for display in the home or office.", 
                                IMAGE_DATE_CREATED:new Date(1354474800000)
                            }, 
                            {
                                IMAGE_FILESIZE:43538, 
                                HTMLDESCRIPTION:"<html><h4><font face=\"Verdana\">Motorcycles</font></h4><p><span style=\"font-family: Times New Roman; color: black\">Our motorcycles are state of the art replicas of classic as well as contemporary motorcycle legends such as <i><b>Harley Davidson</b></i>, <i><b>Ducati</b></i> and <i><b>Vespa</b></i>.</span><span style=\"font-family: Times New Roman\">Models contain stunning details such as official logos, rotating wheels, working kickstand, front suspension, gear-shift lever, footbrake lever, and drive chain.<span style=\"color:#111111\">M</span>aterials used include <i><b>diecast</b></i> and <i><b>plastic</b></i>. <span style=\"color:black\">The models range in size from </span></span><span style=\"color:black\"><b><font face=\"Arial\" size=\"2\">1:10</font></b><span style=\"font-family: Times New Roman\"> to </span><b><font face=\"Arial\" size=\"2\">1:50</font></b><span style=\"font-family: Times New Roman\"> scale and include numerous <i><b>limited edition</b></i> and several <i><b>out-of-production vehicles</b></i>. </span></span><span style=\"font-family: Times New Roman\">All models come<span style=\"color:black\"><i><b>fully assembled</b></i> and ready for display in the home or office. Most include a <i><b>certificate of authenticity</b></i>.</span></span></p><font face=\"Times New Roman\"><u><b>Additional Information</b></u></font><ul>\t<li><font face=\"Times New Roman\">No Toxic Materials</font></li>\t<li><font face=\"Times New Roman\">Monogram Service Available</font></li>\t<li><font face=\"Times New Roman\">Batteries Not Required</font></li>\t<li><font color=\"#FF0000\" face=\"Times New Roman\"><i><b>90 Day Money Back Guarantee</b></i></font></li></ul></html>", 
                                IMAGE_FILENAME:"motorcycles.jpg", 
                                PRODUCTLINE:"Motorcycles", 
                                TEXTDESCRIPTION:"Our motorcycles are state of the art replicas of classic as well as contemporary motorcycle legends such as Harley Davidson, Ducati and Vespa. Models contain stunning details such as official logos, rotating wheels, working kickstand, front suspension, gear-shift lever, footbrake lever, and drive chain. Materials used include diecast and plastic. The models range in size from 1:10 to 1:50 scale and include numerous limited edition and several out-of-production vehicles. All models come fully assembled and ready for display in the home or office. Most include a certificate of authenticity.", 
                                IMAGE_DATE_CREATED:new Date(1354474800000)
                            }, 
                            {
                                IMAGE_FILESIZE:32737, 
                                HTMLDESCRIPTION:"<html><h4><font face=\"Verdana\">Planes</font></h4><p><span style=\"font-family: Times New Roman\">Unique, <i><b>diecast</b></i> airplane and helicopter replicas suitable for collections, as well as home, office or classroom decorations. Models contain stunning details such as official logos and insignias, rotating jet engines and propellers, retractable wheels, and so on. Most come <span style=\"color:black\"><b><i>fully assembled</i></b> and with a <i><b>certificate of authenticity</b></i> from their manufacturers.</span></span><span style=\"font-size: 10.0pt; font-family: Arial\"></span></p><font face=\"Times New Roman\"><u><b>Additional Information</b></u></font><ul>\t<li><font face=\"Times New Roman\">No Toxic Materials</font></li>\t<li><font face=\"Times New Roman\">Monogram Service Available</font></li>\t<li><font face=\"Times New Roman\">Repair Kits Available</font></li>\t<li><font color=\"#FF0000\" face=\"Times New Roman\"><i><b>180 Day Money Back Guarantee</b></i></font></li></ul></html>", 
                                IMAGE_FILENAME:"planes.jpg", 
                                PRODUCTLINE:"Planes", 
                                TEXTDESCRIPTION:"Unique, diecast airplane and helicopter replicas suitable for collections, as well as home, office or classroom decorations. Models contain stunning details such as official logos and insignias, rotating jet engines and propellers, retractable wheels, and so on. Most come fully assembled and with a certificate of authenticity from their manufacturers.", 
                                IMAGE_DATE_CREATED:new Date(1354474800000)
                            }, 
                            {
                                IMAGE_FILESIZE:39402, 
                                HTMLDESCRIPTION:"<html><h4><font face=\"Verdana\">Ships</font></h4><p><font face=\"Times New Roman\">The perfect holiday or anniversary gift for executives, clients, friends, and family. These <i><b>handcrafted</b></i> model ships are unique, stunning works of art that will be treasured for generations! They come <span style=\"color:black\"><i><b>fully assembled</b></i> and ready for display in the home or office.</span> We guarantee the highest quality, and best value.</font><span style=\"font-size:10.0pt;font-family:Arial\"> </span></p><font face=\"Times New Roman\"><u><b>Additional Information</b></u></font><ul>\t<li><font face=\"Times New Roman\">No Toxic Materials</font></li>\t<li><font face=\"Times New Roman\">Monogram Service Available</font></li>\t<li><font face=\"Times New Roman\">Not Suitable for Children</font></li>\t<li><font face=\"Times New Roman\">Repair Kits Available</font></li>\t<li><font color=\"#FF0000\" face=\"Times New Roman\"><i><b>90 Day Money Back Guarantee</b></i></font></li></ul></html>", 
                                IMAGE_FILENAME:"ships.jpg", 
                                PRODUCTLINE:"Ships", 
                                TEXTDESCRIPTION:"The perfect holiday or anniversary gift for executives, clients, friends, and family. These handcrafted model ships are unique, stunning works of art that will be treasured for generations! They come fully assembled and ready for display in the home or office. We guarantee the highest quality, and best value.", 
                                IMAGE_DATE_CREATED:new Date(1354474800000)
                            }, 
                            {
                                IMAGE_FILESIZE:45265, 
                                HTMLDESCRIPTION:"<html><h4><font face=\"Verdana\">Trains</font></h4><p><span style=\"font-family: Times New Roman\">Model trains are a rewarding hobby for enthusiasts of all ages. Whether you're looking for collectible <i><b>wooden trains</b></i>, <i><b>electric streetcars</b></i> or <i><b>locomotives</b></i>, you'll find a number of great choices for any budget within this category. The interactive aspect of trains makes toy trains perfect for young children. The wooden train sets are ideal for children under the age of 5.</span></p><font face=\"Times New Roman\"><u><b>Additional Information</b></u></font><ul>\t<li><font face=\"Times New Roman\">No Toxic Materials</font></li>\t<li><font face=\"Times New Roman\">Monogram Service Available</font></li>\t<li><font face=\"Times New Roman\">Some models require AA bateries</font></li>\t<li><font color=\"#FF0000\" face=\"Times New Roman\"><i><b>30 Day Money Back Guarantee</b></i></font></li></ul></html>", 
                                IMAGE_FILENAME:"trains.jpg", 
                                PRODUCTLINE:"Trains", 
                                TEXTDESCRIPTION:"Model trains are a rewarding hobby for enthusiasts of all ages. Whether you're looking for collectible wooden trains, electric streetcars or locomotives, you'll find a number of great choices for any budget within this category. The interactive aspect of trains makes toy trains perfect for young children. The wooden train sets are ideal for children under the age of 5.", 
                                IMAGE_DATE_CREATED:new Date(1354474800000)
                            }, 
                            {
                                IMAGE_FILESIZE:42819, 
                                HTMLDESCRIPTION:"<html><h4><font face=\"\"Verdana\"\">Trucks and Buses</font></h4><p><span style=\"\"font-family: Times New Roman; color: black\"\">The Truck and Bus models are realistic replicas of buses and specialized trucks produced from the early </span><font face=\"\"Arial\"\" size=\"\"2\"\"><span style=\"\"color: black; font-weight: 700\"\">1920s</span></font><span style=\"\"font-family: Times New Roman; color: black\"\"> to present. The models range in size from </span><font face=\"\"Arial\"\" size=\"\"2\"\"><span style=\"\"color: black; font-weight: 700\"\">1:12</span></font><span style=\"\"font-family: Times New Roman; color: black\"\"> to </span><font face=\"\"Arial\"\" size=\"\"2\"\"><span style=\"\"color: black; font-weight: 700\"\">1:50</span></font><span style=\"\"font-family: Times New Roman; color: black\"\"> scale and include numerous <i><b>limited edition</b></i> and several <i><b>out-of-production vehicles</b></i>.</span><span style=\"\"font-family: Times New Roman; color: #111111\"\"> M</span><span style=\"\"font-family: Times New Roman\"\">aterials used include <i><b>tin, diecast and plastic</b></i>. <span style=\"\"color:#111111\"\">All models include a <i><b>certificate of authenticity</b></i> from their manufacturers and are a perfect ornament for the home and office.</span></span></p><font face=\"\"Times New Roman\"\"><u><b>Additional Information</b></u></font><ul>\t<li><font face=\"\"Times New Roman\"\">No Toxic Materials</font></li>\t<li><font face=\"\"Times New Roman\"\">Monogram Service Available</font></li>\t<li><font face=\"\"Times New Roman\"\">Suitable for Children Above 9 Years of Age</font></li>\t<li><font color=\"\"#FF0000\"\" face=\"\"Times New Roman\"\"><i><b>30 Day Money Back Guarantee</b></i></font></li></ul><p>&nbsp;</p></html>", 
                                IMAGE_FILENAME:"trucksbuses.jpg", 
                                PRODUCTLINE:"Trucks and Buses", 
                                TEXTDESCRIPTION:"The Truck and Bus models are realistic replicas of buses and specialized trucks produced from the early 1920s to present. The models range in size from 1:12 to 1:50 scale and include numerous limited edition and several out-of-production vehicles. Materials used include tin, diecast and plastic. All models include a certificate of authenticity from their manufacturers and are a perfect ornament for the home and office.", 
                                IMAGE_DATE_CREATED:new Date(1354474800000)
                            }, 
                            {
                                IMAGE_FILESIZE:40023, 
                                HTMLDESCRIPTION:"<html><h4><font face=\"Verdana\">Vintage Cars</font></h4><p><font face=\"Times New Roman\">Our Vintage Car models realistically portray automobiles produced from the early</font> <b><font face=\"Arial\" size=\"2\">1900s</font></b> <font face=\"Times New Roman\">through the</font> <b><font face=\"Arial\" size=\"2\">1940s</font></b>.<font face=\"Times New Roman\"> Materials used include <i><b>Bakelite<sup>®</sup>, diecast, plastic and wood</b></i>. Most of the replicas are in the </font><b><font face=\"Arial\" size=\"2\">1:18</font></b> and <b><font face=\"Arial\" size=\"2\">1:24</font></b> <font face=\"Times New Roman\">scale sizes, which provide the optimum in detail and accuracy. Prices range from</font> <i><b><font face=\"Arial\" color=\"#009933\" size=\"2\">$30.00</font></b></i> up to <i><b><font color=\"#009933\" face=\"Arial\" size=\"2\">$180.00</font></b></i> <font face=\"Times New Roman\">for some <i><b>special limited edition replicas</b></i>. All models include a<i><b>certificate of authenticity</b></i> from their manufacturers and <i><b>come fully assembled</b></i> and ready for display in the home or office.</font></p><font face=\"Times New Roman\"><u><b>Additional Information</b></u></font><ul>\t<li><font face=\"Times New Roman\">No Toxic Materials</font></li>\t<li><font face=\"Times New Roman\">Monogram Service Available</font></li>\t<li><font face=\"Times New Roman\">Suitable for Children Above 10 Years of Age</font></li>\t<li><font color=\"#FF0000\" face=\"Times New Roman\"><i><b>90 Day Money Back Guarantee</b></i></font></li></ul></html>", 
                                IMAGE_FILENAME:"vintagecars.jpg", 
                                PRODUCTLINE:"Vintage Cars", 
                                TEXTDESCRIPTION:"Our Vintage Car models realistically portray automobiles produced from the early 1900s through the 1940s. Materials used include Bakelite, diecast, plastic and wood. Most of the replicas are in the 1:18 and 1:24 scale sizes, which provide the optimum in detail and accuracy. Prices range from $30.00 up to $180.00 for some special limited edition replicas. All models include a certificate of authenticity from their manufacturers and come fully assembled and ready for display in the home or office.", 
                                IMAGE_DATE_CREATED:new Date(1354474800000)
                            }
                        ], 
                        endRow:7, 
                        invalidateCache:false, 
                        isDSResponse:true, 
                        operationType:"fetch", 
                        queueStatus:0, 
                        startRow:0, 
                        status:0, 
                        totalRows:7
                    }
                ]
                Download File request
                Code:
                {
                    dataSource:"ProductLines", 
                    operationType:"downloadFile", 
                    data:{
                        PRODUCTLINE:"Planes", 
                        download_fieldname:"IMAGE", 
                        download_filename:null
                    }, 
                    showPrompt:false, 
                    oldValues:{
                        PRODUCTLINE:"Planes", 
                        download_fieldname:"IMAGE", 
                        download_filename:null
                    }, 
                    requestId:"ProductLines$6274", 
                    fallbackToEval:false, 
                    downloadResult:true, 
                    downloadToNewWindow:false, 
                    bypassCache:true
                }
                Last edited by bbruyn; 3 Dec 2012, 09:31. Reason: forgot the result of the inital fetch

                Comment


                  #9
                  When you go to download a file, we actually put the filename into the URL. So you should see, using Firebug, that the URL for the download request includes the filename.

                  If you can verify that, see if you are doing some kind of server-side redirect or request manipulation such that the filename is dropped from the request URL. At this point, the server would fail to look up and apply the appropriate mime type.

                  Comment


                    #10
                    No, it seems to be a regression of this.

                    Comment


                      #11
                      Why do you say that? Your log seems to show a correct SQL query, and data for IMAGE_FILENAME et al being returned. So the metadata fields are recognized.

                      Comment


                        #12
                        Just because this datasource doesn't work

                        Code:
                        <DataSource 
                            ID="ProductLines"
                        	schema="PUBLIC"
                        	dbName="TestCaseData"
                        	tableName="ProductLines"
                        	serverType="sql"
                        	autoDeriveSchema="true">
                        	
                        	<fields>
                        		<field primaryKey="true" name="PRODUCTLINE"/>
                        		<field name="TEXTDESCRIPTION" type="text"/>
                        		<field name="HTMLDESCRIPTION" type="text"/>
                        		<field name="IMAGE" type="binary"/>
                        	</fields>
                        </DataSource>
                        and this does

                        Code:
                        <DataSource 
                            ID="ProductLines"
                        	schema="PUBLIC"
                        	dbName="TestCaseData"
                        	tableName="ProductLines"
                        	serverType="sql"
                        	autoDeriveSchema="false">
                        	
                        	<fields>
                        		<field primaryKey="true" name="PRODUCTLINE"/>
                        		<field name="TEXTDESCRIPTION" type="text"/>
                        		<field name="HTMLDESCRIPTION" type="text"/>
                        		<field name="IMAGE" type="binary"/>
                        	</fields>
                        </DataSource>

                        Comment


                          #13
                          More explicitly, this works

                          Code:
                          <DataSource 
                              ID="ProductLines"
                          	schema="PUBLIC"
                          	dbName="TestCaseData"
                          	tableName="ProductLines"
                          	serverType="sql"
                          	autoDeriveSchema="false">
                          	
                          	<fields>
                          		<field primaryKey="true" name="PRODUCTLINE"/>
                          		<field name="TEXTDESCRIPTION" type="text"/>
                          		<field name="HTMLDESCRIPTION" type="text"/>
                          		<field name="IMAGE" type="binary"/>
                          		<field name="IMAGE_filename" type="text" />
                          		<field name="IMAGE_filesize" type="int"/>
                          		<field name="IMAGE_date_created" type="date"/>
                          	</fields>
                          	
                          </DataSource>
                          this doesn't

                          Code:
                          <DataSource 
                              ID="ProductLines"
                          	schema="PUBLIC"
                          	dbName="TestCaseData"
                          	tableName="ProductLines"
                          	serverType="sql"
                          	autoDeriveSchema="false">
                          	
                          	<fields>
                          		<field primaryKey="true" name="PRODUCTLINE"/>
                          		<field name="TEXTDESCRIPTION" type="text"/>
                          		<field name="HTMLDESCRIPTION" type="text"/>
                          		<field name="IMAGE" type="binary"/>
                          		<field name="IMAGE_FILENAME" type="text" />
                          		<field name="IMAGE_FILESIZE" type="int"/>
                          		<field name="IMAGE_DATE_CREATED" type="date"/>
                          	</fields>
                          	
                          </DataSource>
                          Last edited by bbruyn; 3 Dec 2012, 17:23. Reason: typo

                          Comment


                            #14
                            We can see a line of framework code that would be case-sensitive about "_filename" related to the download codepath - we'll correct that (note it's not a regression; automatic mime type picking would always have been broken for this combination of DB field name reporting, autoDeriveSchema, etc).

                            We'll also check on whether the ListGrid has similar code that would prevent metadata fields from being automatically hidden.

                            Comment


                              #15
                              There were a couple of issues here to do with autoDeriving those metadata fields (*_filename, etc). These have now been corrected in 4.0d and 3.1p branches - please try it with today's nightly build

                              Comment

                              Working...
                              X