TextArea problem

hi Isomorphic:

i found ,once textArea input too long string (mybe more than 500 char) which is in DynamicForm,and call Form.saveData(),the program will hang through to time out. and see log file as follow error:

ERROR XML - XML parser fatal error: file ‘(in memory stream)’ line 1: org.xml.sax.SAXParseException: The element type “elem” must be terminated by the matching end-tag “</elem>”.

also errors found in IE6, IE7,and Mozllia FireFox.

can you tell me how to fix this problem?

Hi baallee,

In house at Isomorphic and throughout the world, SmartClient applications save values many times larger than that via DynamicForm.saveData() thousands of times a day. We’ll need an example of what you’re doing to create this error in order to help.

Hi Isomorphic,
please see the code and help me again

jsp :

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@ taglib uri="/WEB-INF/iscTaglib.xml" prefix="isomorphic" %>

<isomorphic:loadISC includeModules="Analytics" skin="SmartClient" runat="server"/>
<BODY>

<SCRIPT>
<isomorphic:loadDS ID="journalUploadTest" />
</SCRIPT>

<script>
//Create the Journal form for upload file and add Journal.
isc.DynamicForm.create({
	ID:"mainJournalForm",
  	dataSource:"journalUploadTest",
  	width: "100%",
  	numCols: 4,
  	layoutAlign:"center",
  	border: "2px solid #a0a0a0",
  	requiredTitleSuffix:"*",
  	encoding:"multipart",
  	autoDraw: false
});

isc.IButton.create({
	ID:"saveButton",
	width:70,
	autoDraw:false,
	title : "Save", 
	click : function (){
		mainJournalForm.saveData();
	}
});

isc.VLayout.create({
	ID : "mainJournalFormButtonLayout",
	width : "100%",
	members : [saveButton]
});

isc.VLayout.create({
    ID: "mainJournalVLayout",
    members : [mainJournalForm, mainJournalFormButtonLayout]
});
</script>

</BODY>
</HTML>

ds.xml :

<DataSource ID="journalUploadTest" serverType="generic">    
    <fields>
        <field name="id"             title="ID"   type="int"     primaryKey="true" hidden="true"/>
        <field name="supplierId"     title="ID"   type="text"    primaryKey="true" hidden="true"/>
        <field name="journalDate"    title="Date" type="date"    width="140"  required="true"/>
        <field name="user"           title="User" type="text"    width="170"  required="true" length="50"/>
        <field name="type"           title="Type" type="select"  width="175" required="true"  length="50">
            <valueMap>
                <value>deviation</value>
                <value>grievance</value>
                <value>communication</value>
            </valueMap>
        </field>
        <field name="attachments" title="Attachments" type="binary" width="170"/>
        <field name="detail"      title="Detail"      type="text"   width="550" height="100" colSpan="4" length="65535"/>
        
        <field name="error"       hidden="true" />
    </fields>
    
    <serverObject lookupStyle="spring" bean="journalDMI"/>
</DataSource>

in order to recur this error you may setup spring and a bean definition
and wirte empty method fetch,add,update,remove in the test.JournalDMI

<bean id="journalDMI" class="test.JournalDMI">
</bean>

about database ,i was use mysql but you needn’t setup ,because if have error
server side never be called,
and tomcat 5.5 is our application server.

you can try input detail field more than more and click save, currently 500 - 1000 words program will hang.

thank you for you help!

Hi baalee,

Forms that contain UploadItems must be submitted via submitForm(), not saveData(), and the uploaded file must be handled by ordinary servlet logic, not as a SmartClient RPC. What you have tripped upon by calling saveData() is some special upload handling, currently in incomplete form, which will be completed and documented in a future release.

Hi Isomorphic

Thank you for tell me that!
could i pass the some special upload handling in my custom DynamicForm or SmartClient RPC?
and why we need some special upload handling?

Could you rephrase the question?

Oh, good! I see.

Hi Isomorphic

i need upload a file and some of detail data via DynamicForm send to server ,but by servlet way it will refresh the page.
i don’t want refresh page, just want upload file same the SmartClient style.
can i do this?

Yes, see this post.

Thank you very much!