hi there,

it seems there's a bug in "classic" navigation in dbforms from cvs, here's a little patch to solve it. I don't test it in deep, so I prefer to post instead of commit it. The patch contain another little change, it make a local event take precedence over noop event, which seems reasonable to me.

cheers,
Sergio
Index: DbFormTag.java
===================================================================
RCS file: /cvsroot/jdbforms/dbforms/src/org/dbforms/taglib/DbFormTag.java,v
retrieving revision 1.133
diff -u -w -b -r1.133 DbFormTag.java
--- DbFormTag.java      19 Aug 2004 17:08:25 -0000      1.133
+++ DbFormTag.java      23 Sep 2004 13:51:51 -0000
@@ -1,5 +1,5 @@
 /*

- * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/taglib/DbFormTag.java,v 1.133 
2004/08/19 17:08:25 hkollmann Exp $

+ * $Header: /cvsroot/jdbforms//dbforms/src/org/dbforms/taglib/DbFormTag.java,v 1.133 
2004/08/19 17:08:25 hkollmann Exp $
  * $Revision: 1.133 $

  * $Date: 2004/08/19 17:08:25 $

  *

@@ -1515,7 +1515,7 @@
          FieldValue[] orderConstraint;

 

          // if developer provided orderBy - Attribute in <db:dbform> - tag

-         if (overrulingOrder != null) {

+         if (overrulingOrder != null && overrulingOrder.length > 0) {
             orderConstraint = overrulingOrder;

             logCat.info("using OverrulingOrder (dbform tag attribute)");

          }

@@ -1680,7 +1680,8 @@
          //

          // # 2002.11.xx-fossato added an event factory

          // # 20030320-HKK: Rewrite to use navEvent only

-         if ((webEvent == null) && (getLocalWebEvent() != null)) {

+         // 2004-06-14 moretti: local event take precedence over NOOP 
+         if ((webEvent == null || webEvent instanceof org.dbforms.event.NoopEvent) && 
(getLocalWebEvent() != null)) {
             webEvent = navEventFactory.createEvent(localWebEvent, request,

                                                    getConfig(), table);

 

Reply via email to