<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>Change property in action class</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Hi everybody</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">I'm trying to set a property of a resource inside of an action class that listens to I_CmsEventListener.EVENT_RESOURCE_MODIFIED.</FONT></SPAN></P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">The problem is that once I'm not logged in as "Admin" I can't change this property. The error message: Resource XYZ is not locked by current user "Admin". Again, that happens when I'm not logged in as Admin. The class works as expected if I login as Admin and modify the resource then. Another user which also has root admin rights but is not named "Admin" can't do it.</FONT></SPAN></P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">So my guess was that the system internally somehow switches the user prior to firing the event. cmsObject.getRequestContext().currentUser().getFullName() confirms this. The context also tells me that it is in the Online project (which kinda explains the Admin).</FONT></SPAN></P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Any ideas how to get around this? Is there a way to change the lock of this resource temporary and then set it back to it's original state? Or overwrite a property since you are the admin in this situation anyway? Or is there another way to catch events in the Offline project?</FONT></SPAN></P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">The whole task is to put the categories (relations --> assign categories) in a property field that is indexable for the search. Maybe I'm on a wrong path here and I don't need/can't to do this via the action class. If someone has an idea, please let me know too.</FONT></SPAN></P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Thanks and best regards</FONT></SPAN><SPAN LANG="de"></SPAN>
</P>
<P><SPAN LANG="de"><B><FONT SIZE=2 FACE="Trebuchet MS">__________________________________</FONT></B></SPAN>
<BR><SPAN LANG="de"><B><FONT SIZE=2 FACE="Trebuchet MS">Enrico Popall</FONT></B></SPAN>
<BR><SPAN LANG="de"><B><FONT SIZE=2 FACE="Trebuchet MS">Software AG</FONT></B></SPAN>
<BR><SPAN LANG="de"><FONT SIZE=2 FACE="Trebuchet MS">Global Marketing</FONT></SPAN>
<BR><SPAN LANG="de"><FONT SIZE=2 FACE="Trebuchet MS">Uhlandstr.12, 64297 Darmstadt, Germany</FONT></SPAN><SPAN LANG="en-us"></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Tel: +49 6151 922998</FONT></SPAN>
</P>
</BODY>
</HTML>