Hi Deiverson and list,<br><br>As far as I know, locking and publishing a file is always necessary when you create a file, considering you need it available in the Online project. If you only need it in the Offline project, there should be no need to do so.<br>
<br>Anyway, based on similar code as the one from the wiki, you could do the following:<br><br>1.- Specify an action class for one of your modules that stores the privileged CmsObject.<br>2.- Define in that class an static method called for instace "writeFileInWorkspace" that, using the previously stored CmsObject creates the file, lock and publish it.<br>
3.- Call that method from anywhere in your site.<br><br>I have described this approach in <a href="http://www.opencms-wiki.org/Action_classes">http://www.opencms-wiki.org/Action_classes</a>, and though painful can be extremely reusable, write the code once and use it in many places. I hope this gives you more information so you can decide better what to do. Greetings,<br>
<br>Nacho Fernandez.<br>