<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=308255514-25082009><FONT face=Arial size=2>Hello
list!</FONT></SPAN></DIV>
<DIV><SPAN class=308255514-25082009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=308255514-25082009><FONT face=Arial size=2>I've tried to
add a user-defined relation to OpenCms using the following
approaches:</FONT></SPAN></DIV>
<DIV><SPAN class=308255514-25082009><FONT face=Arial size=2>1.) in a JSP
file by calling the constructor in org.opencms.relations.CmsRelationType.
</FONT></SPAN></DIV>
<DIV><SPAN class=308255514-25082009><FONT face=Arial size=2>2.) by creating
a module with an action class, and calling the above
mentioned constructor </FONT></SPAN></DIV>
<DIV><SPAN class=308255514-25082009><FONT face=Arial size=2>from the action
class' initialize-method.</FONT></SPAN></DIV>
<DIV><SPAN class=308255514-25082009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=308255514-25082009><FONT face=Arial size=2>Approach 1.)
produced an error.</FONT></SPAN></DIV>
<DIV><SPAN class=308255514-25082009><FONT face=Arial size=2>Approach 2.) did not
produce any error, but when getting the list of relation types from
</FONT></SPAN></DIV>
<DIV><SPAN class=308255514-25082009><FONT face=Arial
size=2>CmsRelationType.getAll(), my user-defined relation is not there. Also,
trying to use </FONT></SPAN></DIV>
<DIV><SPAN class=308255514-25082009><FONT face=Arial size=2>my user-defined
relation with </FONT></SPAN><SPAN class=308255514-25082009><FONT face=Arial
size=2>addRelationToResource() does not work. It gives an </FONT></SPAN></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=308255514-25082009>exception
telling me that: </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=308255514-25082009></SPAN><SPAN
class=308255514-25082009> </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=308255514-25082009>The value
"801" can not be parsed into an enum </SPAN></FONT><SPAN
class=308255514-25082009><FONT size=2>element of type
"org.opencms.relations.CmsRelationType"</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=308255514-25082009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=308255514-25082009>(Which btw is kinda
interesting, sice I actually try to use the value "901", not "801", which
is</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=308255514-25082009>the ID
I assigned my user-defined relation.)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=308255514-25082009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=308255514-25082009><SPAN
class=308255514-25082009><FONT face=Arial size=2>Is anyone able to tell me how
to add a user-defined relation?</FONT></SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=308255514-25082009><SPAN
class=308255514-25082009></SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=308255514-25082009><SPAN
class=308255514-25082009>Thanks,</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=308255514-25082009><SPAN
class=308255514-25082009>Paul</SPAN></SPAN></FONT></DIV></BODY></HTML>