Hello,<br>To change the project from online to offline you can do it like this:<br><br><pre style="font-family: arial,helvetica,sans-serif;" class="source-java"> CmsRequestContext cmsContext = cmsObj.<span class="me1">getRequestContext</span><span class="br0">(</span><span class="br0">)</span>;
CmsProject curProject = cmsContext.<span class="me1">currentProject</span><span class="br0">(</span><span class="br0">)</span>;
<span class="kw1">if</span><span class="br0">(</span>curProject.<span class="me1">isOnlineProject</span><span class="br0">(</span><span class="br0">)</span><span class="br0">)</span><span class="br0">{</span>
CmsProject offlineProject = cmsObj.<span class="me1">readProject</span><span class="br0">(</span><span class="st0">"Offline"</span><span class="br0">)</span>;
cmsContext.<span class="me1">setCurrentProject</span><span class="br0">(</span>offlineProject<span class="br0">)</span>;
<span class="br0">}</span></pre><br><br><div class="gmail_quote">On Fri, Oct 28, 2011 at 10:49 AM, 20726424 <span dir="ltr"><<a href="mailto:20726424@qq.com">20726424@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
By default OpenCms object uses the project in online,so when someone visit the project,he will visit the project in online.<br> How can I make them to visit the project in offline?<br><br>_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
<br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div style="text-align:left"><img src="http://alejandroalves.files.wordpress.com/2010/10/firmamail.jpg"><br></div><br>