<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
>

<channel>
	<title>John BrunswickEnterprise 2.0 Workbench</title>
	<atom:link href="http://www.johnbrunswick.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johnbrunswick.com</link>
	<description>WebCenter Portal, Sites and Content</description>
	<lastBuildDate>Fri, 04 May 2012 05:34:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<!-- podcast_generator="Blubrry PowerPress/1.0.13" mode="advanced" entry="advanced" -->
	<itunes:summary>The Workbench series provides how-to tutorials, showcasing tips and tricks with Oracle&#039;s WebCenter and Universal Content Management technologies.  Geared toward the development community, each tutorial session is intended to provide building blocks that can be used as the basis for an organization&#039;s enterprise projects.</itunes:summary>
	<itunes:author>John Brunswick</itunes:author>
	<itunes:explicit>clean</itunes:explicit>
	<itunes:image href="http://www.johnbrunswick.com/wp-content/uploads/2011/02/e2_workbench_logo.jpg" />
	<itunes:owner>
		<itunes:name>John Brunswick</itunes:name>
		<itunes:email>john.brunswick@gmail.com</itunes:email>
	</itunes:owner>
	<managingEditor>john.brunswick@gmail.com (John Brunswick)</managingEditor>
	<itunes:subtitle>Tips and Tricks with Oracle&#039;s Enterprise 2.0 Stack - WebCenter and Universal Content Management Technologies</itunes:subtitle>
	<itunes:keywords>Enterprise 2.0, Oracle, WebCenter, UCM, WCM, Content Management, ADF, Universal Content Management, Portal, Web Content Management</itunes:keywords>
	<image>
		<title>John Brunswick</title>
		<url>http://www.johnbrunswick.com/wp-content/plugins/powerpress/rss_default.jpg</url>
		<link>http://www.johnbrunswick.com</link>
	</image>
	<itunes:category text="Technology">
		<itunes:category text="Software How-To" />
	</itunes:category>
	<itunes:category text="Education">
		<itunes:category text="Education Technology" />
		<itunes:category text="Training" />
	</itunes:category>
		<item>
		<title>WebCenter Portal Template Design Best Practices</title>
		<link>http://www.johnbrunswick.com/2012/05/webcenter-portal-template-design-best-practices/</link>
		<comments>http://www.johnbrunswick.com/2012/05/webcenter-portal-template-design-best-practices/#comments</comments>
		<pubDate>Fri, 04 May 2012 05:32:48 +0000</pubDate>
		<dc:creator>John Brunswick</dc:creator>
				<category><![CDATA[ADF]]></category>
		<category><![CDATA[Portal]]></category>
		<category><![CDATA[WebCenter]]></category>

		<guid isPermaLink="false">http://www.johnbrunswick.com/?p=1395</guid>
		<description><![CDATA[Collaborate 2012 was a great event for the WebCenter product stack at Oracle. Excellent customer turnout, combined with a wealth of resources for WebCenter, helped to make this a very worthwhile event. I presented the following deck to provide an &#8230; <a href="http://www.johnbrunswick.com/2012/05/webcenter-portal-template-design-best-practices/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://collaborate12.com/">Collaborate 2012</a> was a great event for the WebCenter product stack at Oracle.  Excellent customer turnout, combined with a wealth of resources for WebCenter, helped to make this a very worthwhile event. I presented the following deck to provide an overview of WebCenter Template development and design best practices.  Hope that these tips are helpful in your deployments.</p>
<link href='http://fonts.googleapis.com/css?family=Molengo' rel='stylesheet' type='text/css'>
<style>
div.slide
{
	width: 700px;
	height: 389px;
	background: url(/presoimg/bg_grey.jpg);
	font-family: 'Molengo', sans-serif ! important;
	border-radius: 6px;
	-moz-box-shadow: inset 0 0 5px #888;
	-webkit-box-shadow: inset 0 0 5px#888;
	box-shadow: inner 0 0 5px #888;
color: #222;
}
div.comments
{
	margin-bottom: 25px;
	padding: 5px;
}
div.slide a
{
	color: #009BC2;
	text-decoration: none;
}
div.slide img
{
	float: left;
}
div.title
{
	float: left;
	margin-top: 353px;
	margin-left: 20px;
	color: #fff;
	font-family: 'Molengo', sans-serif;
	position: absolute;
	font-size: 1.2em ! important;
}
div.presotitle
{
	color: #cff579;
	color: white;
	font-size: 2.8em;
	margin-left: 40px;
	margin-top: 100px;
	float: left;
	position: absolute;
}
div.highlight
{
	color: #cff579;
	font-size: 1.8em;
	margin-left: 40px;
	margin-top: 156px;
	float: left;
	position: absolute;
}
div.presoauthor
{
	color: #ddd;
	font-size: 1.2em;
	margin-left: 40px;
	margin-top: 338px;
	float: left;
	position: absolute;
}
div.singletitle
{
	margin-top: 150px;
	text-align: center;
	width: 700px;
	color: #fff;
	font-family: 'Molengo', sans-serif;
	position: absolute;
	font-size: 3.6em;
}
div.slidebody
{
	float: left;
	font-size: 1.5em ! important;
	line-height: 1.1em ! important;
}
div.slidebody.white
{
	color: #fff;
}
div.openstyle
{
	float: left;
	position: absolute;
}
div.slidebody li
{
	margin-bottom: 0px;
	margin-left: 10px;
	margin-right: 10px;
line-height: 1.2 ! important;
padding: 0px ! important;
list-style-type: disc ! important;
}
div.slidebody ul ul li
{
	font-size: .8em;
list-style-type: disc ! important;
}
ul.spaced li
{
	margin-top: 10px;
	line-height: 1.4em ! important;
list-style-type: disc ! important;
}
</style>
<div class="slide" style="background:url(/presoimg/bg_start.jpg);">
<div class="presotitle">WebCenter Portal</div>
<div class="highlight">Template Development and Design Best Practices</div>
<div class="presoauthor">John Brunswick | Oracle Principal Sales Consultant</div>
</div>
<div class="comments">In our presentation WebCenter Portal Template Development and Design Best Practices we will take a look at foundational elements that will help you be successful with designing and developing your website portal user interface.</div>
<div class="slide">
<div style="float: left;margin-left: 430px;position: absolute;width: 258px;overflow: hidden;color: white;text-shadow: 1px 0 3px #333;font-size: 1.4em;opacity: .5;">.AFInstructionText,.x0,.PortletText1,.xcg,.PortletText2,.xch,.PortletText3,.xci,.PortletText4,.xcj,.portlet-form-field,.xd8,.x1lc,.x1ld,.x1le,.x1lf,.x1lg {font-family:Tahoma,Verdana,Arial,Helvetica,FreeSans,sans-serif;font-weight:normal;font-size:11px;color:#555555}.AFInstructionTextDisabled,.x1,.AFFieldTextDisabled,.x7,.x1u.p_AFDisabled.x2p .x25,.x1u.p_AFDisabled.x2q .x25,.x1u.p_AFDisabled.x2r .x25,.x1u.p_AFDisabled.x2s</div>
<div class="slidebody">
<ul>
<li>Foundation</li>
<li>Skin Selectors</li>
<li>Skinning Approach</li>
<ul>
<li>Page Layouts</li>
<li>CSS Menus</li>
<li>Externalizing Static Resources</li>
</ul>
<li>Tools</li>
<li>Hair Loss and Hacks</li>
<li>Q&#038;A</li>
</ul></div>
<div class="title">What We will Cover</div>
</div>
<div class="comments">We&#8217;ll start by examining how the Advanced Developer Framework manages cascading stylesheets and JavaScript and its impact on user interface development.  We will also cover how to set up CSS using skin selectors to form the look and feel of your website or portal. Various skinning approaches to help you quickly and effectively skin your portal and tools available to help you skin your portal in addition to some tips and tricks to get out of tricky spots.</div>
<div class="slide" style="background:url(/presoimg/bg_design.jpg);">
<div class="slidebody white">
<ul style="width: 350px" class="spaced">
<li>Design Meets IT&#8230;</li>
<li>Cool Messenger Bag</li>
<li>Drinks Complicated Coffee Drinks</li>
<li>Understands Typography</li>
<li>If you think something is &#8220;in&#8221;, he agrees, but says it &#8220;was 5 years ago&#8221;</li>
</ul></div>
<div class="title">Context for this Discussion &#8211; Design with Platforms</div>
</div>
<div class="comments">As the commercialization of Information Technology has taken place, more demands have been placed on our IT organizations to produce aesthetically pleasing websites.  When we design and develop portals we often have to interface with marketing teams that have been using designers to develop the look and feel of the user experience.  This can make it difficult to implement, if we do not have the correct approach to having it work within the portal platform.</div>
<div class="slide" style="background:url(/presoimg/bg_dark.jpg);">
<div class="singletitle">Hitting Our Stride</div>
</div>
<div class="comments"> </div>
<div class="slide" style="background:url(/presoimg/bg_stride.jpg);">
</div>
<div class="comments">When asked to attempt to style our portal we often encounter challenges trying to approach the design and development as we do with other technologies.  ADF uses CSS and standard technologies for the UI layer, but to make things as easy to manage as possible we need to understand its foundation.</div>
<div class="slide" style="background:url(/presoimg/bg_dark.jpg);">
<div class="singletitle">Foundation</div>
</div>
<div class="comments"> </div>
<div class="slide">
	<img src="/presoimg/trinidad_logo.png" style="margin-top: 50px;"/>
<div class="title">Apache Trinidad</div>
</div>
<div class="comments">ADF shares its user interface skinning capabilities with <a href="http://myfaces.apache.org/trinidad/">Apache Trinidad&#8217;s MyFaces</a>, because of this we need to use something called Apache Trinidad skinning to change the look and feel of the Advanced Developer Framework pages.  To do this we use <a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/skin-selectors.html">ADF Skin Selectors</a> that we will cover in more depth later.</div>
<div class="slide">
<div class="openstyle" style="margin-top: 10px; font-size: 1.6em; text-align: center;width: 700px;">richdemo-desktop-7henwz-ltr-safari-cmp.css</div>
<p>	<img src="/presoimg/skin_lifecycle.png" style="margin-left: 100px;margin-top: 30px;"/>
<div class="title" style="margin-top:331px">CSS &#8220;Lifecycle&#8221; in ADF</div>
</div>
<div class="comments">CSS generated by ADF follows a certain life cycle.  This lifecycle includes operations that happen on the server to deliver content that is specific to the platform requesting the webpage.  This allows us to use server-side markup to ultimately deliver a very customized experience for a specific client.  It also means that the CSS and JS delivered to the client are delivered on the basis of what we have done with ADF Skinning.  The resulting files sent to the client are CSS standards, but in order to generate them we must follow the ADF skinning process.  Please note that there are some other approaches that we will cover later, but the ADF Skinning approach does a nice job of isolating the look and feel from the code and version of the portal.</div>
<div class="slide">
<div class="slidebody">
	<img src="/presoimg/compression.png" style="margin-right: 10px;margin-top: 25px;float: left;position: absolute;margin-left: 203px;"/></p>
<ul style="width: 168px">
<li>Obfuscation &#038; Compression</li>
<ul>
<li>Design goal of reduced file size</li>
</ul>
<li>Turn off in web.xml</li>
</ul></div>
<div class="title">CSS Compression</div>
</div>
<div class="comments">As we start designing with CSS in WebCenter Portal we want to disable the compression that ADF applies.  This can be done by turning off the compression feature in the web.XML file to make the resulting CSS generated by ADF for its components much more readable.  This gives us the ability to inspect it, to quickly make UI adjustments.</div>
<div class="slide">
	<img src="/presoimg/geometry.png" style="margin-left: 80px"/></p>
<div class="title" style="margin-top:331px">Geometry</div>
</div>
<div class="comments">ADF&#8217;s &#8220;geometry&#8221; determines the layout of the page.  One thing that is important to be successful with portal design is to establish a good understanding of the layout components of ADF and their resulting user interfaces.</div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/adf_layout_preview.png" style="margin-top: 25px;float: left;position: absolute;margin-left: 444px;"/></p>
<ul style="width: 270px">
<li>ADF Layout Preview Site</li>
<li>ADF Layout Online Tool</li>
<ul>
<li><a href="http://jdevadf.oracle.com/adf-richclient-demo/faces/visualDesigns/index.jspx">http://jdevadf.oracle.com/adf-richclient-demo/faces/visualDesigns/index.jspx</a></li>
</ul>
<li>Martin Deh Blog Post</li>
<ul>
<li><a href="http://martindeh.blogspot.com/2009/08/adf-layout-overview-and-best-practices.htm">http://martindeh.blogspot.com/2009/08/adf-layout-overview-and-best-practices.htm</a></li>
</ul>
</ul></div>
<div class="title">ADF Layout Preview</div>
</div>
<div class="comments">To help us understand this layout there are a few nice online tools.  Take a look at the <a href="http://jdevadf.oracle.com/adf-richclient-demo/faces/visualDesigns/index.jspx">ADF Rich Client Demo</a> online tool to get a sense of what different layout components look like.  Additionally a <a href="http://martindeh.blogspot.com/2009/08/adf-layout-overview-and-best-practices.htm">blog post by Martin Day</a> outlines the various best practices for how to use the layout components together.</div>
<div class="slide" style="background:url(/presoimg/bg_dark.jpg);">
<div class="singletitle">Geometry and Layout</div>
</div>
<div class="comments"> </div>
<div class="slide">
<div class="slidebody">
	<img src="/presoimg/flow_or_stretch.png" style="margin-top: 25px;float: left;position: absolute;margin-left: 400px;"/></p>
<ul style="width: 340px">
<li>To Flow or not to Flow?</li>
<li>Scrolls Bar Headaches</li>
<ul>
<li>Majority of web sites use flow-type layout</li>
</ul>
<li>Since a page template can be changed dynamically</li>
<ul>
<li>Create pages and design custom components that display properly in stretching and flowing context</li>
</ul>
</ul></div>
<div class="title">Flow or Stretch?</div>
</div>
<div class="comments">To have WebCenter Portal pages that reflect most web site designs, we want to use a flow layout stretch layouts are good for dashboards and applications that are going to be very rich in nature and mimic a desktop experience.  Take a look at <a href="http://www.slideshare.net/maikorocha/designing-well-known-websites-with-adf-rich-faces">Designing well known websites with ADF Rich Faces</a> from <a href="http://adfgarage.blogspot.com/">Maiko Rocha</a> and <a href="http://georgemaggessy.blogspot.com/">George Magessy</a> for some examples of variosu layout strategies.</div>
<div class="slide">
<div class="slidebody">
	<img src="/presoimg/flow_arrow.png" style="margin-top: 0px;float: left;position: absolute;margin-left: 10px;"/></p>
<ul style="margin-left: 106px">
<li>Build outer structure with containers that can be stretched and stretch its children</li>
<ul>
<li>PanelStretchLayout, PanelSplitter, &#8230;</li>
</ul>
<li>Create flowing islands</li>
<ul>
<li>Use PanelGroupLayout with type=&#8221;scroll&#8221; or type=&#8221;vertical&#8221;- this can be stretched, but will not stretch its children</li>
</ul>
<li>Don&#8217;t embed stretching components inside flowing islands</li>
<li>Don&#8217;t stretch something vertically when inside of a flowing container</li>
<li>Don&#8217;t use height with % unit</li>
</ul></div>
<div class="title">Flowing Tips</div>
</div>
<div class="comments">When we use a flow layout it is important to follow some basic tips &#8211; namely, create flowing islands and then make sure that components within them continue to flow.</div>
<div class="slide">
<div class="slidebody">
	<img src="/presoimg/flow_arrow.png" style="margin-top: 0px;float: left;position: absolute;margin-left: 500px;"/></p>
<ul style="margin-right: 270px;">
<li>Use non-stretching containers</li>
<ul>
<li>PanelGroupLayout, PanelBorderLayout, &#8230;</li>
<li>PanelBorderLayout can be used to approximate HTML table component</li>
</ul>
<li>To avoid multiple scroll bars, do not nest scrolling PanelGroupLayout components</li>
<ul>
<li>
				Consider type=&#8221;vertical&#8221;
				</li>
</ul>
</ul></div>
<div class="title">Flowing Layouts</div>
</div>
<div class="comments">Whenever using containers, don&#8217;t use stretching containers.</div>
<div class="slide" style="background:url(/presoimg/bg_dark.jpg);">
<div class="singletitle">Skin Selectors</div>
</div>
<div class="comments"> </div>
<div class="slide">
<div class="singletitle" style="color: #000; margin-top: 50px">
<div style="margin-bottom: 100px">af:inputText::label<br />
		<img src="/presoimg/skin_selectors.png" style="margin-left: 280px;margin-top: 10px;margin-bottom: 10px;"/><br />
		af_inputText_label</div>
</p></div>
<div class="title">Skin Selectors</div>
</div>
<div class="comments">ADF uses a concept called <a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/skin-selectors.html">Skin Selectors</a> to associate styles with particular ADF components.  The skin selectors style a particular component and subsections of that particular component.  Due to the CSS being evaluated on the server we use a slightly different notation for ADF skin selectors, which are then transformed at runtime.</div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/enable_css.png" style="margin-left: 120px;margin-top: 27px;"/>
	</div>
<div class="title">Enabling the ADF Skin Editing in JDeveloper</div>
</div>
<div class="comments">JDeveloper has functionality that gives us CSS type ahead capability with the IDE using ADF&#8217;s selectors.</div>
<div class="slide">
<div class="slidebody">
	<img src="/presoimg/skin_selectors_code.png" style="margin-left: 10px;margin-top: 50px;"/></p>
<ul style="margin-left: 396px;width: 300px;">
<li>Style Component or Components</li>
<li>Starts with af|</li>
<ul>
<li>contains the name of the component</li>
<li>Piece of the component to skin, via a pseudo-element</li>
<li>::label</li>
<li>::content</li>
<li>::read-only</li>
</ul>
</ul></div>
<div class="title">Skinning Keys</div>
</div>
<div class="comments">Whenever we style components, we start with AF and a pipe symbol that indicates that it&#8217;s going to be an <a href="http://www.oracle.com/technetwork/developer-tools/adf/overview/index-092391.html">ADF Component</a>.  After that we&#8217;ll go ahead and have a component name and then particular subsection(s) of that component that we wish to apply styling to.  JDeveloper helps us to identify these using its type ahead feature for CSS.</div>
<div class="slide">
<div class="slidebody">
<ul>
<li>&#8220;.&#8221;</li>
<ul>
<li>Do not use leading dot for selectors, leading dot in styleclass properties or use to define style class in CSS files</li>
</ul>
<li>&#8220;:&#8221;</li>
<ul>
<li>Refers to a CSS element of an ADF Faces or Trinidad component</li>
</ul>
<li>&#8220;::&#8221;</li>
<ul>
<li>Refers to a part of the component</li>
<li>af|inputText::content</li>
</ul>
</ul></div>
<div class="title">Skinning Syntax</div>
</div>
<div class="comments">When creating CSS on the server for ADF we&#8217;re not going to use traditional styling of our CSS identifiers. For instance, the &#8220;.&#8221; selector will not be used.  Instead we&#8217;ll be using the selectors described in the previous slides.  To select areas within a component, we will be using colons.  For complete details of ADF Skinning, please review Frank Nimpu&#8217;s <a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/adf-insider-skinning/adf-insider-skinning.html">ADF Faces Skinning</a> on <a href="http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html">ADF Insider</a>.</div>
<div class="slide">
<div class="slidebody">
	<img src="/presoimg/adf_css_code_complete.png" style="margin-left: 336px;margin-top: 30px;position: absolute;"/></p>
<ul>
<li>JDev code editing support</li>
<li>ADF Faces Skin Extensions</li>
<ul>
<li>Syntax Help</li>
<li>Image selection</li>
<li>Code Completion</li>
<li>Code Folding</li>
<ul>
<li>Collapses CSS style definitions</li>
<li>Mouse-over code info</li>
</ul>
</ul>
</ul></div>
<div class="title">Skin Development Support</div>
</div>
<div class="comments">Within each component there can be a variety of attributes that we can style.  Using the JDeveloper CSS editor option, were are able to see each subset of the component as we use the type ahead for our ADF CSS.</div>
<div class="slide">
<div class="slidebody">
<ul>
<li>@platform {/skin definitions go here/}</li>
<ul>
<li>Possible values are: windows, macos, linux, solaris, ppc</li>
<li>Does not work for icons</li>
</ul>
<li>@agent {/skin definitions go here/}</li>
<ul>
<li>Possible values are: netscape, ie, mozilla, gecko, webkit , ice</li>
<li>Does not work for icons</li>
</ul>
<li>:lang or :locale</li>
<li>:rtl pseudo-class to create a style or icon definition when the browser is in a right-to-left language</li>
</ul></div>
<div class="title">Functionality Available to &#8220;Skinners&#8221;</div>
</div>
<div class="comments">Because ADF CSS is evaluated on the server for the skin selectors, we have options to target specific CSS on the basis of platform and on the basis of locale or language.  This practice should be used sparingly, as there are perhaps better ways to manage this within the WebCenter Portal platform or using styling techniques afforded to us by <a href="http://www.w3.org/TR/css3-mediaqueries/">CSS3 Media Queries</a>, etc.</div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/css_adf_faces_1.png" style="margin-left: 370px;margin-top: 30px;position: absolute;"/></p>
<ul style="width:340px">
<li>StyleClass</li>
<ul>
<li>Can be used in conjunction with skinning</li>
<li>Applies styles to the root DOM element</li>
<li>Can use EL for context specific CSS</li>
</ul>
<li>InlineStyle</li>
<ul>
<li>Styles the root DOM element</li>
<li>Can use EL for context specific CSS</li>
</ul>
</ul></div>
<div class="title">CSS in ADF Faces</div>
</div>
<div class="comments">Style classes can be applied to a component in ADF using a class, very similar to traditional CSS &#8211; although here we would still be using the ADF skin selectors to actually apply the style.  You can also use in-line styling on a specific component however this is discouraged, as this is essentially hard coding the style.</div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/css_adf_faces_1.png" style="margin-left: 370px;margin-top: 30px;position: absolute;"/></p>
<ul style="width:320px">
<li>ContentStyle Works for</li>
<ul>
<li>Input components</li>
<li>listboxes</li>
<li>Choices</li>
<li>richTextEditor</li>
<li>Shuttle</li>
<li>contentStyle applied to each list in a shuttle</li>
</ul>
</ul>
</ul></div>
<div class="title">CSS in ADF Faces</div>
</div>
<div class="comments">Styling with ContentStyle helps us to directly address content within a component.  Often times components have a DIV wrapper and we ultimately want to stlye a part of the inside of a component, opposed to a wrapper.</div>
<div class="slide" style="background:url(/presoimg/bg_dark.jpg);">
<div class="singletitle">Skinning Approach</div>
</div>
<div class="comments"> </div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/coarse_fine.png" style="margin-left: 22px;margin-top: 40px;position: absolute;"/>
	</div>
<div class="title">Coarse Grained &#038; Fine Grained</div>
</div>
<div class="comments">When skinning a WebCenter Portal instance we can look at it from coarse-grained and fine-grained standpoint &#8211; meaning that many large elements on the page like the background and the center of the page can use very basic styling techniques to impart a look and feel to particular corporate brand with very little effort.  At the fine-grained level we can apply the styling to specific ADF components and controls within the page.  A lot of value to be gained simply from the coarse-grained approach and then a small amount of tuning with the fine grained goes a long way to complete your overall look and feel that will be inline with your corporate brand.</div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/hybrid_model.png" style="margin-left: 64px; margin-top: 10px; position: absolute;"/>
	</div>
<div class="title">Hybrid Model</div>
</div>
<div class="comments">Often times a hybrid model of styling works very well for portals.  Taking the coarse-grained elements (page background, main portion of the body, etc) and using traditional CSS approaches with those, but then getting specific using the ADF skinning that we discussed previously, will work together to generate your overall portal appearance.</div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/nav.jpg" style="margin-left: 14px;margin-top: 10px;position: absolute;border-radius: 6px;"/>
	</div>
<div class="title">Navigation via CSS</div>
</div>
<div class="comments">An example of a hybrid approach would be using technology in WebCenter to generate a menu that uses unordered lists and list items, then applyies traditional CSS to them.  Even though you&#8217;re benefiting from WebCenter&#8217;s navigation models, you&#8217;re not doing traditional ADF skinning &#8211; but instead using plain old CSS.  As an example, take a look at <a href="http://www.johnbrunswick.com/2011/01/webcenter-ps3-navigation-models-and-css-menus/">E2.0 Workbench Podcast 2 – WebCenter PS3 Navigation Models and CSS Menus</a>.</div>
<div class="slide">
<div class="slidebody">
<ul style="margin-top: 60px">
<li>Expression Language (EL)</li>
<ul>
<li>EL will allow the designer to access the various objects for navigation within their template design<br />
Looping</li>
<li>Looping in EL should look very familiar for any web developers &#8211; nothing complicated required and coding is done inline within the page template!</li>
<li>Can mix regular HTML directly into the looping markup</li>
</ul>
</ul></div>
<div class="title">EL &#038; Looping Structures</div>
</div>
<div class="comments">In the CSS navigation example in the prior slode, we were using expression language that WebCenter provides for us to actually place the various items within our navigation into the markup that the portal renders for the client.  We can then apply coarse-grained styling that uses traditional CSS techniques to style our menu.  This is an approach that designers and web developers are very familiar with.</div>
<div class="slide" style="background:url(/presoimg/bg_code.jpg);">
<div class="title" style="margin-left: 416px;">CSS Navigation Dropdown Code</div>
</div>
<div class="comments">This is the code from  <a href="http://www.johnbrunswick.com/2011/01/webcenter-ps3-navigation-models-and-css-menus/">E2.0 Workbench Podcast 2 – WebCenter PS3 Navigation Models and CSS Menus</a>.</div>
<div class="slide">
<div class="slidebody">
	<img src="/presoimg/oracle_webcenter.png" style="margin-left: 410px;margin-top: 126px;position: absolute;"/></p>
<ul style="width: 280px">
<li>Custom CSS</li>
<li>Images &#038; Video</li>
<li>WC Content</li>
<ul>
<li>&#8220;Web Folders&#8221;</li>
<li>Revise without involving development group</li>
<li>Revisions, Audit &#038; Workflow</li>
<li>Drag and Drop</li>
</ul>
</ul></div>
<div class="title">Externalizing Static Assets</div>
</div>
<div class="comments">When using coarse-grained techniques in addition to be ADF styling, its often times helpful to hold various styling assets outside of your WebCenter application.  In order to do this we can use WebCenter Content to manage all of the unstructured assets for the portal. They can include things like CSS and images that we want manage within our environment and provides revision control and workflow.  This is a best practice if you want to allow design teams to access and work with your WebCenter Portal without involving the development team for each and every change</div>
<div class="slide" style="background:url(/presoimg/bg_dark.jpg);">
<div class="singletitle">Tools</div>
</div>
<div class="comments"></div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/tools.png" style="margin-left: 22px; margin-top: 22px; position: absolute;"/>
	</div>
<div class="title">Tools</div>
</div>
<div class="comments">When working with WebCenter Portal or any other technology it&#8217;s helpful to have tools to help expedite your work. Using visualization and inspection features in chrome and Firefox you&#8217;re able to work very quickly through the CSS needed to style your work. In addition, CSS3 is very powerful for providing visualizations that previously required images to achieve &#8211; like drop shadows and gradients. Finally, using something like JQuery were able to actually manipulate the <a href="http://en.wikipedia.org/wiki/Document_Object_Model">Document Object Model</a> to achieve any change using client-side technology.</div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/chrome_inspection.png" style="margin-left: 62px;margin-top: 7px; position: absolute;"/>
	</div>
<div class="title">Chrome Inspection</div>
</div>
<div class="comments">Above is an example of inspection within Google Chrome.  As we hover over the login link in the upper right-hand corner, we are able to get a very good sense of which styles are being applied to this particular element of the page.  This makes it easy to go back and adjust our ADF skinning for a particular component.  This is an example of &#8220;fine-grained&#8221; skinning.</div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/tools2.png" style="margin-left: 20px;margin-top: 30px; position: absolute;"/>
	</div>
<div class="title">Tools &#8211; More!</div>
</div>
<div class="comments"><a href="http://httpd.apache.org/">Apache</a> is a great tool to have handy when you need to very quickly deploy and test some new CSS or another type of artifact without having to check it into a standard repository.  <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a> is a great installer containing Apache and some additional technologies in a &#8220;one click&#8221; Windows installer.</div>
<div class="slide">
<div class="slidebody">
	<img src="/presoimg/css_reset.png" style="margin-left: 340px;margin-top: 25px;position: absolute;"/></p>
<ul style="width:300px">
<li>&#8220;Reset&#8221; Stylesheet to Clean Base Styles</li>
<li>TR Inhibit Makes this possible</li>
<li>Nice Template within Sample</li>
<li>Inspired by <a href="http://WebDesignerWall.com">WebDesignerWall.com</a></li>
</ul></div>
<div class="title">Bob Fraser CSS Reset Tool</div>
</div>
<div class="comments">One great feature within the server-side CSS capability with ADF is TR Inhibit.  It stops the inheritance of a particular style from being passed down through the DOM for a given selector.  Bob Fraser of the WebCenter Portal product management team has created a nice example using the TR inhibit approach, in the form of a reset stylesheet this is being used with some work that he&#8217;s done in mobile templating. * link pending to reset example</div>
<div class="slide" style="background:url(/presoimg/bg_dark.jpg);">
<div class="singletitle">Resources</div>
</div>
<div class="comments"> </div>
<div class="slide">
<div class="slidebody">
	<img src="/presoimg/more_specific.png" style="margin-left: 416px;margin-top: 0px;position: absolute;-webkit-border-top-right-radius: 6px;-webkit-border-bottom-right-radius: 6px;-moz-border-radius-topright: 6px;-moz-border-radius-bottomright: 6px;border-top-right-radius: 6px;border-bottom-right-radius: 6px;"/></p>
<ul style="width:300px;margin-top:70px">
<li>CSS3 Reduces Time and Headaches</li>
<ul>
<li><a href="http://gradients.glrzad.com/">CSS3 Gradient Generators</a></li>
<li><a href="http://border-radius.com/">CSS3 Border Radius Generators</a></li>
<li><a href="http://css3gen.com/box-shadow/">CSS3 Box Shadow Generators</a></li>
</ul>
</ul></div>
<div class="title">More Specific Tools</div>
</div>
<div class="comments">There are a variety of resources to help expedite our work, specifically some CSS3 generators to help us work with gradients, border radius settings, and shadows.  CSS3 is a huge plus when attempting to speed development.</div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/frank.png" style="margin-top: 49px;float: left;position: absolute;margin-left: 0px;"/></p>
<ul style="margin-left: 206px">
<li>Frank Nimphius</li>
<li>Incredible ADF Skinning Lecture</li>
<ul>
<li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/adf-insider-skinning/adf-insider-skinning.html">http://download.oracle.com/otn_hosted_doc/ jdeveloper/11gdemos/adf-insider-skinning/ adf-insider-skinning.html</a></li>
</ul>
<li>ADF Skinning Tool in JDeveloper</li>
<ul>
<li><a href="https://blogs.oracle.com/shay/entry/adf_faces_skin_editor_how">https://blogs.oracle.com/shay/entry/ adf_faces_skin_editor_how</a></li>
</ul>
</ul></div>
<div class="title"></div>
</div>
<div class="comments">To get more detail about the specifics of ADF and how ADF skinning is achieved <a href="http://twitter.com/#!/fnimphiu">Frank Nimphius</a> does an excellent job of giving a complete overview of ADF skinning capabilities.  In addition, the latest version of JDeveloper now includes a skin editor built directly into the IDE for ADF.</div>
<div class="slide">
<div class="slidebody">
	<img src="/presoimg/3rd_party.png" style="margin-left: 348px;margin-top: 29px;position: absolute;"/></p>
<ul style="width:300px;margin-top:70px">
<li>Learn About Design and Get Inspired!</li>
<ul>
<li><a href="http://nettuts.com">Nettuts</a></li>
<li><a href="http://smashingmagazine.com">Smashing Magazine</a></li>
<li><a href="http://dribbble.com/tags/web">Dribbble</a></li>
</ul>
</ul></div>
<div class="title">3rd Party Information</div>
</div>
<div class="comments">As a developer sometimes it&#8217;s difficult to understand how and why things are designed certain ways.  There are some great third-party websites that provide not only information but also inspiration for designers and developers.</div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/jdev_skin_tool.png" style="margin-left: 96px;margin-top: 5px;position: absolute;"/>
	</div>
<div class="title">Skin Editor for JDeveloper 11.1.2</div>
</div>
<div class="comments">Skin editor in the latest JDeveloper version</div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/meantime.png" style="margin-left: 124px;margin-top: 29px;position: absolute;"/><br />
		<a href="http://jdevadf.oracle.com/adf-richclient-demo/faces/visualDesigns/formLayout.jsp<br />
" style="float: left;color: #000;position: absolute;font-size: .8em;margin-top: 302px;margin-left: 24px;">http://jdevadf.oracle.com/adf-richclient-demo/faces/visualDesigns/formLayout.jsp<br />
</a>
	</div>
<div class="title">Online ADF Skin Tool</div>
</div>
<div class="comments">If you don&#8217;t have access to the latest JDeveloper release due to your WebCenter version, there&#8217;s an online tool that provides great visibility into how and why there is components are styled a particular way and all of the attributes that can be styled within them.</div>
<div class="slide" style="background:url(/presoimg/bg_dark.jpg);">
<div class="singletitle">Hairloss and Hacks</div>
</div>
<div class="comments"> </div>
<div class="slide">
<div class="slidebody">
		<img src="/presoimg/jquery.png" style="margin-left: 348px;margin-top: 130px;position: absolute;"/></p>
<ul style="width:300px;margin-top:70px">
<li>DOM is your friend</li>
<li>$(&#8216;.selector&#8217;).find</li>
<li>Magic of CDATA</li>
<li>! Important</li>
<li>CSS using generated selectors</li>
</ul></div>
<div class="title">Applying Styling Client Side</div>
</div>
<div class="comments">Sometimes development can get very frustrating when you can&#8217;t get exactly what you want and you&#8217;ve tried many times to resolve an issue.  Using a couple of these tricks, we can often times get around showstoppers.  These are not best practices, however they can be used to experiment to find a real resolution. The first being the Document Object Model and using JavaScript by way of JQuery to adjust the DOM using client side notation that allows you to find various elements within the document object model.  For instance, $(&#8216;.selector&#8217;).find, allows your to searhc the DOM, then manipulate your entire page directly on the client to adjust a styling attribute of that element. Another trick is using something called CDATA. Using CDATA we can actually mark parts of our templates to skip being evaluated by the ADF engine.  This allows us to get around any complications for things that the engine might have trouble understanding. Using &#8220;! Important&#8221; allows our style that has been marked with this enhancement to trump any other styling being applied to a particular element. Finally, we can actually use the auto generated CSS selectors from ADF and style them directly, instead of going the ADF Skin selector route.  This will work, but the problem with doing styling against the auto generated selectors is that the style may break between different versions of the platform that you&#8217;re running.</div>
<div class="slide">
	<img src="/presoimg/skin_example.png" style="margin-left: 0px;margin-top: 31px;"/></p>
<div class="title" style="margin-top:331px">ADF Skin Sample</div>
</div>
<div class="comments">Finally, here&#8217;s an example of a small amount of server-side CSS for an ADF skin that can be applied to some common elements to change their look and feel.  Stay tuned on the blog, as eventually I will release a more full-featured sample of something similar to <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a> in the form of an ADF template.</div>
<div class="slide" style="background:url(/presoimg/bg_dark.jpg);">
<div class="presotitle">Thank You!</div>
<div class="highlight">Resources</div>
<ul style="width:300px;margin-top:230px;float: left;position:absolute;list-style-type:none;margin-left: 10px;">
<li><a style="color:#cff579;" href="http://www.oracle.com/us/products/middleware/webcenter/overview/index.html">Oracle.com WebCenter Product Page</a></li>
<li><a style="color:#cff579;" href="http://blogs.oracle.com/webcenter">WebCenter Blog</a></li>
<li><a style="color:#cff579;" href="http://www.johnbrunswick.com">John Brunswick&#8217;s WebCenter Blog</a></li>
</ul>
</div>
<div class="comments"> </div>
<h2 class="related_head">Posts Related to WebCenter Portal Template Design Best Practices</h2><ul><li><a href="http://www.johnbrunswick.com/2011/09/e2-0-workbench-podcast-6-%e2%80%93-webcenter-portal-mobile-templates-using-adaptive-styles/" rel="bookmark">E2.0 Workbench Podcast 6 – WebCenter Portal Mobile Templates using Adaptive Styles</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/03/webcenter_spaces_11g_-_ui_cust.html" rel="bookmark">WebCenter Spaces 11g &#8211; UI Customization</a></li><li><a href="http://www.johnbrunswick.com/2011/10/4-webcenter-spaces-essential-css-tricks/" rel="bookmark">4 WebCenter Spaces Essential CSS Tricks</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/04/oracle_ucm_integration_with_we.html" rel="bookmark">Oracle UCM Integration with WebCenter</a></li><li><a href="http://www.johnbrunswick.com/2008/06/tagging-for-business-applications/" rel="bookmark">Tagging for Business Applications</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.johnbrunswick.com/2012/05/webcenter-portal-template-design-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>E2.0 Workbench Podcast 7 &#8211; LDAP Search Portlet for WebCenter with ADF</title>
		<link>http://www.johnbrunswick.com/2012/04/e2-0-workbench-podcast-7-ldap-search-portlet-for-webcenter-with-adf/</link>
		<comments>http://www.johnbrunswick.com/2012/04/e2-0-workbench-podcast-7-ldap-search-portlet-for-webcenter-with-adf/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 07:47:36 +0000</pubDate>
		<dc:creator>John Brunswick</dc:creator>
				<category><![CDATA[ADF]]></category>
		<category><![CDATA[Enterprise 2.0 Workbench]]></category>
		<category><![CDATA[Portlet]]></category>
		<category><![CDATA[WebCenter]]></category>

		<guid isPermaLink="false">http://www.johnbrunswick.com/?p=1357</guid>
		<description><![CDATA[One of the cornerstones of intranet functionality is the ability to quickly locate colleagues and obtain their contact information. In this episode of Enterprise 2.0 Workbench we take a look at using ADF to create a Data Control on top &#8230; <a href="http://www.johnbrunswick.com/2012/04/e2-0-workbench-podcast-7-ldap-search-portlet-for-webcenter-with-adf/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the cornerstones of intranet functionality is the ability to quickly locate colleagues and obtain their contact information.  In this episode of Enterprise 2.0 Workbench we take a look at using ADF to create a Data Control on top of a Java Bean that connects with an instance of LDAP / Active Directory.</p>
<p>One of the most powerful aspects of ADF is the ability to leverage Data Controls that abstract a web developer from having to know details of underlying data sources.  In our sample we are going to illustrate how a Java Bean can be created, along with a search class and search method to expose LDAP functionality to developers who via the Data Control will be able to drag and drop items within the Data Control to declaratively create this portlet.</p>
<p><a href="http://www.johnbrunswick.com/wp-content/uploads/2012/04/People_Search_783.png"><img src="http://www.johnbrunswick.com/wp-content/uploads/2012/04/People_Search_783.png" alt="" title="People_Search_783" width="783" height="402" class="alignright size-full wp-image-1377" /></a></p>
<p><strong style="margin-top:10px">Sample Files and Purpose</strong><br />
For the purposes of our portlet development, the following are key files that we will use within our Fusion Web Application</p>
<p><a href="http://www.johnbrunswick.com/wp-content/uploads/2012/04/LDAP-Search-Portlet-Files-Tree.png"><img src="http://www.johnbrunswick.com/wp-content/uploads/2012/04/LDAP-Search-Portlet-Files-Tree.png" alt="" title="LDAP Search Portlet Files Tree" width="229" height="431" class="alignright size-full wp-image-1375" /></a>1. DirectorySearch.java &#8211; this file contains the method that actually executes the search and returns the results to us.  As it receives the results it adds the individual people into a List of Person beans.  This class will be used to create our Data Control.</p>
<p>2. Person.java &#8211; this Java Bean will provide a container to hold the people that come back in the result set.  We will take a look at how to create the structure of the bean, so that this same approach could be used with other projects.</p>
<p>3. GetLDAPUserImage.java &#8211; this provides a Servlet that will return the image stored for a given user in the LDAP system.  We will not cover it in detail, but it provides a nice utility to let us enhance the results shown for a search by including a user&#8217;s photo.</p>
<p>4. LDAPSearch.jspx &#8211; our ADF page that will make use of the Data Control in order to provide the interface for the search and the result set.</p>
<p>5. web.xml &#8211; in this file we will setup Environment Entries that will be used by the GetLDAPUserImage servlet, as well as the DirectorySearch class to connect to LDAP.  This allows us to abstract settings that are environment specific from our actual code.</p>
<p>6. WebCenter Template UI Snippet &#8211; at the bottom of this post I have included some navigation snippet code based on what we did in the Navigation Episode that now includes this &#8220;portlet&#8221;.  For the purposes of our display in the UI I have chosen to keep things simple and just use an iFrame to hold the application within our nested list items.  This is a hack, but a nice way to quickly provide the feature.</p>
<p><strong>Weblogic Server Embedded LDAP Server Config</strong><br />
If you are going to try to use the embedded LDAP server in WLS for testing, keep in mind that you will need to set the password for connectivity.  Set the password in the location below, this will be used to authenticate when using the cn=Admin user principal, as we have specified in our web.xml example in the source code below.</p>
<p><a href="http://www.johnbrunswick.com/wp-content/uploads/2012/04/LDAP-Config-783.png"><img src="http://www.johnbrunswick.com/wp-content/uploads/2012/04/LDAP-Config-783.png" alt="" title="LDAP Config 783" width="783" height="341" class="alignright size-full wp-image-1376" /></a></p>
<p><strong>Thoughts on Possible Enhancements</strong><br />
This was made as an example to illustrate a series of platform features, but it may be interesting to expand in the following ways</p>
<ol>
<li>Expose this application via WSRP as a portlet and use portlet preferences to pass the LDAP configuration information.  This could allow the base path to support various areas of a directory on the basis of a user&#8217;s role &#8211; e.g. collaboration portals may only want to expose contact information for peers within a business unit.</li>
<li>Add additional attributes to the person object to make the display more comprehensive</li>
<li>Add more detailed search options to allow filtering prior to the execution of the search</li>
</ol>
<p>Happy coding!</p>
<p><strong style="margin-top:10px">Project Code</strong><br />
<a href="http://www.johnbrunswick.com/downloads/sourcecode/LDAPSearchPortlet.7z" title="Download LDAP Search Portlet for WebCenter with ADF">Download LDAP Search Portlet for WebCenter ADF Project Code</a></p>
<p>The following are the code samples used in our example.  For the search it has been commented in a way with its LDAP connection information that will also apply to the LDAP connectivity in GetLDAPUserImage.java.  Arguably, there are better ways to code this, but I have kept it simple for demonstration purposes.</p>
<div id="gist-2415841" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="kn">package</span> <span class="n">E2Workbench</span><span class="o">;</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="kn">import</span> <span class="nn">java.util.ArrayList</span><span class="o">;</span></div><div class='line' id='LC4'><span class="kn">import</span> <span class="nn">java.util.List</span><span class="o">;</span></div><div class='line' id='LC5'><span class="kn">import</span> <span class="nn">java.util.Properties</span><span class="o">;</span></div><div class='line' id='LC6'><br/></div><div class='line' id='LC7'><span class="kn">import</span> <span class="nn">javax.naming.Context</span><span class="o">;</span></div><div class='line' id='LC8'><span class="kn">import</span> <span class="nn">javax.naming.InitialContext</span><span class="o">;</span></div><div class='line' id='LC9'><span class="kn">import</span> <span class="nn">javax.naming.NamingEnumeration</span><span class="o">;</span></div><div class='line' id='LC10'><span class="kn">import</span> <span class="nn">javax.naming.NamingException</span><span class="o">;</span></div><div class='line' id='LC11'><span class="kn">import</span> <span class="nn">javax.naming.directory.Attributes</span><span class="o">;</span></div><div class='line' id='LC12'><span class="kn">import</span> <span class="nn">javax.naming.directory.DirContext</span><span class="o">;</span></div><div class='line' id='LC13'><span class="kn">import</span> <span class="nn">javax.naming.directory.InitialDirContext</span><span class="o">;</span></div><div class='line' id='LC14'><span class="kn">import</span> <span class="nn">javax.naming.directory.SearchControls</span><span class="o">;</span></div><div class='line' id='LC15'><span class="kn">import</span> <span class="nn">javax.naming.directory.SearchResult</span><span class="o">;</span></div><div class='line' id='LC16'><br/></div><div class='line' id='LC17'><span class="kd">public</span> <span class="kd">class</span> <span class="nc">DirectorySearch</span> <span class="o">{</span></div><div class='line' id='LC18'><br/></div><div class='line' id='LC19'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Variables for LDAP connectivity</span></div><div class='line' id='LC20'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">sLDAPBase</span><span class="o">;</span></div><div class='line' id='LC21'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">sLDAPUrl</span><span class="o">;</span></div><div class='line' id='LC22'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">sLDAPAuthType</span><span class="o">;</span></div><div class='line' id='LC23'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">sLDAPPrincipal</span><span class="o">;</span></div><div class='line' id='LC24'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">sLDAPPassword</span><span class="o">;</span></div><div class='line' id='LC25'><br/></div><div class='line' id='LC26'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="nf">DirectorySearch</span><span class="o">()</span> <span class="o">{</span></div><div class='line' id='LC27'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">super</span><span class="o">();</span></div><div class='line' id='LC28'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC29'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Set defaults for our connectivity to LDAP</span></div><div class='line' id='LC30'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPBase</span> <span class="o">=</span> <span class="s">&quot;&quot;</span><span class="o">;</span></div><div class='line' id='LC31'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPUrl</span> <span class="o">=</span> <span class="s">&quot;&quot;</span><span class="o">;</span></div><div class='line' id='LC32'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPAuthType</span> <span class="o">=</span> <span class="s">&quot;&quot;</span><span class="o">;</span></div><div class='line' id='LC33'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPPrincipal</span> <span class="o">=</span> <span class="s">&quot;&quot;</span><span class="o">;</span></div><div class='line' id='LC34'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPPassword</span> <span class="o">=</span> <span class="s">&quot;&quot;</span><span class="o">;</span></div><div class='line' id='LC35'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC36'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Get the values from the web.xml file</span></div><div class='line' id='LC37'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">try</span> <span class="o">{</span></div><div class='line' id='LC38'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Obtain the initial Java Naming and Directory Interface (JNDI) context</span></div><div class='line' id='LC39'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">InitialContext</span> <span class="n">initCtx</span> <span class="o">=</span> <span class="k">new</span> <span class="n">InitialContext</span><span class="o">();</span></div><div class='line' id='LC40'>&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC41'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Perform JNDI lookup to obtain the resource.</span></div><div class='line' id='LC42'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPBase</span> <span class="o">=</span> <span class="o">(</span><span class="n">String</span><span class="o">)</span> <span class="n">initCtx</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="s">&quot;java:comp/env/LDAPBase&quot;</span><span class="o">);</span></div><div class='line' id='LC43'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPUrl</span> <span class="o">=</span> <span class="o">(</span><span class="n">String</span><span class="o">)</span> <span class="n">initCtx</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="s">&quot;java:comp/env/LDAPUrl&quot;</span><span class="o">);</span></div><div class='line' id='LC44'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPAuthType</span> <span class="o">=</span> <span class="o">(</span><span class="n">String</span><span class="o">)</span> <span class="n">initCtx</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="s">&quot;java:comp/env/LDAPAuthType&quot;</span><span class="o">);</span></div><div class='line' id='LC45'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPPrincipal</span> <span class="o">=</span> <span class="o">(</span><span class="n">String</span><span class="o">)</span> <span class="n">initCtx</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="s">&quot;java:comp/env/LDAPPrincipal&quot;</span><span class="o">);</span></div><div class='line' id='LC46'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPPassword</span> <span class="o">=</span> <span class="o">(</span><span class="n">String</span><span class="o">)</span> <span class="n">initCtx</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="s">&quot;java:comp/env/LDAPPassword&quot;</span><span class="o">);</span></div><div class='line' id='LC47'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC48'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">catch</span> <span class="o">(</span><span class="n">Exception</span> <span class="n">ex</span><span class="o">)</span></div><div class='line' id='LC49'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">{</span> </div><div class='line' id='LC50'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC51'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC52'>&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC53'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">Person</span><span class="o">&gt;</span> <span class="n">SearchLDAPDirectory</span><span class="o">(</span><span class="n">String</span> <span class="n">sSearchName</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC54'><br/></div><div class='line' id='LC55'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Default search query to be performed against LDAP take a look at</span></div><div class='line' id='LC56'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// http://www.centos.org/docs/5/html/CDS/ag/8.0/Finding_Directory_Entries-LDAP_Search_Filters.html for </span></div><div class='line' id='LC57'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// some examples</span></div><div class='line' id='LC58'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">String</span> <span class="n">filter</span> <span class="o">=</span> <span class="s">&quot;(objectclass=person)&quot;</span><span class="o">;</span></div><div class='line' id='LC59'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC60'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Use the search value passed into this method if it contains a value</span></div><div class='line' id='LC61'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">(</span><span class="n">sSearchName</span> <span class="o">!=</span> <span class="s">&quot;&quot;</span><span class="o">)</span></div><div class='line' id='LC62'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">{</span></div><div class='line' id='LC63'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">filter</span> <span class="o">=</span> <span class="s">&quot;(&amp;(objectclass=person)(cn=&quot;</span><span class="o">+</span><span class="n">sSearchName</span><span class="o">+</span><span class="s">&quot;*))&quot;</span><span class="o">;</span></div><div class='line' id='LC64'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC65'><br/></div><div class='line' id='LC66'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Create our collection of properties to be used in creating the LDAP connection</span></div><div class='line' id='LC67'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// the values are arrived at on the basis of the Environment Entries in the web.xml file</span></div><div class='line' id='LC68'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">Properties</span> <span class="n">env</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Properties</span><span class="o">();</span></div><div class='line' id='LC69'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">DirContext</span><span class="o">.</span><span class="na">INITIAL_CONTEXT_FACTORY</span><span class="o">,</span> <span class="s">&quot;com.sun.jndi.ldap.LdapCtxFactory&quot;</span><span class="o">);</span></div><div class='line' id='LC70'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">DirContext</span><span class="o">.</span><span class="na">PROVIDER_URL</span><span class="o">,</span><span class="n">sLDAPUrl</span><span class="o">);</span></div><div class='line' id='LC71'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_AUTHENTICATION</span><span class="o">,</span> <span class="n">sLDAPAuthType</span><span class="o">);</span></div><div class='line' id='LC72'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_PRINCIPAL</span><span class="o">,</span> <span class="n">sLDAPPrincipal</span><span class="o">);</span></div><div class='line' id='LC73'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_CREDENTIALS</span><span class="o">,</span> <span class="n">sLDAPPassword</span><span class="o">);</span></div><div class='line' id='LC74'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC75'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Create a list of our matches on the basis of our query</span></div><div class='line' id='LC76'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">List</span><span class="o">&lt;</span><span class="n">Person</span><span class="o">&gt;</span> <span class="n">lPersonMatches</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ArrayList</span><span class="o">();</span></div><div class='line' id='LC77'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC78'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">try</span> <span class="o">{</span></div><div class='line' id='LC79'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">DirContext</span> <span class="n">directoryConnection</span> <span class="o">=</span> <span class="k">new</span> <span class="n">InitialDirContext</span><span class="o">(</span><span class="n">env</span><span class="o">);</span></div><div class='line' id='LC80'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">SearchControls</span> <span class="n">sc</span> <span class="o">=</span> <span class="k">new</span> <span class="n">SearchControls</span><span class="o">();</span></div><div class='line' id='LC81'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sc</span><span class="o">.</span><span class="na">setSearchScope</span><span class="o">(</span><span class="n">SearchControls</span><span class="o">.</span><span class="na">SUBTREE_SCOPE</span><span class="o">);</span></div><div class='line' id='LC82'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC83'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Create an object to hold the results from our query against LDAP</span></div><div class='line' id='LC84'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">NamingEnumeration</span> <span class="n">matchingDirectoryEntries</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span></div><div class='line' id='LC85'><br/></div><div class='line' id='LC86'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Perform the search</span></div><div class='line' id='LC87'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">matchingDirectoryEntries</span> <span class="o">=</span> <span class="n">directoryConnection</span><span class="o">.</span><span class="na">search</span><span class="o">(</span><span class="n">sLDAPBase</span><span class="o">,</span> <span class="n">filter</span><span class="o">,</span> <span class="n">sc</span><span class="o">);</span></div><div class='line' id='LC88'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC89'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">while</span> <span class="o">(</span><span class="n">matchingDirectoryEntries</span><span class="o">.</span><span class="na">hasMore</span><span class="o">())</span> <span class="o">{</span></div><div class='line' id='LC90'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">SearchResult</span> <span class="n">result</span> <span class="o">=</span> <span class="o">(</span><span class="n">SearchResult</span><span class="o">)</span> <span class="n">matchingDirectoryEntries</span><span class="o">.</span><span class="na">next</span><span class="o">();</span></div><div class='line' id='LC91'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC92'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Uncomment the following line to see all of the values that are returned with the search result object</span></div><div class='line' id='LC93'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// System.out.println(result.toString()+&quot;\n&quot;);</span></div><div class='line' id='LC94'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC95'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Capture all of the attributes of the matching object (email, displayname, etc)</span></div><div class='line' id='LC96'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">Attributes</span> <span class="n">resultAttributes</span> <span class="o">=</span> <span class="n">result</span><span class="o">.</span><span class="na">getAttributes</span><span class="o">();</span></div><div class='line' id='LC97'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC98'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Set default values for the Person object that we will create on the basis of this matching search result</span></div><div class='line' id='LC99'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">String</span> <span class="n">sEmail</span> <span class="o">=</span> <span class="s">&quot;--&quot;</span><span class="o">;</span></div><div class='line' id='LC100'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">String</span> <span class="n">sName</span> <span class="o">=</span> <span class="s">&quot;--&quot;</span><span class="o">;</span></div><div class='line' id='LC101'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">String</span> <span class="n">sPhone</span> <span class="o">=</span> <span class="s">&quot;--&quot;</span><span class="o">;</span></div><div class='line' id='LC102'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">String</span> <span class="n">sDepartment</span> <span class="o">=</span> <span class="s">&quot;--&quot;</span><span class="o">;</span></div><div class='line' id='LC103'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">String</span> <span class="n">sUid</span> <span class="o">=</span> <span class="s">&quot;--&quot;</span><span class="o">;</span></div><div class='line' id='LC104'><br/></div><div class='line' id='LC105'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Check to make sure that an attribute is not null.  If not, store it so it can be used to </span></div><div class='line' id='LC106'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// fill a Person object that we will create to hold the result</span></div><div class='line' id='LC107'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">(</span><span class="n">resultAttributes</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;mail&quot;</span><span class="o">)</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC108'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sEmail</span> <span class="o">=</span> <span class="n">resultAttributes</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;mail&quot;</span><span class="o">).</span><span class="na">get</span><span class="o">().</span><span class="na">toString</span><span class="o">();</span></div><div class='line' id='LC109'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC110'><br/></div><div class='line' id='LC111'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">(</span><span class="n">resultAttributes</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;displayname&quot;</span><span class="o">)</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC112'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sName</span> <span class="o">=</span> <span class="n">resultAttributes</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;displayname&quot;</span><span class="o">).</span><span class="na">get</span><span class="o">().</span><span class="na">toString</span><span class="o">();</span></div><div class='line' id='LC113'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC114'><br/></div><div class='line' id='LC115'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">(</span><span class="n">resultAttributes</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;telephonenumber&quot;</span><span class="o">)</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC116'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sPhone</span> <span class="o">=</span> <span class="n">resultAttributes</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;telephonenumber&quot;</span><span class="o">).</span><span class="na">get</span><span class="o">().</span><span class="na">toString</span><span class="o">();</span></div><div class='line' id='LC117'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC118'><br/></div><div class='line' id='LC119'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">(</span><span class="n">resultAttributes</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;description&quot;</span><span class="o">)</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC120'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sDepartment</span> <span class="o">=</span> <span class="n">resultAttributes</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;description&quot;</span><span class="o">).</span><span class="na">get</span><span class="o">().</span><span class="na">toString</span><span class="o">();</span></div><div class='line' id='LC121'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC122'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC123'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">(</span><span class="n">resultAttributes</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;uid&quot;</span><span class="o">)</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC124'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sUid</span> <span class="o">=</span> <span class="n">resultAttributes</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;uid&quot;</span><span class="o">).</span><span class="na">get</span><span class="o">().</span><span class="na">toString</span><span class="o">();</span></div><div class='line' id='LC125'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC126'><br/></div><div class='line' id='LC127'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Create a person object with the values in this loop itteration                </span></div><div class='line' id='LC128'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">Person</span> <span class="n">FoundPerson</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Person</span><span class="o">(</span><span class="n">sName</span><span class="o">,</span> <span class="n">sEmail</span><span class="o">,</span> <span class="n">sPhone</span><span class="o">,</span> <span class="n">sDepartment</span><span class="o">,</span> <span class="n">sUid</span><span class="o">);</span></div><div class='line' id='LC129'><br/></div><div class='line' id='LC130'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">lPersonMatches</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="n">FoundPerson</span><span class="o">);</span></div><div class='line' id='LC131'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC132'><br/></div><div class='line' id='LC133'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Close connection to the directory            </span></div><div class='line' id='LC134'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">directoryConnection</span><span class="o">.</span><span class="na">close</span><span class="o">();</span></div><div class='line' id='LC135'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC136'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">NamingException</span> <span class="n">nex</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC137'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC138'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Oh snap!  Something went wrong</span></div><div class='line' id='LC139'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">System</span><span class="o">.</span><span class="na">err</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Error: &quot;</span> <span class="o">+</span> <span class="n">nex</span><span class="o">.</span><span class="na">getMessage</span><span class="o">());</span></div><div class='line' id='LC140'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC141'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC142'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Send back our list of matching objects - in this case Person objects as deinfed in our accompanying bean</span></div><div class='line' id='LC143'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">return</span> <span class="n">lPersonMatches</span><span class="o">;</span></div><div class='line' id='LC144'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC145'><span class="o">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2415841/b28c04568e6a55e77f50ae6ae3b6dd76e8abbb46/DirectorySearch.java" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2415841#file_directory_search.java" style="float:right;margin-right:10px;color:#666">DirectorySearch.java</a>
            <a href="https://gist.github.com/2415841">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="kn">package</span> <span class="n">view</span><span class="o">;</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="kn">import</span> <span class="nn">javax.servlet.*</span><span class="o">;</span></div><div class='line' id='LC4'><span class="kn">import</span> <span class="nn">javax.servlet.http.*</span><span class="o">;</span></div><div class='line' id='LC5'><br/></div><div class='line' id='LC6'><span class="kn">import</span> <span class="nn">java.io.IOException</span><span class="o">;</span></div><div class='line' id='LC7'><br/></div><div class='line' id='LC8'><span class="kn">import</span> <span class="nn">javax.naming.*</span><span class="o">;</span></div><div class='line' id='LC9'><br/></div><div class='line' id='LC10'><span class="kn">import</span> <span class="nn">java.io.*</span><span class="o">;</span></div><div class='line' id='LC11'><br/></div><div class='line' id='LC12'><span class="kn">import</span> <span class="nn">java.util.*</span><span class="o">;</span></div><div class='line' id='LC13'><br/></div><div class='line' id='LC14'><span class="kn">import</span> <span class="nn">javax.naming.directory.*</span><span class="o">;</span></div><div class='line' id='LC15'><br/></div><div class='line' id='LC16'><span class="kd">public</span> <span class="kd">class</span> <span class="nc">GetLDAPUserImage</span> <span class="kd">extends</span> <span class="n">HttpServlet</span> <span class="o">{</span></div><div class='line' id='LC17'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">CONTENT_TYPE</span> <span class="o">=</span></div><div class='line' id='LC18'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">&quot;text/html; charset=windows-1252&quot;</span><span class="o">;</span></div><div class='line' id='LC19'><br/></div><div class='line' id='LC20'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">sLDAPBase</span><span class="o">;</span></div><div class='line' id='LC21'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">sLDAPUrl</span><span class="o">;</span></div><div class='line' id='LC22'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">sLDAPAuthType</span><span class="o">;</span></div><div class='line' id='LC23'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">sLDAPPrincipal</span><span class="o">;</span></div><div class='line' id='LC24'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">sLDAPPassword</span><span class="o">;</span></div><div class='line' id='LC25'><br/></div><div class='line' id='LC26'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="kt">void</span> <span class="nf">init</span><span class="o">(</span><span class="n">ServletConfig</span> <span class="n">config</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">ServletException</span> <span class="o">{</span></div><div class='line' id='LC27'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">super</span><span class="o">.</span><span class="na">init</span><span class="o">(</span><span class="n">config</span><span class="o">);</span></div><div class='line' id='LC28'><br/></div><div class='line' id='LC29'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Connection process identical to the one in DirectorySearch.java</span></div><div class='line' id='LC30'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// for relevant comments, please refernece that code</span></div><div class='line' id='LC31'><br/></div><div class='line' id='LC32'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPBase</span> <span class="o">=</span> <span class="s">&quot;&quot;</span><span class="o">;</span></div><div class='line' id='LC33'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPUrl</span> <span class="o">=</span> <span class="s">&quot;&quot;</span><span class="o">;</span></div><div class='line' id='LC34'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPAuthType</span> <span class="o">=</span> <span class="s">&quot;&quot;</span><span class="o">;</span></div><div class='line' id='LC35'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPPrincipal</span> <span class="o">=</span> <span class="s">&quot;&quot;</span><span class="o">;</span></div><div class='line' id='LC36'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPPassword</span> <span class="o">=</span> <span class="s">&quot;&quot;</span><span class="o">;</span></div><div class='line' id='LC37'><br/></div><div class='line' id='LC38'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">try</span> <span class="o">{</span></div><div class='line' id='LC39'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">InitialContext</span> <span class="n">initCtx</span> <span class="o">=</span> <span class="k">new</span> <span class="n">InitialContext</span><span class="o">();</span></div><div class='line' id='LC40'><br/></div><div class='line' id='LC41'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPBase</span> <span class="o">=</span> <span class="o">(</span><span class="n">String</span><span class="o">)</span><span class="n">initCtx</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="s">&quot;java:comp/env/LDAPBase&quot;</span><span class="o">);</span></div><div class='line' id='LC42'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPUrl</span> <span class="o">=</span> <span class="o">(</span><span class="n">String</span><span class="o">)</span><span class="n">initCtx</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="s">&quot;java:comp/env/LDAPUrl&quot;</span><span class="o">);</span></div><div class='line' id='LC43'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPAuthType</span> <span class="o">=</span></div><div class='line' id='LC44'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">(</span><span class="n">String</span><span class="o">)</span><span class="n">initCtx</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="s">&quot;java:comp/env/LDAPAuthType&quot;</span><span class="o">);</span></div><div class='line' id='LC45'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPPrincipal</span> <span class="o">=</span></div><div class='line' id='LC46'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">(</span><span class="n">String</span><span class="o">)</span><span class="n">initCtx</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="s">&quot;java:comp/env/LDAPPrincipal&quot;</span><span class="o">);</span></div><div class='line' id='LC47'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sLDAPPassword</span> <span class="o">=</span></div><div class='line' id='LC48'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">(</span><span class="n">String</span><span class="o">)</span><span class="n">initCtx</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="s">&quot;java:comp/env/LDAPPassword&quot;</span><span class="o">);</span></div><div class='line' id='LC49'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">Exception</span> <span class="n">ex</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC50'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC51'><br/></div><div class='line' id='LC52'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC53'><br/></div><div class='line' id='LC54'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="kt">void</span> <span class="nf">doGet</span><span class="o">(</span><span class="n">HttpServletRequest</span> <span class="n">request</span><span class="o">,</span></div><div class='line' id='LC55'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">HttpServletResponse</span> <span class="n">response</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">ServletException</span><span class="o">,</span></div><div class='line' id='LC56'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">IOException</span> <span class="o">{</span></div><div class='line' id='LC57'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">doPost</span><span class="o">(</span><span class="n">request</span><span class="o">,</span> <span class="n">response</span><span class="o">);</span></div><div class='line' id='LC58'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC59'><br/></div><div class='line' id='LC60'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="kt">void</span> <span class="nf">doPost</span><span class="o">(</span><span class="n">HttpServletRequest</span> <span class="n">request</span><span class="o">,</span></div><div class='line' id='LC61'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">HttpServletResponse</span> <span class="n">response</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">ServletException</span><span class="o">,</span></div><div class='line' id='LC62'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">IOException</span> <span class="o">{</span></div><div class='line' id='LC63'><br/></div><div class='line' id='LC64'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Thanks to Buster Nimmons for the following code snippet to inspire this servlet</span></div><div class='line' id='LC65'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// original source - http://www.mail-archive.com/jsp-interest@java.sun.com/msg41646.html</span></div><div class='line' id='LC66'><br/></div><div class='line' id='LC67'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">response</span><span class="o">.</span><span class="na">setContentType</span><span class="o">(</span><span class="s">&quot;image/jpeg&quot;</span><span class="o">);</span></div><div class='line' id='LC68'><br/></div><div class='line' id='LC69'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// ID of the users image to retrive</span></div><div class='line' id='LC70'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">String</span> <span class="n">userId</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="na">getParameter</span><span class="o">(</span><span class="s">&quot;userId&quot;</span><span class="o">);</span></div><div class='line' id='LC71'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="kt">byte</span> <span class="n">bt</span><span class="o">[]</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span></div><div class='line' id='LC72'><br/></div><div class='line' id='LC73'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">//get the OutputStream to send the image back to the browser</span></div><div class='line' id='LC74'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">OutputStream</span> <span class="n">ot</span> <span class="o">=</span> <span class="n">response</span><span class="o">.</span><span class="na">getOutputStream</span><span class="o">();</span></div><div class='line' id='LC75'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">try</span> <span class="o">{</span></div><div class='line' id='LC76'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">String</span> <span class="n">filter</span> <span class="o">=</span> <span class="s">&quot;(uid=&quot;</span> <span class="o">+</span> <span class="n">userId</span> <span class="o">+</span> <span class="s">&quot;)&quot;</span><span class="o">;</span></div><div class='line' id='LC77'><br/></div><div class='line' id='LC78'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// make connection to LDAP and lookup user</span></div><div class='line' id='LC79'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">Properties</span> <span class="n">env</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Properties</span><span class="o">();</span></div><div class='line' id='LC80'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">DirContext</span><span class="o">.</span><span class="na">INITIAL_CONTEXT_FACTORY</span><span class="o">,</span></div><div class='line' id='LC81'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">&quot;com.sun.jndi.ldap.LdapCtxFactory&quot;</span><span class="o">);</span></div><div class='line' id='LC82'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">DirContext</span><span class="o">.</span><span class="na">PROVIDER_URL</span><span class="o">,</span> <span class="n">sLDAPUrl</span><span class="o">);</span></div><div class='line' id='LC83'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_AUTHENTICATION</span><span class="o">,</span> <span class="n">sLDAPAuthType</span><span class="o">);</span></div><div class='line' id='LC84'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_PRINCIPAL</span><span class="o">,</span> <span class="n">sLDAPPrincipal</span><span class="o">);</span></div><div class='line' id='LC85'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_CREDENTIALS</span><span class="o">,</span> <span class="n">sLDAPPassword</span><span class="o">);</span></div><div class='line' id='LC86'><br/></div><div class='line' id='LC87'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">DirContext</span> <span class="n">directoryConnection</span> <span class="o">=</span> <span class="k">new</span> <span class="n">InitialDirContext</span><span class="o">(</span><span class="n">env</span><span class="o">);</span></div><div class='line' id='LC88'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">SearchControls</span> <span class="n">sc</span> <span class="o">=</span> <span class="k">new</span> <span class="n">SearchControls</span><span class="o">();</span></div><div class='line' id='LC89'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sc</span><span class="o">.</span><span class="na">setSearchScope</span><span class="o">(</span><span class="n">SearchControls</span><span class="o">.</span><span class="na">SUBTREE_SCOPE</span><span class="o">);</span></div><div class='line' id='LC90'><br/></div><div class='line' id='LC91'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">NamingEnumeration</span> <span class="n">matchingDirectoryEntries</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span></div><div class='line' id='LC92'><br/></div><div class='line' id='LC93'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// Perform search</span></div><div class='line' id='LC94'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">matchingDirectoryEntries</span> <span class="o">=</span></div><div class='line' id='LC95'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">directoryConnection</span><span class="o">.</span><span class="na">search</span><span class="o">(</span><span class="n">sLDAPBase</span><span class="o">,</span> <span class="n">filter</span><span class="o">,</span> <span class="n">sc</span><span class="o">);</span></div><div class='line' id='LC96'><br/></div><div class='line' id='LC97'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">while</span> <span class="o">(</span><span class="n">matchingDirectoryEntries</span><span class="o">.</span><span class="na">hasMore</span><span class="o">())</span> <span class="o">{</span></div><div class='line' id='LC98'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">SearchResult</span> <span class="n">result</span> <span class="o">=</span></div><div class='line' id='LC99'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">(</span><span class="n">SearchResult</span><span class="o">)</span><span class="n">matchingDirectoryEntries</span><span class="o">.</span><span class="na">next</span><span class="o">();</span></div><div class='line' id='LC100'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">Attributes</span> <span class="n">attrs</span> <span class="o">=</span> <span class="n">result</span><span class="o">.</span><span class="na">getAttributes</span><span class="o">();</span></div><div class='line' id='LC101'><br/></div><div class='line' id='LC102'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">// get the jpegPhoto attribute of this users entry (getValue returns an Object which I cast to byte[])</span></div><div class='line' id='LC103'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">bt</span> <span class="o">=</span> <span class="o">(</span><span class="kt">byte</span><span class="o">[])(</span><span class="n">attrs</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;jpegPhoto&quot;</span><span class="o">).</span><span class="na">get</span><span class="o">());</span></div><div class='line' id='LC104'><br/></div><div class='line' id='LC105'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">//write the byte[] to the OutputStream</span></div><div class='line' id='LC106'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">ot</span><span class="o">.</span><span class="na">write</span><span class="o">(</span><span class="n">bt</span><span class="o">);</span></div><div class='line' id='LC107'><br/></div><div class='line' id='LC108'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c1">//close OutputStream and we&#39;re done</span></div><div class='line' id='LC109'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">ot</span><span class="o">.</span><span class="na">close</span><span class="o">();</span></div><div class='line' id='LC110'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC111'><br/></div><div class='line' id='LC112'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">directoryConnection</span><span class="o">.</span><span class="na">close</span><span class="o">();</span></div><div class='line' id='LC113'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">Exception</span> <span class="n">ex</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC114'><br/></div><div class='line' id='LC115'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC116'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC117'><span class="o">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2415841/873cdb89610bbe60be2879d3bc93ca924c8f2a3a/GetLDAPUserImage.java" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2415841#file_get_ldap_user_image.java" style="float:right;margin-right:10px;color:#666">GetLDAPUserImage.java</a>
            <a href="https://gist.github.com/2415841">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'>&lt;?xml version=&#39;1.0&#39; encoding=&#39;UTF-8&#39;?&gt;</div><div class='line' id='LC2'>&lt;jsp:root xmlns:jsp=&quot;http://java.sun.com/JSP/Page&quot; version=&quot;2.1&quot;</div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:f=&quot;http://java.sun.com/jsf/core&quot;</div><div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:h=&quot;http://java.sun.com/jsf/html&quot;</div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:af=&quot;http://xmlns.oracle.com/adf/faces/rich&quot;&gt;</div><div class='line' id='LC6'>&nbsp;&nbsp;&lt;jsp:directive.page contentType=&quot;text/html;charset=UTF-8&quot;/&gt;</div><div class='line' id='LC7'>&nbsp;&nbsp;&lt;f:view&gt;</div><div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:document id=&quot;d1&quot; inlineStyle=&quot;width:320.0px;&quot;&gt;</div><div class='line' id='LC9'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:messages id=&quot;m1&quot;/&gt;</div><div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:outputText value=&quot;People Search&quot; id=&quot;ot2&quot;</div><div class='line' id='LC11'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inlineStyle=&quot;font-size:1.4em; font-weight:600; margin-left: 7px;&quot;/&gt;</div><div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:form id=&quot;f1&quot;&gt;</div><div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC15'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC16'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:decorativeBox id=&quot;db1&quot; styleClass=&quot;AFStretchWidth&quot;</div><div class='line' id='LC17'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inlineStyle=&quot;height:360.0px; margin-left: 5px&quot;&gt;</div><div class='line' id='LC18'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;f:facet name=&quot;center&quot;&gt;</div><div class='line' id='LC19'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:panelGroupLayout xmlns:af=&quot;http://xmlns.oracle.com/adf/faces/rich&quot;</div><div class='line' id='LC20'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id=&quot;pgl1&quot; layout=&quot;default&quot;&gt;</div><div class='line' id='LC21'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:table value=&quot;#{bindings.Person.collectionModel}&quot; var=&quot;row&quot;</div><div class='line' id='LC22'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rows=&quot;#{bindings.Person.rangeSize}&quot;</div><div class='line' id='LC23'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;emptyText=&quot;#{bindings.Person.viewable ? &#39;Search via the form above.&#39; : &#39;Access Denied.&#39;}&quot;</div><div class='line' id='LC24'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fetchSize=&quot;#{bindings.Person.rangeSize}&quot;</div><div class='line' id='LC25'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rowBandingInterval=&quot;1&quot;</div><div class='line' id='LC26'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filterModel=&quot;#{bindings.PersonQuery.queryDescriptor}&quot;</div><div class='line' id='LC27'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queryListener=&quot;#{bindings.PersonQuery.processQuery}&quot;</div><div class='line' id='LC28'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filterVisible=&quot;false&quot; varStatus=&quot;vs&quot; id=&quot;t1&quot;</div><div class='line' id='LC29'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;columnStretching=&quot;last&quot; width=&quot;100%&quot; contentDelivery=&quot;immediate&quot;</div><div class='line' id='LC30'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;verticalGridVisible=&quot;false&quot;&gt;</div><div class='line' id='LC31'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:column sortProperty=&quot;name&quot; filterable=&quot;false&quot; sortable=&quot;false&quot;</div><div class='line' id='LC32'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id=&quot;c1&quot;&gt;</div><div class='line' id='LC33'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:image source=&quot;../getldapuserimage?userId=#{row.userid}&quot;</div><div class='line' id='LC34'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id=&quot;userimage&quot;</div><div class='line' id='LC35'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inlineStyle=&quot;width:80px; text-align:left;&quot;/&gt;</div><div class='line' id='LC36'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/af:column&gt;</div><div class='line' id='LC37'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:column sortProperty=&quot;email&quot; filterable=&quot;false&quot;</div><div class='line' id='LC38'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sortable=&quot;false&quot;</div><div class='line' id='LC39'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id=&quot;c5&quot;&gt;</div><div class='line' id='LC40'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:outputText value=&quot;#{row.name}&quot; id=&quot;ot4&quot;/&gt;</div><div class='line' id='LC41'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:outputText value=&quot;#{row.email}&quot; id=&quot;ot3&quot;/&gt;</div><div class='line' id='LC42'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:outputText value=&quot;#{row.phone}&quot; id=&quot;ot5&quot;/&gt;</div><div class='line' id='LC43'><br/></div><div class='line' id='LC44'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:outputText value=&quot;#{row.description}&quot; id=&quot;ot1&quot;/&gt;</div><div class='line' id='LC45'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/af:column&gt;</div><div class='line' id='LC46'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/af:table&gt;</div><div class='line' id='LC47'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/af:panelGroupLayout&gt;</div><div class='line' id='LC48'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/f:facet&gt;</div><div class='line' id='LC49'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;f:facet name=&quot;top&quot;&gt;</div><div class='line' id='LC50'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:panelGroupLayout layout=&quot;horizontal&quot;</div><div class='line' id='LC51'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:af=&quot;http://xmlns.oracle.com/adf/faces/rich&quot;</div><div class='line' id='LC52'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id=&quot;pgl2&quot;</div><div class='line' id='LC53'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inlineStyle=&quot;margin-top: 10px; margin-left: 8px&quot;&gt;</div><div class='line' id='LC54'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:inputText value=&quot;#{bindings.sSearchName.inputValue}&quot;</div><div class='line' id='LC55'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label=&quot;Name&quot;</div><div class='line' id='LC56'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;required=&quot;#{bindings.sSearchName.hints.mandatory}&quot;</div><div class='line' id='LC57'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;columns=&quot;#{bindings.sSearchName.hints.displayWidth}&quot;</div><div class='line' id='LC58'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maximumLength=&quot;#{bindings.sSearchName.hints.precision}&quot;</div><div class='line' id='LC59'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shortDesc=&quot;#{bindings.sSearchName.hints.tooltip}&quot;</div><div class='line' id='LC60'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id=&quot;it1&quot;&gt;</div><div class='line' id='LC61'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;f:validator binding=&quot;#{bindings.sSearchName.validator}&quot;/&gt;</div><div class='line' id='LC62'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/af:inputText&gt;</div><div class='line' id='LC63'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;af:commandButton actionListener=&quot;#{bindings.SearchLDAPDirectory.execute}&quot;</div><div class='line' id='LC64'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text=&quot;Go&quot;</div><div class='line' id='LC65'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;disabled=&quot;#{!bindings.SearchLDAPDirectory.enabled}&quot;</div><div class='line' id='LC66'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id=&quot;cb1&quot;/&gt;</div><div class='line' id='LC67'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/af:panelGroupLayout&gt;</div><div class='line' id='LC68'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/f:facet&gt;</div><div class='line' id='LC69'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/af:decorativeBox&gt;</div><div class='line' id='LC70'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/af:form&gt;</div><div class='line' id='LC71'>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/af:document&gt;</div><div class='line' id='LC72'>&nbsp;&nbsp;&lt;/f:view&gt;</div><div class='line' id='LC73'>&lt;/jsp:root&gt;</div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2415841/188a0c46ed34de9ff3ecdcbbac0db4eb21f42dd1/LDAPSearch.jspx" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2415841#file_ldap_search.jspx" style="float:right;margin-right:10px;color:#666">LDAPSearch.jspx</a>
            <a href="https://gist.github.com/2415841">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">&quot;navbox&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;c:set</span> <span class="na">var=</span><span class="s">&quot;navNodes&quot;</span> <span class="na">value=</span><span class="s">&quot;${navigationContext.defaultNavigationModel.listModel[&#39;startNode=/, includeStartNode=false&#39;]}&quot;</span> <span class="na">scope=</span><span class="s">&quot;session&quot;</span><span class="nt">/&gt;</span></div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;ul</span> <span class="na">id=</span><span class="s">&quot;nav&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;c:forEach</span> <span class="na">var=</span><span class="s">&quot;menu&quot;</span> <span class="na">varStatus=</span><span class="s">&quot;vs&quot;</span> <span class="na">items=</span><span class="s">&quot;${navNodes}&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;li</span> <span class="na">class=</span><span class="s">&quot;parentnode&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">&quot;/webcenter${menu.goLinkPrettyUrl}&quot;</span> <span class="na">class=</span><span class="s">&quot;${menu.selected}&quot;</span><span class="nt">&gt;</span>${menu.title}<span class="nt">&lt;/a&gt;</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;c:if</span> <span class="na">test=</span><span class="s">&quot;${not empty menu.children}&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;ul&gt;</span></div><div class='line' id='LC9'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;c:forEach</span> <span class="na">var=</span><span class="s">&quot;child&quot;</span> <span class="na">items=</span><span class="s">&quot;#{menu.children}&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;li</span> <span class="na">class=</span><span class="s">&quot;childnode&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC11'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">&quot;/webcenter${child.goLinkPrettyUrl}&quot;</span><span class="nt">&gt;</span>${child.title}<span class="nt">&lt;/a&gt;</span></div><div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;c:if</span> <span class="na">test=</span><span class="s">&quot;${not empty child.children}&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;ul&gt;</span></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;c:forEach</span> <span class="na">var=</span><span class="s">&quot;grandchild&quot;</span> <span class="na">items=</span><span class="s">&quot;#{child.children}&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC15'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;li</span> <span class="na">class=</span><span class="s">&quot;grandchildnode&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC16'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">&quot;/webcenter${grandchild.goLinkPrettyUrl}&quot;</span><span class="nt">&gt;</span>${grandchild.title}<span class="nt">&lt;/a&gt;</span></div><div class='line' id='LC17'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/li&gt;</span></div><div class='line' id='LC18'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/c:forEach&gt;</span></div><div class='line' id='LC19'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/ul&gt;</span></div><div class='line' id='LC20'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/c:if&gt;</span></div><div class='line' id='LC21'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/li&gt;</span></div><div class='line' id='LC22'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/c:forEach&gt;</span></div><div class='line' id='LC23'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/ul&gt;</span></div><div class='line' id='LC24'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/c:if&gt;</span></div><div class='line' id='LC25'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/li&gt;</span></div><div class='line' id='LC26'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/c:forEach&gt;</span></div><div class='line' id='LC27'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;c:if</span> <span class="na">test=</span><span class="s">&quot;${securityContext.authenticated}&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC28'><span class="cp">&lt;![CDATA[</span></div><div class='line' id='LC29'><span class="cp">                           &lt;li class=&quot;parentnode&quot;&gt;</span></div><div class='line' id='LC30'><span class="cp">                              &lt;a href=&quot;#&quot;&gt;People Search&lt;/a&gt;</span></div><div class='line' id='LC31'><span class="cp">                              &lt;ul&gt;</span></div><div class='line' id='LC32'><span class="cp">                                 &lt;li class=&quot;childnode&quot;&gt;</span></div><div class='line' id='LC33'><span class="cp">                                    &lt;iframe src=&quot;http://127.0.0.1:7101/LDAPSearchPortlet-ViewController-context-root/faces/LDAPSearch.jspx&quot; width=&quot;330&quot; height=&quot;360&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</span></div><div class='line' id='LC34'><span class="cp">                                 &lt;/li&gt;</span></div><div class='line' id='LC35'><span class="cp">                              &lt;/ul&gt;</span></div><div class='line' id='LC36'><span class="cp">                           &lt;/li&gt;</span></div><div class='line' id='LC37'><span class="cp">]]&gt;</span></div><div class='line' id='LC38'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/c:if&gt;</span></div><div class='line' id='LC39'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/ul&gt;</span></div><div class='line' id='LC40'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/div&gt;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2415841/180bd8c7da5e152d878029ccdba3af034fe35592/NavSnippet.htm" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2415841#file_nav_snippet.htm" style="float:right;margin-right:10px;color:#666">NavSnippet.htm</a>
            <a href="https://gist.github.com/2415841">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="kn">package</span> <span class="n">E2Workbench</span><span class="o">;</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="kd">public</span> <span class="kd">class</span> <span class="nc">Person</span> <span class="o">{</span></div><div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;&nbsp;</div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">name</span><span class="o">;</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">email</span><span class="o">;</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">phone</span><span class="o">;</span></div><div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">description</span><span class="o">;</span></div><div class='line' id='LC9'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">private</span> <span class="n">String</span> <span class="n">userid</span><span class="o">;</span></div><div class='line' id='LC10'><br/></div><div class='line' id='LC11'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="nf">Person</span><span class="o">(</span><span class="n">String</span> <span class="n">name</span><span class="o">,</span> <span class="n">String</span> <span class="n">email</span><span class="o">,</span> <span class="n">String</span> <span class="n">phone</span><span class="o">,</span> <span class="n">String</span> <span class="n">description</span><span class="o">,</span> <span class="n">String</span> <span class="n">userid</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">this</span><span class="o">.</span><span class="na">name</span> <span class="o">=</span> <span class="n">name</span><span class="o">;</span></div><div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">this</span><span class="o">.</span><span class="na">email</span> <span class="o">=</span> <span class="n">email</span><span class="o">;</span></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">this</span><span class="o">.</span><span class="na">phone</span> <span class="o">=</span> <span class="n">phone</span><span class="o">;</span></div><div class='line' id='LC15'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">this</span><span class="o">.</span><span class="na">description</span> <span class="o">=</span> <span class="n">description</span><span class="o">;</span></div><div class='line' id='LC16'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">this</span><span class="o">.</span><span class="na">userid</span> <span class="o">=</span> <span class="n">userid</span><span class="o">;</span></div><div class='line' id='LC17'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC18'><br/></div><div class='line' id='LC19'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="kt">void</span> <span class="nf">setName</span><span class="o">(</span><span class="n">String</span> <span class="n">name</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC20'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">this</span><span class="o">.</span><span class="na">name</span> <span class="o">=</span> <span class="n">name</span><span class="o">;</span></div><div class='line' id='LC21'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC22'><br/></div><div class='line' id='LC23'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="n">String</span> <span class="nf">getName</span><span class="o">()</span> <span class="o">{</span></div><div class='line' id='LC24'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">return</span> <span class="n">name</span><span class="o">;</span></div><div class='line' id='LC25'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC26'><br/></div><div class='line' id='LC27'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="kt">void</span> <span class="nf">setEmail</span><span class="o">(</span><span class="n">String</span> <span class="n">email</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC28'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">this</span><span class="o">.</span><span class="na">email</span> <span class="o">=</span> <span class="n">email</span><span class="o">;</span></div><div class='line' id='LC29'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC30'><br/></div><div class='line' id='LC31'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="n">String</span> <span class="nf">getEmail</span><span class="o">()</span> <span class="o">{</span></div><div class='line' id='LC32'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">return</span> <span class="n">email</span><span class="o">;</span></div><div class='line' id='LC33'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC34'><br/></div><div class='line' id='LC35'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="kt">void</span> <span class="nf">setPhone</span><span class="o">(</span><span class="n">String</span> <span class="n">phone</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC36'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">this</span><span class="o">.</span><span class="na">phone</span> <span class="o">=</span> <span class="n">phone</span><span class="o">;</span></div><div class='line' id='LC37'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC38'><br/></div><div class='line' id='LC39'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="n">String</span> <span class="nf">getPhone</span><span class="o">()</span> <span class="o">{</span></div><div class='line' id='LC40'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">return</span> <span class="n">phone</span><span class="o">;</span></div><div class='line' id='LC41'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC42'><br/></div><div class='line' id='LC43'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="kt">void</span> <span class="nf">setDescription</span><span class="o">(</span><span class="n">String</span> <span class="n">description</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC44'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">this</span><span class="o">.</span><span class="na">description</span> <span class="o">=</span> <span class="n">description</span><span class="o">;</span></div><div class='line' id='LC45'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC46'><br/></div><div class='line' id='LC47'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="n">String</span> <span class="nf">getDescription</span><span class="o">()</span> <span class="o">{</span></div><div class='line' id='LC48'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">return</span> <span class="n">description</span><span class="o">;</span></div><div class='line' id='LC49'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC50'><br/></div><div class='line' id='LC51'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="kt">void</span> <span class="nf">setUserid</span><span class="o">(</span><span class="n">String</span> <span class="n">userid</span><span class="o">)</span> <span class="o">{</span></div><div class='line' id='LC52'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">this</span><span class="o">.</span><span class="na">userid</span> <span class="o">=</span> <span class="n">userid</span><span class="o">;</span></div><div class='line' id='LC53'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC54'><br/></div><div class='line' id='LC55'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">public</span> <span class="n">String</span> <span class="nf">getUserid</span><span class="o">()</span> <span class="o">{</span></div><div class='line' id='LC56'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">return</span> <span class="n">userid</span><span class="o">;</span></div><div class='line' id='LC57'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="o">}</span></div><div class='line' id='LC58'><span class="o">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2415841/1b5798e27959c29b07832076becf2d82e43a01c3/Person.java" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2415841#file_person.java" style="float:right;margin-right:10px;color:#666">Person.java</a>
            <a href="https://gist.github.com/2415841">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?xml version = &#39;1.0&#39; encoding = &#39;windows-1252&#39;?&gt;</span></div><div class='line' id='LC2'><span class="nt">&lt;web-app</span> <span class="na">xmlns:xsi=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="na">xsi:schemaLocation=</span><span class="s">&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;</span></div><div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="na">version=</span><span class="s">&quot;2.5&quot;</span> <span class="na">xmlns=</span><span class="s">&quot;http://java.sun.com/xml/ns/javaee&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC5'>&nbsp;&nbsp;<span class="nt">&lt;context-param&gt;</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;param-name&gt;</span>javax.faces.STATE_SAVING_METHOD<span class="nt">&lt;/param-name&gt;</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;param-value&gt;</span>client<span class="nt">&lt;/param-value&gt;</span></div><div class='line' id='LC8'>&nbsp;&nbsp;<span class="nt">&lt;/context-param&gt;</span></div><div class='line' id='LC9'><span class="nt">&lt;context-param&gt;</span></div><div class='line' id='LC10'><span class="nt">&lt;param-name&gt;</span>oracle.adf.view.rich.security.FRAME_BUSTING<span class="nt">&lt;/param-name&gt;</span></div><div class='line' id='LC11'><span class="nt">&lt;param-value&gt;</span>never<span class="nt">&lt;/param-value&gt;</span></div><div class='line' id='LC12'><span class="nt">&lt;/context-param&gt;</span></div><div class='line' id='LC13'>&nbsp;&nbsp;<span class="nt">&lt;context-param&gt;</span></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;description&gt;</span>If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP&#39;s change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed.<span class="nt">&lt;/description&gt;</span></div><div class='line' id='LC15'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;param-name&gt;</span>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION<span class="nt">&lt;/param-name&gt;</span></div><div class='line' id='LC16'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;param-value&gt;</span>false<span class="nt">&lt;/param-value&gt;</span></div><div class='line' id='LC17'>&nbsp;&nbsp;<span class="nt">&lt;/context-param&gt;</span></div><div class='line' id='LC18'>&nbsp;&nbsp;<span class="nt">&lt;context-param&gt;</span></div><div class='line' id='LC19'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;description&gt;</span>Whether the &#39;Generated by...&#39; comment at the bottom of ADF Faces HTML pages should contain version number information.<span class="nt">&lt;/description&gt;</span></div><div class='line' id='LC20'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;param-name&gt;</span>oracle.adf.view.rich.versionString.HIDDEN<span class="nt">&lt;/param-name&gt;</span></div><div class='line' id='LC21'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;param-value&gt;</span>false<span class="nt">&lt;/param-value&gt;</span></div><div class='line' id='LC22'>&nbsp;&nbsp;<span class="nt">&lt;/context-param&gt;</span></div><div class='line' id='LC23'>&nbsp;&nbsp;<span class="nt">&lt;filter&gt;</span></div><div class='line' id='LC24'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;filter-name&gt;</span>trinidad<span class="nt">&lt;/filter-name&gt;</span></div><div class='line' id='LC25'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;filter-class&gt;</span>org.apache.myfaces.trinidad.webapp.TrinidadFilter<span class="nt">&lt;/filter-class&gt;</span></div><div class='line' id='LC26'>&nbsp;&nbsp;<span class="nt">&lt;/filter&gt;</span></div><div class='line' id='LC27'>&nbsp;&nbsp;<span class="nt">&lt;filter&gt;</span></div><div class='line' id='LC28'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;filter-name&gt;</span>adfBindings<span class="nt">&lt;/filter-name&gt;</span></div><div class='line' id='LC29'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;filter-class&gt;</span>oracle.adf.model.servlet.ADFBindingFilter<span class="nt">&lt;/filter-class&gt;</span></div><div class='line' id='LC30'>&nbsp;&nbsp;<span class="nt">&lt;/filter&gt;</span></div><div class='line' id='LC31'>&nbsp;&nbsp;<span class="nt">&lt;filter-mapping&gt;</span></div><div class='line' id='LC32'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;filter-name&gt;</span>trinidad<span class="nt">&lt;/filter-name&gt;</span></div><div class='line' id='LC33'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>Faces Servlet<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC34'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;dispatcher&gt;</span>FORWARD<span class="nt">&lt;/dispatcher&gt;</span></div><div class='line' id='LC35'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;dispatcher&gt;</span>REQUEST<span class="nt">&lt;/dispatcher&gt;</span></div><div class='line' id='LC36'>&nbsp;&nbsp;<span class="nt">&lt;/filter-mapping&gt;</span></div><div class='line' id='LC37'>&nbsp;&nbsp;<span class="nt">&lt;filter-mapping&gt;</span></div><div class='line' id='LC38'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;filter-name&gt;</span>adfBindings<span class="nt">&lt;/filter-name&gt;</span></div><div class='line' id='LC39'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>Faces Servlet<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC40'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;dispatcher&gt;</span>FORWARD<span class="nt">&lt;/dispatcher&gt;</span></div><div class='line' id='LC41'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;dispatcher&gt;</span>REQUEST<span class="nt">&lt;/dispatcher&gt;</span></div><div class='line' id='LC42'>&nbsp;&nbsp;<span class="nt">&lt;/filter-mapping&gt;</span></div><div class='line' id='LC43'>&nbsp;&nbsp;<span class="nt">&lt;listener&gt;</span></div><div class='line' id='LC44'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;listener-class&gt;</span>oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack<span class="nt">&lt;/listener-class&gt;</span></div><div class='line' id='LC45'>&nbsp;&nbsp;<span class="nt">&lt;/listener&gt;</span></div><div class='line' id='LC46'>&nbsp;&nbsp;<span class="nt">&lt;servlet&gt;</span></div><div class='line' id='LC47'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>Faces Servlet<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC48'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-class&gt;</span>javax.faces.webapp.FacesServlet<span class="nt">&lt;/servlet-class&gt;</span></div><div class='line' id='LC49'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;load-on-startup&gt;</span>1<span class="nt">&lt;/load-on-startup&gt;</span></div><div class='line' id='LC50'>&nbsp;&nbsp;<span class="nt">&lt;/servlet&gt;</span></div><div class='line' id='LC51'>&nbsp;&nbsp;<span class="nt">&lt;servlet&gt;</span></div><div class='line' id='LC52'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>resources<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC53'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-class&gt;</span>org.apache.myfaces.trinidad.webapp.ResourceServlet<span class="nt">&lt;/servlet-class&gt;</span></div><div class='line' id='LC54'>&nbsp;&nbsp;<span class="nt">&lt;/servlet&gt;</span></div><div class='line' id='LC55'>&nbsp;&nbsp;<span class="nt">&lt;servlet&gt;</span></div><div class='line' id='LC56'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>BIGRAPHSERVLET<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC57'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-class&gt;</span>oracle.adfinternal.view.faces.bi.renderkit.graph.GraphServlet<span class="nt">&lt;/servlet-class&gt;</span></div><div class='line' id='LC58'>&nbsp;&nbsp;<span class="nt">&lt;/servlet&gt;</span></div><div class='line' id='LC59'>&nbsp;&nbsp;<span class="nt">&lt;servlet&gt;</span></div><div class='line' id='LC60'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>BIGAUGESERVLET<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC61'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-class&gt;</span>oracle.adfinternal.view.faces.bi.renderkit.gauge.GaugeServlet<span class="nt">&lt;/servlet-class&gt;</span></div><div class='line' id='LC62'>&nbsp;&nbsp;<span class="nt">&lt;/servlet&gt;</span></div><div class='line' id='LC63'>&nbsp;&nbsp;<span class="nt">&lt;servlet&gt;</span></div><div class='line' id='LC64'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>MapProxyServlet<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC65'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-class&gt;</span>oracle.adfinternal.view.faces.bi.renderkit.geoMap.servlet.MapProxyServlet<span class="nt">&lt;/servlet-class&gt;</span></div><div class='line' id='LC66'>&nbsp;&nbsp;<span class="nt">&lt;/servlet&gt;</span></div><div class='line' id='LC67'>&nbsp;&nbsp;<span class="nt">&lt;servlet&gt;</span></div><div class='line' id='LC68'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>GatewayServlet<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC69'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-class&gt;</span>oracle.adfinternal.view.faces.bi.renderkit.graph.FlashBridgeServlet<span class="nt">&lt;/servlet-class&gt;</span></div><div class='line' id='LC70'>&nbsp;&nbsp;<span class="nt">&lt;/servlet&gt;</span></div><div class='line' id='LC71'>&nbsp;&nbsp;<span class="nt">&lt;servlet&gt;</span></div><div class='line' id='LC72'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>GetLDAPUserImage<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC73'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-class&gt;</span>view.GetLDAPUserImage<span class="nt">&lt;/servlet-class&gt;</span></div><div class='line' id='LC74'>&nbsp;&nbsp;<span class="nt">&lt;/servlet&gt;</span></div><div class='line' id='LC75'>&nbsp;&nbsp;<span class="nt">&lt;servlet-mapping&gt;</span></div><div class='line' id='LC76'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>Faces Servlet<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC77'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;url-pattern&gt;</span>/faces/*<span class="nt">&lt;/url-pattern&gt;</span></div><div class='line' id='LC78'>&nbsp;&nbsp;<span class="nt">&lt;/servlet-mapping&gt;</span></div><div class='line' id='LC79'>&nbsp;&nbsp;<span class="nt">&lt;servlet-mapping&gt;</span></div><div class='line' id='LC80'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>resources<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC81'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;url-pattern&gt;</span>/adf/*<span class="nt">&lt;/url-pattern&gt;</span></div><div class='line' id='LC82'>&nbsp;&nbsp;<span class="nt">&lt;/servlet-mapping&gt;</span></div><div class='line' id='LC83'>&nbsp;&nbsp;<span class="nt">&lt;servlet-mapping&gt;</span></div><div class='line' id='LC84'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>resources<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC85'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;url-pattern&gt;</span>/afr/*<span class="nt">&lt;/url-pattern&gt;</span></div><div class='line' id='LC86'>&nbsp;&nbsp;<span class="nt">&lt;/servlet-mapping&gt;</span></div><div class='line' id='LC87'>&nbsp;&nbsp;<span class="nt">&lt;servlet-mapping&gt;</span></div><div class='line' id='LC88'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>BIGRAPHSERVLET<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC89'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;url-pattern&gt;</span>/servlet/GraphServlet/*<span class="nt">&lt;/url-pattern&gt;</span></div><div class='line' id='LC90'>&nbsp;&nbsp;<span class="nt">&lt;/servlet-mapping&gt;</span></div><div class='line' id='LC91'>&nbsp;&nbsp;<span class="nt">&lt;servlet-mapping&gt;</span></div><div class='line' id='LC92'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>BIGAUGESERVLET<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC93'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;url-pattern&gt;</span>/servlet/GaugeServlet/*<span class="nt">&lt;/url-pattern&gt;</span></div><div class='line' id='LC94'>&nbsp;&nbsp;<span class="nt">&lt;/servlet-mapping&gt;</span></div><div class='line' id='LC95'>&nbsp;&nbsp;<span class="nt">&lt;servlet-mapping&gt;</span></div><div class='line' id='LC96'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>MapProxyServlet<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC97'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;url-pattern&gt;</span>/mapproxy/*<span class="nt">&lt;/url-pattern&gt;</span></div><div class='line' id='LC98'>&nbsp;&nbsp;<span class="nt">&lt;/servlet-mapping&gt;</span></div><div class='line' id='LC99'>&nbsp;&nbsp;<span class="nt">&lt;servlet-mapping&gt;</span></div><div class='line' id='LC100'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>resources<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC101'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;url-pattern&gt;</span>/bi/*<span class="nt">&lt;/url-pattern&gt;</span></div><div class='line' id='LC102'>&nbsp;&nbsp;<span class="nt">&lt;/servlet-mapping&gt;</span></div><div class='line' id='LC103'>&nbsp;&nbsp;<span class="nt">&lt;servlet-mapping&gt;</span></div><div class='line' id='LC104'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>GatewayServlet<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC105'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;url-pattern&gt;</span>/flashbridge/*<span class="nt">&lt;/url-pattern&gt;</span></div><div class='line' id='LC106'>&nbsp;&nbsp;<span class="nt">&lt;/servlet-mapping&gt;</span></div><div class='line' id='LC107'>&nbsp;&nbsp;<span class="nt">&lt;servlet-mapping&gt;</span></div><div class='line' id='LC108'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;servlet-name&gt;</span>GetLDAPUserImage<span class="nt">&lt;/servlet-name&gt;</span></div><div class='line' id='LC109'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;url-pattern&gt;</span>/getldapuserimage<span class="nt">&lt;/url-pattern&gt;</span></div><div class='line' id='LC110'>&nbsp;&nbsp;<span class="nt">&lt;/servlet-mapping&gt;</span></div><div class='line' id='LC111'>&nbsp;&nbsp;<span class="nt">&lt;mime-mapping&gt;</span></div><div class='line' id='LC112'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;extension&gt;</span>swf<span class="nt">&lt;/extension&gt;</span></div><div class='line' id='LC113'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;mime-type&gt;</span>application/x-shockwave-flash<span class="nt">&lt;/mime-type&gt;</span></div><div class='line' id='LC114'>&nbsp;&nbsp;<span class="nt">&lt;/mime-mapping&gt;</span></div><div class='line' id='LC115'>&nbsp;&nbsp;<span class="nt">&lt;env-entry&gt;</span></div><div class='line' id='LC116'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;description&gt;</span>Base for LDAP Queries<span class="nt">&lt;/description&gt;</span></div><div class='line' id='LC117'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-name&gt;</span>LDAPBase<span class="nt">&lt;/env-entry-name&gt;</span></div><div class='line' id='LC118'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-type&gt;</span>java.lang.String<span class="nt">&lt;/env-entry-type&gt;</span></div><div class='line' id='LC119'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-value&gt;</span>dc=wc_domain<span class="nt">&lt;/env-entry-value&gt;</span></div><div class='line' id='LC120'>&nbsp;&nbsp;<span class="nt">&lt;/env-entry&gt;</span></div><div class='line' id='LC121'>&nbsp;&nbsp;<span class="nt">&lt;env-entry&gt;</span></div><div class='line' id='LC122'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;description&gt;</span>LDAP Connection URL<span class="nt">&lt;/description&gt;</span></div><div class='line' id='LC123'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-name&gt;</span>LDAPUrl<span class="nt">&lt;/env-entry-name&gt;</span></div><div class='line' id='LC124'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-type&gt;</span>java.lang.String<span class="nt">&lt;/env-entry-type&gt;</span></div><div class='line' id='LC125'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-value&gt;</span>ldap://owcvm03:7001<span class="nt">&lt;/env-entry-value&gt;</span></div><div class='line' id='LC126'>&nbsp;&nbsp;<span class="nt">&lt;/env-entry&gt;</span></div><div class='line' id='LC127'>&nbsp;&nbsp;<span class="nt">&lt;env-entry&gt;</span></div><div class='line' id='LC128'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;description&gt;</span>Authentication method used for LDAP<span class="nt">&lt;/description&gt;</span></div><div class='line' id='LC129'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-name&gt;</span>LDAPAuthType<span class="nt">&lt;/env-entry-name&gt;</span></div><div class='line' id='LC130'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-type&gt;</span>java.lang.String<span class="nt">&lt;/env-entry-type&gt;</span></div><div class='line' id='LC131'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-value&gt;</span>simple<span class="nt">&lt;/env-entry-value&gt;</span></div><div class='line' id='LC132'>&nbsp;&nbsp;<span class="nt">&lt;/env-entry&gt;</span></div><div class='line' id='LC133'>&nbsp;&nbsp;<span class="nt">&lt;env-entry&gt;</span></div><div class='line' id='LC134'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;description&gt;</span>User to connect to LDAP in format cn=username<span class="nt">&lt;/description&gt;</span></div><div class='line' id='LC135'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-name&gt;</span>LDAPPrincipal<span class="nt">&lt;/env-entry-name&gt;</span></div><div class='line' id='LC136'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-type&gt;</span>java.lang.String<span class="nt">&lt;/env-entry-type&gt;</span></div><div class='line' id='LC137'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-value&gt;</span>cn=Admin<span class="nt">&lt;/env-entry-value&gt;</span></div><div class='line' id='LC138'>&nbsp;&nbsp;<span class="nt">&lt;/env-entry&gt;</span></div><div class='line' id='LC139'>&nbsp;&nbsp;<span class="nt">&lt;env-entry&gt;</span></div><div class='line' id='LC140'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;description&gt;</span>Password for user connecting to LDAP<span class="nt">&lt;/description&gt;</span></div><div class='line' id='LC141'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-name&gt;</span>LDAPPassword<span class="nt">&lt;/env-entry-name&gt;</span></div><div class='line' id='LC142'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-type&gt;</span>java.lang.String<span class="nt">&lt;/env-entry-type&gt;</span></div><div class='line' id='LC143'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;env-entry-value&gt;</span>welcome1<span class="nt">&lt;/env-entry-value&gt;</span></div><div class='line' id='LC144'>&nbsp;&nbsp;<span class="nt">&lt;/env-entry&gt;</span>  </div><div class='line' id='LC145'><span class="nt">&lt;/web-app&gt;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2415841/2e8c6d756184ad906759a07d032fd582b26c9e74/web.xml" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2415841#file_web.xml" style="float:right;margin-right:10px;color:#666">web.xml</a>
            <a href="https://gist.github.com/2415841">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<style>
.gist .gist-file {
font-size: 0.8em;
}
</style>
<h2 class="related_head">Posts Related to E2.0 Workbench Podcast 7 - LDAP Search Portlet for WebCenter with ADF</h2><ul><li><a href="http://www.johnbrunswick.com/2010/11/oracle-webcenter-exposing-twitter-data-with-adf/" rel="bookmark">E2.0 Workbench Podcast 1 &#8211; Exposing Twitter Data with ADF in Oracle WebCenter</a></li><li><a href="http://www.johnbrunswick.com/2010/06/slash-e2-0-management-costs-be-like-an-ldap-service/" rel="bookmark">Slash E2.0 Management Costs &#8211; Be like an LDAP Service</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/11/webcenter_-_exposing_twitter_d.html" rel="bookmark">WebCenter &#8211; Exposing Twitter Data in an ADF WSRP2 Portlet</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/02/the_minimalist_approach_to_con_2.html" rel="bookmark">The Minimalist Approach to Content Governance – Manage Phase</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/04/oracle_ucm_integration_with_we.html" rel="bookmark">Oracle UCM Integration with WebCenter</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.johnbrunswick.com/2012/04/e2-0-workbench-podcast-7-ldap-search-portlet-for-webcenter-with-adf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.johnbrunswick.com/itunesmedia/Enterprise_20_Workbench_LDAP_Search_Portlet_for_WebCenter_with_ADF.m4v" length="103543651" type="video/x-m4v" />
			<itunes:keywords>webcenter, portal, search, portlet</itunes:keywords>
		<itunes:subtitle>Create an LDAP Search Portlet using a Data Control from a Java Bean</itunes:subtitle>
		<itunes:summary>One of the cornerstones of intranet functionality is the ability to quickly locate colleagues and obtain their contact information.  In this episode of Enterprise 2.0 Workbench we take a look at using ADF to create a Data Control on top of a Java Bean that connects with an instance of LDAP / Active Directory.  One of the most powerful aspects of ADF is the ability to leverage Data Controls that abstract a web developer from having to know details of underlying data sources.  In our sample we are going to illustrate how a Java Bean can be created, along with a search class and search method to expose LDAP functionality to developers who via the Data Control will be able to drag and drop items within the Data Control to declaratively create this portlet.</itunes:summary>
		<itunes:author>John Brunswick</itunes:author>
		<itunes:explicit>clean</itunes:explicit>
	</item>
		<item>
		<title>WebCenter Content &amp; Sites Dynamic Parameter Image URLs FancyBox Fix</title>
		<link>http://www.johnbrunswick.com/2012/04/webcenter-content-and-sites-dynamic-parameter-image-urls-fancybox-fix/</link>
		<comments>http://www.johnbrunswick.com/2012/04/webcenter-content-and-sites-dynamic-parameter-image-urls-fancybox-fix/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 02:53:59 +0000</pubDate>
		<dc:creator>John Brunswick</dc:creator>
				<category><![CDATA[WebCenter Content]]></category>
		<category><![CDATA[WebCenter Sites]]></category>

		<guid isPermaLink="false">http://www.johnbrunswick.com/?p=1305</guid>
		<description><![CDATA[You are finally ready to add that great JQuery powered image gallery or slideshow to your site when you hit a snag &#8211; some existing JQuery plugins may not behave as you would expect with dynamic URLs for your media &#8230; <a href="http://www.johnbrunswick.com/2012/04/webcenter-content-and-sites-dynamic-parameter-image-urls-fancybox-fix/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You are finally ready to add that great <a href="http://jquery.com/">JQuery</a> powered image gallery or slideshow to your site when you hit a snag &#8211; some existing JQuery plugins may not behave as you would expect with dynamic URLs for your media assets (this applies to any platform that uses URLs with arguments to request these assets).  For instance, clicking on a thumbnail in an image gallery to show a larger view &#8211; may just show encoded text as if the browsed did not understand the MIME type!<br />
<a href="http://www.johnbrunswick.com/wp-content/uploads/2012/04/gallery_error_cropped.jpg"><img src="http://www.johnbrunswick.com/wp-content/uploads/2012/04/gallery_error_cropped.jpg" alt="" title="gallery_error_cropped" width="700" height="284" class="alignleft size-full wp-image-1309" /></a></p>
<p>After running into this issue last week in a new project, I spent a good amount of time brainstorming various workarounds, then stumbled onto a simple fix!</p>
<p>The <a href="http://fancybox.net/">FancyBox</a> plugin can help create engaging user experiences and was used in the podcast <a href="http://www.johnbrunswick.com/2011/06/e2-0-workbench-podcast-5-%E2%80%93-webcenter-image-gallery-with-content-presenter">E2.0 Workbench Podcast 5 – WebCenter Image Gallery with Content Presenter</a> with a hardcoded the MIME type for the image as follows to get around the parameter / dynamic URL issue.  </p>
<pre class="brush: java; gutter: false;">
<af:iterator rows="0" var="node" varStatus="iterator" value="#{nodes}" id="it0">
	<af:outputText escape="false" value="&lt;a class=&quot;grouped_elements&quot; title=&quot;#{node.propertyMap['xComments'] != 'xComments: ' ? node.propertyMap['xComments'].asTextHtml : node.propertyMap['dDocTitle'].value.stringValue}&quot; el=&quot;group&quot; href=&quot;http://owcvm03/cs/groups/public/documents/image/#{fn:toLowerCase(node.id.uid)}.jpg&quot;>"/>
	<af:image source="http://owcvm03/cs/idcplg?IdcService=GET_FILE&amp;dDocName=#{node.propertyMap['dDocTitle'].value}&amp;dID=#{node.propertyMap['dID'].value}&amp;RevisionSelectionMethod=specific&amp;Rendition=Thumbnail&amp;allowInterrupt=1" styleClass="gallery"/>
	<af:outputText escape="false" value="&lt;/a>"/>
</af:iterator>
</pre>
<p>If a URL with parameters like &#8220;http://owcvm03/cs/idcplg?IdcService=GET_FILE&amp;dID=#{node.propertyMap['dID'].value}&amp;dDocName=OWCVM03_#{fn:toLowerCase(node.id.uid)}&amp;allowInterrupt=1&#8243; was used in place of &#8220;http://owcvm03/cs/groups/public/documents/image/#{fn:toLowerCase(node.id.uid)}.jpg&#8221; the above code, you have hit this issue in the past you may have wondered if you had to change something server side or work some magic with URL encoding to get around this (the first two places I started my search).</p>
<p>By simply appending a &#8220;&#038;ext=.jpg&#8221; to the end of your URL, your dynamic presentation will work as planned.  The following code illustrates this for our image gallery sample</p>
<pre class="brush: java; gutter: false;">
<af:iterator rows="0" var="node" varStatus="iterator" value="#{nodes}" id="it0">
	<af:outputText escape="false" value="&lt;a class=&quot;grouped_elements&quot; title=&quot;#{node.propertyMap['xComments'] != 'xComments: ' ? node.propertyMap['xComments'].asTextHtml : node.propertyMap['dDocTitle'].value.stringValue}&quot; rel=&quot;group&quot; href=&quot;http://owcvm03/cs/idcplg?IdcService=GET_FILE&amp;dID=#{node.propertyMap['dID'].value}&amp;dDocName=OWCVM03_#{fn:toLowerCase(node.id.uid)}&amp;allowInterrupt=1&amp;ext=.jpg&quot;>"/>
	<af:image source="http://owcvm03/cs/idcplg?IdcService=GET_FILE&amp;dDocName=#{node.propertyMap['dDocTitle'].value}&amp;dID=#{node.propertyMap['dID'].value}&amp;RevisionSelectionMethod=specific&amp;Rendition=Thumbnail&amp;allowInterrupt=1" styleClass="gallery"/>
	<af:outputText escape="false" value="&lt;/a>"/>
</af:iterator>
</pre>
<p><a href="http://www.johnbrunswick.com/wp-content/uploads/2012/04/gallery_image_layout_cropped.jpg"><img src="http://www.johnbrunswick.com/wp-content/uploads/2012/04/gallery_image_layout_cropped.jpg" alt="" title="gallery_image_layout_cropped" width="700" height="398" class="alignleft size-full wp-image-1310" /></a></p>
<p><a href="http://www.johnbrunswick.com/wp-content/uploads/2012/04/gallery_working_cropped.jpg"><img src="http://www.johnbrunswick.com/wp-content/uploads/2012/04/gallery_working_cropped.jpg" alt="" title="gallery_working_cropped" width="700" height="394" class="alignleft size-full wp-image-1308" /></a></p>
<p>The above fix will apply equally to URLs coming from WebCenter Content, as well as WebCenter Sites.</p>
<p>Hope this helps to save some people time in their development!<br />
<script type="text/javascript" src="../../../js/shCore.js"></script><script type="text/javascript" src="../../../js/shBrushJava.js"></script>
<link href="../../../css/shCore.css" rel="stylesheet" type="text/css" />
<link href="../../../css/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
SyntaxHighlighter.all();
</script></p>
<style>
body .syntaxhighlighter .line {
        white-space: pre-wrap !important; /* make code wrap */
}
</style>
<h2 class="related_head">Posts Related to WebCenter Content & Sites Dynamic Parameter Image URLs FancyBox Fix</h2><ul><li><a href="http://www.johnbrunswick.com/2011/06/e2-0-workbench-podcast-5-%e2%80%93-webcenter-image-gallery-with-content-presenter/" rel="bookmark">E2.0 Workbench Podcast 5 – WebCenter Image Gallery with Content Presenter</a></li><li><a href="http://www.johnbrunswick.com/2012/02/webcenter-sites-template-attribute-helper-code/" rel="bookmark">WebCenter Sites Template Attribute Helper Code</a></li><li><a href="http://www.johnbrunswick.com/2011/05/e2-0-workbench-podcast-4-google-chrome-ucm-search-extension/" rel="bookmark">E2.0 Workbench Podcast 4 &#8211; Google Chrome UCM Search Extension</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/05/site_studio_mobile_example_-_w.html" rel="bookmark">Site Studio Mobile Example &#8211; WCM Reuse</a></li><li><a href="http://www.johnbrunswick.com/2011/04/e2-0-workbench-podcast-3-html5-ucm-and-webcenter-quickbox/" rel="bookmark">E2.0 Workbench Podcast 3 &#8211; HTML5, UCM and WebCenter &#8220;QuickBox&#8221;</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.johnbrunswick.com/2012/04/webcenter-content-and-sites-dynamic-parameter-image-urls-fancybox-fix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WebCenter Sites Template Attribute Helper Code</title>
		<link>http://www.johnbrunswick.com/2012/02/webcenter-sites-template-attribute-helper-code/</link>
		<comments>http://www.johnbrunswick.com/2012/02/webcenter-sites-template-attribute-helper-code/#comments</comments>
		<pubDate>Sun, 19 Feb 2012 01:16:58 +0000</pubDate>
		<dc:creator>John Brunswick</dc:creator>
				<category><![CDATA[WebCenter Sites]]></category>

		<guid isPermaLink="false">http://www.johnbrunswick.com/?p=1289</guid>
		<description><![CDATA[WebCenter Sites provides powerful data modeling capabilities to define what information is available to be accessed within various site templates. To expedite template development it helps to highlight the attributes that are exposed for use within a template based on &#8230; <a href="http://www.johnbrunswick.com/2012/02/webcenter-sites-template-attribute-helper-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>WebCenter Sites provides powerful data modeling capabilities to define what information is available to be accessed within various site templates.  To expedite template development it helps to highlight the attributes that are exposed for use within a template based on the assets are associated with the template.  This is especially relevant when starting to work with more complex models where it is especially nice to have a quick on-screen reference for them.</p>
<p>The following code snippet can be added to a page to see the attributes of an asset of a collection of assets (if the snippet is added within a looping structure within a page).</p>
<h3>Code Snippet by Itself</h3>
<pre class="brush: java">
<%
     // Get all of the available name value pairs
     Enumeration<String> eParameters = ics.GetVars();

     // Transfer the above list into an array
     ArrayList<String> arList = Collections.list(eParameters);

     // Itterate through the list and print out the various name value pairs
     for(String key : arList) {
     out.print(String.valueOf(key) + ": " + ics.GetVar(key) + "
<hr/>");
}

%>
</pre>
<h3>Code Snippet in a Sample Loop</h3>
<pre class="brush: java">
<div id="image-gallery">
          <ics:listloop listname="relatedAssets">
               <ics:listget listname="relatedAssets" fieldname="oid" output="assetId" />
               <ics:listget listname="relatedAssets" fieldname="otype" output="assetType" />
<h2><%= ics.GetVar("assetId") %></h2>

                    <%
                         // Get all of the available name value pairs
                         Enumeration<String> eParameters = ics.GetVars();

                         // Transfer the above list into an array
                         ArrayList<String> arList = Collections.list(eParameters);

                         // Itterate through the list and print out the various name value pairs
                         for(String key : arList) {
                              out.print(String.valueOf(key) + ": " + ics.GetVar(key) + "
<hr/>");
                         }

                    %>

                    <render:calltemplate
                         tname='GalleryDetail'
                         c='<%=ics.GetVar("assetType")%>'
                         cid='<%=ics.GetVar("assetId")%>'
                         slotname="ImageDetail"
                         tid='<%=ics.GetVar("tid")%>'
                         site='<%=ics.GetVar("site")%>'
                    />

          </ics:listloop>
     </div>
</pre>
<p>Make sure to import &#8220;java.util.*&#8221; into your page template if you have not already as follows</p>
<pre class="brush: java">
<%@ page import="java.util.*" %>
</pre>
<p>If your snippet is properly setup you will see the following returned in your browser</p>
<p><a href="http://www.johnbrunswick.com/wp-content/uploads/2012/02/Output_Sample_Cropped1.png"><img src="http://www.johnbrunswick.com/wp-content/uploads/2012/02/Output_Sample_Cropped1.png" alt="" title="Output_Sample_Cropped" width="700" height="379" class="alignleft size-full wp-image-1293" /></a></p>
<p>This highlights what items are currently available via the GetVar method of the ICS Object (Interface to Content Server).  You can then use the corresponding name to get the value for use in your template.</p>
<pre class="brush: java">
<%= ics.GetVar("MyGreatAttributeName") %>
</pre>
<p>Over the following weeks I will be sharing more code snippets and tips around WebCenter Sites.  Hopefully these tricks can help people to get up and running with their development quickly.  Happy coding!<br />
<script type="text/javascript" src="../../../js/shCore.js"></script><script type="text/javascript" src="../../../js/shBrushJava.js"></script>
<link href="../../../css/shCore.css" rel="stylesheet" type="text/css" />
<link href="../../../css/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
     SyntaxHighlighter.all()
</script></p>
<h2 class="related_head">Posts Related to WebCenter Sites Template Attribute Helper Code</h2><ul><li><a href="http://www.johnbrunswick.com/2012/04/e2-0-workbench-podcast-7-ldap-search-portlet-for-webcenter-with-adf/" rel="bookmark">E2.0 Workbench Podcast 7 &#8211; LDAP Search Portlet for WebCenter with ADF</a></li><li><a href="http://www.johnbrunswick.com/2011/01/webcenter-ps3-navigation-models-and-css-menus/" rel="bookmark">E2.0 Workbench Podcast 2 – WebCenter PS3 Navigation Models and CSS Menus</a></li><li><a href="http://www.johnbrunswick.com/2011/06/e2-0-workbench-podcast-5-%e2%80%93-webcenter-image-gallery-with-content-presenter/" rel="bookmark">E2.0 Workbench Podcast 5 – WebCenter Image Gallery with Content Presenter</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/05/site_studio_mobile_example_-_w.html" rel="bookmark">Site Studio Mobile Example &#8211; WCM Reuse</a></li><li><a href="http://www.johnbrunswick.com/2010/11/be-an-effective-e2-0-architect-know-your-inhabitants/" rel="bookmark">Be an Effective E2.0 Architect &#8211; Know your Inhabitants</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.johnbrunswick.com/2012/02/webcenter-sites-template-attribute-helper-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Three Key Tenets of Optimal Social Collaboration White Paper</title>
		<link>http://www.johnbrunswick.com/2011/11/three-key-tenets-of-optimal-social-collaboration-white-paper/</link>
		<comments>http://www.johnbrunswick.com/2011/11/three-key-tenets-of-optimal-social-collaboration-white-paper/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 23:43:26 +0000</pubDate>
		<dc:creator>John Brunswick</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Oracle Social Network]]></category>
		<category><![CDATA[Social Collaboration]]></category>

		<guid isPermaLink="false">http://www.johnbrunswick.com/?p=1198</guid>
		<description><![CDATA[In a guest post on Oracle&#8217;s WebCenter Blog I had the opportunity to share thoughts around optimal use of social collaboration technologies. The full exploration of three key tenets is covered in an accompanying white paper entitled, &#8220;Three Key Tenets &#8230; <a href="http://www.johnbrunswick.com/2011/11/three-key-tenets-of-optimal-social-collaboration-white-paper/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In a guest post on <a href="http://blogs.oracle.com/webcenter/entry/three_key_tenets_of_optimal">Oracle&#8217;s WebCenter Blog</a> I had the opportunity to share thoughts around optimal use of social collaboration technologies.</p>
<p>The full exploration of three key tenets is covered in an accompanying white paper entitled, &#8220;Three Key Tenets of Optimal Social Collaboration white paper&#8221;.</p>
<p><a href="http://blogs.oracle.com/webcenter/resource/ThreeKeyTenetsofOptimalSocialCollaboration.pdf">Read the white paper</a></p>
<blockquote><p>&#8220;Effective social collaboration is actionable, deeply contextual and inherently derives its value from business entities outside of itself.<br/><br />
How does an organization begin the journey from traditional, siloed collaboration to natural, business entity based social collaboration?<br/><br />
Successful enablement of enterprise social collaboration requires that organizations embrace the following tenets and understand that traditional collaborative functionality has inherent limits &#8211; it is innovation and integration in accordance with the following tenets that will provide net-new efficiency benefits.&#8221;</p></blockquote>
<p>The following tenets and an organization&#8217;s respective maturity around each will indicate how much additional value may be possible to unlock with their collaborative solutions.</p>
<p><a href="http://www.johnbrunswick.com/wp-content/uploads/2011/11/3-Key-Tenants-of-Optimal-Social-Collaboration-MD.jpg"><img src="http://www.johnbrunswick.com/wp-content/uploads/2011/11/3-Key-Tenants-of-Optimal-Social-Collaboration-MD.jpg" alt="" title="3 Key Tenants of Optimal Social Collaboration MD" width="620" height="619" class="alignleft size-full wp-image-1214" /></a></p>
<ol>
<li>Leverage a Ubiquitous Social Fabric</li>
<li>Supply Continuous Context to Support Decision Making and Problem Solving</li>
<li>Extend the Collaborative Lifecycle into Back Office</li>
</ol>
<p><a href="http://blogs.oracle.com/webcenter/resource/ThreeKeyTenetsofOptimalSocialCollaboration.pdf">Read the Three Key Tenets of Optimal Social Collaboration white paper</a></p>
<h2 class="related_head">Posts Related to Three Key Tenets of Optimal Social Collaboration White Paper</h2><ul><li><a href="http://www.johnbrunswick.com/2011/09/guest-post-social-collaboration-use-cases/" rel="bookmark">Guest Post &#8211; Social Collaboration Use Cases</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/08/social_bpm_-_benefits_getting.html" rel="bookmark">Social BPM &#8211; Benefits &amp; Getting Started</a></li><li><a href="http://www.johnbrunswick.com/2010/11/does-the-social-web-benefit-any-organization-absolutely-if-they-are-smart/" rel="bookmark">Does the Social Web Benefit any Organization?  Absolutely – If they are Smart</a></li><li><a href="http://www.johnbrunswick.com/2011/01/overlapping-social-networks-in-your-enterprise-strategies-to-understand-and-govern/" rel="bookmark">Overlapping Social Networks in your Enterprise? Strategies to Understand and Govern</a></li><li><a href="http://www.johnbrunswick.com/2009/06/unlocking-the-value-of-enterprise-20-collaboration-and-authoring-tools/" rel="bookmark">Unlocking the Value of Enterprise 2.0 Collaboration and Authoring Tools</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.johnbrunswick.com/2011/11/three-key-tenets-of-optimal-social-collaboration-white-paper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>4 WebCenter Spaces Essential CSS Tricks</title>
		<link>http://www.johnbrunswick.com/2011/10/4-webcenter-spaces-essential-css-tricks/</link>
		<comments>http://www.johnbrunswick.com/2011/10/4-webcenter-spaces-essential-css-tricks/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 03:56:33 +0000</pubDate>
		<dc:creator>John Brunswick</dc:creator>
				<category><![CDATA[Spaces]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[WebCenter]]></category>

		<guid isPermaLink="false">http://www.johnbrunswick.com/?p=1174</guid>
		<description><![CDATA[Composite application development technologies offer powerful aggregation capabilities, along with rich components to surface various backend information to users. These rich user interfaces often leverage server side processes that automatically generate HTML, CSS and JavaScript that are sent to the &#8230; <a href="http://www.johnbrunswick.com/2011/10/4-webcenter-spaces-essential-css-tricks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Composite application development technologies offer powerful aggregation capabilities, along with rich components to surface various backend information to users. These rich user interfaces often leverage server side processes that automatically generate HTML, CSS and JavaScript that are sent to the client to render the interface.  This code does a lot to enable rapid development, but the markup generated providing these rich user interfaces often requires visual adjustment to follow corporate branding patterns (font, color, etc).</p>
<p>The following 4 tips use CSS snippets that can be applied to WebCenter Spaces templates to quickly change the UI, without having to compile new code or leverage an IDE.  In the example template shown here and attached below, we have used the WebCenter Spaces Side Navigation.  Please note that you will want to verify that your changes work across various browsers, as each one has different levels of support for this advanced CSS syntax.</p>
<p><a href="http://www.johnbrunswick.com/wp-content/uploads/2011/10/pure_css2.jpg"><img src="http://www.johnbrunswick.com/wp-content/uploads/2011/10/pure_css2.jpg" alt="" title="pure_css2" width="620" height="465" class="alignleft size-full wp-image-1189" /></a><br/><br/></p>
<h3 class="sectionhead">first-child</h3>
<p>First Child allows you to essentially set a start point from which all children of a certain type will be impacted by the CSS you indicate as applicable.  This allows you to quickly apply CSS to an entire series of tags that would normally have to be addresses one by one.  In the case of<br />
<script type="text/javascript" src="http://www.johnbrunswick.com/js/shCore.js"></script><script type="text/javascript" src="http://www.johnbrunswick.com/css/shBrushJava.js"></script><script type="text/javascript" src="http://www.johnbrunswick.com/css/shBrushXml.js"></script><script type="text/javascript" src="http://www.johnbrunswick.com/css/shBrushCss.js"></script>
<link href="http://www.johnbrunswick.com/css/shCore.css" rel="stylesheet" type="text/css" />
<link href="http://www.johnbrunswick.com/css/shThemeDefault.css" rel="stylesheet" type="text/css" />
<pre class="brush: css; html-script: true; ">.xnn.x1nl div:first-child</pre>
<p>it lets the page know that any tag under a Div tag with xnn and x1nl CSS classes should use the CSS you have specified.</p>
<pre class="brush: css; html-script: true; ">.xnn.x1nl div:first-child
{
     background: #333;
}</pre>
<p>will let all of the first elements under the div tag with classes xnn and x1nl receive a background color of #333.</p>
<p>Check out more details around the <a href="http://www.w3.org/TR/CSS2/selector.html#first-child">first-child selector pseudo class</a>.</p>
<h3 class="sectionhead">[class*='yourclassnamehere'] and [id*='youridhere']</h3>
<p>Have you ever had a series of class names or IDs in CSS that followed a pattern where the start of the class name was the same, but perhaps there were various random characters applied after the shared base?  This is what the class* syntax allows up to do.  In our example we are using </p>
<pre class="brush: css; html-script: true; ">div[class*='xq']</pre>
<p>to indicate that all Div tags with a class starting with xq should have the following style applied as follows</p>
<pre class="brush: css; html-script: true; ">div[class*='xq']
{
     background: #333 ! important;
     background-image: none ! important;
}</pre>
<p>In the above code, you may see something unusual.  What is the ! important code?  We will cover the ! important modifier next.</p>
<h3 class="sectionhead">! important</h3>
<p>Sometimes generated markup from rich controls can contain embedded style code (e.g. &lt;div style=&#8221;color:#000;&#8221;&gt;&lt;/div&gt;).  The ! important modifier will enable you to override inline styles or any style that is applied previously on the page, regardless of where (top, bottom, etc).  Consider ! important as the trump card indicating what style the browser ultimately will apply to a particular item within the document object model.</p>
<p>View additional <a href="http://www.w3.org/TR/CSS2/cascade.html#important-rules">WC3.org details around ! important</a>.</p>
<h3 class="sectionhead">.WCSiteTemplateBackground</h3>
<p>The following code is WebCenter Spaces specific and will allow you to control what background color is delivered for a basic Spaces template (this can depend on Spaces version, but the pattern will be the same, with the .x1nj class potentially changing).</p>
<pre class="brush: css; html-script: true; ">.WCSiteTemplateBackground, .x1nj
{
     background-image: none;
}</pre>
<p>The following is our final CSS code that is applied to our Space to create a stripped down UI that removes the gradient images that were applied out of the box.</p>
<pre class="brush: java; html-script: true; "><af:resource type="css">
.xnn.x1nl div:first-child
{
     background: #333;
}

.WCSiteTemplateBackground, .x1nj
{
     background-image: none;
}

div[class*='xq']
{
     background: #333 ! important;
     background-image: none ! important;
}

</af:resource></pre>
<p>The full template code below from the above screenshot that can be used to jumpstart any UI adjustment that may be undertaken via the CSS tricks above.</p>
<pre class="brush: java; html-script: true; "><?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:wcshell="http://xmlns.oracle.com/webcenter/shell" xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:wcdc="http://xmlns.oracle.com/webcenter/spaces/taglib" xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable" xmlns:trh="http://myfaces.apache.org/trinidad/html" xmlns:rtc="http://xmlns.oracle.com/webcenter/collab/rtc">
   <af:pageTemplateDef var="attrs">
      <af:xmlContent>
         <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
            <display-name>WCSiteRRTemplateSideNavFlow</display-name>
            <facet>
               <facet-name>auxiliary1</facet-name>
            </facet>
            <facet>
               <facet-name>content</facet-name>
            </facet>
            <attribute>
               <attribute-name>auxiliary1Size</attribute-name>
               <attribute-class>int</attribute-class>
               <default-value>200</default-value>
            </attribute>
            <attribute>
               <attribute-name>templateFixWidth</attribute-name>
               <attribute-class>java.lang.String</attribute-class>
               <default-value>1120</default-value>
            </attribute>
            <attribute>
               <attribute-name>sideNavigationSize</attribute-name>
               <attribute-class>java.lang.String</attribute-class>
               <default-value>200</default-value>
            </attribute>
         </component>
      </af:xmlContent>
      <af:resource type="css">
.xnn.x1nl div:first-child
{
	background: #333;
}

.WCSiteTemplateBackground, .x1nj
{
	background-image: none;
}

div[class*='xq']
{
	background: #333 ! important;
	background-image: none ! important;
}

</af:resource>
      <af:panelGroupLayout id="pt_pgl3" layout="scroll" styleClass="WCSiteTemplateRoot">
         <af:panelGroupLayout id="pt_pgl5" layout="vertical" styleClass="WCSiteTemplateBackground">
            <af:panelGroupLayout id="pt_pbl1" layout="vertical" inlineStyle="width:#{attrs.templateFixWidth}px;margin:0px auto;padding-top:8px;">
               <af:panelGroupLayout id="top_globalContainer" layout="vertical" inlineStyle="height:0.0px;">
                  <wcdc:siteTemplateMetadata type="start"/>
               </af:panelGroupLayout>
               <af:panelGroupLayout id="pprIndicator" inlineStyle="height:0.0px;" visible="false">
                  <wcdc:spacesAction id="statusIndiWcLink" type="statusIndicator"/>
               </af:panelGroupLayout>
               <af:decorativeBox id="db1" theme="webcenter" styleClass="WCSiteTemplateHeader">
                  <f:facet name="center">
                     <af:panelBorderLayout id="gtbppbl1" styleClass="AFStretchWidth" inlineStyle="padding-top:3px; vertical-align:middle;">
                        <f:facet name="start">
                           <cust:panelCustomizable id="pcust1" layout="horizontal" inlineStyle="padding:0px;">
                              <af:goLink destination="#{WCAppContext.currentScope.default ? boilerBean.globalLogoURI : boilerBean.globalLogoURIInSpace}" id="gtbrspmxgl2" inlineStyle="border-width:0px; margin:0.0px;">
                                 <af:outputText value="#{WCAppContext.currentScope.default ? WCTruncator[WCAppContext.application.applicationConfig.title]['30'] : WCTruncator[spaceContext.currentSpace.GSMetadata.displayName]['30']}" id="gtbrspmxot1" inlineStyle="color: white; font-size: 14px; font-weight: bold; padding-left: 20px;" noWrap="true"/>
                              </af:goLink>
                           </cust:panelCustomizable>
                        </f:facet>
                        <af:panelBorderLayout id="gtbppbl2" styleClass="AFStretchWidth">
                           <f:facet name="end">
                              <af:panelGroupLayout layout="vertical" styleClass="AFBrandingBarItem" id="gtbppgl3" halign="end">
                                 <af:panelGroupLayout layout="horizontal" id="globNavItms" valign="middle" halign="end" inlineStyle="height:24.0px;">
                                    <cust:panelCustomizable id="pcust2" layout="horizontal" inlineStyle="padding:0px;" valign="middle">
                                       <af:region value="#{bindings.localToolbarSearch.regionModel}" id="searchbox"/>
                                       <af:spacer width="15" height="10" id="pt_s3"/>
                                       <wcdc:userProfile id="currUserWcLink" text="#{security.userDisplayName}" shortDesc="#{security.userDisplayName}" inlineStyle="white-space:nowrap;"/>
                                       <af:spacer styleClass="WCGlobalNavSeparator" rendered="#{security.authenticated}" id="gtbps31"/>
                                       <wcdc:spacesSwitcher id="wcCmdLinkGSSwit" __taskFlowId="createGroupSpaceRegion" inlineStyle="white-space:nowrap;" styleClass="WCLinkMenu" text="#{uib_o_w_s_r_Spaces.LABEL_COMMUNITIES}" shortDesc="#{uib_o_w_s_r_Spaces.LABEL_COMMUNITIES_DESC}"/>
                                       <af:spacer width="10" id="gtbps4"/>
                                       <wcdc:favoritesMenu id="wcCmdLinkGSFav" __taskFlowId="favoritesTaskFlow" inlineStyle="white-space:nowrap;" text="#{uib_o_w_w_r_WebCenter.LABEL_FAVORITES}" shortDesc="#{uib_o_w_w_r_WebCenter.LABEL_FAVORITES_DESC}"/>
                                       <af:spacer styleClass="WCGlobalNavSeparator" id="gtbps32"/>
                                       <af:region value="#{bindings.languageSelectorRegion.regionModel}" id="lang" rendered="#{!security.authenticated}"/>
                                       <af:spacer width="10" id="gtbps5" rendered="#{!security.authenticated}"/>
                                       <wcdc:spacesAction id="wcAdminLink" type="administration" inlineStyle="white-space:nowrap;" text="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_ADMINISTRATION}" shortDesc="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_ADMINISTRATION_DESC}"/>
                                       <af:spacer width="10" id="gtbps52" rendered="#{security.webCenterConfigAllowed and security.authenticated}"/>
                                       <wcdc:userPreferences id="wcPreferLink" __taskFlowId="preferenceRegion" inlineStyle="white-space:nowrap;" text="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_PREFERENCES}" shortDesc="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_PREFERENCES_DESC}"/>
                                       <af:spacer styleClass="WCGlobalNavSeparator" id="gtbps33"/>
                                       <wcdc:spacesAction id="globalHelpWcLink" type="globalHelp" text="#{uib_o_w_w_r_WebCenter.LABEL_HELP}" shortDesc="#{uib_o_w_w_r_WebCenter.LABEL_HELP_DESC}" inlineStyle="white-space:nowrap"/>
                                       <af:spacer width="10" id="gtbps6" rendered="#{boilerBean.webCenterHelpConfigured}"/>
                                       <wcdc:spacesAction id="wcLogoutLink" type="logout" inlineStyle="white-space:nowrap" text="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_LOGOUT}" shortDesc="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_LOGOUT_DESC}"/>
                                       <af:spacer width="10" id="gtbps61" rendered="#{security.authenticated}"/>
                                       <wcdc:spacesAction id="wcLoginLink" type="login" inlineStyle="white-space:nowrap" text="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_LOGIN}" shortDesc="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_LOGIN}"/>
                                       <af:spacer width="10" id="gtbps62" rendered="#{changeModeBean.inEditMode or !security.authenticated}"/>
                                       <wcdc:spacesAction id="selfRegWcLink" type="selfRegistration" text="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_SELFREG}" shortDesc="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_SELFREG_DESC}" inlineStyle="white-space:nowrap"/>
                                       <af:spacer width="10" id="gtbps63" rendered="#{changeModeBean.inEditMode or                                             (WCAppContext.application.applicationConfig.publicregistrationEnabled and                                             !security.authenticated)}"/>
                                    </cust:panelCustomizable>
                                 </af:panelGroupLayout>
<trh:script id="edvkloastar48" text="                 function wcNavigate(event)                 {                   window.location = event.getSource().getProperty('wcDestination');                   event.cancel();                 }                 function wcLaunchWindow(event)                 {                   window.open(event.getSource().getProperty('wcDestination'));                   event.cancel();                 }               "/>
                              </af:panelGroupLayout>
                           </f:facet>
                        </af:panelBorderLayout>
                     </af:panelBorderLayout>
                  </f:facet>
               </af:decorativeBox>
               <af:panelStretchLayout id="pt_psl1" dimensionsFrom="auto" startWidth="#{attrs.sideNavigationSize}px" inlineStyle="padding:14px 0px 12px" styleClass="WCContent">
                  <f:facet name="start">
                     <af:panelGroupLayout id="pt_pgl4" layout="vertical" inlineStyle="min-height:700.0px;">
                        <cust:panelCustomizable id="pcustnav" layout="vertical" inlineStyle="padding:0px;">
                           <af:panelGroupLayout id="pt_pgl1" layout="vertical" halign="end"/>
                           <af:region value="#{bindings.spacesNavigationPanel.regionModel}" id="spcNavPanel"/>
                        </cust:panelCustomizable>
                     </af:panelGroupLayout>
                  </f:facet>
                  <f:facet name="center">
                     <af:panelStretchLayout id="pt_psl2" dimensionsFrom="auto" startWidth="30px" topHeight="auto">
                        <f:facet name="top">
                           <af:panelGroupLayout id="pt_pgl2" layout="vertical" inlineStyle="margin-right:30.0px; margin-left:30.0px;">
                              <af:region value="#{bindings.spacesNavigationPageHeader.regionModel}" id="wcSpcInd"/>
                           </af:panelGroupLayout>
                        </f:facet>
                        <f:facet name="start">
                           <af:spacer width="30" height="10" id="pt_s6"/>
                        </f:facet>
                        <f:facet name="center">
                           <af:skipLinkTarget/>
                           <af:facetRef facetName="content"/>
                        </f:facet>
                     </af:panelStretchLayout>
                  </f:facet>
               </af:panelStretchLayout>
               <af:panelBorderLayout id="appftpsl1" styleClass="WCSiteTemplateFooter" rendered="#{changeModeBean.inEditMode or                                                    (WCAppContext.currentScope.default and !WCAppContext.application.applicationConfig.footerHidden) or                                                   (!WCAppContext.currentScope.default and boilerBean.footerDisplayedInSpace)}">
                  <cust:panelCustomizable id="pCust4" layout="horizontal" inlineStyle="padding:0px;">
                     <af:outputFormatted value="#{WCAppContext.currentScope.default ? boilerBean.copyrightMessage : boilerBean.copyrightMessageInSpace}" rendered="#{WCAppContext.currentScope.default ? not empty boilerBean.copyrightMessage : not empty boilerBean.copyrightMessageInSpace}" id="copyRigtyMsg"/>
                  </cust:panelCustomizable>
                  <f:facet name="end">
                     <cust:panelCustomizable id="pcust5" layout="horizontal" inlineStyle="padding:0px;">
                        <wcdc:spacesAction id="aboutWcLink" type="aboutWebcenter" text="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_ABOUT}" shortDesc="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_ABOUT_DESC}"/>
                        <af:outputText value="|" inlineStyle="margin:0px 5px;" id="appftot1"/>
                        <wcdc:spacesAction id="wcRssLink" type="rss" text="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_RSS}" shortDesc="#{uib_o_w_w_r_WebCenter.GLOBAL_LINK_RSS_DESC}"/>
                        <af:outputText value="|" inlineStyle="margin:0px 5px;" id="appftot2"/>
                        <wcdc:spacesAction id="wcconAdminLink" type="contactAdmin" text="#{uib_o_w_w_r_WebCenter.CONTACT_ADMINISTRATOR}" shortDesc="#{uib_o_w_w_r_WebCenter.CONTACT_ADMINISTRATOR_DESC}"/>
                        <af:outputText value="|" inlineStyle="margin:0px 5px;" id="appftot3"/>
                        <af:goLink text="#{uib_o_w_w_r_WebCenter.PRIVACY_STMT}" shortDesc="#{uib_o_w_w_r_WebCenter.PRIVACY_STMT_DESC}" destination="#{WCAppContext.currentScope.default ? boilerBean.privacyURL : boilerBean.privacyURLInSpace}" rendered="#{WCAppContext.currentScope.default ? not empty boilerBean.privacyURL : not empty boilerBean.privacyURLInSpace}" targetFrame="_blank" id="wcPriLink"/>
                     </cust:panelCustomizable>
                  </f:facet>
               </af:panelBorderLayout>
               <af:panelGroupLayout id="bottom_globalContainer" layout="vertical" inlineStyle="height:0.0px;">
                  <wcdc:siteTemplateMetadata type="end"/>
               </af:panelGroupLayout>
            </af:panelGroupLayout>
         </af:panelGroupLayout>
      </af:panelGroupLayout>
   </af:pageTemplateDef>
</jsp:root>
</pre>
<p><script type="text/javascript">
     SyntaxHighlighter.all()
</script></p>
<style>
h3.sectionhead {margin-top: 15px;}
</style>
<h2 class="related_head">Posts Related to 4 WebCenter Spaces Essential CSS Tricks</h2><ul><li><a href="http://blogs.oracle.com/fusionecm/2010/03/webcenter_spaces_11g_-_ui_cust.html" rel="bookmark">WebCenter Spaces 11g &#8211; UI Customization</a></li><li><a href="http://www.johnbrunswick.com/2012/05/webcenter-portal-template-design-best-practices/" rel="bookmark">WebCenter Portal Template Design Best Practices</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/08/social_bpm_-_benefits_getting.html" rel="bookmark">Social BPM &#8211; Benefits &amp; Getting Started</a></li><li><a href="http://www.johnbrunswick.com/2011/09/e2-0-workbench-podcast-6-%e2%80%93-webcenter-portal-mobile-templates-using-adaptive-styles/" rel="bookmark">E2.0 Workbench Podcast 6 – WebCenter Portal Mobile Templates using Adaptive Styles</a></li><li><a href="http://www.johnbrunswick.com/2010/11/sensei-of-e2-0-quantifiable-benefits-of-evangelism/" rel="bookmark">Sensei of E2.0 &#8211; Quantifiable Benefits of Evangelism</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.johnbrunswick.com/2011/10/4-webcenter-spaces-essential-css-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 Key Resources for Understanding WCM to Web Experience Management (WEM) Evolution</title>
		<link>http://www.johnbrunswick.com/2011/10/5-key-resources-for-understanding-wcm-to-web-experience-management-wem-evolution/</link>
		<comments>http://www.johnbrunswick.com/2011/10/5-key-resources-for-understanding-wcm-to-web-experience-management-wem-evolution/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 20:26:59 +0000</pubDate>
		<dc:creator>John Brunswick</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[WCM]]></category>
		<category><![CDATA[WebCenter]]></category>
		<category><![CDATA[WebCenter Sites]]></category>
		<category><![CDATA[WEM]]></category>

		<guid isPermaLink="false">http://www.johnbrunswick.com/?p=1141</guid>
		<description><![CDATA[It is safe to say that innovation in the information experience space is showing no signs of slowing down and continues to accelerate at a rapid pace. The fabric to provide contextual web experience, delivering increasingly personalized experiences at massive &#8230; <a href="http://www.johnbrunswick.com/2011/10/5-key-resources-for-understanding-wcm-to-web-experience-management-wem-evolution/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It is safe to say that innovation in the information experience space is showing no signs of slowing down and continues to accelerate at a rapid pace.  The fabric to provide contextual web experience, delivering increasingly personalized experiences at massive &#8220;internet scale&#8221; is becoming essential to businesses wishing to remain competitive.  This fabric includes support for catering to a wide range of channels (smart phone, tablets and <a href="http://www.amazon.com/Kindle-Color-Multi-touch-Display-Wi-Fi/dp/B0051VVOB2">now smaller 7&#8243; tablets</a>) and making use of user generated content within and outside of (Facebook, Twitter, LinkedIn, etc) an organization&#8217;s web infrastructure.</p>
<p>Today most organizations are proficient at Web Content Management (WCM), but relatively new to Web Experience Management (WCM).  Over the past few weeks I have had an intense focus on clearly defining an way to illustrate this shift and provide resources to allow businesses to get a sense of what lies ahead for web experience management.</p>
<p>To help people quickly understand and gain visibility into the torrent of information related to Web Experience Management, here are 5 key resources to help expose elements of what will be required for an evolution to WEM, as well as future strategy on the web and beyond.</p>
<p><br/></p>
<h3>What is the functional difference between WCM and WEM platforms?</h3>
<p><a href="http://www.johnbrunswick.com/wp-content/uploads/2011/10/wem2.jpg"><img src="http://www.johnbrunswick.com/wp-content/uploads/2011/10/wem2.jpg" alt="Web Experience Management" title="Web Experience Management" width="620" height="393" class="alignleft size-full wp-image-1169" /></a><br />
It would be nearly impossible to write this post without immediately addressing the general functional differences.  Please note that what I write here is my own take on these differences and does not necessarily represent the views of Oracle.</p>
<p>In the above figure I have grouped WCM and WEM functionality.  There are many views on the interwebs around this, but WCM functionality essentially provides a core foundation for what is available to enable rich WEM.  Since WCM core capabilities like meta data, workflow and basic analytics are topics that have been covered in depth before &#8211; let&#8217;s focus on what WEM provides above and beyond the WCM foundation.</p>
<ul>
<li><strong>Segmentation</strong> &#8211; based on a user&#8217;s behavior (implicit personalization) or profile (explicit personalization) it is possible to tailor the information being show to the user.  For instance, if an anonymous user views a variety of &#8220;learn German&#8221; MP3s on a site like Amazon.com, the site may begin to show the user related items that showcase other learn German MP3s, but also travel information for Germany and Austria or history books on the regions.  In order to facilitate this WEM allows this organization to create a &#8220;segment&#8221; for users who look through learn German materials.  This segment will ensure that a dynamic, contextual user experience is delivered for this person.<br/><br/>Additionally, the user may log in and the system may start to use information about past purchases to delivered promotions and other targeted information on the basis of the user&#8217;s demographic information, Facebook connections indicating what products their friends like, etc.<br/><br/></li>
<li><strong>Personalization</strong> &#8211; personalization comes in 2 forms &#8211; Implicit and Explicit.
<ul>
<li><strong>Implicit</strong> &#8211; essentially Implicit personalization is possible on the basis of an anonymous user&#8217;s geography, method by which they arrived at your site, device they are browsing from, clicks that they have made on your site and the content on your site they have viewed.</li>
<li><strong>Explicit</strong> &#8211; once a user is known to your site via a login, Facebook token or other authentication mechanism, it is possible to deliver extremely targeted content.  You not only have information about prior interactions with that user from your CRM or ERP system, but can potentially interact with the user&#8217;s Social Graph to determine what they like and what people they are friends with like.<br/><br/></li>
</ul>
<li><strong>User Generated Content (UGC) / Community</strong> &#8211; customer self service sites, fan clubs and other communities can enable organizations to increase sales into their existing customer base and increase satisfaction with that company&#8217;s products or services.  WEM technologies offer deeper engagement with users on the basis of user forums, product ratings, comments, profiles and communities.  Prospective customers are more inclined to believe comments from peers, than from a vendor, so comments and ratings (User Generated Content) are critical to consider when presenting product information.<br/><br/></li>
<li><strong>Social Media Integration</strong> &#8211; twitter, Facebook and other social media platforms allow organizations to quickly communicate with their customers and prospects, as well as for people to provide commentary about the organization itself.  The web experience happens both inside of and outside of an organization&#8217;s web properties and thought must be given to how this information is managed &#8211; from a publishing and response standpoint.  For more details around the emergence of social media and its implications for companies, check out <a href="#social">Get Social or Die with Jeremiah Owyang</a> below.<br/><br/></li>
<li><strong>Campaigns</strong> &#8211; are used to determine what materials are being shown to users in the various segments discussed above.  This allow marketing teams to shape the experience of users on the basis of what segments have been identified and created.  In our example above, the possible segment &#8220;german interest&#8221; may be created to allow marketers to create a campaign consisting of materials to show to this segment around language tapes, travel guides, german history, etc.<br/><br/></li>
<li><strong>Multichannel Delivery</strong> &#8211; it is now the rule, rather than the exception, that your site will be reviewed on mobile devices.  This may mean a tablet, smartphone or a future device not yet known.  Either way, your content, along with personalization and multimedia assets, need to be ready for delivery to a wide range of devices.  WEM platforms inherently will provide functionality to allow reuse of functions and assets across all channels.<br/><br/></li>
<li><strong>Advanced Analytics</strong> &#8211; page view analytics have existed for quite some time and no marketing department is without them.  With this being said, traditional analytics provide limited insight and no proactive capability to assist in the delivery of a web experience.  Campaign monitoring, click stream analysis and A/B testing are all essential tools to support marketing and are a key component of WEM.  Much more on advanced web analytics below within the other resources.</li>
</ul>
<p><a name="social"></a><br />
<h3>Get Social or Die with Jeremiah Owyang</h3>
<p><a href="http://www.web-strategist.com/blog/">Jeremiah</a> is a partner with <a href="http://www.altimetergroup.com/">Altimeter Group</a> focusing on web strategy and customer experience.  Anyone familiar with or new to consumer social media (Facebook, Twitter, etc) will get a ton of value from the following session Jeremiah did where he discusses developing a social strategy for your organization.</p>
<p>Check out his first session in a series of 4 from <a href="http://www.amplifyfestival.com.au/artists/detail/jeremiah-owyang">Amplify Festival</a><br />
<iframe width="560" height="315" src="http://www.youtube.com/embed/KaNwFH3yvjc" frameborder="0" allowfullscreen></iframe></p>
<p>Review the remaining 3 parts of Jeremiah&#8217;s session at <a href="http://www.amplifyfestival.com.au/artists/detail/jeremiah-owyang">Amplify Festival</a>.</p>
<p><br/></p>
<h3>Measuring Online Marketing Success with Avinash Kaushik</h3>
<p>Web analytics are great &#8211; but are you looking at metrics that actually matters?  For instance &#8220;&#8230;only you are the person that cares about your home page&#8230; people go deep on your site &#8211; look at the pages with the highest bounce rates&#8221;  &#8220;&#8230; what traffic sources are actually adding value to my business? &#8230; who are my BFFs?&#8221;  He also covers the concept of micro and macro conversions and highlights key indicators and ways of filtering data for more detail that actually show the behaviors occurring on your site that are critical to your success.</p>
<p><a href="http://www.kaushik.net/avinash/">Avinash Kaushik</a> provides a passionate, informative introduction in this session done for <a href="http://inboundmarketing.com/university/advanced-marketing-analytics-az402">Inbound Marketing University</a>.</p>
<p><object id="flashObj" width="486" height="412" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0"><param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9?isVid=1" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="videoId=85527875001&#038;playerID=70795066001&#038;playerKey=AQ~~,AAAAEEarmkE~,S-Amv_e6t_UoRNX1LIoJJ6UVqnHSmewk&#038;domain=embed&#038;dynamicStreaming=true" /><param name="base" value="http://admin.brightcove.com" /><param name="seamlesstabbing" value="false" /><param name="allowFullScreen" value="true" /><param name="swLiveConnect" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://c.brightcove.com/services/viewer/federated_f9?isVid=1" bgcolor="#FFFFFF" flashVars="videoId=85527875001&#038;playerID=70795066001&#038;playerKey=AQ~~,AAAAEEarmkE~,S-Amv_e6t_UoRNX1LIoJJ6UVqnHSmewk&#038;domain=embed&#038;dynamicStreaming=true" base="http://admin.brightcove.com" name="flashObj" width="486" height="412" seamlesstabbing="false" type="application/x-shockwave-flash" allowFullScreen="true" swLiveConnect="true" allowScriptAccess="always" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object></p>
<p><br/></p>
<h3>Rethinking Engagement Metrics</h3>
<p>With all of the increased focus around inbound marketing within organizations (blogging, etc) new ways of viewing metrics are critical to understanding what is really occurring online that contributes to brand recognition and sales.</p>
<p><a href="http://blog.webanalyticsdemystified.com/weblog/">Eric T. Peterson</a> and Joseph Carrabis from the Nextstage Group have come up with some innovative formulas to attempt to measure user engagement, providing insight beyond what is generally expected from web analytics.  Their report is embedded below.  Additionally, Lois Beckett from the Nieman Journalism Lab provides an excellent overview and insights on the basis of this work in action with some Philadelphia news organizations in <a href="http://www.niemanlab.org/2010/10/getting-beyond-just-pageviews-philly-coms-seven-part-equation-for-measuring-online-engagement/">Getting beyond just pageviews: Philly.com’s seven-part equation for measuring online engagement</a>.</p>
<p>The formula and an excerpt from the report highlight the insight capable of being gleaned from analytics that otherwise simply appears as a massive pile of information.  For details into this approach, definitely dive into the report a bit or check out Lois Beckett&#8217;s great summary.<br />
Σ(Ci + Di + Ri + Li + Bi + Fi + Ii)</p>
<p>“Visitor Engagement is a function of the number of clicks (Ci), the visit duration (Di), the rate at which the visitor returns to the site over time (Ri), their overall loyalty to the site (Li), their measured awareness of the brand (Bi), their willingness to directly contribute feedback (Fi) and the likelihood that they will engage in specific activities on the site designed to increase awareness and create a lasting impression (Ii).”</p>
<div style="width:477px" id="__ss_609593"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/leonaressi/measuring-the-immeasurable-visitor-engagement-presentation" title="Measuring The Immeasurable - Visitor Engagement" target="_blank">Measuring The Immeasurable &#8211; Visitor Engagement</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/609593" width="477" height="510" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">documents</a> from <a href="http://www.slideshare.net/leonaressi" target="_blank">Leonardo Naressi</a> </div>
</p></div>
<p><br/></p>
<h3>Marketing Analytics 101 &#8211; How to Measure the Effectiveness of your Web Site</h3>
<p>This lecture from <a href="http://www.hubspot.com">Hubspot</a> reviews why outbound marketing is broken and how it has driven the increased focus around inbound marketing.  It covers at a detailed level various ways to view and understand publishing, metrics and optimization around inbound efforts.</p>
<p><object id="flashObj" width="486" height="412" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0"><param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9?isVid=1" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="videoId=82838574001&#038;playerID=70795066001&#038;playerKey=AQ~~,AAAAEEarmkE~,S-Amv_e6t_UoRNX1LIoJJ6UVqnHSmewk&#038;domain=embed&#038;dynamicStreaming=true" /><param name="base" value="http://admin.brightcove.com" /><param name="seamlesstabbing" value="false" /><param name="allowFullScreen" value="true" /><param name="swLiveConnect" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://c.brightcove.com/services/viewer/federated_f9?isVid=1" bgcolor="#FFFFFF" flashVars="videoId=82838574001&#038;playerID=70795066001&#038;playerKey=AQ~~,AAAAEEarmkE~,S-Amv_e6t_UoRNX1LIoJJ6UVqnHSmewk&#038;domain=embed&#038;dynamicStreaming=true" base="http://admin.brightcove.com" name="flashObj" width="486" height="412" seamlesstabbing="false" type="application/x-shockwave-flash" allowFullScreen="true" swLiveConnect="true" allowScriptAccess="always" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object></p>
<h2 class="related_head">Posts Related to 5 Key Resources for Understanding WCM to Web Experience Management (WEM) Evolution</h2><ul><li><a href="http://www.johnbrunswick.com/2010/09/enterprise-2-0-interactivity-spectrum-portal-content-or-both/" rel="bookmark">Enterprise 2.0 Interactivity Spectrum – Portal, Content or Both?</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/03/elevating_customer_experience.html" rel="bookmark">Elevating Customer Experience through Enterprise Social Networking</a></li><li><a href="http://www.johnbrunswick.com/2011/03/age-gap-fallacy-and-social-networking-the-perspective-gap-impacts-enterprise-2-0-adoption/" rel="bookmark">Age Gap Fallacy and Social Networking &#8211; &#8220;Perspective Gap&#8221; Impacts Enterprise 2.0 Adoption</a></li><li><a href="http://www.johnbrunswick.com/2011/05/10-reasons-enterprise-portal-still-matters/" rel="bookmark">10 Reasons Enterprise Portal Still Matters</a></li><li><a href="http://www.johnbrunswick.com/2010/03/%ef%bb%bfportal-content-personalization/" rel="bookmark">﻿Portal Content Personalization</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.johnbrunswick.com/2011/10/5-key-resources-for-understanding-wcm-to-web-experience-management-wem-evolution/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Guest Post &#8211; Social Collaboration Use Cases</title>
		<link>http://www.johnbrunswick.com/2011/09/guest-post-social-collaboration-use-cases/</link>
		<comments>http://www.johnbrunswick.com/2011/09/guest-post-social-collaboration-use-cases/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 19:54:10 +0000</pubDate>
		<dc:creator>John Brunswick</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Social Collaboration]]></category>
		<category><![CDATA[WebCenter]]></category>

		<guid isPermaLink="false">http://www.johnbrunswick.com/?p=1135</guid>
		<description><![CDATA[I recently had the pleasure of guest blogging on Oracle&#8217;s WebCenter Blog to discuss Social Collaboration. Using examples like Nike Plus, Innocentive and 99 Designs to illustrate how social collaboration supports on-demand groups of domain experts, provides efficient ad-hoc decision &#8230; <a href="http://www.johnbrunswick.com/2011/09/guest-post-social-collaboration-use-cases/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently had the pleasure of guest blogging on <a href="http://blogs.oracle.com/webcenter/">Oracle&#8217;s WebCenter Blog</a> to discuss Social Collaboration.  Using examples like Nike Plus, Innocentive and 99 Designs to illustrate how social collaboration supports on-demand groups of domain experts, provides efficient ad-hoc decision support cockpits, retains top talent and perhaps most interestingly &#8211; drives brand affinity in and around organizations.  Read <a href="http://blogs.oracle.com/webcenter/entry/social_collaboration_use_cases">Social Collaboration Use Cases</a>.</p>
<h2 class="related_head">Posts Related to Guest Post - Social Collaboration Use Cases</h2><ul><li><a href="http://www.johnbrunswick.com/2011/11/three-key-tenets-of-optimal-social-collaboration-white-paper/" rel="bookmark">Three Key Tenets of Optimal Social Collaboration White Paper</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/08/social_bpm_-_benefits_getting.html" rel="bookmark">Social BPM &#8211; Benefits &amp; Getting Started</a></li><li><a href="http://www.johnbrunswick.com/2010/11/does-the-social-web-benefit-any-organization-absolutely-if-they-are-smart/" rel="bookmark">Does the Social Web Benefit any Organization?  Absolutely – If they are Smart</a></li><li><a href="http://www.johnbrunswick.com/2011/08/guest-post-5-best-practices-laying-the-foundation-for-webcenter-projects/" rel="bookmark">Guest Post &#8211; 5 Best Practices Laying the Foundation for WebCenter Projects</a></li><li><a href="http://www.johnbrunswick.com/2010/06/you-dont-want-facebook-for-the-enterprise/" rel="bookmark">You Don’t Want Facebook for the Enterprise</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.johnbrunswick.com/2011/09/guest-post-social-collaboration-use-cases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>E2.0 Workbench Podcast 6 – WebCenter Portal Mobile Templates using Adaptive Styles</title>
		<link>http://www.johnbrunswick.com/2011/09/e2-0-workbench-podcast-6-%e2%80%93-webcenter-portal-mobile-templates-using-adaptive-styles/</link>
		<comments>http://www.johnbrunswick.com/2011/09/e2-0-workbench-podcast-6-%e2%80%93-webcenter-portal-mobile-templates-using-adaptive-styles/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 20:02:52 +0000</pubDate>
		<dc:creator>John Brunswick</dc:creator>
				<category><![CDATA[Enterprise 2.0 Workbench]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[WebCenter]]></category>

		<guid isPermaLink="false">http://www.johnbrunswick.com/?p=1076</guid>
		<description><![CDATA[It is difficult to have a discussion around web experience today without talking about mobile. Mobile has rapidly evolved from something that only a technically inclined group of users participated in (hey &#8211; look I can view the weather forecast &#8230; <a href="http://www.johnbrunswick.com/2011/09/e2-0-workbench-podcast-6-%e2%80%93-webcenter-portal-mobile-templates-using-adaptive-styles/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It is difficult to have a discussion around web experience today without talking about mobile. Mobile has rapidly evolved from something that only a technically inclined group of users participated in (hey &#8211; look I can view the weather forecast on my phone!), to an omnipresent extension of our navigation, knowledge and interaction with the world. It is not surprising then that organizations need to embrace technical capabilities to engage customers, partners and prospects within this medium.</p>
<p>WebCenter Portal offers a variety of capabilities around mobile, <a href="http://www.oracle.com/technetwork/middleware/webcenter/iphone-163241.html">some running on device</a>, while others offering development platforms to cater to a <a href="http://www.oracle.com/technetwork/developer-tools/adf/overview/adf-mobile-096323.html">wide range of devices &#8211; both off and on device</a>. The pace of device capability is hurdling forward at a tremendous pace, as table and other form factors have grown rapidly in adoption. Depending on the project needs with a WebCenter Portal it may make sense to look at using CSS3 and Adaptive Design techniques to provide both a desktop browser, tablet and mobile experience from a single code base*</p>
<p>Only a few short years ago it was important to cater to a very wide range of devices web capabilities. Thankfully those days are coming to a close, as consumers of the &#8220;Facebook&#8221; generation frequently want the best access to news, events and services related to them and their social interactions.</p>
<p>Ok &#8211; enough around the introduction. How do we take WebCenter Portal onto a mobile? What do we want to achieve with the mobile version?</p>
<ul>
<li><a href="#achieve">What we will Achieve</a></li>
<li><a href="#how">Technical Approach</a></li>
<li><a href="#template">WebCenter Portal Adaptive Page Template</a></li>
<li><a href="#css">Media Query CSS for Page Template</a></li>
<li><a href="#code">Project Source Code</a></li>
<li><a href="#resouces">Excellent Supporting Resources</a></li>
</ul>
<p><a name="achieve"><br />
<h3>What we will Achieve</h3>
<p></a></p>
<ol>
<li>The mobile experience will optimize the browsing experience for an iPhone style viewport, removing the login box and dropping the Offerings to below the page body. This simple example shows how with basic CSS we can easily change the visibility and positioning of the elements. Keep in mind that because this is client side, some items still remain within the document object model, but are removed in the user&#8217;s view. With EL these could be removed when the sever processes the user request, so that they would not show in the page markup behind the scenes, but in our case we are just going to use this as an example to illustrate Adaptive Design.</li>
<li>We will also change the navigation for easier use on a small form factor device.  In our case &#8211; and this is just an example &#8211; we are going to disable the dropdown functionality available on the desktop, assuming that child pages would have their own respective detail navigation.  In an actual deployment it may be more likely to use other techniques to handle this, but we do it here to show the difference that various CSS modification based on viewport size can have.</li>
</ol>
<div>The figure below roughly depicts what happens when our &#8220;viewport&#8221; drops below 600px.  The site is bare-bones, but setup to convey key points that you can work into your own designs.</div>
<div><a href="http://www.johnbrunswick.com/wp-content/uploads/2011/09/mobile.jpg"><img class="size-full wp-image-1078 alignnone" title="mobile" src="http://www.johnbrunswick.com/wp-content/uploads/2011/09/mobile.jpg" alt="" width="600" height="314" /></a></div>
<p><a name="how"><br />
<h3>How will we do it?</h3>
<p></a></p>
<ol>
<li>CC3 Media Queries &#8211; CSS3 affords us the ability to understand the size of a user&#8217;s viewport and respond accordingly with styles tailored to a given user&#8217;s device. This means that we can adjust our user interface on the basis of desktop, tablet, mobile and even the big display in Times Square as needed</li>
<li>Portal Skin Family &#8211; WebCenter offers some nice skins around the Fusion UI, but for our example we need to set our skin to &#8220;simple&#8221; in the trinidad-config.xml file to give us the most control over the page style.</li>
<li>Viewport Meta Tag &#8211; We need to add a meta tag to let the browser know how to behave with our page (<a href="http://www.html5rocks.com/en/mobile/mobifying.html#toc-meta">see more detail related to mobile meta tags</a>) to keep our work abstracted from the core of WebCenter I used JQuery to append the meta tag within the header as follows<em>$(&#8216;head&#8217;).append(&#8221;);</em></li>
<li>WebCenter Page Template &#8211; For the purposes of this demonstration I created a slimmed down template with IDs and classes that make it very CSS edit friendly for this example.</li>
<li>IE &#8211; what would a post about the web be like without some caveats around IE? IE9 embraces the latest around media queries, but prior versions need a little extra love. We won&#8217;t showcase it in our example, but this great post over at <a href="http://webdesignerwall.com/tutorials/adaptive-responsive-design-with-css3-media-queries">Web Designer Wall &#8211; Adaptive &amp; Responsive Design with CSS Media Queries</a> dives right in to the gritty details of legacy support and how with a few extra files it is actually not too bad.</li>
</ol>
<div><a name="template"><br />
<h3>pageTemplate_adaptive.jspx &#8211; Adaptive Template ADF Code</h3>
</div>
<p></a><script type="text/javascript" src="http://www.johnbrunswick.com/js/shCore.js"></script><script type="text/javascript" src="http://www.johnbrunswick.com/css/shBrushJava.js"></script><script type="text/javascript" src="http://www.johnbrunswick.com/css/shBrushXml.js"></script>
<link href="http://www.johnbrunswick.com/css/shCore.css" rel="stylesheet" type="text/css" />
<link href="http://www.johnbrunswick.com/css/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://www.johnbrunswick.com/js/shCore.js"></script><script type="text/javascript" src="http://www.johnbrunswick.com/css/shBrushJava.js"></script><script type="text/javascript" src="http://www.johnbrunswick.com/css/shBrushXml.js"></script><script type="text/javascript" src="http://www.johnbrunswick.com/css/shBrushCss.js"></script>
<link href="http://www.johnbrunswick.com/css/shCore.css" rel="stylesheet" type="text/css" />
<link href="http://www.johnbrunswick.com/css/shThemeDefault.css" rel="stylesheet" type="text/css" />
<pre class="brush: java; html-script: true; ">
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
          xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable"
          xmlns:c="http://java.sun.com/jsp/jstl/core">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <af:pageTemplateDef var="attrs">

<af:resource type="javascript" source="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></af:resource>

<af:panelGroupLayout id="webcenterroot" layout="scroll" styleClass="webcenterroot">

<f:verbatim>
<!-- disable iPhone inital scale -->
&lt;script>
&#36;(&#39;head&#39;).append(&#39;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, minimum-scale=1.0, maximum-scale=1.0&quot; /&gt;&#39;);
&lt;/script>

<af:resource type="css" source="http://127.0.0.1:7101/AdaptiveTemplatePortal-Portal-context-root/css/mediaquery.css"></af:resource>

</f:verbatim>

    <!-- This will dictate overall width -->
     <af:panelGroupLayout id="contentbody" layout="vertical" styleClass="contentbody" >
<div id="mobileloginlink">
          <a href="../pages/login.jspx">Account Login</a>
        </div>

        <af:panelBorderLayout id="header" styleClass="header">
<div id="sitelogo"></div>

          <f:facet name="end">
            <af:panelGroupLayout layout="vertical" id="headerloginbox" styleClass="headerloginbox" halign="end">

                <af:outputText id="ot_username"
                               value="Welcome #{securityContext.userName}"
                               rendered="#{attrs.showGreetings}"/>

                <af:goLink id="gl_adminlink" text="Administration"
                           destination="/admin"
                           rendered="#{attrs.showAdmin and !attrs.isAdminPage}" />

                <af:commandLink id="cl_logoutlink" text="Logout"
                                action="#{o_w_s_l_LoginBackingBean.doLogout}"
                                rendered="#{securityContext.authenticated}" />

              <af:subform id="sf_loginbox" defaultCommand="pt_logincb">

                <af:panelFormLayout id="pf_userloginform">

                  <af:panelLabelAndMessage id="pl_username" label="User Name">
                    <af:inputText id="pt_it1" simple="true" value="#{o_w_s_l_LoginBackingBean.userName}"/>
                  </af:panelLabelAndMessage>

                  <af:panelLabelAndMessage id="pl_password" label="Password">
                    <af:inputText id="pt_it2" simple="true" value="#{o_w_s_l_LoginBackingBean.password}" secret="true"/>
                  </af:panelLabelAndMessage>
                </af:panelFormLayout>

                <af:panelGroupLayout id="pl_loginbutton" layout="horizontal" >
                  <af:commandLink id="pt_logincb" text="Login" action="#{o_w_s_l_LoginBackingBean.doLogin}"/>
                </af:panelGroupLayout>

              </af:subform>

            </af:panelGroupLayout>
          </f:facet>
        </af:panelBorderLayout>

        <af:panelGroupLayout id="topnavigation" layout="horizontal" styleClass="topnavigation">

        <!-- UL / CSS based nav -->
<ul id="nav">
        <c:set var="node" value="${navigationContext.defaultNavigationModel.listModel['startNode=/, includeStartNode=false']}" scope="session"/>
        <af:forEach var="node" varStatus="vs" items="#{navigationContext.defaultNavigationModel.listModel['startNode=/, includeStartNode=false']}">
<li class="parentnode"><a href="/webcenter${menu.goLinkPrettyUrl}">${node.title}</a>
            <c:if test="${not empty node.children}">
<ul>
                <c:forEach var="child" items="#{node.children}">
<li class="childnode">
                  <a href="/webcenter${child.goLinkPrettyUrl}">${child.title}</a>
                  </li>

                </c:forEach>
              </ul>

            </c:if>
        </li>

        </af:forEach>
        </ul>

        </af:panelGroupLayout>

        <af:facetRef facetName="content"></af:facetRef>
<div class="clear"></div>

<br/>
        <af:panelGroupLayout id="footer" styleClass="footer" >
          <af:outputText id="ot_copyright" value="Some Copyright Info Here..."/>
        </af:panelGroupLayout>

      </af:panelGroupLayout>
    </af:panelGroupLayout>

    <af:xmlContent>
      <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
        <display-name>pageTemplate_adaptive</display-name>
        <facet>
          <description>content</description>
          <facet-name>content</facet-name>
        </facet>
      </component>
    </af:xmlContent>
  </af:pageTemplateDef>
</jsp:root>
</pre>
<p><a name="css"><br />
<h3>mediaquery.css &#8211; CSS3 using Media Queries</h3>
<p></a><br />
Source code included in download package below code block</p>
<pre class="brush: css;">
.contentbody
{
  width: 960px;
  margin: 0 auto;
}

.header
{
  height: 50px;
}

#maincontent {
	width: 600px;
	float: left;
}

#sidebar {
	width: 280px;
	float: right;
}

#sitelogo
{
  background: url("../images/webcenter.png") ;
  height: 61px;
  width: 126px;
}

#mobileloginlink
{
  display: none;
}

.footer
{
}

.clear
{
  clear: both;
}

#nav{
	list-style:none;
	font-weight:bold;
	margin-bottom:10px;
	float:left;
	width:100%;
}
#nav li{
	float:left;
	margin-right:10px;
	position:relative;
}
#nav a{
	display:block;
	padding:5px;
	color:#fff;
	background:#888;
	text-decoration:none;
}
#nav a:hover{
	color:#fff;
	background:#6b0c36;
}
#nav ul{
	background:#fff;
	background:rgba(255,255,255,0);
	list-style:none;
	position:absolute;
	left:-9999px;
  margin-left: -40px;
}
#nav ul li{
	float:none;
}
#nav ul a{
	white-space:nowrap;
}
#nav li:hover ul{
	left:0;
}
#nav li:hover a{
	background:#000;
}
#nav li:hover ul a{
	text-decoration:none;
  font-weight: normal;
}
#nav li:hover ul li a:hover{
	background:#333;
}

/* CSS that will be used for screens <= 600px */
@media all and (max-width: 600px)
{

.headerloginbox
{
  display: none;
}

#mobileloginlink
{
  display: block;
}

.contentbody
{
  width: 300px;
  margin: 0 auto;
}  

  #maincontent
  {
    width: 100%;
  }

  #sidebar
  {
    clear: both;
    float: left;
    background: #efefef;
  }

  #nav li:hover ul a{
    display:none;
  }
}
</pre>
<p><script type="text/javascript">
     SyntaxHighlighter.all()
</script><br />
<a name="code"><br />
<h3>Sample Code Download</h3>
<p></a></p>
<ul>
<li><a href="http://www.johnbrunswick.com/wp-content/uploads/2011/09/AdaptiveTemplatePortal_Sample_Code.zip">Download the sample portal project code</a> - please note that it is not 100% identical to the video code, but has all key elements (in the video the mediaquery.css file was located in "styles" vs "css" as in the download version.</li>
</ul>
<p><a name="resources"><br />
<h3>Great Resources</h3>
<p></a><br />
Many other great techniques are possible through Adaptive Design. I suggest that you check out the following posts for more information.</p>
<ul>
<li>Web Designer Wall - <a href="http://webdesignerwall.com/tutorials/adaptive-responsive-design-with-css3-media-queries">Adaptive &amp; Responsive Design with CSS3 Media Queries</a></li>
<li>HTML5Rocks - <a href="&quot;Mobifying&quot; Your HTML5 Site">"Mobifying" Your HTML5 Site</a></li>
<li>Yannick Ongena - <a href="http://www.yonaweb.be/webcenter_11g_ps3_tutorial_building_webcenter_template">WebCenter 11g PS3 Tutorial: Building a WebCenter Template</a></li>
</ul>
<p>Happy mobiling!</p>
<p>* Please note that this blog represents my own views and not those of Oracle. The techniques illustrated here are an implementation approach and sample.</p>
<h2 class="related_head">Posts Related to E2.0 Workbench Podcast 6 – WebCenter Portal Mobile Templates using Adaptive Styles</h2><ul><li><a href="http://blogs.oracle.com/fusionecm/2010/05/site_studio_mobile_example_-_w.html" rel="bookmark">Site Studio Mobile Example &#8211; WCM Reuse</a></li><li><a href="http://www.johnbrunswick.com/2012/05/webcenter-portal-template-design-best-practices/" rel="bookmark">WebCenter Portal Template Design Best Practices</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/03/webcenter_spaces_11g_-_ui_cust.html" rel="bookmark">WebCenter Spaces 11g &#8211; UI Customization</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/02/the_minimalist_approach_to_con_1.html" rel="bookmark">The Minimalist Approach to Content Governance &#8211; Create Phase</a></li><li><a href="http://blogs.oracle.com/fusionecm/2010/04/oracle_ucm_integration_with_we.html" rel="bookmark">Oracle UCM Integration with WebCenter</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.johnbrunswick.com/2011/09/e2-0-workbench-podcast-6-%e2%80%93-webcenter-portal-mobile-templates-using-adaptive-styles/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
<enclosure url="http://www.johnbrunswick.com/itunesmedia/Enterprise_20_Workbench_WebCenter_Portal_Mobile_Templates_Using_Adaptive_Styles.m4v" length="72333615" type="video/x-m4v" />
			<itunes:keywords>WebCenter, Portal, Template, Mobile, CSS3, Adaptive</itunes:keywords>
		<itunes:subtitle>Create a WebCenter Template using CSS3 Adaptive Styles to Support Desktop, Mobile and Tablet Display Sizes</itunes:subtitle>
		<itunes:summary>Walkthrough the creation and use of a WebCenter template designed to showcase the use of CSS3 Media Queries that support adaptive design functionality.  This allows a single UI template to respond to a screen size, adjusting the look, feel and layout of WebCenter portal user interfaces.</itunes:summary>
		<itunes:author>John Brunswick</itunes:author>
		<itunes:explicit>clean</itunes:explicit>
		<itunes:duration>10:01</itunes:duration>
	</item>
		<item>
		<title>Design for Developers &#8211; 5 Great Resources</title>
		<link>http://www.johnbrunswick.com/2011/09/design-for-developers-5-great-resources/</link>
		<comments>http://www.johnbrunswick.com/2011/09/design-for-developers-5-great-resources/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 21:45:57 +0000</pubDate>
		<dc:creator>John Brunswick</dc:creator>
				<category><![CDATA[Enterprise 2.0]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://www.johnbrunswick.com/?p=1048</guid>
		<description><![CDATA[In the world of enterprise software, design has a tendency to take a back seat. Though to some technologists design seems purely superficial, it&#8217;s impact on adoption and productivity is quite objective and can be detrimental to a project&#8217;s success &#8230; <a href="http://www.johnbrunswick.com/2011/09/design-for-developers-5-great-resources/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the world of enterprise software, design has a tendency to take a back seat. Though to some technologists design seems purely superficial, it&#8217;s impact on adoption and productivity is quite objective and can be detrimental to a project&#8217;s success if poorly done.</p>
<p><em><strong>People can spot great design, but often struggle to explain why a design is effective, let alone create one themselves.</strong></em></p>
<p>What if we had a core set of rules to help with this process that were pretty simple? Going from bad to moderate would be a huge improvement and basic rules can get us there.</p>
<p>Let&#8217;s take ourselves on a quick journey to introductory design&#8230; Quick &#8211; close you eyes and think about the characteristics of a designer.</p>
<p>What did you think of?</p>
<p>Religious about the Apple brand, loves lattes and pulls awesome espresso shots, listens to music from indie bands or electronica and when you tell them about something cool you found &#8211; they tell you about how it was interesting 5 years ago, but is now completely passe.</p>
<p>Beyond this &#8211; they seem to have an ability to just &#8220;get it&#8221; with ramifications around certain design decisions. Absorbing even only a fraction of this skill can pay big dividends with the usage of our applications.</p>
<p>How can this be done?</p>
<p><strong>Good News</strong><br />
The good news effective design can be learned. As a starting point I have included 5 key resources in the form of a presentation given to developers around design, as well as a series of web sites for inspiration and reference. If you review the presentation first, you will begin to see new points within each design that were not previously visible due to you updated perspective.</p>
<p><strong>1. Idan Gazit: Design for Developers Lecture</strong><br />
In the following presentation <a href="http://blog.gazit.me/">Idan Gazit</a> uses some colorful language, but bear with him, as provides excellent commentary on design for developers. Here are some key design aspects that he discusses in detail, providing some insight that will absolutely change the way you view your existing and current projects.</p>
<ul>
<li>If you are a developer you inherently do front end!</li>
<li>Attractive things work better</li>
<li>Do less, go minimal</li>
<li>Design using a grid framework</li>
<li>Leave more whitespace</li>
<li>Your words are dressed in Typography</li>
<li>Colors &#8211; go monochromatic or one color with grey or black</li>
</ul>
<p><iframe src="http://blip.tv/play/heALgeKQMAI.html" frameborder="0" width="480" height="300"></iframe><object style="display: none;" width="320" height="240" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://a.blip.tv/api.swf#heALgeKQMAI" /><embed style="display: none;" width="320" height="240" type="application/x-shockwave-flash" src="http://a.blip.tv/api.swf#heALgeKQMAI" /></object>
</p>
<p><br/></p>
<p style="min-height: 160px;">
<img class="alignleft size-thumbnail wp-image-1049" style="margin-left: 10px; margin-right: 10px;" title="smashing" src="http://www.johnbrunswick.com/wp-content/uploads/2011/09/smashing-150x150.jpg" alt="" width="150" height="150" /><strong>2. Smashing Magazine</strong><br />
Frequently updated blog around the state of the web from a design standpoint. Smashing does a good job of providing both technical developer and design focused information.<br />
<a href="http://www.smashingmagazine.com">check out Smashing Magazine</a></p>
<p style="min-height: 160px;">
<img class="alignleft size-thumbnail wp-image-1052" style="margin-left: 10px; margin-right: 10px;" title="dribbble" src="http://www.johnbrunswick.com/wp-content/uploads/2011/09/dribbble-150x150.jpg" alt="" width="150" height="150" /><strong>3. Dribbble</strong><br />
Dribble is &#8220;Show and tell for creatives&#8221; where people share designs tagged by type (logo, ui, etc). Dribbble makes it possible to search on the basis of color palette. Some stunning example of design are located here and serve as brilliant inspiration. The content here is especially germane to developers looking to take their game to a new level with UI design using the examples tagged for <a title="UI" href="http://dribbble.com/tags/ui">http://dribbble.com/tags/ui</a> and <a title="App" href="http://dribbble.com/tags/app">http://dribbble.com/tags/app</a>.  <a href="http://www.dribbble.com">Head over to Dribbble</a> for more.</p>
<p style="min-height: 160px;">
<img class="alignleft size-thumbnail wp-image-1050" style="margin-left: 10px; margin-right: 10px;" title="pattern" src="http://www.johnbrunswick.com/wp-content/uploads/2011/09/pattern-150x150.jpg" alt="" width="150" height="150" /><strong>4. Pattern Tap</strong><br />
Pattern Tap breaks down user submitted examples into categories like forms, buttons, navigation and other areas extremely helpful to web application interface development.<br />
<a href="http://www.patterntap.com">visit Pattern Tap</a>
</p>
<p style="min-height: 160px;">
<img class="alignleft size-thumbnail wp-image-1051" style="margin-left: 10px; margin-right: 10px;" title="best" src="http://www.johnbrunswick.com/wp-content/uploads/2011/09/best-150x150.jpg" alt="" width="150" height="150" /><strong>5. The Best Designs</strong><br />
Provides an outstanding gallery of web designs segmented into various categories based on appearance. A great spot to see what some of the top end designers are doing on the web today.<br />
<a href="http://www.thebestdesigns.com/">check out The Best Designs</a></p>
<h2 class="related_head">Posts Related to Design for Developers - 5 Great Resources</h2><ul><li><a href="http://www.johnbrunswick.com/2011/03/moms-enterprise-usability-tip-1-avoid-option-overload-plague/" rel="bookmark">Mom&#8217;s Enterprise Usability Tip #1 &#8211; Avoid Option Overload Plague</a></li><li><a href="http://www.johnbrunswick.com/2010/11/be-an-effective-e2-0-architect-know-your-inhabitants/" rel="bookmark">Be an Effective E2.0 Architect &#8211; Know your Inhabitants</a></li><li><a href="http://www.johnbrunswick.com/2009/11/misconceptions-redesigns-and-information-architecture/" rel="bookmark">Misconceptions &#8211; Redesigns and Information Architecture</a></li><li><a href="http://www.johnbrunswick.com/2008/06/tagging-for-business-applications/" rel="bookmark">Tagging for Business Applications</a></li><li><a href="http://www.johnbrunswick.com/2010/12/oldspice-your-innovation-dangers-of-status-quo-e2-0/" rel="bookmark">OldSpice your Innovation &#8211; Dangers of Status Quo E2.0</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.johnbrunswick.com/2011/09/design-for-developers-5-great-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: basic

Served from: www.johnbrunswick.com @ 2012-05-19 12:52:07 -->
