Hi list,

I noticed very strange behaviour with one of my _single.jsp form. This form includes a subform, but I tried to remove it - nothing changed. Although maxRows is set to 1 in dbform tag, often in the Insert mode (clicking <db:navNewButton>) the field names are doubled. I'm also using
javascriptFieldsArray="true", so the result becomes as following:


    var dbFormFields = new Array();
    dbFormFields["FILTER1"] = new Array("[EMAIL PROTECTED]", "f_1_insroot_11");
    dbFormFields["LANGUAGE"] = new Array("[EMAIL PROTECTED]", "f_1_insroot_6");
    dbFormFields["TITLE"] = new Array("[EMAIL PROTECTED]", "f_1_insroot_2");
    dbFormFields["TYPE"] = new Array("[EMAIL PROTECTED]", "f_1_insroot_1");

But as I said, it's the insert mode - why and how can these references to the fields become double?

I'm also using javascript validation, so maxlenght() function becomes:

function maxlength () {
if(bValidateUpdate==true) this.dbforms_aa = new Array("[EMAIL PROTECTED]", "TITLE has a maximum length of :255", new Function ("varName", "this.maxlength='255'; return this[varName];"));
if(bValidateUpdate==false) this.dbforms_ab = new Array("f_1_insroot_2", "TITLE has a maximum length of :255", new Function ("varName", "this.maxlength='255'; return this[varName];"));
if(bValidateUpdate==false) this.dbforms_ac = new Array("f_1_insroot_6", "LANGUAGE has a maximum length of :2", new Function ("varName", "this.maxlength='2'; return this[varName];"));
if(bValidateUpdate==true) this.dbforms_ad = new Array("[EMAIL PROTECTED]", "LANGUAGE has a maximum length of :2", new Function ("varName", "this.maxlength='2'; return this[varName];"));
}


Although in "normal" behaviour there are no bValidateUpdate==true checks.

Strange is that this behaviour occurs only travelling through the following path: Menu -> "Single" -> "Insert new", and it also dissapears when jsp file is recompiled.

Do any of you have faced such an issue? IMHO this could be context related and there might also be some variables overlapping problem.

In the same form I'm using some JSTL tags, like:

<c:set var="i" value="1" />
<sql:query var="query" dataSource="${ds}">SELECT PATTERN, DESCRIPTION FROM HC_FILTER_VALUES WHERE FILTER_ID = 1
</sql:query>
<c:forEach var="myrow" items="${query.rows}" >
<input type="checkbox" name="__f1_<c:out value='${i}' />" value="<c:out value='${myrow.PATTERN}' />" OnChange="switchFilter('FILTER1', this)"><c:out value='${myrow.DESCRIPTION}' />&nbsp;
<c:set var="i" value="${i+1}" />
</c:forEach>


But when that duplicate occurs, that query from <sql:query> tag is printed in the subform!

This behaviour occurs with jdbforms 2.4rc2 and 2.3, I'm using Tomcat 5.0.25.

regards,
Dziugas Baltrunas



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to