Thanks! I will try this. I'll add the wish

-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Michiel Meeuwissen
Verzonden: donderdag 30 maart 2006 18:38
Aan: Discussion list for developers
Onderwerp: Re: [Developers] isrelated

Ferdinandus, Humphrey wrote:
>    All,
> 
>     
> 
>    In JSP: Is there some sort of  `isRelated' function to quickly determine
>    if two nodes are related. I only want to show a node that is related to
>    three other nodes of different types. The node numbers of the related
>    nodes are known.


There is not one tag or one function for that.

It can relatively easily and efficiently be emulated by something like this:

     <mm:listnodescontainer type="insrel">
        <mm:composite operator="or">
          <mm:composite operator="and">
            <mm:constraint field="snumber" value="$node1" />
            <mm:constraint field="dnumber" value="$node2" />
          </mm:composite>
          <mm:composite operator="and">
            <mm:constraint field="snumber" value="$node2" />
            <mm:constraint field="dnumber" value="$node1" />
          </mm:composite>
        </mm:composite>
        <mm:size>
          <mm:compare value="0" inverse="true">
            ${node1} and ${node2} are related!
          </mm:compare>
        </mm:size>
      </mm:listnodescontainer>

and if you know the direction, about half of that...

You can do something with operator "IN" for three other nodes at the same
time.

I do think something like "mm:isrelated" is a valid wish. Simply add it
to the bugtracker if you like. It's quite easily granted (actually the
amount of  time for creating the tag would  have been comparable to the
amount it costed me to type up this mail...)

Probably it would be an idea to add a few attribute to the already
existing mm:hasrelations (like 'source', 'destination', 'other' and
'role') or so.

Michiel


-- 
Michiel Meeuwissen                  mihxil'
Peperbus 111 MediaPark H'sum          [] ()
+31 (0)35 6772979         nl_NL eo_XX en_US



_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.3/296 - Release Date: 29-3-2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.3/296 - Release Date: 29-3-2006
 
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to