<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Developer Notes</title>
	<atom:link href="http://achorniy.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://achorniy.wordpress.com</link>
	<description>Practical notes, advises on application development (java, seam, android, google api)</description>
	<lastBuildDate>Sun, 29 Jan 2012 08:37:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='achorniy.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/450b7c8b424121321987bccf7b59625e?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Developer Notes</title>
		<link>http://achorniy.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://achorniy.wordpress.com/osd.xml" title="Developer Notes" />
	<atom:link rel='hub' href='http://achorniy.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Useful Eclipse navigation shortcuts for java developer</title>
		<link>http://achorniy.wordpress.com/2011/06/14/eclipse_navigation_shortcuts/</link>
		<comments>http://achorniy.wordpress.com/2011/06/14/eclipse_navigation_shortcuts/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 15:49:59 +0000</pubDate>
		<dc:creator>Andrey Chorniy</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://achorniy.wordpress.com/?p=356</guid>
		<description><![CDATA[I find that this article (10 Eclipse Navigation Shortcuts&#8230;) is great and will save you a lot of time in development/coding if you are programming in Eclipse. I personally prefer Intellij Idea for java development, but in case of Android &#8220;Eclipse + ADT plugin&#8221; doesn&#8217;t leave much chances to alternative IDE&#8217;s. Great shortcuts, I use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=356&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I find that this <a title="10 Eclipse Navigation Shortcuts Every Java Programmer Should Know" href="http://rayfd.wordpress.com/2007/05/20/10-eclipse-navigation-shortcuts-every-java-programmer-should-know/" target="_blank">article (10 Eclipse Navigation Shortcuts&#8230;)</a> is great and will save you a lot of time in development/coding if you are programming in Eclipse. I personally prefer Intellij Idea for java development, but in case of Android &#8220;Eclipse + ADT plugin&#8221; doesn&#8217;t leave much chances to alternative IDE&#8217;s.<br />
Great shortcuts, I use part of them before and really miss &#8220;CTRL-E&#8221; <em>Go to other open editors</em></p>
<p><img class="alignnone" title="Go to other open editors" src="http://rayfd.files.wordpress.com/2007/05/ctrl_e.jpg?w=325&#038;h=271" alt="Go to other open editor" width="325" height="271" /></p>
<p>and &#8220;CTRL-O&#8221; <em>Go directly to a member (method, variable)</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/achorniy.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/achorniy.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/achorniy.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/achorniy.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/achorniy.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/achorniy.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/achorniy.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/achorniy.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/achorniy.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/achorniy.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/achorniy.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/achorniy.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/achorniy.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/achorniy.wordpress.com/356/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=356&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://achorniy.wordpress.com/2011/06/14/eclipse_navigation_shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75c2bdacfd2d62abcbfe7beda3d9c613?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">achorniy</media:title>
		</media:content>

		<media:content url="http://rayfd.files.wordpress.com/2007/05/ctrl_e.jpg" medium="image">
			<media:title type="html">Go to other open editors</media:title>
		</media:content>
	</item>
		<item>
		<title>Richfaces a4j:poll and a4j:push Can Do More Together</title>
		<link>http://achorniy.wordpress.com/2011/02/27/richfaces-a4j-poll-and-push-can-do-more-together/</link>
		<comments>http://achorniy.wordpress.com/2011/02/27/richfaces-a4j-poll-and-push-can-do-more-together/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 17:01:36 +0000</pubDate>
		<dc:creator>Andrey Chorniy</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ajax-push]]></category>
		<category><![CDATA[icefaces]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[richfaces]]></category>

		<guid isPermaLink="false">http://achorniy.wordpress.com/?p=314</guid>
		<description><![CDATA[Task: Update the content of the page if the content is changed on server-side, in other words &#8211; show the most-fleshiest content to the user. The most simple solution that comes to mind is to use &#60;a4j:poll/&#62; component which will periodically call some action which will load fresh content and re-render the content on the page. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=314&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://achorniy.files.wordpress.com/2011/02/together-we-can-do-it.jpg"><img class="alignleft size-full wp-image-331" title="Together we can do it!" src="http://achorniy.files.wordpress.com/2011/02/together-we-can-do-it.jpg" alt="" width="262" height="350" /></a>Task: Update the content of the page if the content is changed on server-side, in other words &#8211; show the most-fleshiest content to the user.</p>
<p>The most simple solution that comes to mind is to use <a href="http://livedemo.exadel.com/richfaces-demo/richfaces/poll.jsf">&lt;a4j:poll/&gt; component</a> which will periodically call some action which will load fresh content and re-render the content on the page. But that not very optimal since you will create the content on server-side and send it back to the client each time you execute the polling request. </p>
<p><a href="http://livedemo.exadel.com/richfaces-demo/richfaces/push.jsf">a4j:push component</a> looks like the one who was created to avoid that every-time re-rendering. Here is what demo-site says about it:</p>
<blockquote><p>The main difference between a4j:push and a4j:poll components is that a4j:push makes request to minimal code only (not to JSF tree) in order to check the presence of messages in the queue. If the message exists the complete request will be performed. The component doesn&#8217;t poll registered beans but registers EventListener which receives messages about events.</p></blockquote>
<p>Looks very promising, but in reality it&#8217;s a kind of tricky to integrate it with your real application because some code on the server side should execute something like that:</p>
<blockquote><p>
synchronized (listener) {<br />
    listener.onEvent(new EventObject(this));<br />
}
</p></blockquote>
<p>But, to do so we should have something in background which will periodically check for updates and generate the events and send them to our listener. Starting a Thread is not good option since we have to worry about the way to stop it, as well who start Thread&#8217;s in web-apps ? @Asynchronous task is better one option, but still has the same issues &#8211; we have to worry about it lifecycle and stop updates at some point (user may leave the page or close his browser) so we actually has no good way to manage the lifecycle of launched background tasks.<br />
At first I try to use a4j:push with action=&#8221;#{myActionBean.checkForUpdates}&#8221; but action is not called by a4j:push, it just checks if he has new events and only if it has such &#8211; execute action and do reRendering (all that JSF lifecycle)&nbsp;</p>
<p>But it looks like combination of a4j:poll and a4j:push could work here in that way.</p>
<ul>
<li>a4j:poll execute an action which check for updates in the data and fire an Event if they are exists</li>
<li>a4j:push periodically check for new events and re-render content on new event</li>
</ul>
<p>So, a4:poll play role of assistant, actually it&#8217;s like the managed background task on the serverside which periodically poll for the data, but it&#8217;s live on the client-side, so in case user will close his browser &#8211; server will not execute the requests to datsource anymore.</p>
<p>I call it a &#8220;conditional re-rendering&#8221;. Here is the JSF code I use to make it working.</p>
<p><pre class="brush: xml;">
&lt;a4j:form id=&quot;pollForm&quot; eventsQueue=&quot;queue&quot;&gt;
    &lt;a4j:region id=&quot;pollRegion&quot; selfRendered=&quot;true&quot; renderRegionOnly=&quot;true&quot;&gt;
        &lt;a4j:poll action=&quot;#{myActionBean.checkForNewData}&quot;
            id=&quot;datasetChangedChecker&quot; interval=&quot;#{myActionBean.pollInterval}&quot;
            ajaxSingle=&quot;true&quot; limitToList=&quot;true&quot; immediate=&quot;true&quot; bypassUpdates=&quot;true&quot;&gt;
        &lt;/a4j:poll&gt;
    &lt;/a4j:region&gt;
&lt;!-- the function below execute an ajax-call to server which enable the push and re-render &lt;a4j:push /&gt; to start it --&gt;
&lt;a4j:jsFunction name=&quot;startPushUpdates&quot;
                action=&quot;#{myActionBean.startPushUpdates}&quot;
                reRender=&quot;dataSetReRendererPush&quot; ajaxSingle=&quot;true&quot;/&gt;
&lt;/a4j:form&gt;

&lt;a4j:form id=&quot;pushForm&quot; eventsQueue=&quot;queue&quot;&gt;
    &lt;a4j:push id=&quot;dataSetReRendererPush&quot; ajaxSingle=&quot;true&quot;
              eventProducer=&quot;#{myActionBean.addUpdatesListener}&quot;
              interval=&quot;#{myActionBean.pollInterval}&quot;
              reRender=&quot;contentPanel,datasetChangedChecker,dataSetReRendererPush&quot;
              enabled=&quot;#{myActionBean.pushUpdatesStarted}&quot;
     /&gt;
&lt;/a4j:form&gt;

&lt;a4j:outputPanel id=&quot;contentPanel&quot;&gt;
   &lt;!-- Updated content goes here --&gt;
&lt;/a4j:outputPanel&gt;
</pre></p>
<p>The only issue here is that we have to ensure that a4j:push is executed AFTER a4j:poll so action called in a4j:poll will generate the event before we will execute the a4j:push. Unfortunately we don&#8217;t have the way to manage it in JSF with attributes, but that could be done with help of postponed launching of a4j:push (with some reasonable gap which should be bigger than time required to execute check for data-updates)<br />
The postponed a4j:push execution is achieved with enabling it with &#8216;enabled=&#8221;#{myActionBean.pushUpdatesStarted}&#8221;&#8216; attribute and calling the javascript with timeout</p>
<p><pre class="brush: jscript;">
jQuery(document).ready(function() {
    window.setTimeout(startPushUpdates, 5000);
});
</pre></p>
<p>so, having all that JSF code and MyActionBean.java we have quite optimal solution<br />
I didn&#8217;t include java-code here but I believe if you read this line than you most probably got the idea and capable to implement it on your own <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Future notes</strong>: it looks that <a href="http://www.icefaces.org/main/ajax-java/ajaxpush.iface">IceFaces </a>propose their own vision of ajax-push and it&#8217;s not based on periodical polling of server from server-side.<br />
<img src="http://www.icefaces.org/main/css/images/icepush-ajaxpush.png" alt="IceFaces push model" /><br />
As well they have <a href="http://wiki.icefaces.org/display/ICE/Direct-to-DOM+Rendering">Direct-To-Dom</a> rendering which looks like much more optimal way of re-Rendering. Haven&#8217;t tried it yet, but for me it looks ajax-push at IceFaces and re-rendering is a more optimal solution.<br />
It would be nice to hear from the ones who try both <a href="http://www.tikalk.com/java/icefaces-vs-richfaces">RichFaces and IceFaces ajax push approaches</a>.<br />
BTW, just find that RichFaces team <a href="http://www.jroller.com/a4j/entry/richfaces_4_0_0_milestone1">prepare some updates to a4j:push in RF-4.0</a></p>
<blockquote><p>With this release we have added a few new components, redesigned a4j:push to use advanced Comet implementation and JMS servers</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/achorniy.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/achorniy.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/achorniy.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/achorniy.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/achorniy.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/achorniy.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/achorniy.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/achorniy.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/achorniy.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/achorniy.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/achorniy.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/achorniy.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/achorniy.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/achorniy.wordpress.com/314/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=314&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://achorniy.wordpress.com/2011/02/27/richfaces-a4j-poll-and-push-can-do-more-together/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75c2bdacfd2d62abcbfe7beda3d9c613?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">achorniy</media:title>
		</media:content>

		<media:content url="http://achorniy.files.wordpress.com/2011/02/together-we-can-do-it.jpg" medium="image">
			<media:title type="html">Together we can do it!</media:title>
		</media:content>

		<media:content url="http://www.icefaces.org/main/css/images/icepush-ajaxpush.png" medium="image">
			<media:title type="html">IceFaces push model</media:title>
		</media:content>
	</item>
		<item>
		<title>Export to Excel with jXLS can be faster</title>
		<link>http://achorniy.wordpress.com/2011/02/14/faster-excel-export-jxls/</link>
		<comments>http://achorniy.wordpress.com/2011/02/14/faster-excel-export-jxls/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 19:05:18 +0000</pubDate>
		<dc:creator>Andrey Chorniy</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jxls]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://achorniy.wordpress.com/?p=306</guid>
		<description><![CDATA[I got a question about the jXLS performance, in short it was like &#8220;jXLS is a kind of slow for my big reports&#8221;. I mentioned that in my previous post (Creating Excel reports from java is easy) It&#8217;s true, especially about latest jXLS, after I updated my jxls-0.9.8 to 1.0-RC1 (see downloads) I noticed that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=306&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://achorniy.files.wordpress.com/2011/02/say-slow.jpg"><img class="alignleft size-full wp-image-309" title="Slowness it's not happiness" src="http://achorniy.files.wordpress.com/2011/02/say-slow.jpg" alt="" width="283" height="222" /></a>I got a question about the jXLS performance, in short it was like &#8220;jXLS is a kind of slow for my big reports&#8221;.<br />
I mentioned that in my previous post (<a href="http://achorniy.wordpress.com/2009/12/02/creating-excel-reports-from-java-is-easy/">Creating Excel reports from java is easy</a>)</p>
<p>It&#8217;s true, especially about latest jXLS, after I updated my jxls-0.9.8 to 1.0-RC1 (see <a href="http://sourceforge.net/projects/jxls/files/jxls/">downloads</a>) I noticed that report generation become <strong>MUCH SLOWER</strong>. I believe the difference is in the expression library version <a href="http://commons.apache.org/jexl/">JEXL</a>. In the 1.0-RC1 they start using JEXL-2.0.1 version and before they use JEXL-1.1<br />
Anyway, it looks downgrading it back to the jXLS 0.9.8 solves my problems, the performance is not blazing fast but much better than in jXLS 1.0. I bet jXLS 0.9.9 work faster than 1.0</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/achorniy.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/achorniy.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/achorniy.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/achorniy.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/achorniy.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/achorniy.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/achorniy.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/achorniy.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/achorniy.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/achorniy.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/achorniy.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/achorniy.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/achorniy.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/achorniy.wordpress.com/306/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=306&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://achorniy.wordpress.com/2011/02/14/faster-excel-export-jxls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75c2bdacfd2d62abcbfe7beda3d9c613?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">achorniy</media:title>
		</media:content>

		<media:content url="http://achorniy.files.wordpress.com/2011/02/say-slow.jpg" medium="image">
			<media:title type="html">Slowness it&#039;s not happiness</media:title>
		</media:content>
	</item>
		<item>
		<title>Howto disable form submit on Enter and fix for RichFaces rich:inputNumberSpinner</title>
		<link>http://achorniy.wordpress.com/2010/11/06/disable-enter-form-submit-fix-inputnumberspinner/</link>
		<comments>http://achorniy.wordpress.com/2010/11/06/disable-enter-form-submit-fix-inputnumberspinner/#comments</comments>
		<pubDate>Sat, 06 Nov 2010 00:37:10 +0000</pubDate>
		<dc:creator>Andrey Chorniy</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[inputNumberSpinner]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[richfaces]]></category>

		<guid isPermaLink="false">http://achorniy.wordpress.com/?p=284</guid>
		<description><![CDATA[It&#8217;s quite generic problem &#8211; to disable automatic form submit on ENTER, to avoid occasional submits which could lead either to page refresh or even to redirecting to another page. The general idea is to define onkeypressed event handler for text input fields Here is the article which describe the general approach to do it in HTML. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=284&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s quite generic problem &#8211; to disable automatic form submit on ENTER, to avoid occasional submits which could lead either to page refresh or even to redirecting to another page.<br />
The general idea is to define onkeypressed event handler for text input fields<br />
Here is the <a href="http://www.cs.tut.fi/~jkorpela/forms/enter.html">article</a> which describe the general approach to do it in HTML.</p>
<p>we can assign onkeypressed event handler to all fields just with few lines (with help of JQuery of course)</p>
<p><pre class="brush: jscript;">
function noEnter() {
    return !(window.event &amp;&amp; window.event.keyCode == ENTER_KEY_CODE);
}

jQuery(document).ready(function(){
      jQuery(:input:text).keypress(function(){
           return noEnter();
      });
});
</pre></p>
<p>That works fine for a lot of components, but not for  rich:inputNumberSpinner.  &#8221;onkeypressed&#8221; handler was assigned and was called, but &#8230; it still not work, after a plenty time in debug I finally ensured that it not working and start investigating the richfaces sources for that component and found that it has a javascript command that DIRECTLY perform the form submit. And there is no way to prevent this behavior using tags or javascript handlers.<br />
BTW &#8211; I really like new google-chrome developer tools, pretty good and *faster* alternative to FireBug in FF)</p>
<p>After some googling I  found that there is an RF issue exists (not resolved yet) and there is no way to prevent form submission according to the <a href="https://jira.jboss.org/browse/RF-8385">richfaces-issue</a> and actually in the <a href="http://community.jboss.org/message/548195" target="_blank">related-post</a> this issue is described in details, but it looks that solution could be only fixing the RichFaces library itself.<br />
So, let&#8217;s do it!  We will need to build it form sources, since direct update of the script in the jar-file is not working &#8211; richfaces have minified scripts and they are pretty hard to read/modify <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>You can <a href="http://www.4shared.com/file/uZcc2zFx/richfaces-ui-333Final.html" target="_blank">download patched richfaces-ui.jar</a> from here.</p>
<ol>
<li>Download <a href="http://www.jboss.org/richfaces/download/stable.html" target="_blank">RichFaces sources</a> (I prefer to use stable builds)</li>
<li>Extract them and navigate to the file in which form-submission is done &#8220;ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js&#8221;</li>
<li>comment out that crazy row<br />
<pre class="brush: jscript;">
        if (e.keyCode == 13){
            if (this.spinner.required || &quot;&quot; != this.edit.value)
                this.edit.value = this.getValidValue(this.edit.value);
            if (this.edit.form) {
//                this.edit.form.submit();
            }
        }
}
</pre></li>
<li>Lets build the Richfaces from sources. The first problem you can met is the memory. We will need a bunch of memory, so ensure that you have 64-bit java (since you will need a lot of memory &#8211; about 1500MB &#8211; I was not able to allocate this amount on 32-bit java in Windows-XP)<br />
so, instead of redefining env variables I just copied mvn.bat to mvn64.bat and added the following lines<br />
<pre class="brush: bash;">
set JAVA_HOME=E:/Java/jdk/jdk.1.6_64
set MAVEN_OPTS=-Xms512m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m
</pre></li>
<li>no lets rebuild richfaces-ui to do it, let&#8217;s grab few command-lines from developmentBuild.sh<br />
<pre class="brush: bash;">
cd %PROJECT_DIR%/ui
mvn64  clean install -Dmaven.test.skip=true
cd %PROJECT_DIR%/ui/assembly
mvn64  clean install -Dmaven.test.skip=true
</pre></li>
<li>Let&#8217;s take a cup of tea since it will take a while&#8230;<br />
<a href="http://achorniy.files.wordpress.com/2010/11/cup-of-tea1.jpg"><img class="size-thumbnail wp-image-289 alignnone" title="cup-of-tea" src="http://achorniy.files.wordpress.com/2010/11/cup-of-tea1.jpg?w=150&#038;h=105" alt="" width="150" height="105" /></a></li>
<li>After build is done you will find the updated richfaces-ui.jar in the local maven repository.<br />
<span style="font-family:monospace;">${repository-home}/org/richfaces/ui/richfaces-ui/3.3.3.Final/richfaces-ui-3.3.3.Final.jar</span></li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/achorniy.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/achorniy.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/achorniy.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/achorniy.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/achorniy.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/achorniy.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/achorniy.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/achorniy.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/achorniy.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/achorniy.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/achorniy.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/achorniy.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/achorniy.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/achorniy.wordpress.com/284/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=284&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://achorniy.wordpress.com/2010/11/06/disable-enter-form-submit-fix-inputnumberspinner/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75c2bdacfd2d62abcbfe7beda3d9c613?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">achorniy</media:title>
		</media:content>

		<media:content url="http://achorniy.files.wordpress.com/2010/11/cup-of-tea1.jpg?w=150" medium="image">
			<media:title type="html">cup-of-tea</media:title>
		</media:content>
	</item>
		<item>
		<title>HierarchyViewer missed in Android SDK r07 for Windows</title>
		<link>http://achorniy.wordpress.com/2010/10/29/android-hierarchyviewer-missed-sdkr07/</link>
		<comments>http://achorniy.wordpress.com/2010/10/29/android-hierarchyviewer-missed-sdkr07/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 21:02:53 +0000</pubDate>
		<dc:creator>Andrey Chorniy</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[android layout optimization]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://achorniy.wordpress.com/?p=276</guid>
		<description><![CDATA[I just updated to Android SDK-r07 and find out that I don&#8217;t have hierarchy-viewer tool anymore, what a nice surprise I know this program is stored in hierarchyviewer.jar so just created the hv.bat in tools directory with just java -Xmx512m  -jar ./lib/hierarchyviewer.jar .. and it works for me. Another way &#8211; is to download Android-SDK-r06 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=276&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just updated to <a href="http://developer.android.com/sdk/index.html">Android SDK-r07 </a> and find out that I don&#8217;t have hierarchy-viewer tool anymore, what a nice surprise <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
I know this program is stored in hierarchyviewer.jar so just created the hv.bat in tools directory with just</p>
<pre>java -Xmx512m  -jar ./lib/hierarchyviewer.jar</pre>
<p>.. and it works for me.</p>
<p><a href="http://achorniy.files.wordpress.com/2010/10/hierarchy-viewer.png"><img class="alignnone size-medium wp-image-277" title="Hierarchy-Viewer" src="http://achorniy.files.wordpress.com/2010/10/hierarchy-viewer.png?w=300&#038;h=230" alt="" width="300" height="230" /></a></p>
<p>Another way &#8211; is to download <a href="http://dl.google.com/android/android-sdk_r06-windows.zip">Android-SDK-r06</a> and take hierarchyviewer.bat from it. Still don&#8217;t know how it happens that Android-SDK-r07 miss that great tool launcher</p>
<p>For those who don&#8217;t know nothing about that great tool, I recommend to take a look at <a href="http://developer.android.com/resources/articles/layout-tricks-efficiency.html">article about layout-efficiency in android</a> and <a href="http://developer.android.com/resources/articles/layout-tricks-merge.html">about layout-optimization</a> &#8211; and start using  and  in your layouts. And of course spend some time exploring your view-s in HierarchyViewer.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/achorniy.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/achorniy.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/achorniy.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/achorniy.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/achorniy.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/achorniy.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/achorniy.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/achorniy.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/achorniy.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/achorniy.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/achorniy.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/achorniy.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/achorniy.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/achorniy.wordpress.com/276/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=276&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://achorniy.wordpress.com/2010/10/29/android-hierarchyviewer-missed-sdkr07/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75c2bdacfd2d62abcbfe7beda3d9c613?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">achorniy</media:title>
		</media:content>

		<media:content url="http://achorniy.files.wordpress.com/2010/10/hierarchy-viewer.png?w=300" medium="image">
			<media:title type="html">Hierarchy-Viewer</media:title>
		</media:content>
	</item>
		<item>
		<title>Show dynamic progress of time-consuming process in Seam/RichFaces</title>
		<link>http://achorniy.wordpress.com/2010/10/22/show-dynamic-process-progress-in-seam-richfaces/</link>
		<comments>http://achorniy.wordpress.com/2010/10/22/show-dynamic-process-progress-in-seam-richfaces/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 10:06:08 +0000</pubDate>
		<dc:creator>Andrey Chorniy</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[a4j]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[asynchronous]]></category>
		<category><![CDATA[asynchronous data processing]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[richfaces]]></category>
		<category><![CDATA[seam]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[web-application]]></category>

		<guid isPermaLink="false">http://achorniy.wordpress.com/?p=248</guid>
		<description><![CDATA[Sometimes you need to start really time-consuming task on the server, but doing that with simple h:commandAction which will re-render page after it is done is not a good idea. Showing a4j:status (which could be blocking &#8211; see &#8220;avoid concurrent call to conversation&#8220;) &#8211; is a bit better and will work for relatively short tasks [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=248&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to start really time-consuming task on the server, but doing that with simple h:commandAction which will re-render page after it is done is not a good idea. Showing a4j:status (which could be blocking &#8211; see &#8220;<a href="http://achorniy.wordpress.com/2009/07/14/avoid-concurrent-call-to-conversation/">avoid concurrent call to conversation</a>&#8220;) &#8211; is a bit better and will work for relatively short tasks (like 5 &#8211; 15 seconds, matter of taste actually) but still not good solution for really long tasks (something more than 1 minute)</p>
<p>For really long tasks I recommend to show the progress indicator (it&#8217;s also known usability fact that user will think that task with dynamic progress-bar is faster than the same task but without progress-bar)</p>
<p>There is a quite good component to do it with Richfaces &#8211; it&#8217;s <a href="http://livedemo.exadel.com/richfaces-demo/richfaces/progressBar.jsf" target="_blank">progressBar</a> component, the only problem to do it with Seam is that you should initiate progress (by calling the action) and that action should immediately return and start some background process.  It&#8217;s always bad practice to use Thread&#8217;s in the web-containers, in Seam we have alternative <a href="http://docs.jboss.org/seam/2.2.1.CR2/reference/en-US/html/jms.html#d0e21542">Asynchronous tasks</a>, but.. the problem with them is that they actually will be running in completely separate scope (they don&#8217;t know nothing about your conversation scope)</p>
<p>The trick here is to pass all the required parameters to asynchronous method and use them for returning the results too (in the conversation). That way we are not crazy about memory issues, since as long the long computation process will be ended the memory will be released (the reference to the object will be only in the initiator &#8211; the conversation scoped bean)</p>
<p>So, the solution may look like that.</p>
<ol>
<li>Define the PrgressBean.java which will hold all required initialization parameters for the process and methods to access the progress-state</li>
<li>add &#8220;progressBean&#8221; attribute (+getter) in your action-class (ConversationBean.java)</li>
<li>define methods to start process which will make a call to asynchronous method in other &#8220;LongProcess.java&#8221; and pass the progress bean to it</li>
<li>add rich:progressBar and start/stop buttons in &#8220;commandPanel&#8221; (could be done inside progressBar only), + &#8220;updatedResults&#8221; &#8211; here you can show intermediate and final results during the process (optional)</li>
</ol>
<p>In short &#8211; it is all you need to show very informative long-running process progress.</p>
<h3>Future Notes:</h3>
<p>Richfaces has few other ways to build your own progressBean &#8211; it is <a href="http://livedemo.exadel.com/richfaces-demo/richfaces/poll.jsf">a4j:poll</a> and <a href="http://livedemo.exadel.com/richfaces-demo/richfaces/push.jsf" target="_blank">a4j:push</a> components. rich:progressBean actually utilize &#8220;pooling&#8221; approach, in most cases it&#8217;s quite enough to periodically update progress/results for the user, so actually there is no much sense to write your own  approach using a4j:poll.  a4j:push maybe quite good alternative to rich:progressBar since it use much less traffic and doesn&#8217;t update JSF tree (so it&#8217;s potentially a better alternative). I think you can easily adapt described approach to use a4j:push &#8211; you just need to add few pieces  (addListener method and send events to the listener during the process)</p>
<h3>Code-Snippets</h3>
<p><strong>Java Code:</strong><br />
<pre class="brush: java;">
@Name(&quot;longProcess&quot;)
@AutoCreate
public class LongProcess {
    private ProgressBean progress
    @Asynchronous
    public void startProcess(ProgressBean progress) {
        this.progress = progress;
        this.progress.setInProgress(true);
        try {
            runProcess();
        } finally {
            this.progress.setInProgress(false);
        }
    }

   private void runProcess(){
     //perform your time-consuming operations here and periodically update the progress status
....
     progress.setPprogress(progressValue);
....
     if (progress.shouldStop()){
        //finish long process and return
     }
....
   }
}

@Name(&quot;conversationBean&quot;)
@Scope(ScopeType.CONVERSATION)
public class ConversationBean  {
    private ProgressBean progressBean = new ProgressBean();
    @In LongProcess longProcess;

    public void startProcess(){
        if (!progressBean.isInProgress()) {
           progressBean = createNewProgressBean(); //initialize it with required parameters here
           longProcess.startProcess(progressBean);
        }
    }
    public ProgressBean getProgressBean(){
        return progressBean;
    }
    public void stopProcess(){
       progressBean.stop(); //update the internal state of progress-bean so long-process will check it and stop
    }
}
</pre></p>
<p><strong>Richfaces/JSF code</strong><br />
<pre class="brush: xml;">
&lt;h:panelGroup id=&quot;commandPanel&quot;&gt;
&lt;a4j:commandButton action=&quot;#{conversationBean.startProcess}&quot;
        value=&quot;Start&quot; onclick=&quot;this.disabled=true;&quot;
        rendered=&quot;#{!conversationBean.progressBean.inProgress}&quot;
        reRender=&quot;commandPanel,proggressPanel,updatedResults&quot;&gt;
&lt;/a4j:commandButton&gt;
&lt;a4j:commandButton action=&quot;#{conversationBean.stopProcess}&quot;
        value=&quot;Stop&quot; onclick=&quot;this.disabled=true;&quot;
        reRender=&quot;commandPanel,proggressPanel,updatedResults&quot;
        rendered=&quot;#{suggestedEventController.progressBean.inProgress}&quot;&gt;
&lt;/a4j:commandButton&gt;
&lt;/h:panelGroup&gt;

&lt;a4j:outputPanel id=&quot;proggressPanel&quot;&gt;
&lt;rich:progressBar value=&quot;#{conversationBean.progressBean.progress}&quot;
                  label=&quot;#{conversationBean.progressBean.progress} %&quot;
                  enabled=&quot;#{conversationBean.progressBean.inProgress}&quot;
                  minValue=&quot;-1&quot; maxValue=&quot;100&quot;
                  interval=&quot;#{conversationBean.updateRate}&quot;
                  reRender=&quot;#{conversationBean.shouldUpdateTable ? 'updatedResults':'anyEmptyComponent'}&quot;
                  reRenderAfterComplete=&quot;proggressPanel, updatedResults, commandPanel&quot;&gt;
    &lt;f:facet name=&quot;initial&quot;&gt;
        &lt;h:outputText value=&quot;&amp;amp;lt; Click to start&quot;/&gt;
       &lt;!-- we also may show here button to start process as in RichFaces example (I use separate commandPanel instead) --&gt;
    &lt;/f:facet&gt;
    &lt;f:facet name=&quot;complete&quot;&gt;
        &lt;h:outputText value=&quot;Process Completed&quot;/&gt;
      &lt;!-- we also may show here button to restart process as in RichFaces example --&gt;
    &lt;/f:facet&gt;
&lt;/rich:progressBar&gt;

&lt;h:panelGroup id=&quot;updatedResults&quot;&gt;
      &lt;!-- it could be used to show results (for example list of processed or generated rows) --&gt;
     &lt;rich:dataTable value=&quot;#{conversationBean.progressBean.items}&gt;
     &lt;/rich:dataTable&gt;
&lt;/h:panelGroup&gt;
&lt;/a4j:outputPanel&gt;
</pre></p>
<p>Please take a notice at 2 parameters used in rich:progressBar<br />
<strong><code>interval="#{conversationBean.updateRate}" </code></strong><br />
it use a method conversationBean.updateRate to determine the update rate. I&#8217;s optional and could be just hardcoded to some value like &#8220;1000&#8243; (1 second). Can be used to dynamically set it to appropriate value, so your progress bar will not be updated to often and can be even changed during a process to fit to your real update rate</p>
<p><strong><code>reRender="#{conversationBean.shouldUpdateTable ? 'updatedResults':'anyEmptyComponent'}"</code> </strong><br />
As you see reRender here use dynamic condition, so conversationBean has a control other it and can skip heavy &#8220;updatedResults&#8221; update to save a traffic </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/achorniy.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/achorniy.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/achorniy.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/achorniy.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/achorniy.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/achorniy.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/achorniy.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/achorniy.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/achorniy.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/achorniy.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/achorniy.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/achorniy.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/achorniy.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/achorniy.wordpress.com/248/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=248&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://achorniy.wordpress.com/2010/10/22/show-dynamic-process-progress-in-seam-richfaces/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75c2bdacfd2d62abcbfe7beda3d9c613?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">achorniy</media:title>
		</media:content>
	</item>
		<item>
		<title>Free Hosted Redmine</title>
		<link>http://achorniy.wordpress.com/2010/07/23/free-hosted-redmine/</link>
		<comments>http://achorniy.wordpress.com/2010/07/23/free-hosted-redmine/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 19:49:44 +0000</pubDate>
		<dc:creator>Andrey Chorniy</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[issue tracker]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[redmine]]></category>

		<guid isPermaLink="false">http://achorniy.wordpress.com/?p=242</guid>
		<description><![CDATA[I like Redmine, it&#8217;s simple but yet powerful, one tool with almost all you need for managing project  (Issue tracker, time-sheets, wiki, file-share tool, cool filtering and reporting tools) Just Like It. Here is the link to the free redmine hosting (you can still have your project private) the only limitation I found &#8211; you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=242&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I like Redmine, it&#8217;s simple but yet powerful, one tool with almost all you need for managing project  (Issue tracker, time-sheets, wiki, file-share tool, cool filtering and reporting tools)</p>
<p>Just Like It.</p>
<p>Here is the link to the free redmine hosting (you can still have your project private) the only limitation I found &#8211; you can&#8217;t create users on your own (i.e you don&#8217;t have Admin rights which of course correct for free public service). Of course you can&#8217;t install plugins, but even without that Redmine offer you a lot</p>
<p>Thank you guys for your service <a href="https://www.hostedredmine.com/">https://www.hostedredmine.com/</a></p>
<p>And thanks to Redmine creators, I wish I will contribute to Redmine too.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/achorniy.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/achorniy.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/achorniy.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/achorniy.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/achorniy.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/achorniy.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/achorniy.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/achorniy.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/achorniy.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/achorniy.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/achorniy.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/achorniy.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/achorniy.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/achorniy.wordpress.com/242/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=242&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://achorniy.wordpress.com/2010/07/23/free-hosted-redmine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75c2bdacfd2d62abcbfe7beda3d9c613?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">achorniy</media:title>
		</media:content>
	</item>
		<item>
		<title>How to view android sources in Eclipse</title>
		<link>http://achorniy.wordpress.com/2010/05/26/how-to-view-android-sources-in-eclipse/</link>
		<comments>http://achorniy.wordpress.com/2010/05/26/how-to-view-android-sources-in-eclipse/#comments</comments>
		<pubDate>Wed, 26 May 2010 08:31:50 +0000</pubDate>
		<dc:creator>Andrey Chorniy</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[android sources]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://achorniy.wordpress.com/?p=233</guid>
		<description><![CDATA[It's not straightforward to <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=233&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know any more straightforward way to work with (view/browse) android sources in eclipse on the moment. I have downloaded sources from GIT before, but that actually doesn&#8217;t allow me to browse them in Eclipse. I still have to find the source on the disk to browse it, since they are scattered in different folders.</p>
<p>I find this article very helpful <a href="http://android.opensourceror.org/2010/01/18/android-source/" target="_blank">http://android.opensourceror.org/2010/01/18/android-source/</a> (all information below is actually taken from this article)</p>
<p>So, in short &#8211; download zipped sources from</p>
<ul>
<li><a href="http://www.mediafire.com/file/mywjymazt3m/sources-1.5-cupcake.zip" target="_blank">Cupcake (1.5)</a></li>
<li><a href="http://www.mediafire.com/file/r0uzq1f0e0m/sources-1.6-donut.zip" target="_blank">Donut (1.6)</a></li>
<li><a href="http://www.mediafire.com/file/mninnmzznxc/sources-2.1-eclair.zip" target="_blank">Eclair (2.1)</a></li>
</ul>
<p>Unzip it them in the corresponding \source folder for particular platform/SDK  ${android-sdk-home}/platforms/android-4/sources</p>
<p>And refresh you project in Eclipse, that&#8217;s all &#8211; it works for me in &#8220;Eclipse Galileo&#8221; and &#8220;Eclipse Helios&#8221; so I believe it should work for you too.</p>
<p>There is some possible problem with viewing sources in debug which is covered in the source article &#8211; &#8220;Just click on that “Edit Source Lookup Path” button to add a source lookup path.</p>
<p><a href="http://achorniy.files.wordpress.com/2010/05/click-edit-source-lookup.png"><img class="alignnone size-full wp-image-234" title="click-edit-source-lookup" src="http://achorniy.files.wordpress.com/2010/05/click-edit-source-lookup.png" alt="Click edit source lookup path button" width="800" height="309" /></a></p>
<p>In that dialog leave “Default” selected and click “Add.”</p>
<p><a href="http://achorniy.files.wordpress.com/2010/05/edit-source-lookup-path1.png"><img class="size-full wp-image-236" title="edit-source-lookup-path" src="http://achorniy.files.wordpress.com/2010/05/edit-source-lookup-path1.png" alt="Leave default selected=" height="448" /></a></p>
<p>In the following “Add Source” dialog choose “File System Directory” and hit the OK button: Then choose the source directory where you unzipped the code. The debugger should now show all the code you can debug into.</p>
<p><a href="http://achorniy.files.wordpress.com/2010/05/add-source.png"><img class="alignnone size-full wp-image-237" title="add-source" src="http://achorniy.files.wordpress.com/2010/05/add-source.png" alt="Define path to unpacked sources" width="613" height="346" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/achorniy.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/achorniy.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/achorniy.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/achorniy.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/achorniy.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/achorniy.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/achorniy.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/achorniy.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/achorniy.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/achorniy.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/achorniy.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/achorniy.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/achorniy.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/achorniy.wordpress.com/233/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=233&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://achorniy.wordpress.com/2010/05/26/how-to-view-android-sources-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75c2bdacfd2d62abcbfe7beda3d9c613?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">achorniy</media:title>
		</media:content>

		<media:content url="http://achorniy.files.wordpress.com/2010/05/click-edit-source-lookup.png" medium="image">
			<media:title type="html">click-edit-source-lookup</media:title>
		</media:content>

		<media:content url="http://achorniy.files.wordpress.com/2010/05/edit-source-lookup-path1.png" medium="image">
			<media:title type="html">edit-source-lookup-path</media:title>
		</media:content>

		<media:content url="http://achorniy.files.wordpress.com/2010/05/add-source.png" medium="image">
			<media:title type="html">add-source</media:title>
		</media:content>
	</item>
		<item>
		<title>3 Magic words from Google &#8220;Upload, Train, Predict&#8221; = Prediction API</title>
		<link>http://achorniy.wordpress.com/2010/05/21/3-magic-words-from-google-upload-train-predict-perdiction-api/</link>
		<comments>http://achorniy.wordpress.com/2010/05/21/3-magic-words-from-google-upload-train-predict-perdiction-api/#comments</comments>
		<pubDate>Fri, 21 May 2010 19:43:07 +0000</pubDate>
		<dc:creator>Andrey Chorniy</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[classification]]></category>
		<category><![CDATA[google I/O]]></category>
		<category><![CDATA[prediciton]]></category>
		<category><![CDATA[supervised classification]]></category>

		<guid isPermaLink="false">http://achorniy.wordpress.com/?p=229</guid>
		<description><![CDATA[Yesterday, May 20, 2010 on Google I/O the brand new API was announced by Google &#8220;Prediction API&#8220; It looks very promising and open the wide range of areas to use it of course. In short it will expose to everyone (on the moment only to &#8220;selected everyone&#8221; on the moment since it has limited access [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=229&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yesterday, May 20, 2010 on Google I/O the brand new API was announced by Google &#8220;<a href="http://code.google.com/apis/predict/" target="_blank">Prediction API</a>&#8220;<br />
It looks very promising and open the wide range of areas to use it of course.<br />
In short it will expose to everyone <em>(on the moment only to &#8220;selected everyone&#8221; on the moment since it has limited access on the moment)</em> the ability to build their own &#8220;<a href="http://en.wikipedia.org/wiki/Supervised_classification" target="_blank">Supervised Classification</a>&#8221; without coding, without writing algorithms to analyze and learn from their data.</p>
<p>To use that API you have to sign-up and wait until Google decide to give you an access, so don&#8217;t wait and <a href="https://spreadsheets6.google.com/a/google.com/viewform?formkey=dHZoZk03MkVUYU1yZTRLRFc4LU5sM3c6MA#gid=0" target="_blank">sign-up to the Prediction API access</a> if you are interested<br />
So, generally you have to do 3 relatively simple things (except thinking about the classification task description)<br />
<strong>Upload </strong> your data to Google Storage</p>
<p><strong>Train </strong>classify your data set</p>
<p><strong>Predict</strong> use the model which google create from your data-set to predict (classify)</p>
<p><img src="http://code.google.com/apis/predict/images/process.png" alt="Usage of Google Prediction" /></p>
<p>Looking at the <a href="https://wave.google.com/wave/#restored:wave:googlewave.com!w%252B3kgmObZwI" target="_blank">answers from Google representatives </a>I can say that is absolutely fresh pilot product but for it is very promising, especially if they will have API to describe the data-set, configure prediction models and algorithms, etc. It will allow embed complex prediction based logic even in mobile phones without having actual computation and programming on client side.  One more example of how to transform  complex and scaring into simple.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/achorniy.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/achorniy.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/achorniy.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/achorniy.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/achorniy.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/achorniy.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/achorniy.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/achorniy.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/achorniy.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/achorniy.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/achorniy.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/achorniy.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/achorniy.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/achorniy.wordpress.com/229/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=229&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://achorniy.wordpress.com/2010/05/21/3-magic-words-from-google-upload-train-predict-perdiction-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75c2bdacfd2d62abcbfe7beda3d9c613?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">achorniy</media:title>
		</media:content>

		<media:content url="http://code.google.com/apis/predict/images/process.png" medium="image">
			<media:title type="html">Usage of Google Prediction</media:title>
		</media:content>
	</item>
		<item>
		<title>Lucene spellchecker for TinyMCE</title>
		<link>http://achorniy.wordpress.com/2010/05/11/lucene-spellchecker-for-tinymce/</link>
		<comments>http://achorniy.wordpress.com/2010/05/11/lucene-spellchecker-for-tinymce/#comments</comments>
		<pubDate>Tue, 11 May 2010 15:27:43 +0000</pubDate>
		<dc:creator>Andrey Chorniy</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[lucene]]></category>
		<category><![CDATA[spellchecker]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web-application]]></category>

		<guid isPermaLink="false">http://achorniy.wordpress.com/?p=221</guid>
		<description><![CDATA[I just finished creation of Lucene based spellchecker for TinyMCE editor. It is based on the same code as the two previous ones &#8220;Jazzy-based&#8221; and &#8220;JMySpell-based&#8220; You can download code from the jspellchecker (http://jspellchecker.svn.sourceforge.net/viewvc/jspellchecker/trunk/) All configuration for TinyMCE still the same, just use updated path to spellchecker-servlet Current implementation is based on the org.apache.lucene.search.spell.PlainTextDictionary (it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=221&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just finished creation of Lucene based spellchecker for TinyMCE editor. It is based on the same code as the two previous ones &#8220;<a href="http://achorniy.wordpress.com/2009/08/11/tinymce-spellchecker-in-java/">Jazzy-based</a>&#8221; and &#8220;<a href="http://achorniy.wordpress.com/2010/01/05/tinymce-jmyspell-jazzy-spellchecker/">JMySpell-based</a>&#8220;</p>
<p>You can download code from the <a href="http://sourceforge.net/projects/jspellchecker/">jspellchecker</a> (http://jspellchecker.svn.sourceforge.net/viewvc/jspellchecker/trunk/)</p>
<p>All configuration for TinyMCE still the same, just use updated path to spellchecker-servlet</p>
<p><pre class="brush: xml;">
spellchecker_rpc_url&amp;nbsp;   : &quot;/spellchecker/lucene-spellchecker&quot;,
</pre></p>
<p>Current implementation is based on the org.apache.lucene.search.spell.PlainTextDictionary (it is just the list of words delimited with newlines) and have additional memory-configuration servlet parameter &#8220;max_memory_usage&#8221; (value in megabytes which define the maximum size of Lucene indexes which could be stored in memory)</p>
<p>Indexes for spellchecker created at the first access to the particular language after web-application startup (or pre-created for &#8220;preloadedLanguages&#8221; on servlet-startup).<br />
To speed-up index access (and the spell checking as the result) spellchecker indexes initially created on the file-system and after that they are moved to memory<br />
It use 2-level cache to achieve the maximum performance and memory-management.</p>
<ul>
<li> 1-st level of the cache is the cache of SpellCheckers which use In-Memory (RAMDirectory) Lucene indexes</li>
<li> 2-nd level cache store File-System SpellCheckers (FSDirectory) which don&#8217;t take memory but just hold the reference to the Directory object</li>
</ul>
<p>1-st level cache implementation (based on LinkedHashMap) is also responsible for memory-management, it guarantees that summary size of all In-Memory indexes is less than &#8220;maxMemoryUsage&#8221; (this parameter is configured in servlet init parameters in megabytes)</p>
<p>On the moment I&#8217;ve found one-issue of Lucene spellchecker, it&#8217;s related to multi-word processing.  For example I have &#8220;New-York&#8221; in my dictionary, but it doesn&#8217;t processed as one-word (Lucene index-reader split it into two words of course).</p>
<p>The extension points of that spellchecker could be</p>
<ol>
<li>Usage of IndexReader to read existent Lucene indexes<br />
Dictionary dictionary = new LuceneDictionary(reader, indexedField);</li>
<li>Use extended form of suggestSimilar which boost &#8220;most-popular&#8221; terms (it need the initial index-reader, so applicable only for LuceneDictionary based on IndexReader)<br />
suggestions = spellChecker.suggestSimilar(word, maxSuggestionsCount, fieldIR, suggestedField, true);<br />
See the code examples for that in the  <a href="../2010/04/24/did-you-mean-feature-hibernate-search-lucene-seam-example-application/">&#8220;Did-you-mean   feature with Hibernate Search, Lucene and Seam. Example application&#8221;</a>.</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/achorniy.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/achorniy.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/achorniy.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/achorniy.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/achorniy.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/achorniy.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/achorniy.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/achorniy.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/achorniy.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/achorniy.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/achorniy.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/achorniy.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/achorniy.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/achorniy.wordpress.com/221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=achorniy.wordpress.com&amp;blog=8544771&amp;post=221&amp;subd=achorniy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://achorniy.wordpress.com/2010/05/11/lucene-spellchecker-for-tinymce/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75c2bdacfd2d62abcbfe7beda3d9c613?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">achorniy</media:title>
		</media:content>
	</item>
	</channel>
</rss>
