CALL FOR: HACK/Bugfix: taglib cloudreferrer.getCloud()
Called by: Nico Klasens Total tally on this call : +8
START: 5/7/2004 START OF VOTING: 5/7/2004 12:00 END OF CALL: 8/7/2004 12:00
YEA (8) : Rico Jansen, Michiel Meeuwissen, Rob van Maris, Gerard van Enk, Marcel Maatkamp, Andre van Toly, Daniel Ockeloen, Rob Vermeulen
ABSTAIN (1) : Pierre van Rooden
NAY (0) :
VETO (0) :
No votes, assumed abstained (6): Eduard Witteveen, Jaco de Groot, Johannes Verelst, Kees Jongenburger, Mark Huijser, Ernst Bunders
Result:
The hack is accepted.
The new method's name is getCloudVar().
The getCloud method will be deprecated in MMBase 1.7, and removed from the code in MMBase 1.8.
Pierre "Gomez' van Rooden, beancounter
Nico Klasens wrote:
Hello developers & committors,
At the moment, I am working for a customer who requires BEA Weblogic as the application server. There is only a small issue with the MMBase taglib which prevents MMBase from running in it. BEA Weblogic requires that all taglib attributes are implemented according to the bean specification. The MMBase taglib fails on this, because the CloudReferrer tags have a cloud attribute which is not implemented according to the bean specs. CloudReferrer.java does not have matching setter and getter methods for the cloud attribute.
public void setCloud(String c) throws JspTagException public Cloud getCloud() throws JspTagException
With this proposal I want to rename the getCloud method. When the method is renamed the bean specs is honoured and I can use MMBase in Weblogic. IMO this is more then a small bugfix. A rename will affect a lot of taglib classes (including custom extensions on the MMBase taglib). There is no other way to comply to the bean specs. The method can not be changed to protected, because then other classes don't compile anymore.
Code proposal: CloudReferrer.java
/**
* Find the CloudProvider and return its cloud variable in one
* step. And the result of findCloudProvider is stored, so
* invoking this function more often is better then invoking
* findCloudProvider every time.
*
* @return a Cloud
* @throws JspTagException
* * @deprecated (2004-05-08) use getCloudWeblogic, because this breaks the bean specs
*/
public Cloud getCloud() throws JspTagException {
return getCloudWeblogic();
}
/**
* Find the CloudProvider and return its cloud variable in one
* step. And the result of findCloudProvider is stored, so
* invoking this function more often is better then invoking
* findCloudProvider every time.
*
* @return a Cloud
* @throws JspTagException
*/
public Cloud getCloudWeblogic() throws JspTagException {
return findCloudProvider().getCloudVar();
}
The method should be renamed to something else, but that is a minor detail. The custom extenstions will still work, because the getCloud method is only deprecated. I could then remove the getCloud method from the sources to let it run in Weblogic.
Files changed:
applications/community/src/org/mmbase/applications/community/taglib/PostTag.java applications/community/src/org/mmbase/applications/community/taglib/TreeTag.java applications/community/src/org/mmbase/applications/community/taglib/UpdateTag.java applications/community/src/org/mmbase/applications/community/taglib/WhoTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/CloudReferrerTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers/ListContainerTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers/ListNodesContainerTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers/ListRelationsContainerTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers/QueryAgeConstraintTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers/QueryAliasConstraintTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers/QueryContainer.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers/RelatedContainerTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/containers/RelatedNodesContainerTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/CountRelationsTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/edit/CreateNodeTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/FieldInfoTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/FieldListTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/functions/AbstractFunctionTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/functions/NodeFunctionTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/functions/NodeListFunctionTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/ImageTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/InfoTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/ListNodesTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/ListRelationsTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/ListTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/macro/RelatedTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/NodeFieldTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/NodeInfoTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/NodeTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow/LeafFileTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow/LeafIncludeTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow/TreeFileTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow/TreeIncludeTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/RelatedNodesTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/security/MayCreateRelationTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/security/MayCreateTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/tree/TreeTag.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/typehandler/ByteHandler.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/typehandler/EnumHandler.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/typehandler/IntegerHandler.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/typehandler/NodeHandler.java applications/taglib/src/org/mmbase/bridge/jsp/taglib/typehandler/StringHandler.java
The code change is for MMBase-1_7 and MMBase HEAD.
-- Pierre van Rooden Mediapark, C 107 tel. +31 (0)35 6772815 "Never summon anything bigger than your head."
