|
Sylvain
Reading between the lines, I assume this means that
a conversion of sorts must be done somewhere / somehow;
but this is the part that is unclear to me...
The field is read in as part of a record from the database
& placed in a variable; thereafter it is assigned to the forms
model. I assume it is during this process I need to do a
conversion - in the code I have these snippets:
1. var thisTheme = getTheme(myID); //record from database
2a. var editThemeDataForm = new Form("view/forms/editThemeForm_d.xml"); //model
2b. var model = editThemeDataForm.getModel();
3. model.bigTextField = thisTheme.bigTextField; //assign value to form field
where
...getTheme = function(myid) {
var conn = this.getConnection(this.poolId); var result = conn.query("select * from mytable where myid = ?", [myid]); var record = result.rows[0]; conn.close(); return record; } So.. do I need something to add to step 3 to convert the BLOB
field which in thisTheme.bigTextField to the string display of
the form's model.bigTextField .. and if so, what?
Thanks
Derek
PS Are there any other DB fields that can/must be converted; is
there a general guide somewhere for performing these conversions?
>>> [EMAIL PROTECTED] 2005/11/04 03:46 PM >>> Derek Hohls wrote:
> Is there a special technique for handling BLOB fields (in > my case, the MEDIUMTEXT field from a mySQL dataabse) > in a cforms/flow situation? > > I get : > > java.lang.RuntimeExceptioon "Incorrect value type for 'FIELD' > (expected class.java.langString, got class [B This message says that you're trying to fit a byte[] into a String field, which obviously won't work. You should feed the field with a String that you create from the data read in the blob Sylvain -- Sylvain Wallez Anyware Technologies http://people.apache.org/~sylvain http://www.anyware-tech.com Apache Software Foundation Member Research & Technology Director --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice CSIR Copyright, Terms and Conditions For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with "REQUEST LEGAL" in the subject line to CSIR HelpDesk
|
