Michiel Meeuwissen wrote:
> > mm:list - can't filter by role, perhaps "constraints" could
> do it, though
> > looking at the examples in the taglib docs, it seems the conditional
> > expressions only refer to field values; perhaps I am
> mistaken and the
> > constraint expression can be more complex?
> >
> > mm:listrelations - can't filter by direction
> >
> > mm:related - can't filter by role
> >
> > mm:relatednodes - can't filter by role or direction
> >
> > Any help or pointers to docs would be greatly appreciated.
>
> I think you can add the 'role' to the path of 'related' and of 'list'.
>
> Like:  path="news,posrel,images"
>
>
>  Michiel

Thanks for the suggestion, but I had already tried this and it did not work
as expected.

I think I have lost all understanding.  From what the docs say, a role is
the name of a direction in a relation, like related, parent, or child, i.e.
stuff that we can find in reldef, n'est-ce pas?

>From docs on the mmbase site:  "Lets call the direction of a relationship a
role. The role played by the subject is called the forward role the role
played by the object is called the reciprocal role."

Your use of posrel above (which is an object/builder) seems to contradict
this.  Posrel is just another object type in the path, and not a role.  If I
have two task objects in a "parent/child" relation, and another task in a
"related/related" relation how do I distinguish the parent from the child,
or the parent/child from the related/related?  If I try to use parent for
the role, I get the following error.

org.mmbase.bridge.BridgeException: Parameters are invalid : NODES='-1'
TYPES='tasks,parent,tasks' FIELDS='' - null
        at org.mmbase.bridge.implementation.BasicCloud.getList(BasicCloud.java)
....

I tried to find some examples in the jsp editors to help me out, but
strangely enough, the jsp editors don't distinguish between roles, e.g. all
parent/child relations are marked as parent, regardless of the direction of
the relation.

I'm afraid I am missing something.  Once again, thanks for you patience, and
any help would be greatly appreciated.


Reply via email to