You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jason Harrop <ja...@xn.com.au> on 2001/06/21 21:56:39 UTC

Small bug fix for AbstractDatabaseAction.java

Hi,

setkey in DatabaseAddAction uses

  setRequestAttribute(Request request, String key, Object value)

to set a request attribute. As its Javadoc says, this method prefixes 
the key  with the name of this class to prevent potential name collisions.

There is another method in AbstractDatabaseAction which is the converse 
of setRequestAttribute, called getRequestAttribute(Request request, 
String key), which prepends the name of the class.

The problem is that the method setColumn(PreparedStatement statement, 
int position, Request request, Configuration entry, String param) 
doesn't use it:

         if (value == null) value = request.getAttribute(param);

This line should say:

  if (value == null) value = getRequestAttribute(request, param);

cheers,

Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org