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

<channel>
	<title>Jianming Li</title>
	<atom:link href="http://jianmingli.com/wp/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://jianmingli.com/wp</link>
	<description>Beta quality. Read at your own risk...</description>
	<lastBuildDate>Wed, 16 May 2012 20:55:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Windows7: Diable Java Updater</title>
		<link>http://jianmingli.com/wp/?p=4633</link>
		<comments>http://jianmingli.com/wp/?p=4633#comments</comments>
		<pubDate>Mon, 30 Apr 2012 14:46:27 +0000</pubDate>
		<dc:creator>Jianming Li</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[win7]]></category>

		<guid isPermaLink="false">http://jianmingli.com/wp/?p=4633</guid>
		<description><![CDATA[<p>For Windows 7, there are several places that JRE can be installed. For example, here are the three JREs on my machine. You need to disable auto <a href="http://jianmingli.com/wp/?p=4633"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<p>For Windows 7, there are several places that JRE can be installed. For example, here are the three JREs on my machine. You need to disable auto updates for <em>each</em> JRE.<br />
* <em>C:\Program Files\Java\jre6</em><br />
* <em>C:\Program Files\Java\jdk1.6.0_25\jre</em><br />
* <em>C:\Program Files (x86)\Java\jre6</em></p>
<p>Briefly,<br />
* Go to each JRE home's bin directory<br />
* Run <em>javacpl.exe</em> program. You may need to run it as an Administrator.<br />
* Click the <em>Update</em> tab and uncheck <em>Check for Updates Automatically</em>.</p>
<span id=""><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/04/win7_disable_update.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/04/win7_disable_update.jpg" alt="" title="win7_disable_update" width="449" height="503" class="aligncenter size-full wp-image-4634" /></a></h6></span>
<p>If you do not see the <em>Update</em> tab, that means the update has already been disabled via registry.</p>
<span id="References"><h2>References</h2></span>
<p>* <a href="http://mybrainsaver.blogspot.com/2011/07/disable-java-update-in-windows-7.html">http://mybrainsaver.blogspot.com/2011/07/disable-java-update-in-windows-7.html</a></p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://jianmingli.com/wp/?feed=rss2&#038;p=4633</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebLogic11g: Configure Standard Out Logging Level</title>
		<link>http://jianmingli.com/wp/?p=4615</link>
		<comments>http://jianmingli.com/wp/?p=4615#comments</comments>
		<pubDate>Wed, 25 Apr 2012 15:09:23 +0000</pubDate>
		<dc:creator>Jianming Li</dc:creator>
				<category><![CDATA[weblogic11g]]></category>

		<guid isPermaLink="false">http://jianmingli.com/wp/?p=4615</guid>
		<description><![CDATA[<p>* If applicable, in the Change Center of the Administration Console, click Lock &#038; Edit.
* In the left pane of the Console, expand Environment and select Servers.
* <a href="http://jianmingli.com/wp/?p=4615"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<p>* If applicable, in the Change Center of the Administration Console, click <em>Lock & Edit</em>.<br />
* In the left pane of the Console, expand <em>Environment</em> and select <em>Servers</em>.<br />
* In the Servers table, click the name of the server instance whose logging you want to configure.</p>
<span id=""><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/04/wls_logging_sel_svr.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/04/wls_logging_sel_svr.jpg" alt="" title="wls_logging_sel_svr" width="438" height="264" class="aligncenter size-full wp-image-4616" /></a></h6></span>
<p>* Select <em>Logging > General</em>, and click <em>Advanced</em> at the bottom of the page.</p>
<span id="_1"><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/04/wls_logging_sel_logging_general.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/04/wls_logging_sel_logging_general.jpg" alt="" title="wls_logging_sel_logging_general" width="210" height="96" class="aligncenter size-full wp-image-4617" /></a></h6></span>
<span id="_2"><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/04/wls_logging_sel_logging_general_adv.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/04/wls_logging_sel_logging_general_adv.jpg" alt="" title="wls_logging_sel_logging_general_adv" width="110" height="36" class="aligncenter size-full wp-image-4619" /></a></h6></span>
<p>* Under <em>Message Destinations</em>, in the <em>Standard Out: Severity Level</em> list box, choose the minimum severity level of the messages that you want to send to standard out, e.g. <strong>Error</strong>.</p>
<span id="_3"><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/04/wls_logging_stdout_severity.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/04/wls_logging_stdout_severity.jpg" alt="" title="wls_logging_stdout_severity" width="388" height="436" class="aligncenter size-full wp-image-4618" /></a></h6></span>
<p>* Click <em>Save</em>.<br />
* If applicable, in the Change Center of the Administration Console, click <em>Activate Changes</em>.</p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://jianmingli.com/wp/?feed=rss2&#038;p=4615</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7: Fix Language Control+Space Hot Key Issue</title>
		<link>http://jianmingli.com/wp/?p=4421</link>
		<comments>http://jianmingli.com/wp/?p=4421#comments</comments>
		<pubDate>Tue, 27 Mar 2012 13:58:26 +0000</pubDate>
		<dc:creator>Jianming Li</dc:creator>
				<category><![CDATA[win]]></category>

		<guid isPermaLink="false">http://jianmingli.com/wp/?p=4421</guid>
		<description><![CDATA[<p>When you installed an additional keyboard input for a new language (e.g. Chinese), you are stuck with Control + Space hot key even though you change the <a href="http://jianmingli.com/wp/?p=4421"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<p>When you installed an additional keyboard input for a new language (e.g. Chinese), you are stuck with Control + Space hot key even though you change the hot key sequence via <em>Text Services and Input Languages -> Advanced Key Settings</em>. I have Googled and tried many solutions but <em>none </em>of them seem to work. Now I just my colleague Jian's advice to <em>remove </em>the trouble keyboard input when I am done with it and reinstall when I need it.</p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://jianmingli.com/wp/?feed=rss2&#038;p=4421</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recover Photos</title>
		<link>http://jianmingli.com/wp/?p=4522</link>
		<comments>http://jianmingli.com/wp/?p=4522#comments</comments>
		<pubDate>Tue, 27 Mar 2012 13:55:12 +0000</pubDate>
		<dc:creator>Jianming Li</dc:creator>
				<category><![CDATA[photo]]></category>

		<guid isPermaLink="false">http://jianmingli.com/wp/?p=4522</guid>
		<description><![CDATA[<p>Grandma accidentally deleted her photos from her camera SD card. Here is how I recovered them using a free GNU license software called PhotoRec. See http://www.cgsecurity.org/wiki/PhotoRec for <a href="http://jianmingli.com/wp/?p=4522"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Grandma accidentally deleted her photos from her camera SD card. Here is how I recovered them using a free GNU license software called <strong>PhotoRec</strong>. See <a href="http://www.cgsecurity.org/wiki/PhotoRec">http://www.cgsecurity.org/wiki/PhotoRec</a> for details on the software.</p>
<p>* Download TestDisk from <a href="http://www.cgsecurity.org/wiki/TestDisk_Download">http://www.cgsecurity.org/wiki/TestDisk_Download</a>. I downloaded <a href="http://www.cgsecurity.org/testdisk-6.14-WIP.win.zip">Windows 32bit version</a>.<br />
* Unzip to a local directory, e.g. <em>c:\prog</em>.<br />
* Double click <em>photorec_win</em> to start the program</p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://jianmingli.com/wp/?feed=rss2&#038;p=4522</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VYSA Coaching Series</title>
		<link>http://jianmingli.com/wp/?p=4526</link>
		<comments>http://jianmingli.com/wp/?p=4526#comments</comments>
		<pubDate>Mon, 26 Mar 2012 22:00:13 +0000</pubDate>
		<dc:creator>Jianming Li</dc:creator>
				<category><![CDATA[soccer]]></category>

		<guid isPermaLink="false">http://jianmingli.com/wp/?p=4526</guid>
		<description><![CDATA[
Contents

	
		Passing and Receiving
		
			
				Key Coaching Points
				
					
						Passing
					
					
						Receiving
					
				
			
				Warm Up
			
			
				5v2 Keep Away
				
					
						Supports
					
					
						Win Ball Back
					
				
			
				End Zone Game
				
					
						Target Men
					
					
						Long Pass into Target Man
					
					
						Receive in Zone
					
				
			
				Scrimmage
			
		
	
		Shooting
		
			
				Key Coaching Points
			
			
				Warm Up
			
			
				Run and Shoot at Goal
			
			
				One Defender <a href="http://jianmingli.com/wp/?p=4526"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Passing_and_Receiving">Passing and Receiving</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Key_Coaching_Points">Key Coaching Points</a>
				<ol class='toc-odd level-3'>
					<li>
						<a href="#Passing">Passing</a>
					</li>
					<li>
						<a href="#Receiving">Receiving</a>
					</li>
				</ol>
			<li>
				<a href="#Warm_Up">Warm Up</a>
			</li>
			<li>
				<a href="#v2_Keep_Away">5v2 Keep Away</a>
				<ol class='toc-odd level-3'>
					<li>
						<a href="#Supports">Supports</a>
					</li>
					<li>
						<a href="#Win_Ball_Back">Win Ball Back</a>
					</li>
				</ol>
			<li>
				<a href="#End_Zone_Game">End Zone Game</a>
				<ol class='toc-odd level-3'>
					<li>
						<a href="#Target_Men">Target Men</a>
					</li>
					<li>
						<a href="#Long_Pass_into_Target_Man">Long Pass into Target Man</a>
					</li>
					<li>
						<a href="#Receive_in_Zone">Receive in Zone</a>
					</li>
				</ol>
			<li>
				<a href="#Scrimmage">Scrimmage</a>
			</li>
		</ol>
	<li>
		<a href="#Shooting">Shooting</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Key_Coaching_Points_1">Key Coaching Points</a>
			</li>
			<li>
				<a href="#Warm_Up_1">Warm Up</a>
			</li>
			<li>
				<a href="#Run_and_Shoot_at_Goal">Run and Shoot at Goal</a>
			</li>
			<li>
				<a href="#One_Defender_Chasing">One Defender Chasing</a>
			</li>
			<li>
				<a href="#v2_Shooting">2v2 Shooting</a>
			</li>
			<li>
				<a href="#v5_Scrimmage">5v5 Scrimmage</a>
			</li>
		</ol>
	<li>
		<a href="#Dribbling">Dribbling</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Key_Coaching_Points_2">Key Coaching Points</a>
			</li>
			<li>
				<a href="#Warm_Up_2">Warm Up</a>
			</li>
			<li>
				<a href="#Shadow_Dribbling_and_Shielding">Shadow Dribbling and Shielding</a>
			</li>
			<li>
				<a href="#Shielding_the_Ball">Shielding the Ball</a>
			</li>
			<li>
				<a href="#v1_Line_Soccer">1v1 Line Soccer</a>
			</li>
			<li>
				<a href="#vs_Line_Soccer">2vs Line Soccer</a>
			</li>
			<li>
				<a href="#v4_Four_Goals">4v4 Four Goals</a>
			</li>
			<li>
				<a href="#Small_Sided_Game">Small Sided Game</a>
			</li>
		</ol>
	<li>
		<a href="#Defending">Defending</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Coaching_Points">Coaching Points</a>
			</li>
			<li>
				<a href="#Warm_Up_3">Warm Up</a>
			</li>
			<li>
				<a href="#v1_Line_Soccer_1">1v1 Line Soccer</a>
			</li>
			<li>
				<a href="#v2_Line_Soccer">2v2 Line Soccer</a>
			</li>
			<li>
				<a href="#v2_Small_Goals">2v2 Small Goals</a>
			</li>
			<li>
				<a href="#Small_Sided_Game_1">Small Sided Game</a>
			</li>
</ol>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="Passing_and_Receiving"><h2>Passing and Receiving</h2></span>
<span id="Key_Coaching_Points"><h3>Key Coaching Points</h3></span>
<span id="Passing"><h4>Passing</h4></span>
<p>* Accuracy<br />
* Lock ankle<br />
* Weight of pass<br />
* Short pass: strike middle of the ball<br />
* Long pass: strike underneath the ball<br />
* Disguise pass<br />
* Follow through<br />
* Use both feet</p>
<span id="Receiving"><h4>Receiving</h4></span>
<p>* Get into line of flight of the ball<br />
* choose body surface<br />
* Relax surface on contact<br />
* control ball into space or away from opponent<br />
* Open up your body to see field on first touch</p>
<span id="Warm_Up"><h3>Warm Up</h3></span>
<p>* In pair, strike back and forth, go<br />
* Strike the middle of the ball, nice and clean<br />
* Man-on: pass straight back<br />
* Turn: turn and keep dribbling</p>
<span id="v2_Keep_Away"><h3>5v2 Keep Away</h3></span>
<span id="Supports"><h4>Supports</h4></span>
<p>* Two players close to ball carrier for short support<br />
* Open up body to pass<br />
* One player for long support<br />
* Disguise pass: face one way, pass another</p>
<span id="Win_Ball_Back"><h4>Win Ball Back</h4></span>
<p>* Yellow must carry ball outside box<br />
* Rest must win ball back before yellow going outside box<br />
* Close up faster</p>
<span id="End_Zone_Game"><h3>End Zone Game</h3></span>
<span id="Target_Men"><h4>Target Men</h4></span>
<p>* Six blue v six yellow, one red (neutral)<br />
* Score by passing into target men in the zones</p>
<span id="Long_Pass_into_Target_Man"><h4>Long Pass into Target Man</h4></span>
<p>* Some times long pass into zone to score<br />
* If open, show for the ball<br />
* Show disguise<br />
* Show supports</p>
<span id="Receive_in_Zone"><h4>Receive in Zone</h4></span>
<p>* Score by receiving ball in the zone</p>
<span id="Scrimmage"><h3>Scrimmage</h3></span>
<p>* 6v6</p>
<span id="Shooting"><h2>Shooting</h2></span>
<span id="Key_Coaching_Points_1"><h3>Key Coaching Points</h3></span>
<p>* Prep touch to set up shot<br />
* See goal, see ball<br />
* Non-kicking foot beside ball<br />
* Knee over ball<br />
* Use different surfaces of foot<br />
* Lock ankle, point toe down<br />
* Accuracy over power<br />
* Follow through to target<br />
* Positive attitude to shoot<br />
* Use both feet</p>
<span id="Warm_Up_1"><h3>Warm Up</h3></span>
<p>* Passing and moving in pair, touch with outside of foot, knee over ball, and hit it<br />
* Think of shooting as another step in the run, land on shooting foot.<br />
* Lock ankle, point toe down.<br />
* Alternate with both feet</p>
<span id="Run_and_Shoot_at_Goal"><h3>Run and Shoot at Goal</h3></span>
<p>* See goal see ball<br />
* Strike through the ball<br />
* Ball not spinning</p>
<span id="One_Defender_Chasing"><h3>One Defender Chasing</h3></span>
<p>* Follow through, land on shooting foot<br />
* Touch inside<br />
* Strike through center of ball</p>
<span id="v2_Shooting"><h3>2v2 Shooting</h3></span>
<p>* Goalie start the ball<br />
* Positive attitude to shoot: go for yourself if you can shoot, pass if impasse</p>
<span id="v5_Scrimmage"><h3>5v5 Scrimmage</h3></span>
<p>* Neutral player on the outside for width<br />
* Use any part of surfaces, take chance<br />
* Neutral players join the game<br />
* Team shape: width/depth</p>
<span id="Dribbling"><h2>Dribbling</h2></span>
<span id="Key_Coaching_Points_2"><h3>Key Coaching Points</h3></span>
<p>* Dribble with different parts of the foot<br />
* Dribbling under pressure - keep ball close<br />
* Dribbling into open areas - off of front foot<br />
* Change of speed<br />
* Change of direction<br />
* Fakes/moves<br />
* Shielding<br />
* Dribble at opponent when taking them on</p>
<span id="Warm_Up_2"><h3>Warm Up</h3></span>
<p>* Everybody has a ball, dribble within the area<br />
- Every step touch the ball, keep the ball close to you<br />
- Keep heads up, see where you are going<br />
* Dribble into open area<br />
* Use different part of the foot (inside, outside)<br />
* Dribble into open area <strong>quickly</strong>, off the front foot<br />
* <strong>Change speed</strong> into open area<br />
* <strong>Change direction</strong> into open area<br />
* Off with front foot into open area<br />
* Do moves into open area</p>
<span id="Shadow_Dribbling_and_Shielding"><h3>Shadow Dribbling and Shielding</h3></span>
<p>* Half yellow shirt<br />
* Find a yellow shirt standing beside her<br />
* Dribble following the shadow<br />
* Dribble with different part of foot<br />
* Reverse shadowing</p>
<span id="Shielding_the_Ball"><h3>Shielding the Ball</h3></span>
<p>* When coach say <strong>GO</strong>, shadow trying to win the ball, dribbler trying to shield the ball<br />
- Use arms as antenna<br />
- Keep ball away from opponent</p>
<span id="v1_Line_Soccer"><h3>1v1 Line Soccer</h3></span>
<p>* Coach pass the ball to one side<br />
* Dribble to end lines to score<br />
- Into open area<br />
- Change direction<br />
- Change speed<br />
- Moves<br />
- Shielding<br />
- Create space to face opponent<br />
- Use opponent's body to turn off</p>
<span id="vs_Line_Soccer"><h3>2vs Line Soccer</h3></span>
<p>* Dribble and then decide keep dribbling or pass</p>
<span id="v4_Four_Goals"><h3>4v4 Four Goals</h3></span>
<p>* Two Goals at each end line<br />
* Dribble through to score<br />
* Make field big, keep wide<br />
* Touch ball into space to dribble<br />
* Attack the space (not the player)<br />
* Dribble off front foot</p>
<span id="Small_Sided_Game"><h3>Small Sided Game</h3></span>
<p>* Two wide, one high<br />
* Attach space<br />
* Use two neutral wingers to encourage width?</p>
<span id="Defending"><h2>Defending</h2></span>
<span id="Coaching_Points"><h3>Coaching Points</h3></span>
<p>* Close down attacker<br />
* Close down space while ball is traveling<br />
* Side on<br />
* Jockey<br />
* Eyes on ball<br />
* Channel away from danger or to helping defenders<br />
* When and how to tackle<br />
* Speed, angle, and distance of first and second defender<br />
* Keep ball and opponent in front of you<br />
* Recover goal side and inside when beaten</p>
<span id="Warm_Up_3"><h3>Warm Up</h3></span>
<p>* Two players one ball, pass around<br />
* Coach calls GO,<br />
- Player with ball trying to dribble pass the defender<br />
- Player without the ball try to defend<br />
- Close down attacker<br />
- Close down space while ball is traveling<br />
- Keep ball and opponent in front of you<br />
- Side on and jockey (make yourself bigger)<br />
- Keep eyes on the ball (not the opponent)</p>
<span id="v1_Line_Soccer_1"><h3>1v1 Line Soccer</h3></span>
<p>* Defender passes ball to attacker to start<br />
* Close down attacker quickly<br />
* Side on<br />
* Jockey<br />
* Don't have to win the ball every single time, channel attacker away from danger</p>
<span id="v2_Line_Soccer"><h3>2v2 Line Soccer</h3></span>
<p>* Defender passes ball to attacker to start<br />
* Closest defender closes down attacker quickly and becomes first defender<br />
* Second defender covers space</p>
<span id="v2_Small_Goals"><h3>2v2 Small Goals</h3></span>
<p>* Recover goal side and inside when beaten</p>
<span id="Small_Sided_Game_1"><h3>Small Sided Game</h3></span>
<p>* Close down attacker on his strong foot<br />
* Goalie calls plays (since he has good vision)</p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://jianmingli.com/wp/?feed=rss2&#038;p=4526</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iMacros for Firefox</title>
		<link>http://jianmingli.com/wp/?p=4500</link>
		<comments>http://jianmingli.com/wp/?p=4500#comments</comments>
		<pubDate>Thu, 22 Mar 2012 18:30:56 +0000</pubDate>
		<dc:creator>Jianming Li</dc:creator>
				<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://jianmingli.com/wp/?p=4500</guid>
		<description><![CDATA[Install
<p>* Download from https://addons.mozilla.org/en-US/firefox/addon/imacros-for-firefox/
* Click + Add to Firefox</p>

<p>* Click Install Now when prompted
* Restart Firefox
* You should see iMacros for Firefox - Installation completed!" message</p>
How to <a href="http://jianmingli.com/wp/?p=4500"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<span id="Install"><h3>Install</h3></span>
<p>* Download from <a href="https://addons.mozilla.org/en-US/firefox/addon/imacros-for-firefox/">https://addons.mozilla.org/en-US/firefox/addon/imacros-for-firefox/</a><br />
* Click <em>+ Add to Firefox</em></p>
<span id=""><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/03/firefox_imacros_1.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/03/firefox_imacros_1-300x131.jpg" alt="" title="firefox_imacros_1" width="300" height="131" class="aligncenter size-medium wp-image-4503" /></a></h6></span>
<p>* Click <em>Install Now</em> when prompted<br />
* Restart Firefox<br />
* You should see iMacros for Firefox - Installation completed!" message</p>
<span id="How_to_Use"><h3>How to Use</h3></span>
<p>* If you are not on the "Installation completed" page, go to <a href="http://www.iopus.com/imacros/home/fx/welcome.htm">http://www.iopus.com/imacros/home/fx/welcome.htm</a><br />
* Follow the demos</p>
<span id="Turn_on_iMacro_Menu"><h3>Turn on iMacro Menu</h3></span>
<p>* Open Firefox<br />
* Enable Add-on Bar (<em>Firefox > Options > Add-on Bar</em>)</p>
<span id="_1"><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/03/firefox_imacros_addonbar.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/03/firefox_imacros_addonbar.jpg" alt="" title="firefox_imacros_addonbar" width="478" height="298" class="aligncenter size-full wp-image-4501" /></a></h6></span>
<p>* Click the iMacro menu button to open iMacro menu.</p>
<span id="_2"><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/03/firefox_imacros_imacro_button.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/03/firefox_imacros_imacro_button.jpg" alt="" title="firefox_imacros_imacro_button" width="367" height="588" class="aligncenter size-full wp-image-4502" /></a></h6></span>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://jianmingli.com/wp/?feed=rss2&#038;p=4500</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facelet Composite Components</title>
		<link>http://jianmingli.com/wp/?p=4476</link>
		<comments>http://jianmingli.com/wp/?p=4476#comments</comments>
		<pubDate>Thu, 08 Mar 2012 18:08:35 +0000</pubDate>
		<dc:creator>Jianming Li</dc:creator>
				<category><![CDATA[jsf]]></category>

		<guid isPermaLink="false">http://jianmingli.com/wp/?p=4476</guid>
		<description><![CDATA[
Contents

	
		Setup Test Project
	
	
		Create a Test Bean
	
	
		Create a New Facelet Composite Component
	
	
		Setup testcc-taglib.xml
	
	
		Test Composite Component
	
	
		Test
	
	
		References
	




&#160;

Setup Test Project
<p>* Follow this post to setup a dynamic web project using MyFaces <a href="http://jianmingli.com/wp/?p=4476"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Setup_Test_Project">Setup Test Project</a>
	</li>
	<li>
		<a href="#Create_a_Test_Bean">Create a Test Bean</a>
	</li>
	<li>
		<a href="#Create_a_New_Facelet_Composite_Component">Create a New Facelet Composite Component</a>
	</li>
	<li>
		<a href="#Setup_testcc-taglib.xml">Setup testcc-taglib.xml</a>
	</li>
	<li>
		<a href="#Test_Composite_Component">Test Composite Component</a>
	</li>
	<li>
		<a href="#Test">Test</a>
	</li>
	<li>
		<a href="#References">References</a>
	</li>
</ol>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id=""><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/03/jsf2_trinidiad_testcc_folders.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/03/jsf2_trinidiad_testcc_folders-150x300.jpg" alt="" title="jsf2_trinidiad_testcc_folders" width="150" height="300" class="aligncenter size-medium wp-image-4483" /></a></h6></span>
<span id="Setup_Test_Project"><h3>Setup Test Project</h3></span>
<p>* Follow<a href="?p=3813"> this post</a> to setup a dynamic web project using MyFaces Trinidad in Eclipse. You can download the <a href="http://jianmingli.com/wp/wp-content/uploads/2011/12/jsf2.myfaces2.trinidad2.one_1.zip">sample code</a> to begin with.<br />
* Add CDI/WELD support to the project. See <a href="?p=4373">this post</a> for details.<br />
- Add weld.jar to build path and assembly path<br />
- Add weld listener to web.xml<br />
- Add beans.xml to src/MEATA-INF</p>
<span id="Create_a_Test_Bean"><h3>Create a Test Bean</h3></span>
<p>* Create a new package named test<br />
* Create a new Java class in test package named <strong>TestBean</strong></p>
<pre class="java"><span style="color: #000000; font-weight: bold;">package</span> test;
&nbsp;
<span style="color: #a1a100;">import javax.enterprise.context.RequestScoped;</span>
<span style="color: #a1a100;">import javax.inject.Named;</span>
&nbsp;
@Named
@RequestScoped
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TestBean <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getTitle<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #ff0000;">&quot;Test Bean&quot;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> val;
	<span style="color: #000000; font-weight: bold;">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> vals;
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> getVals<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> vals;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setVals<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> vals<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">vals</span> = vals;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getVal<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> val;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setVal<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> val<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">val</span> = val;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getStr<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #ff0000;">&quot;A string&quot;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> getStrs<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> tmp = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span>;
		tmp<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;String one&quot;</span>;
		tmp<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;String two&quot;</span>;
		tmp<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;String three&quot;</span>;
		<span style="color: #000000; font-weight: bold;">return</span> tmp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<span id="Create_a_New_Facelet_Composite_Component"><h3>Create a New Facelet Composite Component</h3></span>
<p>* Add a new folder named <strong>faceletlib</strong> under <em>WEB-INF</em> directory<br />
* Add a new xhtml file named<strong> testccFace.xhtml</strong> in the <em>faceletlib </em>directory. Note that we introduced two new variables in the composite whose values can be passed in at run time: <strong>testcc_id</strong> and <strong>testcc_bean</strong></p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ui:composition</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>
	<span style="color: #000066;">xmlns:ui</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/jsf/facelets&quot;</span>
	<span style="color: #000066;">xmlns:h</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/jsf/html&quot;</span>
	<span style="color: #000066;">xmlns:f</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/jsf/core&quot;</span>
	<span style="color: #000066;">xmlns:trh</span>=<span style="color: #ff0000;">&quot;http://myfaces.apache.org/trinidad/html&quot;</span>
	<span style="color: #000066;">xmlns:tr</span>=<span style="color: #ff0000;">&quot;http://myfaces.apache.org/trinidad&quot;</span>
	<span style="color: #000066;">xmlns:c</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/jstl/core&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr:panelLabelAndMessage</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;#{testcc_id}&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;f:facet</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;help&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr:outputText</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;Pick a date&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/f:facet<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr:inputDate</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;#{testcc_id}&quot;</span> <span style="color: #000066;">simple</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tr:panelLabelAndMessage<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr:spacer</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;15&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr:panelFormLayout<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- A bunch of form components --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr:selectOneChoice</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;#{testcc_bean.val}&quot;</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">&quot;true&quot;</span>
			<span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;Select One Option:&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;f:selectItem</span> <span style="color: #000066;">itemLabel</span>=<span style="color: #ff0000;">&quot;Option1&quot;</span> <span style="color: #000066;">itemValue</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;f:selectItem</span> <span style="color: #000066;">itemLabel</span>=<span style="color: #ff0000;">&quot;Option1&quot;</span> <span style="color: #000066;">itemValue</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;f:selectItem</span> <span style="color: #000066;">itemLabel</span>=<span style="color: #ff0000;">&quot;Option1&quot;</span> <span style="color: #000066;">itemValue</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tr:selectOneChoice<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr:selectManyCheckbox</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;#{testcc_bean.vals}&quot;</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">&quot;true&quot;</span>
			<span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;Select many options:&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;f:selectItem</span> <span style="color: #000066;">itemLabel</span>=<span style="color: #ff0000;">&quot;Option1&quot;</span> <span style="color: #000066;">itemValue</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;f:selectItem</span> <span style="color: #000066;">itemLabel</span>=<span style="color: #ff0000;">&quot;Option1&quot;</span> <span style="color: #000066;">itemValue</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;f:selectItem</span> <span style="color: #000066;">itemLabel</span>=<span style="color: #ff0000;">&quot;Option1&quot;</span> <span style="color: #000066;">itemValue</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tr:selectManyCheckbox<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tr:panelFormLayout<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ui:composition<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<span id="Setup_testcc-taglib.xml"><h3>Setup testcc-taglib.xml</h3></span>
<p>* Create a new xml file named <strong>testcc-taglib.xml</strong> in the <em>WEB-INF</em> directory<br />
* Define a namespace for the new facelet taglib, e.g. <strong>http://www.testcc.com/facelets</strong><br />
* Enter the tag-name and point source to testccFace.xhtml file</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span>
<span style="color: #00bbdd;">&lt;!DOCTYPE facelet-taglib PUBLIC</span>
<span style="color: #00bbdd;">&quot;-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN&quot;</span>
<span style="color: #00bbdd;">&quot;http://java.sun.com/dtd/facelet-taglib_1_0.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;facelet-taglib<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;namespace<span style="font-weight: bold; color: black;">&gt;</span></span></span>http://www.testcc.com/facelets<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/namespace<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tag<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tag-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>testcc<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tag-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;source<span style="font-weight: bold; color: black;">&gt;</span></span></span>faceletlib/testccFace.xhtml<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/source<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tag<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/facelet-taglib<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p>* Declare new facelet tag lib in web.xml:</p>
<pre class="xml">&nbsp;
  <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--
      =================
  		Facelet Tag library
      =================
  --&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;context-param<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;param-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>facelets.LIBRARIES<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/param-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;param-value<span style="font-weight: bold; color: black;">&gt;</span></span></span>/WEB-INF/testcc-taglib.xml<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/param-value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/context-param<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<span id="Test_Composite_Component"><h3>Test Composite Component</h3></span>
<p>* Add a new folder named <strong>testcc</strong> (read test composite component) under <em>WebContent</em> directory<br />
* Add a new xhtml page named <strong>testccForm.xhtml</strong><br />
* Add <em>testcc</em> namespace in order to use the new taglib: <em>xmlns:tcc="http://www.testcc.com/facelets"</em><br />
* Use the tablib and pass in values for the two variables, i.e.<em> testcc_id</em> and <em>testcc_bean</em>:</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ui:composition</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>
	<span style="color: #000066;">xmlns:ui</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/jsf/facelets&quot;</span>
	<span style="color: #000066;">xmlns:h</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/jsf/html&quot;</span>
	<span style="color: #000066;">xmlns:f</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/jsf/core&quot;</span>
	<span style="color: #000066;">xmlns:tr</span>=<span style="color: #ff0000;">&quot;http://myfaces.apache.org/trinidad&quot;</span>
	<span style="color: #000066;">xmlns:tcc</span>=<span style="color: #ff0000;">&quot;http://www.testcc.com/facelets&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
  Sample Form: #{testBean.title}
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr:form<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tr:messages</span> <span style="color: #000066;">styleClass</span>=<span style="color: #ff0000;">&quot;message&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tcc:testcc</span> <span style="color: #000066;">testcc_id</span>=<span style="color: #ff0000;">&quot;id1&quot;</span> <span style="color: #000066;">testcc_bean</span>=<span style="color: #ff0000;">&quot;#{testBean}&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tcc:testcc<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tr:form<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ui:composition<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p>* Add a new xhtml page named <strong>testcc.xhtml</strong> and include testccForm.xhtml</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ui:composition</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>
	<span style="color: #000066;">xmlns:ui</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/jsf/facelets&quot;</span>
	<span style="color: #000066;">template</span>=<span style="color: #ff0000;">&quot;/templates/template1.xhtml&quot;</span>
	<span style="color: #000066;">xmlns:tr</span>=<span style="color: #ff0000;">&quot;http://myfaces.apache.org/trinidad&quot;</span>
	<span style="color: #000066;">xmlns:h</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/jsf/html&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ui:define</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;body&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ui:include</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;testccForm.xhtml&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ui:define<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ui:composition<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<span id="Test"><h3>Test</h3></span>
<p>* Deploy to Tomcat<br />
* Point browser to <a href="http://localhost:8080/jsf2.myfaces2.trinidad2.one/faces/testcc/testcc.xhtml">http://localhost:8080/jsf2.myfaces2.trinidad2.one/faces/testcc/testcc.xhtml</a></p>
<span id="_1"><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/03/eclipse_jsf2.myfaces2.trinidad2.facelettaglib_test.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/03/eclipse_jsf2.myfaces2.trinidad2.facelettaglib_test.jpg" alt="" title="eclipse_jsf2.myfaces2.trinidad2.facelettaglib_test" width="371" height="268" class="aligncenter size-full wp-image-4495" /></a></h6></span>
<span id="References"><h3>References</h3></span>
<p>* Apache MyFaces Trinidad 1.2 By: David Thomas </p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://jianmingli.com/wp/?feed=rss2&#038;p=4476</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSF 2 Resource/Message Bundle</title>
		<link>http://jianmingli.com/wp/?p=4437</link>
		<comments>http://jianmingli.com/wp/?p=4437#comments</comments>
		<pubDate>Thu, 01 Mar 2012 19:05:37 +0000</pubDate>
		<dc:creator>Jianming Li</dc:creator>
				<category><![CDATA[jsf]]></category>

		<guid isPermaLink="false">http://jianmingli.com/wp/?p=4437</guid>
		<description><![CDATA[<p>* Follow this post to setup test.cdi test app if needed
* Or you can download the source code for this example from test.cdi.msg.bundle
* Create a new Java <a href="http://jianmingli.com/wp/?p=4437"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<p>* Follow <a href="?p=4373">this post</a> to setup <em>test.cdi</em> test app if needed<br />
* Or you can download the source code for this example from <a href='http://jianmingli.com/wp/wp-content/uploads/2012/03/test.cdi_.msg_.bundle.zip'>test.cdi.msg.bundle</a><br />
* Create a new Java package named <strong>resources</strong><br />
* Create a message bundle file named <strong>mymessage.properties</strong> with content:</p>
<pre>&nbsp;
message1=Hello
message2= world
&nbsp;</pre>
<span id=""><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/03/weld_hello_msgbundle_pkg.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/03/weld_hello_msgbundle_pkg.jpg" alt="" title="weld_hello_msgbundle_pkg" width="222" height="92" class="aligncenter size-full wp-image-4438" /></a></h6></span>
<p>* Configure either a <em>message bundle</em> and/or(?) <em>message bundle</em> in <em>WEB-INF/faces-config.xml</em></p>
<pre class="xml">&nbsp;
    ...
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;message-bundle<span style="font-weight: bold; color: black;">&gt;</span></span></span>resources.mymessage<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/message-bundle<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;resource-bundle<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;base-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>resources.mymessage<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/base-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;var<span style="font-weight: bold; color: black;">&gt;</span></span></span>mymsg<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/var<span style="font-weight: bold; color: black;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/resource-bundle<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/application<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p>* Use message bundle in pages. Note that you use <em>f:loadbundle</em> to load bundle in individual pages.</p>
<pre>&nbsp;
&lt;body&gt;
&nbsp;
&nbsp;
	&lt;f:loadBundle basename=&quot;resources.mymessage&quot; var=&quot;msg&quot;&gt;&lt;/f:loadBundle&gt;
	From message bundle: #{msg.message1} #{msg.message2}
&nbsp;
&nbsp;</pre>
<p>* Or use resource bundle in pages. Note that you do <em>not </em>need to use <em>f:loadbundle</em> to load bundle in individual pages.</p>
<pre>&nbsp;
&lt;body&gt;
&nbsp;
&nbsp;
	From resource bundle: #{mymsg.message1} #{mymsg.message2}
&nbsp;
&nbsp;</pre>
<p>* Or use mixed message/resource bundle in pages:</p>
<pre>&nbsp;
&lt;body&gt;
&nbsp;
&nbsp;
	&lt;f:loadBundle basename=&quot;resources.mymessage&quot; var=&quot;msg&quot;&gt;&lt;/f:loadBundle&gt;
	From message bundle: #{msg.message1} #{msg.message2}
&nbsp;
&nbsp;
&nbsp;
	From resource bundle: #{mymsg.message1} #{mymsg.message2}
&nbsp;
&nbsp;</pre>
<p>* Test in browser:</p>
<span id="_1"><h6><a href="http://jianmingli.com/wp/wp-content/uploads/2012/03/weld_hello_msgbundle_test.jpg"><img src="http://jianmingli.com/wp/wp-content/uploads/2012/03/weld_hello_msgbundle_test.jpg" alt="" title="weld_hello_msgbundle_test" width="286" height="114" class="aligncenter size-full wp-image-4443" /></a></h6></span>
<span id="References"><h2>References</h2></span>
<p>* <a href="http://www.mkyong.com/jsf2/jsf-2-0-and-resource-bundles-example/">JSF 2.0 and Resource Bundles example</a><br />
* <a href="http://www.java-javafx.com/2010/09/jsf2-and-internationalization-i18n.html">JSF2 and Internationalization (I18N)</a></p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://jianmingli.com/wp/?feed=rss2&#038;p=4437</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebLogic Security References</title>
		<link>http://jianmingli.com/wp/?p=4223</link>
		<comments>http://jianmingli.com/wp/?p=4223#comments</comments>
		<pubDate>Mon, 27 Feb 2012 17:20:09 +0000</pubDate>
		<dc:creator>Jianming Li</dc:creator>
				<category><![CDATA[jaas]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://jianmingli.com/wp/?p=4223</guid>
		<description><![CDATA[References
<p>* JDK6: JavaTM Authentication and Authorization Service (JAAS) Reference Guide
* All that JAAS Scalable Java security with JAAS</p>
Books
<p>* Free JAAS in Action book</p>
WebLogic
<p>* Developing Security Providers for <a href="http://jianmingli.com/wp/?p=4223"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<span id="References"><h2>References</h2></span>
<p>* <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/jaas/JAASRefGuide.html">JDK6: JavaTM Authentication and Authorization Service (JAAS) Reference Guide</a><br />
* <a href="http://www.javaworld.com/javaworld/jw-09-2002/jw-0913-jaas.html">All that JAAS Scalable Java security with JAAS</a></p>
<span id="Books"><h3>Books</h3></span>
<p>* <a href="http://www.jaasbook.com/">Free JAAS in Action book</a></p>
<span id="WebLogic"><h3>WebLogic</h3></span>
<p>* <a href="http://docs.oracle.com/cd/E11035_01/wls100/dvspisec/atn.html">Developing Security Providers for WebLogic Server</a><br />
* <a href="http://docs.oracle.com/cd/E21764_01/web.1111/e13710/concepts.htm">Security Fundamentals</a><br />
* <a href="http://weblogic.sys-con.com/node/48219">Weblogic Article: Perimeter Authentication via Identity Assertion</a><br />
* <a href="http://fusionsecurity.blogspot.com/2010/04/by-request-multiple-realms-in-weblogic.html">By Request - Multiple Realms in WebLogic Server</a><br />
* <a href="http://docs.oracle.com/cd/E15523_01/web.1111/e13718/servlet.htm#i1043184">Servlet Authentication Filters</a><br />
* <a href="http://docs.oracle.com/cd/E12840_01/wls/docs103/javadocs/weblogic/servlet/security/ServletAuthentication.html">WebLogic 10.3 weblogic.servlet.security.ServletAuthentication API</a><br />
* <a href="http://docs.oracle.com/cd/E12890_01/ales/docs32/dvspisec/examples.html">Code Examples for Developing Security Providers</a><br />
* <a href="http://weblogic-wonders.com/weblogic/2010/03/15/custom-identity-asserter-for-weblogic-server/">Custom Identity Asserter for Weblogic Server<br />
</a></p>
<span id="ADF"><h3>ADF</h3></span>
<p>* <a href="http://docs.oracle.com/cd/E14571_01/web.1111/b31974/adding_security.htm#BABDEICH">30 Enabling ADF Security in a Fusion Web Application</a><br />
* <a href="http://andrejusb.blogspot.com/2010/11/things-you-must-know-about-adf-faces.html">Things You Must Know About ADF Faces Login Page</a></p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://jianmingli.com/wp/?feed=rss2&#038;p=4223</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Session Sharing: WebCenter and WAR</title>
		<link>http://jianmingli.com/wp/?p=4404</link>
		<comments>http://jianmingli.com/wp/?p=4404#comments</comments>
		<pubDate>Fri, 24 Feb 2012 20:34:49 +0000</pubDate>
		<dc:creator>Jianming Li</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WebCenter]]></category>

		<guid isPermaLink="false">http://jianmingli.com/wp/?p=4404</guid>
		<description><![CDATA[
Contents

	
		Create a Webcenter Application and Project
	
	
		Import appA Web Application
	
	
		Package EAR
	
	
		Test
	



&#160;
Create a Webcenter Application and Project
<p>* Create a new Webcenter application according to this post. Name the name <a href="http://jianmingli.com/wp/?p=4404"  >&#187;&#187;</a>]]></description>
			<content:encoded><![CDATA[<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Create_a_Webcenter_Application_and_Project">Create a Webcenter Application and Project</a>
	</li>
	<li>
		<a href="#Import_appA_Web_Application">Import appA Web Application</a>
	</li>
	<li>
		<a href="#Package_EAR">Package EAR</a>
	</li>
	<li>
		<a href="#Test">Test</a>
	</li>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="Create_a_Webcenter_Application_and_Project"><h2>Create a Webcenter Application and Project</h2></span>
<p>* Create a new Webcenter application according to <a href="?p=3792">this post</a>. Name the name app <strong>wc.session.sharing.test</strong><br />
* Right click <em>Portal</em> project and select <em>Project Properties > Deployment > wc.session.sharing.test_webapps (WAR File) > Edit</em>, set web context root to <strong>ssPortal</strong> for session sharing portal:</p>
<span id=""><h6></h6></span>
<span id="Import_appA_Web_Application"><h2>Import appA Web Application</h2></span>
<p>* Import <em>appA.war</em> into a new project named <strong>appA</strong>.<br />
* Set its web context root to <strong>appA</strong><br />
* See <a href="?p=4389">this post</a> for additional info<br />
* Add the following scriplet to <em>appA > Web Content > admin > auth.jsp</em> right before the &lt;/body&gt; to enumerate and print out session attribute names.</p>
<pre class="java">&nbsp;
&lt;%
java.<span style="color: #006600;">util</span>.<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AEnumeration+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Enumeration</span></a> attrs = session.<span style="color: #006600;">getAttributeNames</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AEnumeration+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Enumeration</span></a> e = session.<span style="color: #006600;">getAttributeNames</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; e.<span style="color: #006600;">hasMoreElements</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> ;<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
%&gt;
    Next element: &lt;%= e.<span style="color: #006600;">nextElement</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> %&gt; &lt;br/&gt;
&nbsp;
&lt;%
<span style="color: #66cc66;">&#125;</span>
%&gt;
&nbsp;</pre>
<span id="Package_EAR"><h2>Package EAR</h2></span>
<p>* Add <em>appA</em> to application assembly:<br />
<em>Application Properties > Deployment > wc.session.sharing.test_application1 (EAR File) > Edit... > Application Assembly </em></p>
<span id="_1"><h6></h6></span>
<p>* Enable application level session sharing:<br />
- Open <em>Application Resources > Descriptors > META-INF > weblogic-application.xml</em> file<br />
- Click Session on the left side menu<br />
- Check Enable session sharing</p>
<span id="_2"><h6></h6></span>
<span id="Test"><h2>Test</h2></span>
<p>* Deploy the application (not just Portal project)<br />
* Login portal: </p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://jianmingli.com/wp/?feed=rss2&#038;p=4404</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

