cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Harrop <ja...@xn.com.au>
Subject Small bug fix for AbstractDatabaseAction.java
Date Thu, 21 Jun 2001 19:56:39 GMT
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


Mime
View raw message