[opencms-dev] Programmatic login: No direct edit

Roman-Uhlig roman.uhlig at maxity.de
Tue Jul 5 18:00:43 CEST 2011


Hi,
I'm trying to achieve direct edit functionality after logging in a workplace
user programmatically through a website. Everything works fine when done
through a workplace login, but not when done through an programmatic API
login.

Config:

     siteroot: /sites/sitetest
     project: test1

Programmatic Login:

     CmsJspLoginBean cms = new CmsJspLoginBean(pageContext, request,
response);
     cms.login(username, password, "test", cms.link("index_edit_test.jsp"));

index_edit_test.jsp:

     ...including cms editable in the header....

     CmsJspXmlContentBean jcb = new CmsJspXmlContentBean(pageContext,
request, response);
     I_CmsXmlContentContainer contentContainer =
jcb.contentload("singleFile", "/test.html", new java.util.Locale("en"),
true); 
     if (contentContainer.hasMoreContent()) {
     ...
     }

As said before, when doing the above through workplace login, everything is
fine. When doing through the login method shown above, no direct edit
buttons appear. The test is done through a Domain which is connected to
/sites/sitetest inside modules-system.xml:

     <site server="http://my.test.domain" uri="/sites/sitetest/" />

And one more thing I noticed: when trying the whole thing inside the
/sites/default context, it's working.

Any ideas on this would be very appreciated.

Thanks,
Roman
-- 
View this message in context: http://old.nabble.com/Programmatic-login%3A-No-direct-edit-tp31998077p31998077.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.




More information about the opencms-dev mailing list