I'll might have time to make an example page over the weekend. At the moment I'm 
debugging my program against 1.1.3 source code. I tried the Query.java class and 
chacnged getSelectQuery() method in an made two changes:

Row 358: //buf.append(getFollowAfterWhere());
Row 362: buf.append(" AND ( ");

It's working against all the queries I have in my program, but I really haven't become 
acquainted with the code, so I don't know side effects for this.

Then an other problem with search-tag in config. If the dbform-tag in jsp, which is 
using filtering with search fields, is top level in the page, everything is ok. But if 
this dbform is in a sub-level (having parentField and childField attributes) the 
values in sql querys where clause go mixed. Exapmple:

dbforms-config.xml:
<query name="myQuery"
  ...
  <field name="first"/>
  <field name="second"/>
  <field name="third"/>
  ...

jsp:
<db:dbform name="myQuery"
  filter="first=1,second=2,third=3"
  ...

sql:

...WHERE ((first=1 AND second=2 AND third=3)) ORDER...

So, everything is ok.

BUT if dbforms-config.xml is like:
<query name="myQuery"
  ...
  <field name="first"/>
  <field name="second"/>
  <search name="third"/>
  ...

jsp is same as above

sql:

...WHERE ((third=1)) AND ((first=2 AND second=3)) ORDER... (which is wrong)

The AND goes between ")) ((" only after the "fix" mentioned above. So, maybe the 
original problem is that search-tag field goes to the wrong place in the query?

So, field which is in search-tag goes in the first place and takes the value of the 
first field which is field-tag. This is hard to explain and I'll try to make the 
example page against bookshop program. I have tested this many times with my program 
and this must be a bug and this causes a serius error when usin search-tag.

Can you give me a hint in which class this values setting to query is placed?

Regards,
Salient


-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
DbForms Mailing List

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

Reply via email to