Update of /var/cvs/src/org/mmbase/framework
In directory james.mmbase.org:/tmp/cvs-serv31848
Modified Files:
ComponentRepository.java
Log Message:
support for defaultblock function (for use in mm:function tag)
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/framework
Index: ComponentRepository.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/framework/ComponentRepository.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- ComponentRepository.java 21 Aug 2008 16:36:57 -0000 1.40
+++ ComponentRepository.java 2 Sep 2008 12:03:33 -0000 1.41
@@ -25,7 +25,7 @@
* Components can be configured by placing their configuration in
'config/components/'.
*
* @author Michiel Meeuwissen
- * @version $Id: ComponentRepository.java,v 1.40 2008/08/21 16:36:57 michiel
Exp $
+ * @version $Id: ComponentRepository.java,v 1.41 2008/09/02 12:03:33 andre Exp
$
* @since MMBase-1.9
*/
public class ComponentRepository {
@@ -115,6 +115,12 @@
return component.getBlock(blockName);
}
+ public Block getDefaultBlock(String componentName) {
+ Component component = getComponent(componentName);
+ if (component == null) throw new IllegalArgumentException("No
component with name '" + componentName + "'");
+ return component.getDefaultBlock();
+ }
+
protected boolean resolve() {
int unsatisfied = 0;
for (Component comp : getComponents()) {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs