Dear All, I found the issue debugging step by step the dbformtag.java file. The problem was that the fieldType of one of my chield fields was different from the parent field.
MASTER FORM <!-- ENROLMENT_PINFO --> <table name="enrolment_pinfo"> <field name="studentcode" fieldType="char" size="10" isKey=3D"true"/> DETAIL FORM <table name="study_plan"> <field name="studentcode" fieldType="varchar" size="10" isKey="true"/> ---------------- Now I have to take a note! varchar is different from char. In dbformtag.initSearchFields() the system creates the query for the subform based on the searchFields of the parent form. If two fields are different by name AND/OR TYPE they aren't included in the SQL Query of the subform.... ----------------- AT THIS POINT ANOTHER QUESTION... I was stepping into the instruction with the debugger and I noticed that parent-field relation between form and subform is not considered if the parent has some searchFields, is this true? Till yesterday I was convinced that the searchFields are to be considered "local" to the form that contain them where the data flow (in my mind) was 1. MASTER FORM -- searchFields for the master form to extract MASTER RECORD -- 2. THEN AFTER MASTER FORM HAS THE MASTER RECORD link the SUBFORM to the MASTER through the parent,child fields (without applying the filter on the subform) .... Now is the real situation this one? 1. MASTER FORM -- searchFields form the masterform to extract master record- 2. IF THERE ARE searchFields DOES NOT CONSIDER parent,child fields relationship and APPLY the same Search criteria to the SUBFORM.... ----------------- Am I right? Is the second situation the "real-behavior" of dbforms? Thank you. Ivan PS. I put a note on the wiki! Quoting Ivan Codarin <[EMAIL PROTECTED]>: > Hi Henner, > I tested my applications also with the latest sources (cvs) in my environ= > ment > instead of the jar file. But I don't know where to start to debug the > sourcecode of dbforms, and I havent the sources of December to compare th= > e > differences.... > could you help me to find the point where to start debugging? > > Is it correct the use of searchfields in the JSP page I sent? I tried al= > so to > use db:filter but the behaviour of search fields is more user-friendly in= > my > opinion.... > > Thank you. > Ivan > > > Quoting Henner Kollmann <[EMAIL PROTECTED]>: > > > Hi Ivan, > > > > Sounds really strange... I haven't change something in the search code = > since > > december.. > > > > If you can not reproduce this behaviour in the bookstore example your t= > est > > pages would'nt help. > > > > Do you have the same problem in your test enviroment? If yes - could yo= > u use > > the sources instead of the jar file and try to debug whrere the student= > code > > is lost? I needed i can help you to find the right starting point for > > debugging. > > > > Hope to help, > > > > Henner > > > > > -----Urspr=FCngliche Nachricht----- > > > Von: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] Im > > > Auftrag von Ivan Codarin > > > Gesendet: Freitag, 4. M=E4rz 2005 21:20 > > > An: jdbforms-interest@lists.sourceforge.net > > > Betreff: [dbforms] [Bug?] Very strange problem with final 2.5 > > > and search fields. > > > > > > Dear All, > > > I have a very strange problem with dbforms2.5. > > > I'm upgrading my production system from the > > > dbforms2.5snapshot of December 2004 to the final release. > > > I enclose to this mail my JSP page and 2 pieces of my dbforms config. > > > I have also created a similar example on bookstore (but in > > > that case all the things run well)... > > > I could send you also that files to extend the "tests" folder... > > > > > > > > > I have the main form that uses two searchCombos to search (1) > > > a student and (2) an academic year. > > > The subform is related to the first one through > > > (studentcode,academicyear) attribs. > > > > > > The problem is that when I select a student from the > > > searchCombo my database > > > (postgresql) logs this two queries: > > > > > > > > > > > > (1) For the MAIN FORM: > > > > > > SELECT studentcode, lastname, firstname, courseyear, > > > academicyear > > > FROM enrolment_pinfo WHERE ( ( (studentcode =3D > > > 'AD03MROS' AND academicyear =3D 2003 ) ) ) > > > > > > [this is as expected the query to extract a specific > > > student in a specific academic year. > > > > > > (2) The strange thing is that for the SUBFORM: > > > > > > SELECT studentcode, academicyear, subjectlevel, > > > subject, date_start, date_end, updatedate, lastusermod > > > FROM study_plan WHERE ( ( ( academicyear =3D 2003 ) ) = > ) > > > > > > [in this case dbform loses the studentcode part in > > > the whereString] > > > > > > The very strange thing is that the December Version (of > > > course 29 december 2004) is ok and works well with the same > > > page simply using the "old" jar file. > > > > > > Is this a bug? Is this a problem related to my form or > > > related to the use of search fields? > > > > > > > > > I created a "similar" example for bookstore but in that case > > > I'm not able to generate the same situation.... > > > (Henner or other developers do you need it? I could zip it > > > and send to you the hsqldb file, jsp and dbforms-config.xml). > > > > > > > > > Has anyone an idea? Now I will restore my configuration with > > > the December version, but I would like to solve this issue... > > > > > > Thank you. > > > Ivan > > > > > > > ----------------------- > Ivan Codarin > ----------------------- > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > DbForms Mailing List > > http://www.wap-force.net/dbforms > ----------------------- Ivan Codarin ----------------------- ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ DbForms Mailing List http://www.wap-force.net/dbforms