<?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>Devon Hillard&#039;s Digital Sanctuary &#187; richfaces</title>
	<atom:link href="http://www.digitalsanctuary.com/tech-blog/tag/richfaces/feed" rel="self" type="application/rss+xml" />
	<link>http://www.digitalsanctuary.com/tech-blog</link>
	<description>Java, ATG, Seam, and related Technologies</description>
	<lastBuildDate>Mon, 30 Jan 2012 23:04:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Make A Custom RichFaces Skin</title>
		<link>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/make-a-custom-richfaces-skin.html</link>
		<comments>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/make-a-custom-richfaces-skin.html#comments</comments>
		<pubDate>Thu, 09 Apr 2009 23:40:52 +0000</pubDate>
		<dc:creator>Devon</dc:creator>
				<category><![CDATA[Seam]]></category>
		<category><![CDATA[richfaces]]></category>

		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=337</guid>
		<description><![CDATA[Using RichFaces in your application makes it easy to build great rich interfaces without spending a ton of time writing custom JavaScript for the front end and the back-end support for the JavaScript calls. It ties into your JSF components &#8230; <a href="http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/make-a-custom-richfaces-skin.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Using RichFaces in your application makes it easy to build great rich interfaces without spending a ton of time writing custom JavaScript for the front end and the back-end support for the JavaScript calls.  It ties into your JSF components easily and makes dynamic interaction easy to build.  It also comes with a number of default skins which is great when you&#8217;re first starting to build out a new application because it gives it a nice polished look instead of just black and white unstyled elements.</p>
<p>However, once you you get your own site design in place, the RichFaces skins probably won&#8217;t match your design perfectly.  You can always override any of the particular element styles using CSS, but if you want to quickly change the global look and feel for all the RichFaces components, the easiest thing to do is to create a customized RichFaces skin.  </p>
<p>You should start with the RichFaces skin that most closely matches your design and build your custom skin based on that.  The skins are defined in properties files in the RichFaces jar file under /META-INF/skins/.  You can also just download them from here, to avoid having to unpack the jar file yourself: <a href='http://www.digitalsanctuary.com/tech-blog/wp-content/uploads/2009/04/richfaces-skins.zip'>richfaces-skins.zip</a>.</p>
<p>Copy the skin file that&#8217;s closest to your design into your project.  If you&#8217;re using a Seam project created with seam-gen, you&#8217;re in luck because the ant build file is already setup to deploy RichFaces skins if you have them.  Just drop the skinname.skin.properties file into the &#8220;resources&#8221; directory of your Seam project.  Rename it to a custom name for your site&#8217;s skin, i.e. mysite.skin.properties.  </p>
<p>Now you need to configure your application to use the new custom skin.  Edit /resources/WEB-INF/web.xml, and change the org.richfaces.SKIN param to the name of your new skin:</p>
<pre class="brush: xml; title: ; notranslate">
   &lt;context-param&gt;
      &lt;param-name&gt;org.richfaces.SKIN&lt;/param-name&gt;
      &lt;param-value&gt;mysite&lt;/param-value&gt;
   &lt;/context-param&gt;
</pre>
<p>Now you can edit the skin file to adjust the colors and look and feel of the skin to match your site&#8217;s design.  The ant build file will automatically deploy the custom skin file into the war file.</p>
<p>There are also other ways to customize RichFaces and build custom skins including extending an existing skin, or using the new <a href="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/ArchitectureOverview.html#PlugnSkin" target="_new">Plug-n-Skin</a> feature, or <a href="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/ArchitectureOverview.html#XCSSfileformat" target="_new">using XCSS,</a> etc&#8230;  But this should get you started!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/make-a-custom-richfaces-skin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RichFaces Refcardz from DZone</title>
		<link>http://www.digitalsanctuary.com/tech-blog/general/richfaces-refcardz-from-dzone.html</link>
		<comments>http://www.digitalsanctuary.com/tech-blog/general/richfaces-refcardz-from-dzone.html#comments</comments>
		<pubDate>Mon, 09 Mar 2009 23:58:50 +0000</pubDate>
		<dc:creator>Devon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[richfaces]]></category>

		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=291</guid>
		<description><![CDATA[DZone has added a new, free, quick reference sheet (Refcardz) for RichFaces. It&#8217;s a six page PDF that covers everything from how to install RichFaces, to the basic concepts of using RichFaces, all the way through information on each a4j &#8230; <a href="http://www.digitalsanctuary.com/tech-blog/general/richfaces-refcardz-from-dzone.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://dzone.com" target="_new">DZone</a> has added a new, free, quick reference sheet (<a href="http://refcardz.dzone.com/" target="_new">Refcardz</a>) for <a href="http://www.jboss.org/jbossrichfaces/" target="_new">RichFaces</a>.</p>
<p>It&#8217;s a six page PDF that covers everything from how to install RichFaces, to the basic concepts of using RichFaces, all the way through information on each a4j and rich tag and example usage.  Refcardz are free, and so far I&#8217;ve been very impressed with them.  I also really like their Seam Refcard.  It has come in handy several times.</p>
<p><a href="http://refcardz.dzone.com/refcardz/richfaces">Download the RichFaces Quick Reference Guide for free!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalsanctuary.com/tech-blog/general/richfaces-refcardz-from-dzone.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RichFaces Modal Panels, s:graphicImage, and IE6</title>
		<link>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/richfaces-modal-panels-sgraphicimage-and-ie6.html</link>
		<comments>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/richfaces-modal-panels-sgraphicimage-and-ie6.html#comments</comments>
		<pubDate>Mon, 14 Apr 2008 07:40:38 +0000</pubDate>
		<dc:creator>Devon</dc:creator>
				<category><![CDATA[Seam]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[modal]]></category>
		<category><![CDATA[richfaces]]></category>

		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/?p=95</guid>
		<description><![CDATA[If, like me, you are using the Seam s:graphicImage tag to serve an image from within a RichFaces modal panel, you may have run into an issue where in IE6 the image does not get displayed, and you get the &#8230; <a href="http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/richfaces-modal-panels-sgraphicimage-and-ie6.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If, like me, you are using the Seam s:graphicImage tag to serve an image from within a RichFaces modal panel, you may have run into an issue where in IE6 the image does not get displayed, and you get the dreaded red X of failure.  It works fine in all other browsers, including IE7, and works outside of the modal panel, but not from within the modal panel.</p>
<p>It&#8217;s not a problem with the image data (saving the image from another browser and serving it up directly works fine.  I suspect it&#8217;s a delay issue with the rendering of the modal panel.  For me, it was serving up the red X about 90% of the time under IE6.</p>
<p>The &#8220;fix&#8221; is to stop using the s:graphicImage tag within the modal, and use a Servlet to stream out the image data instead.  It&#8217;s pretty easy.</p>
<p>One gotcha I had was that I already had a Servlet handling video output, and I couldn&#8217;t find an example of how to configure two separate paths into the seam web:context-filter Servlet Filter (which allows access to Seam components, like the entity manager to load up the video/image items).  A helpful response on the forums gave me this solution:</p>
<pre lang="xml">
<web:context-filter regex-url-pattern="/image/*|/video/*" />
</pre>
<p>Also, if you&#8217;re struggling to figure out what a library&#8217;s new feature isn&#8217;t working for you, no matter how many permutations of the documented usage you try, check the versions in the manifest files in the library&#8217;s jars.  Maybe, like me, you upgraded the jars in one project, but forgot to upgrade them in this one&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/richfaces-modal-panels-sgraphicimage-and-ie6.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>10MinuteMail Updates</title>
		<link>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/10minutemail-updates.html</link>
		<comments>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/10minutemail-updates.html#comments</comments>
		<pubDate>Mon, 24 Mar 2008 07:30:31 +0000</pubDate>
		<dc:creator>Devon</dc:creator>
				<category><![CDATA[10MinuteMail]]></category>
		<category><![CDATA[Seam]]></category>
		<category><![CDATA[ad-aware]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[richfaces]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/10minutemail-updates.html</guid>
		<description><![CDATA[I just pushed a new version of 10MinuteMail. Here are the notable updates: Removed the Ad-Aware links and text. No one was clicking on them anyhow. Added some translation fixes. Implemented AJAX based (RichFaces) refreshing of the list of e-mails &#8230; <a href="http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/10minutemail-updates.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just pushed a new version of 10MinuteMail.  Here are the notable updates:</p>
<ol>
<li>Removed the Ad-Aware links and text.  No one was clicking on them anyhow.</li>
<li>Added some translation fixes.</li>
<li>Implemented AJAX based (RichFaces) refreshing of the list of e-mails in your inbox.</li>
<li>Added smtp client throttling (in Postfix) to limit the number of messages accepted from a single source within 60 seconds.  This seems to have already fixed the negative impact of high volume spammers on the function of the site.</li>
<li>Removed the &#8220;Get Another E-Mail&#8221; feature.  While this was a user request, I discovered that it was being abused by spammers.</li>
<li>Added a Forward feature to allow you to forward a received e-mail to your home account for storage.</li>
</ol>
<p>Enjoy!  If you have any issues with the AJAX refreshes, let me know, but I think it should work better now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/10minutemail-updates.html/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Apache Proxy Breaks RichFaces</title>
		<link>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/apache-proxy-breaks-richfaces.html</link>
		<comments>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/apache-proxy-breaks-richfaces.html#comments</comments>
		<pubDate>Mon, 24 Mar 2008 07:24:19 +0000</pubDate>
		<dc:creator>Devon</dc:creator>
				<category><![CDATA[Seam]]></category>
		<category><![CDATA[a4j]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[richfaces]]></category>

		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/apache-proxy-breaks-richfaces.html</guid>
		<description><![CDATA[I&#8217;ve run into this twice now, so I wanted to document it here to help other folks, and to see if anyone knows the root cause of the issue. When using RichFaces with Seam, things work just fine on my &#8230; <a href="http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/apache-proxy-breaks-richfaces.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve run into this twice now, so I wanted to document it here to help other folks, and to see if anyone knows the root cause of the issue.</p>
<p>When using RichFaces with Seam, things work just fine on my local development JBoss instance.  But when I deploy the same EAR file up to my production JBoss instance, which is sitting behind an Apache proxy, everything works EXCEPT the rich/ajax stuff.  </p>
<p>The issue was that the JavaScript located here: ContextRoot/a4j_3_1_4.GAorg.ajax4jsf.javascript.AjaxScript</p>
<p>would not load.</p>
<p>My Apache proxy was configured like this:</p>
<pre>
	ProxyPass /10MinuteMail balancer://mycluster/10MinuteMail/
	ProxyPass /10MinuteMail/* balancer://mycluster/10MinuteMail/
	ProxyPassReverse /10MinuteMail http://127.0.0.1:8080/10MinuteMail
</pre>
<p>With mycluster defined like this:</p>
<pre>
        <Proxy balancer://mycluster>
                AddDefaultCharset off
                Order deny,allow
                Allow from all

		BalancerMember http://127.0.0.1:8080
                #Allow from .example.com
        </Proxy>
</pre>
<p>Again, this configuration worked fine for everything EXCEPT that RichFaces JavaScript.</p>
<p>Since I am only using one node for 10MinuteMail, there is no real need for a load balancer configuration, so I replaced the configuration with this:</p>
<pre>
	ProxyPass /10MinuteMail http://127.0.0.1:8080/10MinuteMail
	ProxyPass /10MinuteMail/ http://127.0.0.1:8080/10MinuteMail/
        ProxyPassReverse /10MinuteMail/ http://127.0.0.1:8080/10MinuteMail/
</pre>
<p>Which works, and fixed the RichFaces reference.</p>
<p>So there&#8217;s your solution.  However I have no idea what the actual root cause is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/apache-proxy-breaks-richfaces.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Displaying and Rerendering a RichFaces ModalPanel from a commandLink</title>
		<link>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/displaying-and-rerendering-a-richfaces-modalpanel-from-a-commandlink.html</link>
		<comments>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/displaying-and-rerendering-a-richfaces-modalpanel-from-a-commandlink.html#comments</comments>
		<pubDate>Wed, 05 Mar 2008 00:43:45 +0000</pubDate>
		<dc:creator>Devon</dc:creator>
				<category><![CDATA[Seam]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[modal]]></category>
		<category><![CDATA[render]]></category>
		<category><![CDATA[richfaces]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/displaying-and-rerendering-a-richfaces-modalpanel-from-a-commandlink.html</guid>
		<description><![CDATA[Let's say that when a user clicks on something, perhaps selecting something from a DataTable or DataGrid, you want to call some server side code, and then popup a modal panel which needs to show content based on the new state setup by your server side call.  In my case I have a DataGrid showing a number of items, and when a user clicks on an item I want to set the current selected item on a Seam component on the server, and then popup a modal panel to display detailed information about the item, and provide the user some actions within the modal panel. <a href="http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/displaying-and-rerendering-a-richfaces-modalpanel-from-a-commandlink.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say that when a user clicks on something, perhaps selecting something from a DataTable or DataGrid, you want to call some server side code, and then popup a modal panel which needs to show content based on the new state setup by your server side call.  In my case I have a DataGrid showing a number of items, and when a user clicks on an item I want to set the current selected item on a Seam component on the server, and then popup a modal panel to display detailed information about the item, and provide the user some actions within the modal panel.</p>
<p>Looking at the solution it seems so simple, but for some reason it took me hours of trying different combinations, orders, tags, JavaScripts, etc&#8230; before I could get this to work correctly.  I had the panel appearing with the old data, or appearing with the old data and then disappearing completely, only to show the so called new data the next time I clicked on an item, or rendering on the page itself below the footer, or not popping up at all, or popping up with null data, or&#8230;.  So I&#8217;m posting it up here for myself and anyone else who runs into issues.</p>
<p>First, create your modal panel (rich:modalPanel).  I do this in a separate .xhtml file, as I will use the same model panel in various pages throughout the site.  In your modal-panel.xhtml file (or whatever you choose to name it), start with a <code lang=xml> &lt;ui:composition&gt;</code> tag, define your RichFaces xml namespace (and any other JSF libs you&#8217;ll be using), and then setup your <code>&lt;rich:modalpanel&gt;</code></p>
<p>You need to give the modalPanel a unique id, in this case we&#8217;ll call it &#8220;myModalPanel&#8221;.</p>
<p><code>&lt;rich:modalpanel id="myModalPanel" autosized="true" zindex="2000"&gt;</code></p>
<p>Inside your modalPanel tag, you need to define an inner div.  This is the div which you will be rerendering after the server action is complete.  I use  tags, as I&#8217;m using Seam.  Ensure that any references to backing beans or data that you want refreshed are within these div tags.  You must give this div a unique id as well, in this case we&#8217;ll call it &#8220;myModalDiv&#8221;.</p>
<p><code>&lt;s:div id="myModalDiv"&gt;</code></p>
<p>The one limitation that I&#8217;ve run into here, and if you know how to solve this, please let me know, is that the <code>&lt;f:facet&gt;</code> tags for your header text and controls can&#8217;t be inside this div, and you can&#8217;t put the div around the whole modalPanel (or it makes the panel disappear when you rerender).  As such you can&#8217;t make anything from the <code>&lt;f:facet&gt;</code>s be updated on rerender.  This is preventing me from having the modal panel header displaying the current selected item&#8217;s name.  Not great, but not the end of the world.</p>
<p>So inside this div you have your dynamic output.  I have lots of <code>&lt;h:outputtext value="#{backingBean.selectedItem.property}"&gt;</code> type entries in mine.</p>
<p>On your actual page where you will be displaying the modal panel from you need to include the modal-panel.xhtml file, I use a:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a:include viewid=&quot;/modal-panel.xhtml&quot;&gt;
</pre>
<p>Then, I have my page, which includes a rich:dataGrid, and inside it has an <code>&lt;a:commandLink&gt;</code> which creates the AJAX clickable item.  This commandLink has to call the backend action, display the modal panel, and rerender your div.</p>
<p><code>&lt;a:commandlink id="showItem" action="#{backingBean.setSelectedItem(item)}" oncomplete="Richfaces.showModalPanel('myModalPanel',{width:550, top:200});" rerender="myModalDiv"&gt;<br />
    Click Here!<br />
&lt;/a:commandlink&gt;</code></p>
<p>This makes the panel display, and then the new content is rendered in the panel.  It seems to work just how I wanted it to.  With the minor annoyance of having to use a static modalPanel header.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/displaying-and-rerendering-a-richfaces-modalpanel-from-a-commandlink.html/feed</wfw:commentRss>
		<slash:comments>77</slash:comments>
		</item>
		<item>
		<title>How to get RichFaces to not crash Safari</title>
		<link>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/how-to-get-richfaces-to-not-crash-safari.html</link>
		<comments>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/how-to-get-richfaces-to-not-crash-safari.html#comments</comments>
		<pubDate>Wed, 05 Mar 2008 00:22:13 +0000</pubDate>
		<dc:creator>Devon</dc:creator>
				<category><![CDATA[Seam]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[richfaces]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/how-to-get-richfaces-to-not-crash-safari.html</guid>
		<description><![CDATA[RichFaces, a collection of open source JSF Components for building &#8220;rich&#8221; AJAXy interfaces, unfortunately makes Safari crash or hang or lock up with many of it&#8217;s components. I&#8217;m not the one who figured this out, but I wanted to document &#8230; <a href="http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/how-to-get-richfaces-to-not-crash-safari.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>RichFaces, a collection of open source JSF Components for building &#8220;rich&#8221; AJAXy interfaces, unfortunately makes Safari crash or hang or lock up with many of it&#8217;s components.</p>
<p>I&#8217;m not the one who figured this out, but I wanted to document it here.</p>
<p>You can solve this the same way you solve the <a href="http://www.digitalsanctuary.com/tech-blog/java/firefox-xhtml-jboss-420-jsf-and-google-ads.html">JSF/Google Ad issue</a>:</p>
<p>Add this just before the <head> tag on your .xhtml pages or template file:</p>
<pre lang="xml"><f:view contentType="text/html" />
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/how-to-get-richfaces-to-not-crash-safari.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/33 queries in 0.006 seconds using disk: basic
Object Caching 648/727 objects using disk: basic

Served from: www.digitalsanctuary.com @ 2012-02-07 00:10:44 -->
