<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Brian Olore Story &#187; portal</title>
	<atom:link href="http://brian.olore.net/wp/tag/portal/feed/" rel="self" type="application/rss+xml" />
	<link>http://brian.olore.net</link>
	<description>Less of a story, more of a brain dump</description>
	<lastBuildDate>Thu, 02 Sep 2010 20:31:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Websphere Portal theme navigation context menus</title>
		<link>http://brian.olore.net/wp/2009/05/websphere-portal-theme-navigation-context-menus/</link>
		<comments>http://brian.olore.net/wp/2009/05/websphere-portal-theme-navigation-context-menus/#comments</comments>
		<pubDate>Fri, 01 May 2009 15:06:55 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[portal]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[websphere]]></category>

		<guid isPermaLink="false">http://brian.olore.net/?p=51</guid>
		<description><![CDATA[I spend a lot of my day working with WebSphere Portal server, and as of late, spending more time (than I&#8217;d like!) with themes &#38; skins. I am currently working with Portal v6.1, but the information below should be useful for previous versions as well. Our portal is pretty open, we want people to come [...]]]></description>
			<content:encoded><![CDATA[<p>I spend a lot of my day working with WebSphere Portal server, and as of late, spending more time (than I&#8217;d like!) with themes &amp; skins. I am currently working with Portal v6.1, but the information below should be useful for previous versions as well.<img src="http://www-01.ibm.com/software/main/img/com/ws-mark-title-235x50.gif" alt="WebSphere software" width="235" height="50" align="right" /></p>
<p>Our portal is pretty open, we want people to come in &amp; customize it as much as they&#8217;d like. One feature that we allow is for the user to come in &amp; create new pages. We are running our own <a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/topic/com.ibm.wp.ent.doc/dev/dgn_thempolicy.html">theme policy</a> which is a copy of the <a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/topic/com.ibm.wp.ent.doc/dev/dgn_thempolicy.html?resultof=%22%64%6f%75%62%6c%65%74%6f%70%6e%61%76%22%20">DoubleTopNav</a> policy. Our theme displays these 2 levels of navigation at the top, and we have no side navigation.</p>
<p>The hurdle I ran into was &#8211; how do I prevent the &#8220;New Page&#8221; option from appearing in the portlet menu for pages in the second level of navigation? The way the out-of-the-box Portal theme works is that when you create a new page, it is created as a child of the page that you are on. This works fine for top level pages, but there no policy or rule that can be set to prevent the &#8220;New Page&#8221; option from appearing in the portlet menu for second level pages.</p>
<p>The solution, proposed by a member of the Portal team was to create an alternate<strong> pageContextMenu.jsp</strong> which simply didn&#8217;t have a &#8220;New Page&#8221; option. Since the call the that JSP is done via AJAX, prior to the call we can determine what navigation level we are on and call the appropriate version of <strong>pageContextMenu.jsp</strong>.</p>
<p>Piece of cake, right? Eh .. maybe not cake, but not all that difficult. After creating the new <strong>pageContextMenu2.jsp</strong> &amp; removing the &#8220;New Page&#8221; option, the next place to go is <strong>head_inlineJS.jspf</strong>. Below is the code I have added/modified to the <strong>head_inlineJS.jspf</strong>.</p>
<div class="dean_ch" style="overflow: scroll;white-space: nowrap;">&lt;%&#8211; START &#8211; see <span class="kw1">if</span> we are in 2nd level of navigation &#8211;%&gt;<br />
&lt;%<br />
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> pageContextMenuJSP = <span class="st0">&quot;pageContextMenu&quot;</span>;<br />
%&gt;<br />
&lt;portal-navigation:navigation startLevel=<span class="st0">&quot;2&quot;</span> stopLevel=<span class="st0">&quot;3&quot;</span>&gt;<br />
&nbsp; &lt;portal-navigation:navigationLoop&gt;<br />
&nbsp; &nbsp; &lt;portal-logic:<span class="kw1">if</span> nodeInSelectionPath=<span class="st0">&quot;yes&quot;</span>&gt;<br />
&nbsp; &nbsp; &lt;%<br />
&nbsp; &nbsp; &nbsp; <span class="co1">//it&#8217;s in selection path &amp;amp; it&#8217;s selected (this is the page we are on!</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>wpsSelectionModel.<span class="me1">isNodeSelected</span><span class="br0">&#40;</span>wpsNavNode<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">int</span> level = wpsNavLevel.<span class="me1">intValue</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>level == <span class="nu0">2</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pageContextMenuJSP = <span class="st0">&quot;pageContextMenu2&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; %&gt;<br />
&nbsp; &nbsp; &lt;/portal-logic:if&gt;<br />
&nbsp; &lt;/portal-navigation:navigationLoop&gt;<br />
&lt;/portal-navigation:navigation&gt;<br />
&lt;%&#8211; END &#8211; see <span class="kw1">if</span> we are in 2nd level of navigation &#8211;%&gt;</p>
<p>&lt;%&#8211; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AContext+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Context</span></a> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AMenu+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Menu</span></a> Initialization &#8211;%&gt;<br />
&lt;c-rt:set var=<span class="st0">&quot;pageNoActionsText&quot;</span> &gt;&lt;portal-fmt:text bundle=<span class="st0">&#8216;nls.engine&#8217;</span> key=<span class="st0">&#8216;info.emptymenu&#8217;</span> /&gt;&lt;/c-rt:set&gt;<br />
<span class="br0">&#40;</span>function<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></p>
<p>var pageMenuURL = <span class="st0">&#8216;&lt;portal-navigation:url themeTemplate=&quot;&lt;%=pageContextMenuJSP%&gt;&quot; /&gt;&#8217;</span>;<br />
&lt;%&#8211; OLD var pageMenuURL = <span class="st0">&#8216;&lt;portal-navigation:url themeTemplate=&quot;pageContextMenu&quot; /&gt;&#8217;</span>; &#8211;%&gt;</div>
<p>Now that you&#8217;ve got that taken care of, <strong>touch head.jspf &amp;&amp; touch Default.jsp</strong>, reload your page and you should no longer see &#8220;New Page&#8221; as an option in the page drop down for pages in the 2nd level of your navigation.</p>
<p>That worked and was a thing of beauty .. well, almost. I wasn&#8217;t a big fan of looping through the entire navigation model, but I didn&#8217;t know any other way. I ran the code past my colleague from the Portal team and he pointed me at the <strong>navigationSelectionModel</strong>. The code below is smaller &amp; faster. Best of all &#8211; it works <img src='http://brian.olore.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="dean_ch" style="overflow: scroll;white-space: nowrap;">&lt;%&#8211; <span class="nu0">2009.05</span><span class="nu0">.04</span> OLORE &#8211; see <span class="kw1">if</span> we are in 2nd level of navigation &#8211;%&gt;<br />
&lt;%<br />
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> pageContextMenuJSP = <span class="st0">&quot;pageContextMenu&quot;</span>;</p>
<p><span class="kw4">int</span> level_count = <span class="nu0">0</span>;<br />
<span class="kw1">for</span> <span class="br0">&#40;</span>java.<span class="me1">util</span>.<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AIterator+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Iterator</span></a> i = nsm.<span class="me1">iterator</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; i.<span class="me1">hasNext</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; <span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; NavigationNode node = <span class="br0">&#40;</span>NavigationNode<span class="br0">&#41;</span> i.<span class="me1">next</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; level_count++;<br />
<span class="br0">&#125;</span><br />
<span class="kw1">if</span> <span class="br0">&#40;</span>level_count &gt;= <span class="nu0">4</span><span class="br0">&#41;</span> <span class="br0">&#123;</span> <span class="co1">// level 4 == our 2nd level of top navigation (shouldn&#8217;t ever be &gt;)</span><br />
&nbsp; pageContextMenuJSP = <span class="st0">&quot;pageContextMenu2&quot;</span>;<br />
<span class="br0">&#125;</span></p>
<p>%&gt;<br />
&lt;%&#8211; <span class="nu0">2009.05</span><span class="nu0">.04</span> OLORE &#8211; see <span class="kw1">if</span> we are in 2nd level of navigation &#8211;%&gt;</p>
<p>&lt;%&#8211; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AContext+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Context</span></a> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AMenu+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Menu</span></a> Initialization &#8211;%&gt;<br />
&lt;c-rt:set var=<span class="st0">&quot;pageNoActionsText&quot;</span> &gt;&lt;portal-fmt:text bundle=<span class="st0">&#8216;nls.engine&#8217;</span> key=<span class="st0">&#8216;info.emptymenu&#8217;</span> /&gt;&lt;/c-rt:set&gt;<br />
<span class="br0">&#40;</span>function<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></p>
<p>&nbsp; &lt;%&#8211; <span class="nu0">2009.05</span><span class="nu0">.01</span> OLORE &#8211; use pageContextMenu2 <span class="kw1">if</span> we are in 2nd level nav &#8211;%&gt;<br />
&nbsp; var pageMenuURL = <span class="st0">&#8216;&lt;portal-navigation:url themeTemplate=&quot;&lt;%=pageContextMenuJSP%&gt;&quot; /&gt;&#8217;</span>;<br />
&nbsp; &lt;%&#8211; <span class="nu0">2009.05</span><span class="nu0">.01</span> OLORE &#8211; use pageContextMenu2 <span class="kw1">if</span> we are in 2nd level nav &#8211;%&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://brian.olore.net/wp/2009/05/websphere-portal-theme-navigation-context-menus/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My Lotusphere session</title>
		<link>http://brian.olore.net/wp/2008/11/my-lotusphere-session/</link>
		<comments>http://brian.olore.net/wp/2008/11/my-lotusphere-session/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 03:01:54 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[lotusphere]]></category>
		<category><![CDATA[lotusphere2009]]></category>
		<category><![CDATA[portal]]></category>
		<category><![CDATA[speaking]]></category>

		<guid isPermaLink="false">http://brian.olore.net/?p=19</guid>
		<description><![CDATA[Come check me out at Lotusphere 2009. Session Title: Innovation with Integration: IBM&#8217;s &#8220;Next Generation&#8221; Intranet Portal Session Track: ID503 Track Three: Planning and Managing Your Collaboration Infrastructure Continuous innovation of IBM&#8217;s enterprise portal, in a rapid, non-disruptive, evolutionary manner is a major goal of the &#8220;ODW Next&#8221; project. The On Demand Workplace (ODW) is [...]]]></description>
			<content:encoded><![CDATA[<p>Come check me out at <a href="https://www.ibm.com/lotus/lotusphere">Lotusphere 2009</a>.</p>
<p>Session Title: <a href="https://www-950.ibm.com/events/wwe/lotus/lsph2009.nsf/sessionabstract?openform&amp;sessionid=ID503">Innovation with Integration: IBM&#8217;s &#8220;Next Generation&#8221; Intranet Portal</a><br />
Session Track: ID503<br />
Track Three: Planning and Managing Your Collaboration Infrastructure</p>
<p>Continuous innovation of IBM&#8217;s enterprise portal, in a rapid, non-disruptive, evolutionary manner is a major goal of the &#8220;ODW Next&#8221; project. The On Demand Workplace (ODW) is IBM&#8217;s single point of entry for employee intranet access (w3.ibm.com). It serves as the &#8220;front door&#8221; to IBM&#8217;s internal transformation activities, providing a personalized work environment for more than 350,000 employees, in over 100 countries. The approach of ODW Next is to couple a live innovation platform &#8211; a &#8220;perpetual beta&#8221; &#8211; alongside the production environment, to obtain the maximum benefits of live usage and continuous feedback from a statistically significant number of global employees, while minimizing risk to the steady state production systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://brian.olore.net/wp/2008/11/my-lotusphere-session/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
