<?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>Netbeans for the Coffee Drinker</title>
	<atom:link href="http://netbeansboy.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://netbeansboy.com</link>
	<description>Netbeansboy works on Netbeans and Java....</description>
	<lastBuildDate>Fri, 19 Mar 2010 15:44:13 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='netbeansboy.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/8b689b526f0f850741b2c83768634eaf?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Netbeans for the Coffee Drinker</title>
		<link>http://netbeansboy.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://netbeansboy.com/osd.xml" title="Netbeans for the Coffee Drinker" />
	<atom:link rel='hub' href='http://netbeansboy.com/?pushpress=hub'/>
		<item>
		<title>Running a Dispersed team in Second Life.</title>
		<link>http://netbeansboy.com/2010/03/19/running-a-dispersed-team-in-second-life/</link>
		<comments>http://netbeansboy.com/2010/03/19/running-a-dispersed-team-in-second-life/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 15:38:28 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
				<category><![CDATA[Virtual Worlds]]></category>

		<guid isPermaLink="false">http://netbeansboy.com/?p=222</guid>
		<description><![CDATA[How my programming team works inside Second Life.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=222&subd=netbeansboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://netbeansboy.files.wordpress.com/2010/03/secondlifeoffice_001.png"><img class="alignright size-medium wp-image-227" title="PHJ Solutions Second LIfe Office" src="http://netbeansboy.files.wordpress.com/2010/03/secondlifeoffice_001.png?w=300&#038;h=182" alt="" width="300" height="182" /></a>I have been using Second Life for a jolly long time, it&#8217;s been a sort of wheel without a car, ok I&#8217;ve had fun in my spare time but I&#8217;ve always looked for ways we could use this kind of immersive environment in business. Especially in my team.</p>
<p>Well since part of my team is half way up the country we decided to try open meetings, but it turned out, it didn&#8217;t quite create the kind of &#8220;togetherness&#8221; we wanted, also, the video of me on everyone&#8217;s screen was distracting them from work.</p>
<p>So another solution was needed. Frankly, I&#8217;d held Second Life back. Until now that is, they have released a new viewer that allows us to share media such as websites. This in itself as far as I&#8217;m concerned is probably the biggest development in the last few years in terms of this technology.</p>
<p>So now we&#8217;re all sitting in an office in Second Life. We are experimenting with things like boxes for each task or set of tasks we are doing. One of the problems is that some of my guys get work from customers and others that I&#8217;m not aware of. (Unless they tell me) so it&#8217;s easy for them to get overloaded with &#8220;Can you Just&#8217;s&#8221;, by having a pile of task boxes I can see by each one&#8217;s desk how much they have on at any one time. Useful.</p>
<p>Other things we are doing is using OpenMeeting in Second Life for a whiteboard facility. I have some other WILD ideas that we might end up meeting customers there.</p>
<p>I would like to be able to share my screen with the others so I&#8217;m working on that, at least as an idea to start with. So on the laptop on my desk is a copy of whatever I&#8217;m doing on my screen. That way a quick &#8220;hey guys check this out&#8221; is quite possible, and, because the feed would be from the local network, only those in our community would be able to see it, everyone else would get a 404 error!</p>
<p>Well done Second Life, at long last.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/222/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=222&subd=netbeansboy&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2010/03/19/running-a-dispersed-team-in-second-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f88194049b511df7f5545ab664592d14?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pncblessed</media:title>
		</media:content>

		<media:content url="http://netbeansboy.files.wordpress.com/2010/03/secondlifeoffice_001.png?w=300" medium="image">
			<media:title type="html">PHJ Solutions Second LIfe Office</media:title>
		</media:content>
	</item>
		<item>
		<title>Open Meetings! Well worth a look&#8230;</title>
		<link>http://netbeansboy.com/2010/03/09/open-meetings-well-worth-a-look/</link>
		<comments>http://netbeansboy.com/2010/03/09/open-meetings-well-worth-a-look/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 13:13:31 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
				<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://netbeansboy.com/?p=219</guid>
		<description><![CDATA[This is nothing to do with Netbeans (sorry folks!) but for some time our development department have been using an IRC chat client, limited but worked. We just got a whizzy new second hand server and I decided to explore what we could do with some more advanced conferencing.
I came accross this&#8230;
http://code.google.com/p/openmeetings/wiki/InstallationOpenMeetings
This is an awesome [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=219&subd=netbeansboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong>This</strong> is nothing to do with Netbeans (sorry folks!) but for some time our development department have been using an IRC chat client, limited but worked. We just got a whizzy new second hand server and I decided to explore what we could do with some more advanced conferencing.</p>
<p>I came accross this&#8230;</p>
<p>http://code.google.com/p/openmeetings/wiki/InstallationOpenMeetings</p>
<p>This is an awesome bit of software and for our department I had it set up in 15/20 minutes! (not including downloads) but you must follow the instructions down to the letter, down load your package from the INSTALLATION page.</p>
<p>Good job guys!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/219/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=219&subd=netbeansboy&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2010/03/09/open-meetings-well-worth-a-look/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f88194049b511df7f5545ab664592d14?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pncblessed</media:title>
		</media:content>
	</item>
		<item>
		<title>Netbeans 6.9&#8230;. Woodstock is BACK!</title>
		<link>http://netbeansboy.com/2010/03/08/netbeans-6-9-woodstock-is-back/</link>
		<comments>http://netbeansboy.com/2010/03/08/netbeans-6-9-woodstock-is-back/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 07:50:04 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
				<category><![CDATA[Netbeans]]></category>

		<guid isPermaLink="false">http://netbeansboy.com/?p=217</guid>
		<description><![CDATA[Great News,
To my surprise, upon installing Netbeans 6.9, I find the woodstock plugins back inside and working great. This is amazingly good news for us as we are often building complex screens and laying it out in raw, naked jsp is just too much and too time consuming!
Great Job!
Now &#8211; perhaps we should get back [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=217&subd=netbeansboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Great News,</p>
<p>To my surprise, upon installing Netbeans 6.9, I find the woodstock plugins back inside and working great. This is amazingly good news for us as we are often building complex screens and laying it out in raw, naked jsp is just too much and too time consuming!</p>
<p>Great Job!</p>
<p>Now &#8211; perhaps we should get back to supporting it somehow?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=217&subd=netbeansboy&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2010/03/08/netbeans-6-9-woodstock-is-back/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f88194049b511df7f5545ab664592d14?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pncblessed</media:title>
		</media:content>
	</item>
		<item>
		<title>Another Glassfish Gotcha!</title>
		<link>http://netbeansboy.com/2010/02/25/another-glassfish-gotcha/</link>
		<comments>http://netbeansboy.com/2010/02/25/another-glassfish-gotcha/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 11:03:21 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
				<category><![CDATA[glassfish]]></category>

		<guid isPermaLink="false">http://netbeansboy.com/?p=214</guid>
		<description><![CDATA[Logs again folks.
We had a big system we deployed, got 23 users in it ran like a DOG, updated Glassfish 2.1.1 still ran like a dog (but didn&#8217;t crash with permgen problems).
What was happening was simple the web stack was writing hundreds of INFO statements about combos and drop downs. I set all the logs [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=214&subd=netbeansboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Logs</strong> again folks.</p>
<p>We had a big system we deployed, got 23 users in it ran like a DOG, updated Glassfish 2.1.1 still ran like a dog (but didn&#8217;t crash with permgen problems).</p>
<p>What was happening was simple the web stack was writing hundreds of INFO statements about combos and drop downs. I set all the logs to only report SEVERE errors and it all sped up!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=214&subd=netbeansboy&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2010/02/25/another-glassfish-gotcha/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f88194049b511df7f5545ab664592d14?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pncblessed</media:title>
		</media:content>
	</item>
		<item>
		<title>A couple of Glassfish Gotchas!</title>
		<link>http://netbeansboy.com/2010/02/20/a-couple-of-glassfish-gotchas/</link>
		<comments>http://netbeansboy.com/2010/02/20/a-couple-of-glassfish-gotchas/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 11:46:08 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
				<category><![CDATA[glassfish]]></category>

		<guid isPermaLink="false">http://netbeansboy.com/?p=210</guid>
		<description><![CDATA[First Gotcha!
Logs! I had a server pulling 5.2 million records and joining them together from a set of database servers. Ran fine for about 2 weeks then fell over. Could I get it to work? No, thats because Glassfish servers have their logs set to rotate at 200000 k or something strange, which means the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=210&subd=netbeansboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>First Gotcha!</p>
<p><strong><em>Logs</em></strong>! I had a server pulling 5.2 million records and joining them together from a set of database servers. Ran fine for about 2 weeks then fell over. Could I get it to work? No, thats because Glassfish servers have their logs set to rotate at 200000 k or something strange, which means the server just simply ran out of disk space&#8230; it was a console based Solaris box so it didn&#8217;t TELL me what was wrong!</p>
<p><strong><em>Connections to the Database Server</em></strong> &#8211; If you have a lot of users make sure your maximum connections are set high enough in the EJB, if not you&#8217;ll find it works fine with 5 users but slows down or even breaks if not!</p>
<p><strong><em> </em></strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/210/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=210&subd=netbeansboy&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2010/02/20/a-couple-of-glassfish-gotchas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f88194049b511df7f5545ab664592d14?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pncblessed</media:title>
		</media:content>
	</item>
		<item>
		<title>Netbeans 6.8, good old woodstock!</title>
		<link>http://netbeansboy.com/2009/10/30/netbeans-6-8-good-old-woodstock/</link>
		<comments>http://netbeansboy.com/2009/10/30/netbeans-6-8-good-old-woodstock/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 09:51:03 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://netbeansboy.com/?p=208</guid>
		<description><![CDATA[Well, it seems that Netbeans 6.8 does not come with Visual Web/Woodstock
I suspect that Sun (Oracle) are planning to replace it with those really nice ADF components, brilliant but folks it just is not commercial in my view.
People like us who have been using Netbeans with Woodstock to build HUGE applications are left high and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=208&subd=netbeansboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Well, </strong>it seems that Netbeans 6.8 does not come with Visual Web/Woodstock</p>
<p>I suspect that Sun (Oracle) are planning to replace it with those really nice ADF components, brilliant but folks it just is not commercial in my view.</p>
<p>People like us who have been using Netbeans with Woodstock to build HUGE applications are left high and dry and can&#8217;t move forward or upgrade to the new version. The cost of us converting to the new components is just too great with no financial benefit. We had the same trouble with IceFaces when that came out.</p>
<p>Personally I would like to actually get DHTLMX components and tightly integrate them with Woodstock and Visual Web, using this combination of components we&#8217;ve built some really swish AJAX based web apps that run VERY fast.</p>
<p>When you have 300 components on a form, you cannot hope to do it manually and leaving us with a text only option with no layout facilities provides us with no alternative but to stay with Netbeans 6.7.</p>
<p>So here&#8217;s my plan.</p>
<p>I plan to develop a tool/plugin/thingy that will allow you to visually design JSP/JSF pages. It will be seperate from Netbeans so we don&#8217;t suffer with random upgrade blues.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/208/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=208&subd=netbeansboy&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2009/10/30/netbeans-6-8-good-old-woodstock/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f88194049b511df7f5545ab664592d14?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pncblessed</media:title>
		</media:content>
	</item>
		<item>
		<title>FAST way of generating JSP pages using EJB&#8217;s to provide the data!</title>
		<link>http://netbeansboy.com/2009/10/04/fast-way-of-generating-jsp-pages-using-ejbs-to-provide-the-data/</link>
		<comments>http://netbeansboy.com/2009/10/04/fast-way-of-generating-jsp-pages-using-ejbs-to-provide-the-data/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 07:39:20 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://netbeansboy.com/?p=206</guid>
		<description><![CDATA[Ok firstly sorry I&#8217;ve not posted much but had a lot of personal issues.
Anyway &#8211; here&#8217;s the story, we were using the awesome DHTLMX components with JSP&#8217;s feeding the data but we could never get the speed up especially since our source database had 270,000 records or so (and increasing!). The server is a GlassFish [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=206&subd=netbeansboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Ok firstly sorry I&#8217;ve not posted much but had a lot of personal issues.</p>
<p>Anyway &#8211; here&#8217;s the story, we were using the awesome DHTLMX components with JSP&#8217;s feeding the data but we could never get the speed up especially since our source database had 270,000 records or so (and increasing!). The server is a GlassFish server by the way.</p>
<p>So basically the woodstock page replaced the DHTLMX combo boxes, and grid by feeding from JSP&#8217;s that opened a database in the standard way. Which is SLOOWWW.</p>
<p>By accident I found that moving the actual routine to an ejb with an entity manager made the code run about a million times faster. In fact when one of the customer&#8217;s date entry people tried it they nearly fell off their chair as it was so much faster than their existing system.</p>
<p>This technique can be used with just about any application to call a routine and return data, but it must be java.! Note I&#8217;m not a fan of XML because I think it gives back a whole load more data than it needs! But some of the components need it! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Ok &#8211; so 3 teirs.</p>
<p>JSP PAGE &lt;&#8212;&gt; EJB Remote Interface &lt;&#8212;&gt; EJB</p>
<p>Here&#8217;s the JSP page that generates the XML in the WAR project (web application)</p>
<pre>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;%@ page contentType="text/xml;charset=ISO-8859-1" %&gt;
&lt;%@ page import = "java.sql.*" %&gt;
&lt;%@ page import = "javax.naming.Context" %&gt;
&lt;%@ page import = "javax.naming.InitialContext; "%&gt;
&lt;%@ page import = "PHJ.JobManagerRemote.*" %&gt;
&lt;%

 PHJ.JobManagerRemote jobManagerBean=null;
 try {
 Context c = new InitialContext();
 jobManagerBean=(PHJ.JobManagerRemote)c.lookup("java:comp/env/JobManagerBean");
 } catch (Exception ne) {
 System.out.println("Could not find Job Manager Bean "+ne);
 }

 String sql = "SELECT TOP 40 tblAddressBook.AddrName, tblAddressBook.AddrNum, tblAddressBook.AddrCity, tblAddressBook.AddrCounty, tblAddressBook.ID ";
 sql=sql+ " FROM tblAddressBook ";
 sql=sql+" WHERE tblAddressBook.LastUsed&gt;DATEADD (day,-60,GETDATE() )  ";

 if (request.getParameter("mask")!=null) {
 sql=sql+" and addrName like '"+(request.getParameter("mask").replace("'","''"))+"%' ";
 }
 sql=sql+" ORDER BY tblAddressBook.AddrName ";

// connect to database

 //  String connectionURL = "jdbc:sqlserver://" + db_ipp_addr + ":1433;databaseName=" + db_name;

 //  Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
 //

 out.println(jobManagerBean.CustomerAddressserverXML(sql));

%&gt;</pre>
<p>Look how tiny it is! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Ok So &#8211; then I have an EJB in an enterprise applcation called JobManagerBean. In the remote code we have&#8230;.</p>
<pre>public  String CustomerAddressserverXML(String sSQL);</pre>
<p>and in the EJB itself&#8230;</p>
<pre>@Override
 public  String CustomerAddressserverXML(String sSQL) {

 String sSQLTemplate = sSQL;
 List results = null;
 Query q = em.createNativeQuery(sSQLTemplate, TblAddressBook.class);

 try {
 results = q.getResultList();
 } catch (Exception e) {
 return "&lt;complete&gt;&lt;/complete&gt;";
 }

 String sResult = "";
// output data in XML format
 sResult = "&lt;complete&gt;";
 String sThisFields="";
 TblAddressBook thisCustomer = null;
 for (int i = 0; i &lt; results.size(); ++i) {
 thisCustomer= (TblAddressBook) results.get(i);
 sThisFields=thisCustomer.getAddrName();
 sThisFields=sThisFields+" "+thisCustomer.getAddrNum();
 sThisFields=sThisFields+" "+thisCustomer.getAddrCity();
 sThisFields=sThisFields+" "+thisCustomer.getAddrCounty();
 sThisFields=sThisFields+" - "+thisCustomer.getId();
 sResult = sResult + ("&lt;option value=\"" + (thisCustomer.getAddrName().replace("&amp;","&amp;amp;")) + "\"&gt;&lt;![CDATA[" +
 sThisFields + "]]&gt;&lt;/option&gt;");

 }
 sResult = sResult + ("&lt;/complete&gt;");

 return sResult;

 }</pre>
<p>Simples!</p>
<p>In a sense ofcourse you could move ALL your JSP code into EJB&#8217;s and actually have ONE JSP for your whole web site!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=206&subd=netbeansboy&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2009/10/04/fast-way-of-generating-jsp-pages-using-ejbs-to-provide-the-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f88194049b511df7f5545ab664592d14?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pncblessed</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Jasper Reports with Icefaces and Visual Web</title>
		<link>http://netbeansboy.com/2009/04/20/using-jasper-reports-with-icefaces-and-visual-web/</link>
		<comments>http://netbeansboy.com/2009/04/20/using-jasper-reports-with-icefaces-and-visual-web/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 09:16:32 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://netbeansboy.com/?p=203</guid>
		<description><![CDATA[Ok here&#8217;s how to do it.
Firstly you&#8217;ll need a Jasper Reports Engine Class.
Create a new class in your project.
/*
 * To change this template, choose Tools &#124; Templates
 * and open the template in the editor.
 */

package PHJ;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.sql.ResultSet;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.FacesException;
import javax.faces.context.ExternalContext;
import net.sf.jasperreports.engine.JRExporter;
import net.sf.jasperreports.engine.JRExporterParameter;
import [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=203&subd=netbeansboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Ok here&#8217;s how to do it.</p>
<p>Firstly you&#8217;ll need a Jasper Reports Engine Class.</p>
<p>Create a new class in your project.</p>
<pre>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package PHJ;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.sql.ResultSet;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.FacesException;
import javax.faces.context.ExternalContext;
import net.sf.jasperreports.engine.JRExporter;
import net.sf.jasperreports.engine.JRExporterParameter;
import net.sf.jasperreports.engine.JRResultSetDataSource;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.export.JRPdfExporter;

/**
 *
 * @author paulc
 */
public class PHJJasperReportEngine {

        private databasesettings MyDB=new databasesettings();

    // private static final String PREFIX = "/WEB-INF/reports/";
    private static final String PREFIX = "";///faces/";
    /**
     * &lt;p&gt;Suffix to the resource name for compiled reports.&lt;/p&gt;
     */
    private static final String SUFFIX = ".jasper";
    /**
     * &lt;p&gt;Valid content types for reports that we can produce.&lt;/p&gt;
     */
    private static final String[] VALID_TYPES = {"text/html", // Standard HTML representation
        "application/pdf", // Adobe Portable Document Format
        "application/rtf"};

     public byte[] iceFacesjasperReport(String sBaseURL,String sSQL,String name, String type, Map params) throws IOException {
        URL url=null;
        ByteArrayOutputStream returnStream=new ByteArrayOutputStream();

        System.out.println(sBaseURL);
        try {
            url = new URI(sBaseURL+"/"+name+SUFFIX).toURL();
        } catch (URISyntaxException ex) {
            Logger.getLogger(PHJJasperReportEngine.class.getName()).log(Level.SEVERE, null, ex);
        }

             ResultSet data=null;
        try {
            data = MyDB.getDataFromMYSQL(sSQL);
        } catch (ClassNotFoundException ex) {
            System.out.println("Class not found "+ex);
        }
             if (data==null) {
                 System.out.println("Error in SQL "+sSQL);
                 return null;
             }

        // Validate that we recognize the report type
        // before potentially wasting time filling the
        // report with data

        boolean found = false;
        for (int i = 0; i &lt; VALID_TYPES.length; i++) {
            if (VALID_TYPES[i].equals(type)) {
                found = true;
                break;
            }
        }
        if (!found) {
            throw new IllegalArgumentException("Invalid report type '" + type + "' requested");
        }

        // Look up the compiled report design resource
        InputStream stream = url.openStream();

        if (stream == null) {
            throw new IllegalArgumentException("Unknown report name '" + name + "' requested");
        }

        try {
            data.beforeFirst();
        } catch (Exception e) {
            throw new FacesException(e);
        }

        // Fill the requested report with the specified data
        JRResultSetDataSource ds = new JRResultSetDataSource(data);
        JasperPrint jasperPrint = null;
        try {

            jasperPrint = JasperFillManager.fillReport(
                    stream, params, ds);

        } catch (RuntimeException e) {
            System.out.println(e);
            throw e;
        } catch (Exception e) {
            System.out.println(e);
            throw new FacesException(e);
        } finally {
            try {

                stream.close();
            } catch (IOException e) {
            }
        }

        // Configure the exporter to be used, along with the custom
        // parameters specific to the exporter type
        JRExporter exporter = null;

         // PersistentFacesState response=(PersistentFacesState)econtext.getResponse();
        //FacesContext fcontext = FacesContext.getCurrentInstance();
        try {
          //  response.setContentType(type);
            if ("application/pdf".equals(type)) {
                exporter = new JRPdfExporter();

            //    response.setHeader("Content-Type", "application/download");
              //  response.setHeader("Content-Disposition", "attachment; filename=" + name + ".pdf");

                exporter.setParameter(JRExporterParameter.JASPER_PRINT,
                        jasperPrint);
                exporter.setParameter(JRExporterParameter.OUTPUT_STREAM,
                        returnStream);

            }
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new FacesException(e);
        }

        // Enough with the preliminaries ...
        // export the report already
        try {
            exporter.exportReport();
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new FacesException(e);
        }

        // Tell JavaServer Faces that no output is required
        return returnStream.toByteArray();

    }

        public static byte[] toByteArray(InputStream input) throws IOException {
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        byte[] buf = new byte[4096];
        int len = 0;
        while ((len = input.read(buf)) &gt; -1) output.write(buf, 0, len);
        return output.toByteArray();
    }

}</pre>
<p>Then create a new page. You then need to add an OUTPUT RESOURCE component. I do this in the JSP tab because it doesn&#8217;t have any properties.</p>
<pre>  &lt;ice:outputResource attachment="true" fileName="subcontractorsummary.pdf" id="pdf-button" label="Output to PDF" mimeType="application/pdf"
                            resource="#{FRIMICESUBCONTRACTORSUMMARY.pdfResource}"
style="height: 24px; left: 24px; top: 168px; position: absolute; width: 119px" type="button"/&gt;</pre>
<p>In this case the page is called FRIMICESUBCONTRACTORSUMMARY so you&#8217;ll need to change that to match.</p>
<p>Now in the Java backing bean.</p>
<pre>    private Resource pdfResource;

    public Resource getPdfResource() {
        return pdfResource;
    }

    public void setPdfResource(Resource pdfResource) {
        this.pdfResource = pdfResource;
    }

    class MyResource implements Resource, Serializable {
        public String sURL;
        private String resourceName;
        private final Date lastModified;
        private ExternalContext extContext;
        private PHJJasperReportEngine thisEngine = new PHJJasperReportEngine();

        public MyResource(ExternalContext ec, String resourceName) {
            this.extContext = ec;
            this.resourceName = resourceName;
            this.lastModified = new Date();

        }

        /**
         * This intermediate step of reading in the files from the JAR, into a
         * byte array, and then serving the Resource from the ByteArrayInputStream,
         * is not strictly necessary, but serves to illustrate that the Resource
         * content need not come from an actual file, but can come from any source,
         * and also be dynamically generated. In most cases, applications need not
         * provide their own concrete implementations of Resource, but can instead
         * simply make use of com.icesoft.faces.context.ByteArrayResource,
         * com.icesoft.faces.context.FileResource, com.icesoft.faces.context.JarResource.
         */
        public InputStream open() throws IOException {
            try {
                // getrequestservletpath retruns the page url
                // getRequestContextPath=/CourierSystem

                HttpServletRequest thisRequest=(HttpServletRequest) extContext.getRequest();
                sURL="http://"+thisRequest.getServerName()+":"+thisRequest.getServerPort()+extContext.getRequestContextPath();
                Map param = new HashMap();

                /***********************************************/
                /* THIS IS THE BIT YOU NEED TO CHANGE FOR YOUR */
                /* REPORT - Make sure the filename.jasper is in*/
                /* the same place as your icefaces pages       */
                /* lastly, make sure the SQL matches           */
                /***********************************************/

                String sReportFileName="RPTCUSTOMERJOBSUMMARY";
                String sSQL = "SELECT * FROM TBLCUSTOMERS";

                /************************************************/
                return new ByteArrayInputStream(thisEngine.iceFacesjasperReport(sURL, sSQL, sReportFileName, "application/pdf", param));

            } catch (Exception e) {

                System.out.println("Error " + e);
            }

            return null;
        }

        public String calculateDigest() {
            return resourceName;
        }

        public Date lastModified() {
            return lastModified;
        }

        public void withOptions(Options arg0) throws IOException {
        }

    }</pre>
<p>And then add to the init()  phase of the page.</p>
<pre> try {
            FacesContext fc = FacesContext.getCurrentInstance();
            ExternalContext ec = fc.getExternalContext();
            pdfResource = new MyResource(ec, "report.pdf");

        } catch (Exception e) {
            e.printStackTrace();
        }</pre>
<p>Bingo!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/203/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=203&subd=netbeansboy&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2009/04/20/using-jasper-reports-with-icefaces-and-visual-web/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f88194049b511df7f5545ab664592d14?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pncblessed</media:title>
		</media:content>
	</item>
		<item>
		<title>One Line of code confirmation on a button &#8211; visual web</title>
		<link>http://netbeansboy.com/2009/03/24/one-line-of-code-confirmation-on-a-button-visual-web/</link>
		<comments>http://netbeansboy.com/2009/03/24/one-line-of-code-confirmation-on-a-button-visual-web/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 09:46:57 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://netbeansboy.com/?p=201</guid>
		<description><![CDATA[Here&#8217;s one of those teeny tips that saves a lot of building screens etc.  Let&#8217;s say you have a Visual Web button that you want the user to confrim before it proceeds through to the actual code at the back end.
In the onClick javascript property simply add
return confirm(&#8220;Are you sure&#8221;);
Then when the user clicks [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=201&subd=netbeansboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s one of those teeny tips that saves a lot of building screens etc.  Let&#8217;s say you have a Visual Web button that you want the user to confrim before it proceeds through to the actual code at the back end.</p>
<p>In the onClick javascript property simply add</p>
<p>return confirm(&#8220;Are you sure&#8221;);</p>
<p>Then when the user clicks the button if they click OK the system will carry on and submit to the back end, if not, it will simply do nothing. Ofcourse we could expand this to add other messages by putting a function in some javascript in the head tags and the call it from the onClick.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/201/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=201&subd=netbeansboy&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2009/03/24/one-line-of-code-confirmation-on-a-button-visual-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f88194049b511df7f5545ab664592d14?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pncblessed</media:title>
		</media:content>
	</item>
		<item>
		<title>Woodstock and AJAX with DHTMLXGRID (Netbeans 6.5)</title>
		<link>http://netbeansboy.com/2009/03/13/woodstock-and-ajax-with-dhtmlxgrid-netbeans-65/</link>
		<comments>http://netbeansboy.com/2009/03/13/woodstock-and-ajax-with-dhtmlxgrid-netbeans-65/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 10:39:13 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
				<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://netbeansboy.com/?p=195</guid>
		<description><![CDATA[dhtmlx grid jsp java server faces<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=195&subd=netbeansboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Did you know that you can use the great woodstock components with DHTMLXGRID (and all the other components), this is the first of a series of articles to show you how. (<a href="http://www.dhtmlx.com/">http://www.dhtmlx.com</a>/)</p>
<p>Before you start &#8211; if you are coding Javascript like this you best switch to <a href="http://www.mozilla-europe.org/en/firefox/" target="_blank">Firefox</a> and install the <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">FIREBUG plugin</a>, this lets you see whats going on with javascript pages like you&#8217;ve never done before. It will also help you identify the id&#8217;s of components before you use them and see if you get any problems.</p>
<p>The first thing to do is to copy the DHTMLXGRID javascript and CSS code into your Resources directory of your web project. Copy the whole of the codebase directory including the subdirectories, just drag and drop them.</p>
<p>Now create a new page and add a layout panel called it grdJOBDISPLAY Stretch it out to the size you want.</p>
<p>One of the problems we have is that we want to do some javascript that runs after the component tree is loaded, this happens after the page is loaded, I found that doing onload didn&#8217;t work, so you have to create a Static Text box, turn of ESCAPE and then in the text box put</p>
<p>&lt;script language=&#8221;javascript&#8221;&gt;<br />
initgrid();</p>
<p>&lt;/script&gt;</p>
<p>Now switch to your JSP it&#8217;s time to implement the javascript for the grid.</p>
<p>First, between the &lt;head&gt; tags we&#8217;ll add the code to load the grid support</p>
<p>&lt;webuijsf:link id=&#8221;link91&#8243; url=&#8221;/resources/dhtmlxgrid.css&#8221;/&gt;<br />
&lt;webuijsf:script id=&#8221;link29&#8243; url=&#8221;/resources/dhtmlxcommon.js&#8221;/&gt;<br />
&lt;webuijsf:script id=&#8221;link39&#8243; url=&#8221;/resources/dhtmlxgrid.js&#8221;/&gt;<br />
&lt;webuijsf:script id=&#8221;link49&#8243; url=&#8221;/resources/dhtmlxgridcell.js&#8221;/&gt;<br />
&lt;webuijsf:script id=&#8221;link59&#8243; url=&#8221;/resources/ext/dhtmlxgrid_srnd.js&#8221;/&gt;<br />
&lt;webuijsf:script id=&#8221;link69&#8243; url=&#8221;/resources/ext/dhtmlxgrid_filter.js&#8221;/&gt;<br />
&lt;webuijsf:script id=&#8221;link71&#8243; url=&#8221;/resources/ext/dhtmlxgrid_splt.js&#8221;/&gt;<br />
&lt;webuijsf:script id=&#8221;link331&#8243; url=&#8221;/resources/ext/dhtmlxgrid_hmenu.js&#8221;/&gt;</p>
<p>And finally a section of script that will run to initialise the grid. In this case you can see my code for a real screen this is more complex that you will use, here I&#8217;m using the dynamic loading grid but you can adjust the code for your own use. Note that if you are going to use the dynamic loading grid with a SQL server you should be using some paging code to return the pages of data that is required, this is easy with SQL 2005 and MYSQL (LIMIT) but with SQL 2000 it is a complete dog.</p>
<p>To do paging with SQL Server 2000 I use <a href="http://esersahin.wordpress.com/2008/11/24/efficient-and-dynamic-server-side-paging-with-sql-server-2000/" target="_blank">http://esersahin.wordpress.com/2008/11/24/efficient-and-dynamic-server-side-paging-with-sql-server-2000/</a> this works like a dream and more than makes up for the lack of it working otherwise.</p>
<p>Also in this code I stretch the grid to be the width of the screen.</p>
<pre>                        getElementByIdCompatible('form1:grdJOBDISPLAY').style.height=(pageHeight()-200)+"px";
                        getElementByIdCompatible('form1:grdJOBDISPLAY').style.width=(pageWidth()-30)+"px";</pre>
<p>And in fact I make it the height of the screen &#8211; 200 pixels.</p>
<p>Note that here I also have a couple of other hidden fields (HIDDEN boxes) I use to pass data from the javascript at the front to the code at the back end.</p>
<p>form1:layoutPanel1:txtTABLENAME &#8211; stores the tablename to pull from, I dynamically set this when searching etc. It is bound to a variable stored in the session bean so I can set it or read it from the backing bean OR javascript.</p>
<p>form1:layoutPanel1:txtSQL- stores the WHERE statement that I&#8217;m going to use to filter the data in the grid. Again, bound to a session bean variable means that I can have a button you click on that changes the where statement.</p>
<pre>&lt;webuijsf:markup id="gridscript"&gt;
                        &lt;script language="javascript"&gt;

                        var gridQString = "";

                        // called from a javascript function

                        function init() {
                        getElementByIdCompatible('form1:grdJOBDISPLAY').style.height=(pageHeight()-200)+"px";
                        getElementByIdCompatible('form1:grdJOBDISPLAY').style.width=(pageWidth()-30)+"px";
                        mygrid = new dhtmlXGridObject('form1:grdJOBDISPLAY');
                        mygrid.imgURL = "img/";
                        mygrid.setHeader("Job No, Job Date,POD,Hist, Svc,Sub,Haz,Pcs,Wgt,Acc No,Customer,Co Name, Town, Driver, Hdlg Dep,Close Time,Status,Print ");
                        mygrid.setInitWidths("100,100,60,60,50,50,50,50,50,100,200,200,200,100,200,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100");
                        mygrid.setColAlign("left,left,center,left,left,left,left,left,left,left,left,left,left")
                  //      mygrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
                        mygrid.setColSorting("str,date,str,str,str,str,str,str,str,str,str,str,str,str")
                        mygrid.setSkin("light");
                        mygrid.setDateFormat("%d/%b/%Y");
                        mygrid.enableHeaderMenu();
                        mygrid.setAwaitedRowHeight(25);

                        // mygrid.attachHeader("#text_filter,#combo_filter,#numeric_filter");

                        // NOTE YOU NEED TO INSTALL A STORED PROCEDURE IN THE SQL SERVER TO MAKE THIS WORK

                                        mygrid.attachHeader("#text_filter,#rspan,#rspan,#rspan,#rspan,#rspan,#rspan,#rspan,#rspan,#text_filter,#rspan,#rspan,#rspan,#text_filter,#text_filter,#rspan,#text_filter");
                        mygrid.init();
                        // mygrid.splitAt(1);
                        gridQString ="../jobscreendriver.jsp?tbl="+getElementByIdCompatible("form1:layoutPanel1:txtTABLENAME").value+"&amp;amp;whr="+getElementByIdCompatible("form1:layoutPanel1:txtSQL").value;
                        mygrid.loadXML(gridQString);
                        mygrid.enableSmartRendering(true);

                        var sLastSQLWhere='';

                        mygrid.attachEvent("onFilterStart",function(cols,vals) {

                        var sAND='';
                        var sSQLWhere='';
                        if (vals[0]!='') {
                            sSQLWhere="jobno LIKE 'PERCENT"+vals[0]+"PERCENT'"
                            sAND=" AND "
                        }
                        if (vals[1]!='') {
                            sSQLWhere=sSQLWhere + sAND+" accountno LIKE 'PERCENT"+vals[1]+"PERCENT'";
                            sAND=" AND ";
                        }
                        if (vals[2]!='') {
                            sSQLWhere=sSQLWhere + sAND+" isporfleetid LIKE 'PERCENT"+vals[2]+"PERCENT'";
                            sAND=" AND ";
                        }
                         if (vals[3]!='') {
                            sSQLWhere=sSQLWhere + sAND+" handlingdepot LIKE 'PERCENT"+vals[3]+"PERCENT'";
                            sAND=" AND ";
                        }
                        if (sLastSQLWhere!=sSQLWhere) {
                        sLastSQLWhere=sSQLWhere;
                        mygrid.clearAll();
                        getElementByIdCompatible("form1:layoutPanel1:txtSQL").value=sSQLWhere;
                        mygrid.loadXML("../jobscreendriver.jsp?tbl="+getElementByIdCompatible("form1:layoutPanel1:txtTABLENAME").value+"&amp;amp;whr="+ sSQLWhere);
                        mygrid.enableSmartRendering(true);
                        }
                        return false;  //block default filters
                        });

                        }

                        function getElementByIdCompatible(the_id) {
                        if (typeof the_id != 'string') {
                        return the_id;
                        }

                        if (typeof document.getElementById != 'undefined') {
                        return document.getElementById(the_id);
                        } else if (typeof document.all != 'undefined') {
                        return document.all[the_id];
                        } else if (typeof document.layers != 'undefined') {
                        return document.layers[the_id];
                        } else {
                        return null;
                        }
                        }

                        // Process the clicked Job button
                        function editJob(sJobNo) {
                        getElementByIdCompatible("form1:layoutPanel1:txtJOBNO").value=sJobNo.id;
                        getElementByIdCompatible("form1:layoutPanel1:cmdEDITJOB").click();
                        return false;
                        }

                        &lt;/script&gt;
                    &lt;/webuijsf:markup&gt;</pre>
<p>Now then. You will need a JSP file to deliver the data to the grid -</p>
<pre>            mygrid.loadXML("../jobscreendriver.jsp?tbl="+getElementByIdCompatible("form1:layoutPanel1:txtTABLENAME").value+"&amp;amp;whr="+ sSQLWhere);</pre>
<p>Here I have a JSP file that creates some xml &#8211; this is more complex than you might need for your applications but it does some interesting things with being able to filter data. You will have to adjust this to your database and situation, note that it uses the paging stored procedure to provide the data back to the grid on an SQL 2000 server.  Also I change the colour of the row to reflect the status of the record.</p>
<p>Lastly before I send the sql statement I replace the % signs with PERCENT and then convert it back in the code &#8211; you also need to filter out &amp; signs in the xml and replace with &amp;amp; otherwise you&#8217;ll get the &#8220;invalid XML statement&#8221;</p>
<pre>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;%@ page contentType="text/xml;charset=ISO-8859-1" %&gt;
&lt;%@ page import = "java.sql.*" %&gt;
&lt;%
        String db_ipp_addr = "insert ip address";
        String db_username = "insert username";
        String db_password = "insert password";
        String db_name = "insert database";

// set content type and xml tag

//   out.println("&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;");
// response.setContentType("text/xml");
// define variables from incoming values
        Integer posStart = 0;
        if (request.getParameter("posStart") != null) {
            posStart = new Integer(request.getParameter("posStart"));
        } else {
            posStart = 0;
        }

        Integer count = 0;
        if (request.getParameter("count") != null) {
            count = new Integer(request.getParameter("count"));
        } else {
            count = 20;
        }
        if (posStart.equals("0")) {
            posStart = 0;
        }

// connect to database
        Connection connection = null;
        Statement statement = null;
        Statement history = null;
        ResultSet rs = null;
        ResultSet Historyrs = null;

        String connectionURL = "jdbc:sqlserver://" + db_ipp_addr + ":1433;databaseName=" + db_name;

        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
        connection = DriverManager.getConnection(connectionURL, db_username, db_password);
// connection.setCatalog("dbo");
// query to products table
        String sTableName = "dbo.tbljobs";
        if (request.getParameter("tbl") != null) {
            sTableName = request.getParameter("tbl");

        }

        String sql = "SELECT * FROM " + sTableName;
        String sCancelled = " Cancelled=0 AND ";

        if (request.getParameter("whr") != null) {
            if (request.getParameter("whr").toLowerCase().contains(" cancelled")) {
                sCancelled = "";
            }
            sql = sql.trim() + " WHERE " + sCancelled + " JobNo Not Like 'CR%' AND " + request.getParameter("whr");
        } else {
            sql = sql.trim() + " WHERE " + sCancelled + " JobNo Not Like 'CR%'";
        }
        sql=sql.trim();
        if (sql.substring(sql.length()-3,sql.length()).equals("AND")) {
            sql=sql.substring(0,sql.length()-3);
            }
        sql=sql.replace("PERCENT","%");
// if this is the first query - get total number of records in the query result
        String totalCount = "";
        if (posStart == 0) {
            String sqlCount = "Select count(*) as cnt from (" + sql + ") as tbl";
            statement = connection.createStatement();

            rs = statement.executeQuery(sqlCount);
            rs.next();
            totalCount = rs.getString("cnt");

            rs.close();
        } else {
            totalCount = "";
        }

        CallableStatement getData = connection.prepareCall("{call returnpage(?,?,?,?)}");
        getData.setString(1, sql);

        getData.setInt(3, posStart);
        getData.setInt(4, (posStart + count));
        try {
        getData.executeQuery();

        rs = getData.getResultSet();
        } catch (Exception e) {
            System.out.println (sql);
        System.out.println ("Error Getting Record "+e);
          }
// output data in XML format
        out.println("&lt;rows total_count='" + totalCount + "' pos='" + posStart + "'&gt;");
        String sThisColor;
        String sStatus;

        while (rs.next()) {

            sStatus = rs.getString("status").trim();

            sThisColor = "#ffffff";
            if (sStatus.equals("XXXX")) {
                sThisColor = "#ff0000";
            } else if (sStatus.equals("YYYYY")) {
                sThisColor = "#ffcc00";
            } else if (sStatus.equals("EEEEE")) {
                sThisColor = "#ffcc00";
            } 

            out.println("&lt;row style=' border-width: 1px; border-style: solid; border-color: rgb(253, 253, 253) rgb(147, 175, 186) rgb(147, 175, 186) white;padding:1px;height:22px;background-color:" + sThisColor + "' id='" + rs.getString("jobno") + "'&gt;");

            out.println("&lt;cell&gt;");
            out.println(rs.getString("field1"));
            out.println("&lt;/cell&gt;");
            out.println("&lt;cell&gt;");
            out.println(rs.getDate("field2"));
            out.println("&lt;/cell&gt;");
            out.println("&lt;cell&gt;");
            out.println(rs.getString("field4") + "");  // value for product name
            out.println("&lt;/cell&gt;");
            out.println("&lt;/row&gt;");
        }
        out.write("&lt;/rows&gt;");

        rs.close();

%&gt;

Have fun!</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=195&subd=netbeansboy&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2009/03/13/woodstock-and-ajax-with-dhtmlxgrid-netbeans-65/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f88194049b511df7f5545ab664592d14?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pncblessed</media:title>
		</media:content>
	</item>
	</channel>
</rss>