Announcement

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

    MultiFileItem error

    Hi isomorphic,

    When I click on the + icon in order to add files, it shows the screen where it should allow me to capture the file however this is not displayed correctly, since not appears the controls.

    The masterRecord datasource code is:

    Code:
    <DataSource ID="masterRecord" serverType="generic">
    	<fields>
    		<field name="id"      type="sequence"             primaryKey="true" hidden="true"/>
    		<field name="upload"  dataSource="detailRecord"  editorType="MultiFileItem"  width="400"/>
    	</fields>
    </DataSource>
    The detailRecord datasource code is:

    Code:
    <DataSource ID="detailRecord" serverType="generic">
    	<fields>
    		<field name="fileId"         type="sequence" primaryKey="true"            hidden="true"/>
    		<field name="masterRecordId" type="number"   foreignKey="masterRecord.id" hidden="true"/>
    		<field name="file"           type="binary"   title="File" />
    	</fields>
    </DataSource>
    The JSP code is:

    Code:
    			<isomorphic:loadDS ID="masterRecord"/>
    	
    			isc.DynamicForm.create({
    				ID: "uploadForm",
    				encoding:"multipart",
    				dataSource:"masterRecord"
    			});
    It does not show any errors on the apache tomcat console, and also does not show any error over firebug.

    Please help me in order than me can resolve this problem

    #2
    I had the same problem.

    Try this detailDS:
    Code:
    <DataSource ID="detailRecord" serverType="generic">
    	<fields>
    		<field name="fileId"         type="sequence" primaryKey="true"            hidden="true"/>
    		<field name="masterRecordId" type="number"   foreignKey="masterRecord.id" hidden="true"/>
    		<field name="file"           type="binary"   title="File" width="100%" />
    	</fields>
    </DataSource>
    I just added a width to the file field.

    Comment


      #3
      Thank you, its run

      Comment


        #4
        Do you receive the file data? I don't receive the files on the server. Instead i get a strange exception:
        Code:
        [ERROR] [client_works] Uncaught exception escaped
        com.google.gwt.core.client.JavaScriptException: (TypeError): _6 is undefined
         fileName: http://10.54.217.42:8888/client_works/sc/modules/ISC_Forms.js
         lineNumber: 2467
         stack: isc_MultiFilePicker_saveData("isc_MultiFileItem_0.saveDataCallback()")@http://10.54.217.42:8888/client_works/sc/modules/ISC_Forms.js:2467
        isc_MultiFileItem_formSaved([object Object],[object Object],[object Object])@http://10.54.217.42:8888/client_works/sc/modules/ISC_Forms.js:2441
        ()@http://10.54.217.42:8888/client_works/sc/modules/ISC_DataBinding.js:1470
        ([object Object],[object Object],[object Object])@http://10.54.217.42:8888/client_works/sc/modules/ISC_DataBinding.js:1470
        anonymous([object Object],[object Array],[object Object])@http://10.54.217.42:8888/client_works/sc/modules/ISC_Core.js:38
        isc_c_Class_fireCallback("isc_DynamicForm_2.$49z(dsRequest, dsResponse, data)","dsResponse,data,dsRequest",[object Array],[object Object],(void 0))@http://10.54.217.42:8888/client_works/sc/modules/ISC_Core.js:282
        isc_Class_fireCallback("isc_DynamicForm_2.$49z(dsRequest, dsResponse, data)","dsResponse,data,dsRequest",[object Array])@http://10.54.217.42:8888/client_works/sc/modules/ISC_Core.js:376
        isc_DataSource__completeResponseProcessing([object Array],[object Object],[object Object])@http://10.54.217.42:8888/client_works/sc/modules/ISC_DataBinding.js:527
        isc_DataSource_processResponse("createnote$6274",[object Object])@http://10.54.217.42:8888/client_works/sc/modules/ISC_DataBinding.js:379
        ("createnote$6274",[object GWTJavaObject])@http://10.54.217.42:8888:40
        @:0
        ([object GWTJavaObject],16973825,[object XMLHttpRequest])@http://10.54.217.42:8888/client_works/hosted.html?client_works:56
        ([object Event])@http://10.54.217.42:8888:102
        ((function () {__gwt_makeJavaInvoke(1)(handler, 16973825, _this);}),[object XMLHttpRequest],[object Object])@http://10.54.217.42:8888:66
        @:0
        (null,27,(function () {__gwt_makeJavaInvoke(1)(handler, 16973825, _this);}),[object XMLHttpRequest],[object Object])@http://10.54.217.42:8888/client_works/hosted.html?client_works:56
        ([object Event])@http://10.54.217.42:8888:3
            at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
            at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
            at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
            at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
            at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
            at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
            at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
            at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
            at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
            at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
            at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1669)
            at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
            at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
            at java.lang.Thread.run(Thread.java:637)
        I am using the LGPL Version of SmartGWT. Is it possible to do it with that?

        Comment

        Working...
        X