|
Hi all,
jdbform is very nice... but I've a complex feeling with it! [i use 1.1.4pr1 of 2003-09-20] I've produced a form where I use a tecnique like in howtoChangeSelectBox.jsp example to change the contents of the form. I've a session that loads a selectBox with particular values, then when I change this selectBox the form is submitted to change another subform with the correct data. [I'll put the source code at the end of this post.] The subform displays the records of a table with a particular
whereClause.
I've a table "student_grade" where every student's grade is taked from
another table named "tbl_grade".
My problem is on the select with tableData based on "tbl_grade".
The selectBox is rendered correctly with all the values of the "tableData tbl_grade" displayed with the "decoded value", but this values aren't matched with the field "achievmentgrade" of the record of "student_grade" contents. I've a long table (managed with associatedRadio) where the contents of
selectBox is the same for every record and if i print out the coded valued (the
value in the record of "student_grade" table) it is different from "decoded
value" taked from tableData "tbl_grade".
My english is very poor, i hope you understand me.
I tried to disable caching with disableCache="true" in tableData TAG, but i didn't have any result.... I must put this page in work in two days, I'm disperated.
Many thanx
Ivan
---- PARTIAL SOURCE CODE OF THE PAGE
---
<db:dbform maxRows="*" bypassNavigation="true" followUp="business_objects/navigation_test/howtoChangeSelectBox.jsp" autoUpdate="false" > <!--- To force an reload event. This is necessary because we have no given table and needs and reload event to refetch the values of the select boxes! --> <input type="hidden" name="customEvent" value="re_0_0"/> <!-- PRIMA SELECT BOX - SCELTA TEACHER - --> <% String user= (String)session.getValue("loginName"); out.println("Welcome, "+ user); /* String class=(String)session.getValue("classCode"); String qry_class=new String("SELECT DISTINCT classcode, classcode FROM teching_block "); if (class==null) { qry_class = qry_class + " WHERE teacher = '" + user + "'"; } else { } */ %> <!-- SECONDA SELECT BOX - SCELTA CLASS - --> Class choice <db:select fieldName="classcode" > <db:queryData name="ext_classcode" query='<%= "SELECT DISTINCT classcode, classcode " + "FROM teaching_block " + "WHERE teacher= '" + user +"'" %>' /> </db:select> <!--------------------------- SUB FORM
---------------------------------------------->
<db:dbform maxRows="*" followUp="business_objects/navigation_test/howtoChangeSelectBox.jsp" autoUpdate="true" tableName="student_grade" whereClause='<%= "WHERE classcode = '" + org.dbforms.util.ParseUtil.getParameter(request, "classcode", "-1") +"'"%>' > <db:header> <table align="center"> <tr> <td>S.</td> <td>S.Code</td> <td>Class</td> <td>Year</td> <td>Term</td> <td>Effort</td> <td>Achiev.</td> <td>Acad.year</td> </tr>
</db:header> <d |
