hi,

I am wondering what the behavior of a construction like

<mm:list nodes="" path="homepages" >
</mm:list>

should be.

It looks like it will list all nodes of type 'homepage' but I would think that someone could assume it should list none, since no startnodes are given. (There is already the option of not using the nodes attribute or specifying nodes="-1" to indicate that all should be listed)

Code that handles the "" value of the nodes atrribute is in org.mmbase.util.Queries with an interesting comment...

(from line 70)
        // the bridge test case say that you may also specifiy empty string (why?)
        if ("".equals(startNodes) || "-1".equals(startNodes)) {
            startNodes = null;
        }


This is generally not a problem, but becomese interesting once a construction like this is used.

<mm:import externid="nodes" />
<mm:list nodes="$nodes" path="homepages" >
  <mm:deletenode />
</mm:list>

This construction would delete all homepages if the nodes attribute was not specified in the url for some reason, wheras I would rather have it to have deleted none of them ;-)

cheers,

  Simon







Reply via email to