[opencms-dev] using directedit from outside the workspace

RĂ¼diger Kurz r.kurz at alkacon.com
Thu Aug 30 20:01:37 CEST 2012


Hi,

using the method:

/**
  * Logs a system user in to OpenCms.<p>
  *
  * Note that if a login project name is provided, this project must
  * exist, otherwise the login is regarded as a failure even if the user
  * data was correct.<p>
  *
  * @param userName the users name
  * @param password the password
  * @param projectName the project to switch to after login
  * @param redirectUri the URI to redirect to after login
  *
  * @throws IOException in case redirect was not successful
  */
org.opencms.jsp.CmsJspLoginBean.login(String, String, String, String)

should switch to the project passed as third parameter. In order to 
initialize the CmsJspLoginBean in any JSP file you can call:

new CmsJspLoginBean(pageContext, request, response);

Hope that helps
RĂ¼diger


Am 28.08.2012 22:43, schrieb Riley Pickerl:
> In opencms is it possible to edit content outside of the workspace? If a
> user logs in from the online site I want to turn the project to offline
> and allow them to use the WYSIWYG editor to change their content
> (similar to in offline mode).
>
> To turn the project offline I have (in my jsp login validation check):
>
> CmsRequestContext crq = cms.getRequestContext();
> CmsProject project = cms.readProject("Offline");
> crq.setCurrentProject(project);
>
> This works fine and the content is supposedly editable. However when I
> click on the [Edit] links and the editors start to open the close
> because the WYSIWYG (FCKeditor) is still in the online context and you
> cannot write from the online context. Has anyone been able to use the
> editors by programmatic-ly turning the project to offline mode? Or is
> there a way to use the WYSIWYG editors strictly going through a
> front-end application and without having to access or use the opencms
> interface?
>
> Thanks in advance!




More information about the opencms-dev mailing list