<?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: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>
	<pubDate>Fri, 24 Oct 2008 09:05:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Netbeans 6.5 RC Can&#8217;t load 6.1 Project</title>
		<link>http://netbeansboy.com/2008/10/23/netbeans-65-rc-cant-load-61-project/</link>
		<comments>http://netbeansboy.com/2008/10/23/netbeans-65-rc-cant-load-61-project/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 08:05:53 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
		
		<category><![CDATA[PLEASE HELP ME]]></category>

		<category><![CDATA[6.1]]></category>

		<category><![CDATA[Netbeans]]></category>

		<category><![CDATA[netbeans 6.5]]></category>

		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://netbeansboy.wordpress.com/?p=156</guid>
		<description><![CDATA[Normally I write posts to solve problems. Sadly today I&#8217;m writing a post out of desperation. I am currently reviewing the RC of Netbeans 6.5, it has some great features *BUT* we have our main huge project we are working on right now that we can&#8217;t work with in it.
It&#8217;s an enterprise application with Jasper [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Normally I write posts to solve problems. Sadly today I&#8217;m writing a post out of desperation. I am currently reviewing the RC of Netbeans 6.5, it has some great features *BUT* we have our main huge project we are working on right now that we can&#8217;t work with in it.</p>
<p>It&#8217;s an enterprise application with Jasper Reports and Java Server Faces, however. We cannot load any JSF pages they don&#8217;t appear for editing, just the java code, we occasionally get an &#8220;Illegal State Exception&#8221;.</p>
<p>I read somewhere that the problem is to do with Jasper Reports, but even not loading the plugins we cannot load the JSF pages from the project in 6.5.</p>
<div><strong>UPDATE</strong></div>
<div>It is the jasper reports plugin Ireport causing the problem. Unfortunately you can&#8217;t just uninstall the plugin it seems to actually &#8220;stuff up&#8221; (technical term) NB completely.</div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=156&subd=netbeansboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2008/10/23/netbeans-65-rc-cant-load-61-project/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Problems with Webservices in Netbeans and how to solve them</title>
		<link>http://netbeansboy.com/2008/10/01/problems-with-webservices-in-netbeans-and-how-to-solve-them/</link>
		<comments>http://netbeansboy.com/2008/10/01/problems-with-webservices-in-netbeans-and-how-to-solve-them/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 15:30:29 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
		
		<category><![CDATA[Netbeans]]></category>

		<category><![CDATA[glassfish]]></category>

		<category><![CDATA[nervous breakdown]]></category>

		<category><![CDATA[netbeans web service]]></category>

		<category><![CDATA[netbeans webservice]]></category>

		<category><![CDATA[problems]]></category>

		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://netbeansboy.wordpress.com/?p=152</guid>
		<description><![CDATA[Ok, rather than give a tutorial on web services - because there are some around, I thought I would solve one of the mysterious problems that can occur when you are creating these services.
Netbeans is AMAZING at creating web services, the tools are incredibly rich.
But this error dogged me. I had one or two web [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ok, rather than give a tutorial on web services - because there are some around, I thought I would solve one of the mysterious problems that can occur when you are creating these services.</p>
<p>Netbeans is AMAZING at creating web services, the tools are incredibly rich.</p>
<p>But this error dogged me. I had one or two web services that worked and others that didn&#8217;t. To set up my service I had set up some inner classes</p>
<pre>public static class dtaData {
private String Name;
private String date;
private String sid;
}</pre>
<p>then created a web services that returned a LIST of those objects:-</p>
<pre>    @WebMethod(operationName = "Data")
    public List Data() {
        List result=new ArrayList();
       for (int i=0;i&lt;20;++i) {
        dtaData DataObject=new dtaData ();
       DataObject.sid=""+i;
       result.add(Result);
     }

        
        return result;
    }
  </pre>
<p>And it falls over with this error when you test the webserver. HOWEVER The problem is caused because there is no web service DIRECTLY returning the dtaData class. The solution is to create a web service that returns null but has dtaData as the returning Object.</p>
<p>e.g.</p>
<pre>    @WebMethod(operationName = "testData")
    public dtaData testData() {
           return null;

    }
   </pre>
<p>These errors are given when the problem occurs:-</p>
<p><strong>On the glassfish server</strong></p>
<pre>Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException: class PHJ.Agenda$ICDB_Agenda_data nor any of its super class is known to this context.]
        at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:322)
        at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142)
        at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:108)
        at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
        at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:320)
        at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:93)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:454)</pre>
<p><strong>On the web service test return:</strong><br />
<hr />
<h3>Exceptions details : java.lang.reflect.InvocationTargetException</h3>
<hr />javax.servlet.ServletException: java.lang.reflect.InvocationTargetException at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:345) at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:121) at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:165) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.Ap</p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=152&subd=netbeansboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2008/10/01/problems-with-webservices-in-netbeans-and-how-to-solve-them/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Configuring a Glassfish/Sunapp CLUSTER Server on Windows</title>
		<link>http://netbeansboy.com/2008/09/24/configuring-a-glassfishsunapp-server-on-windows/</link>
		<comments>http://netbeansboy.com/2008/09/24/configuring-a-glassfishsunapp-server-on-windows/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 11:21:57 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
		
		<category><![CDATA[Howto]]></category>

		<category><![CDATA[glassfish]]></category>

		<category><![CDATA[windows]]></category>

		<category><![CDATA[deploy]]></category>

		<category><![CDATA[cluster]]></category>

		<category><![CDATA[sun app server 9]]></category>

		<guid isPermaLink="false">http://netbeansboy.wordpress.com/?p=132</guid>
		<description><![CDATA[Ok, I know, in an ideal world we&#8217;d do this on Solaris but I have customers with a pile of windows boxes so we have to work with what they have.
Server 1 - The &#8220;Controller&#8221; (machine 1, 192.168.100.10)
1. Install the SUN Application server make sure you select
- Do not require username/password
- Create a windows service [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ok, I know, in an ideal world we&#8217;d do this on Solaris but I have customers with a pile of windows boxes so we have to work with what they have.</p>
<p><strong>Server 1 - The &#8220;Controller&#8221; (machine 1, 192.168.100.10)</strong></p>
<p>1. Install the SUN Application server make sure you select</p>
<p>- Do not require username/password<br />
- Create a windows service (otherwise it wont stay running)<br />
- Do not start the server from the INSTALLATION PROGRAM, use control panel, administration tools, services and start the service from there.</p>
<p>2. Login to the GUI <a href="http://localhost:4848">http://localhost:4848</a></p>
<p>3. Select ADD CLUSTER SUPPORT - you will have to restart the server. Do NOT do this through the windows instead restart the service - Start, Control Panel, Admin Tools, Services, find SUN APPLICATION SERVER and RESTART</p>
<p>4. Login to the GUI <a href="http://localhost:4848/">http://localhost:4848</a> - Click on CREATE NEW CLUSTER</p>
<p>Enter the name and click OK now the cluster has been created (in this case i&#8217;ll use cluster1)</p>
<p>5. Create the first NODE. (this has to be done at the dos prompt)</p>
<p>Start, RUN, CMD, OK</p>
<p><strong>cd \Sun\appserver\bin&lt;ENTER&gt;</strong></p>
<p><strong>asadmin&lt;ENTER&gt;</strong></p>
<p>You will get a asadmin&gt; prompt.</p>
<p>on each machine in the cluster you have to create and start a node agent</p>
<p><strong>create-node-agent &#8211;host localhost &#8211;port 4848 nodeagent1</strong></p>
<p>create an instance for this node agent</p>
<p><strong>create-instance &#8211;host localhost &#8211;port 4848 &#8211;nodeagent nodeagent1 &#8211;cluster cluster1 instance1</strong></p>
<p>now start the node agent</p>
<p><strong>start-node-agent &#8211;syncinstances=true nodeagent1<br />
</strong>(just hit enter on the master password)</p>
<p>at this point you have created and set up the first cluster machine which will control the cluster - so all your cluster admin will be done from this machine.</p>
<p>Exit asadmin</p>
<p><strong>exit </strong></p>
<p>then exit the command box</p>
<p><strong>exit</strong></p>
<p><strong>Setting up Cluster Server clients (machine 2, 192.168.100.11)</strong></p>
<p>1. Install the SUN Application server make sure you select</p>
<p>- Do not require username/password<br />
- Create a windows service (otherwise it wont stay running)<br />
- Do not start the server from the INSTALLATION PROGRAM, use control panel, administration tools, services and start the service from there.</p>
<p>2. Login to the GUI <a href="http://localhost:4848/">http://localhost:4848</a></p>
<p>3. Select ADD CLUSTER SUPPORT - you will have to restart the server. Do NOT do this through the windows instead restart the service - Start, Control Panel, Admin Tools, Services, find SUN APPLICATION SERVER and RESTART</p>
<p>4. Create a node agent, start, run cmd ok</p>
<p>Start, RUN, CMD, OK</p>
<p><strong>cd \Sun\appserver\bin&lt;ENTER&gt;</strong></p>
<p><strong>asadmin&lt;ENTER&gt;</strong></p>
<p>You will get a asadmin&gt; prompt.</p>
<p>on each machine in the cluster you have to create and start a node agent</p>
<p><strong>create-node-agent &#8211;host 192.168.100.10 &#8211;port 4848 nodeagent2</strong></p>
<p>create an instance for this node agent</p>
<p><strong>create-instance &#8211;host 192.168.100.10 &#8211;port 4848 &#8211;nodeagent nodeagent2 &#8211;cluster cluster1 instance2</strong></p>
<p>now start the node agent</p>
<p><strong>start-node-agent &#8211;syncinstances=true nodeagent2<br />
</strong>(just hit enter on the master password)</p>
<p>at this point you have created and set up a cluster &#8220;client&#8221;</p>
<p>Exit asadmin</p>
<p><strong>exit </strong></p>
<p>then exit the command box</p>
<p><strong>exit</strong></p>
<p>Now you have your two cluster machines working.</p>
<p><strong>Deploying a Netbeans Project to the Cluster</strong></p>
<p>1. Make sure it&#8217;s running locally<br />
2. Change the database settings in netbeans to point to the LIVE database if it is different and make sure it runs still<br />
3. Deploy the app to the main server in the cluster<br />
4. Login to the GUI and go through the JDBC connectors and enable them for the cluster<br />
5. Test the application in SINGLE USER mode (normally port 8080) and make sure it all works.<br />
6. Go into APPLICATIONS, MANAGE TARGETS for your app and deploy it to the cluster</p>
<p>I will be putting up a tutorial on load balancing as well shortly.</p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=132&subd=netbeansboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2008/09/24/configuring-a-glassfishsunapp-server-on-windows/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Java Server Faces, SQL SERVER and CHAR FIELDS</title>
		<link>http://netbeansboy.com/2008/09/18/the-nightmare-of-char-fields-in-sql-server-and-a-naughty-solution/</link>
		<comments>http://netbeansboy.com/2008/09/18/the-nightmare-of-char-fields-in-sql-server-and-a-naughty-solution/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 09:19:20 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
		
		<category><![CDATA[Netbeans]]></category>

		<category><![CDATA[char fields]]></category>

		<category><![CDATA[jdts]]></category>

		<category><![CDATA[jtds]]></category>

		<category><![CDATA[padding spaces]]></category>

		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://netbeansboy.wordpress.com/?p=120</guid>
		<description><![CDATA[I have modified the excellent JTDS driver to strip the spaces from CHAR FIELDS so that Java Server faces controls do not get confused when fields are of different lengths and also when you go to edit a field you don&#8217;t get a pile of spaces at the end of the text.
The problem.
Well I have [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have modified the excellent JTDS driver to strip the spaces from CHAR FIELDS so that Java Server faces controls do not get confused when fields are of different lengths and also when you go to edit a field you don&#8217;t get a pile of spaces at the end of the text.</p>
<p><strong>The problem.</strong></p>
<p>Well I have a project where the people who originally designed the database were obviously monkeys. So they used CHAR fields throughout the database. But not all the same size, for example:-</p>
<p>TABLE 1 (SERVICE CODES) SERVICE CODE CHAR 2 JI</p>
<p>Then in an other table</p>
<p>TABLE 2 SERVICE CODE CHAR 50</p>
<p>This means that if you create a drop down box on a page with the service code list it would be padded and would not match the other table. I initially started modifying the SQL code to CAST service code as a CHAR to match the other one. Since there were 100 odd tables this meant masses of extra work to use Java Server Faces.</p>
<p>The other problem is that editing fields have extra spaces at the end of the data - what a nightmare.</p>
<p>So I pulled down the open source JTDS driver and rewrote it to trim all spaces from CHAR fields, thus making JSF work right and solving my SPACE problem.</p>
<p>The files are here</p>
<p><a title="Source" href="http://www.ukconstruction.com/jtdssource.zip">Source Code (converted into a Netbeans Project)</a></p>
<p><strong>Note</strong> if you download and use this you do so at your own risk, no warranty, implied or otherwise is provided for this software.</p>
<p><strong>Note 2: </strong>if you were using an OLD jdts driver you will need to remove the references from the SERVER as well as NETBEANS and use this new one - I might get round to renaming the driver to something else but if you find there are spaces where there should not be its probably because you are running the standard driver not the new one.</p>
<p><strong>Note 3: If you just want the driver its in the &#8220;dist&#8221; subdirectory, you need the LIB folder as well.</strong></p>
<p><strong>Note 4: If you publish a project using this driver and modify the driver then publish it again, NB won&#8217;t change the driver on the glassfish server if it has the same name, so you&#8217;ll have to copy it over yourself.</strong></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/netbeansboy.wordpress.com/120/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/netbeansboy.wordpress.com/120/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=120&subd=netbeansboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2008/09/18/the-nightmare-of-char-fields-in-sql-server-and-a-naughty-solution/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Java Server Faces, Data Class (Parent/Child) (if you use JSF read this)</title>
		<link>http://netbeansboy.com/2008/09/16/java-server-faces-data-class-parentchild-if-you-use-jsf-read-this/</link>
		<comments>http://netbeansboy.com/2008/09/16/java-server-faces-data-class-parentchild-if-you-use-jsf-read-this/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 12:54:28 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
		
		<category><![CDATA[Netbeans]]></category>

		<category><![CDATA[netbeans cacheddataprovider speed slow fast netbeans my]]></category>

		<guid isPermaLink="false">http://netbeansboy.wordpress.com/?p=118</guid>
		<description><![CDATA[I&#8217;m working on a huge project with some multi tab screens and I noticed two things about the code, firstly my init code had a lot of changes to the default SQL providers, mainly for  things where tables had links to other tables, parent child relationships. The more I added, the slower it got  - [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m working on a huge project with some multi tab screens and I noticed two things about the code, firstly my init code had a lot of changes to the default SQL providers, mainly for  things where tables had links to other tables, parent child relationships. The more I added, the slower it got  - plus my code got quite messy.</p>
<p>So - just to tidy up the code, I wrote a class below that has some functions for changing data providers. Guess what, not only was my code neater but the pages speeded up very noticably when loading. - Why not comment if you have a clue why, personally I think its something to do with the way java handles classes that are called a lot.</p>
<p>I declare one change object at the start of the JSF java code.</p>
<pre>DataProviderSQLChanger change = new DataProviderSQLChanger();</pre>
<p>Then I can use the change object whenever I like in the init code and throughout the page&#8230;</p>
<pre>change.ChangeSQL(tblsubservicetypesDataProvider, "select * FROM tblsubservicetypes");</pre>
<p><strong>Functions</strong></p>
<p><em>public void ChangeSQL(CachedRowSetDataProvider dataProvider, String sNewSQL) </em></p>
<p>This routine changes the SQL of a cached data provider - however it does look to see if the SQL your are submitting is what is already on the cached data provider so we don&#8217;t waste time reloading schemas etc.</p>
<p><em>public void ParentChildLink(<br />
            CachedRowSetDataProvider parentDataProvider,<br />
            String sParentFieldName,<br />
            CachedRowSetDataProvider childDataProvider,<br />
            String sChildFieldName,<br />
            boolean bIsText)</em></p>
<p> This Parentchildlink is for when you have a parent child relationship for example, when I have a &#8220;MAIN SUBFORM&#8221; Idea. It&#8217;s pretty straight forward (see the code for documentation and parameters).</p>
<p><em>public void ForceParentChildLink(<br />
            String sKey,<br />
            CachedRowSetDataProvider parentDataProvider,<br />
            String sParentFieldName,<br />
            CachedRowSetDataProvider childDataProvider,<br />
            String sChildFieldName,<br />
            boolean bIsText) </em></p>
<p>This is the same as parent child link but FORCES the Parent CachedRowSetDataProvider to look only to the record selected.</p>
<p>Anyway - here&#8217;s the class, have fun!</p>
<pre>import com.sun.data.provider.impl.CachedRowSetDataProvider;
import java.sql.SQLException;
/**
 * This is an easier way to change a Data Providers SQL and manage data providers
 * By Paul Clevett <a href="http://www.netbeansboy.com">http://www.netbeansboy.com</a>
 * @author paulc
 */
public class DataProviderSQLChanger {
    /**
     * Changes the SQL Statement of a Dataprovider
     * If the sql statement is already set to that, just return, refreshing the data provider
     * @param dataProvider
     * @param sNewSQL
     */
    public void ChangeSQL(CachedRowSetDataProvider dataProvider, String sNewSQL) {
        // Is the dataproviders sql already set?
        if (!dataProvider.getCachedRowSet().getCommand().equals(sNewSQL)) {
            try {
                dataProvider.getCachedRowSet().setCommand(sNewSQL);
            } catch (SQLException ex) {
                System.out.println("SQL Error: " + ex);
            // Logger.getLogger(DataProviderSQLChanger.class.getName()).log(Level.SEVERE, null, ex);
            }

        }
        dataProvider.refresh();
    }
    /**
     * Manage the Parent Child Link between two cached data providers
     * gives much clearer code, note that this routinedoes not change the parents
     * data provider's SQL unlike ForceParentChildLink
     * @param parentDataProvider    - Parent Data Provider
     * @param sParentFieldName      - Parent Field name
     * @param childDataProvider     - Child Data Provider
     * @param sChildFieldName       - Child Field name
     * @param bIsText               - if the link is a text link
     */
    public void ParentChildLink(
            CachedRowSetDataProvider parentDataProvider,
            String sParentFieldName,
            CachedRowSetDataProvider childDataProvider,
            String sChildFieldName,
            boolean bIsText) {
        // Sets up the link between parent and childe data providers
        String sOrderBy="";
        String sSQL = childDataProvider.getCachedRowSet().getCommand();
        if (sSQL.indexOf("ORDER BY")!=-1) sOrderBy = sSQL.substring(sSQL.indexOf("ORDER BY"));
        // Now remove any existing where's
       
        if (sSQL.indexOf("WHERE")!=-1) sSQL = sSQL.substring(0, sSQL.indexOf("WHERE") - 1);
        // Add the Query
        if (bIsText) {
           
            sSQL = sSQL.concat(" WHERE " + sChildFieldName + "='" + parentDataProvider.getValue(sParentFieldName).toString().trim() + "'");
           
        } else {
           
            sSQL = sSQL.concat(" WHERE " + sChildFieldName + "=" + parentDataProvider.getValue(sParentFieldName));
           
        }
        sSQL=sSQL.concat(sOrderBy);
       
        // Execute the query on the child
        ChangeSQL(childDataProvider,sSQL);
    }
   
    /**
     * Syncs up the parent/child relationship between two data providers with
     * a key
     * @param sKey                  - Parents Key Value or blank if the fieldname is the same as the sParentNameField
     * @param parentDataProvider    - Parents Data Provider
     * @param sParentFieldName      - Parents FieldName
     * @param childDataProvider     - Childs Data Provider
     * @param sChildFieldName       - Childs Field Name
     * @param bIsText               - Is the key Text or Numeric? (TRUE/FALSE)
     */
    public void ForceParentChildLink(
            String sKey,
            CachedRowSetDataProvider parentDataProvider,
            String sParentFieldName,
            CachedRowSetDataProvider childDataProvider,
            String sChildFieldName,
            boolean bIsText) {
        // Sets up the link between parent and childe data providers
        String sOrderBy="";
        String sSQL= parentDataProvider.getCachedRowSet().getCommand();
        if (sKey.equals("")) sKey=parentDataProvider.getValue(sParentFieldName).toString();
        if (sSQL.indexOf("ORDER BY")!=-1) sOrderBy = sSQL.substring(sSQL.indexOf("ORDER BY"));
        // Now remove any existing where's
       
        if (sSQL.indexOf("WHERE")!=-1) sSQL = sSQL.substring(0, sSQL.indexOf("WHERE") - 1);
        // Add the Query
        if (bIsText) {
           
            sSQL = sSQL.concat(" WHERE " + sParentFieldName + "='" + sKey + "'");
           
        } else {
           
            sSQL = sSQL.concat(" WHERE " + sParentFieldName + "=" + sKey);
           
        }
        sSQL=sSQL.concat(sOrderBy);
        // Force the parent over to look at the particular row
        ChangeSQL(parentDataProvider,sSQL);
       
       
        // Now the child
        sSQL = childDataProvider.getCachedRowSet().getCommand();
        if (sSQL.indexOf("ORDER BY")!=-1) sOrderBy = sSQL.substring(sSQL.indexOf("ORDER BY"));
        // Now remove any existing where's
       
        if (sSQL.indexOf("WHERE")!=-1) sSQL = sSQL.substring(0, sSQL.indexOf("WHERE") - 1);
        // Add the Query
        if (bIsText) {
           
            sSQL = sSQL.concat(" WHERE " + sChildFieldName + "='" + parentDataProvider.getValue(sParentFieldName) + "'");
           
        } else {
           
            sSQL = sSQL.concat(" WHERE " + sChildFieldName + "=" + parentDataProvider.getValue(sParentFieldName));
           
        }
        sSQL=sSQL.concat(sOrderBy);
       
        // Execute the query on the child
        ChangeSQL(childDataProvider,sSQL);
    }
   
   
   
}</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/netbeansboy.wordpress.com/118/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/netbeansboy.wordpress.com/118/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=118&subd=netbeansboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2008/09/16/java-server-faces-data-class-parentchild-if-you-use-jsf-read-this/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Java Server Faces and Google Chrome &#8212; Goodbye IE!</title>
		<link>http://netbeansboy.com/2008/09/03/java-server-faces-and-google-chrome-goodbye-ie/</link>
		<comments>http://netbeansboy.com/2008/09/03/java-server-faces-and-google-chrome-goodbye-ie/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 08:41:27 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
		
		<category><![CDATA[Google Chrome]]></category>

		<category><![CDATA[Netbeans]]></category>

		<category><![CDATA[java server faces]]></category>

		<guid isPermaLink="false">http://netbeansboy.wordpress.com/?p=113</guid>
		<description><![CDATA[When Firefox 3 came out I was hoping it would run JSF faster than IE did, instead it actually failed to run at all well so we just forgot about it and went back to sunny IE for our clients.
Today! I install Google Chrome&#8230; Actually I expected JSF not to work at all&#8230; let alone [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When Firefox 3 came out I was hoping it would run JSF faster than IE did, instead it actually failed to run at all well so we just forgot about it and went back to sunny IE for our clients.</p>
<p>Today! I install Google Chrome&#8230; Actually I expected JSF not to work at all&#8230; let alone how it does.</p>
<p>JSF runs VERY VERY VERY Fast in Google Chrome, sorry, actually, the whole internet runs VERY VERY VERY FAST.</p>
<p>Our tests so far show perfect compatibilty with JSF and it turns the web browser into an application browser, apart from the fact we can perform more customisations of the browser and use it as a real tool for accessing the multiple JSF projects we have.</p>
<p>We can now see bottlenecks without running profiler. The time between the pages loading shows where the problems are. IE really struggled with massive amounts of componants on pages. </p>
<p><strong>GOOD JOB GOOGLE</strong></p>
<p>If you&#8217;ve not tried Google Chrome please please do&#8230; hitch it up to your JSF application (or any web app) or your favorite website and just fall off your chair at the MARKED DIFFERENCE in speed. </p>
<p>I would think once word gets out that people will not want to use IE any longer.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/netbeansboy.wordpress.com/113/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/netbeansboy.wordpress.com/113/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=113&subd=netbeansboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2008/09/03/java-server-faces-and-google-chrome-goodbye-ie/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Making an email link in a table with Java Server Faces</title>
		<link>http://netbeansboy.com/2008/08/27/making-an-email-link-in-a-table-with-java-server-faces/</link>
		<comments>http://netbeansboy.com/2008/08/27/making-an-email-link-in-a-table-with-java-server-faces/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 14:26:26 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
		
		<category><![CDATA[Howto]]></category>

		<category><![CDATA[grid]]></category>

		<category><![CDATA[java server faces]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[table]]></category>

		<category><![CDATA[send email]]></category>

		<category><![CDATA[send email from table]]></category>

		<guid isPermaLink="false">http://netbeansboy.wordpress.com/?p=110</guid>
		<description><![CDATA[Ok, here&#8217;s how to do it.
1. Edit the table with the email in it - and set the type of the email field to a HYPERLINK.
2. Create a STATIC TEXT field on the form somewhere, change its ID to txtJAVASCRIPT, turn off the escape property and add a binding attribute to it. We&#8217;ll use this [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ok, here&#8217;s how to do it.</p>
<p>1. Edit the table with the email in it - and set the type of the email field to a HYPERLINK.</p>
<p>2. Create a STATIC TEXT field on the form somewhere, change its ID to <strong>txtJAVASCRIPT</strong>, turn off the escape property and add a binding attribute to it. We&#8217;ll use this to run a bit of javascript to call the email.</p>
<p>3. Add a binding attribute to tablerowgroup1 on your table</p>
<p>4. In the action code for the Hyperlink insert the following code, this will make the javascript basically tell the browser to open the users email programme with the email address in the subject. Obviously you&#8217;ll need to change tblcustomersDataProvider1 to your data provider and email to the field in the database corresponding to the persons email address.</p>
<pre>public String hyperlink2_action() {
        // Process email
        tblcustomersDataProvider1.setCursorRow(
                tableRowGroup1.getRowKey());
        String sEmail=tblcustomersDataProvider1.getValue("email")+"";
        if (!sEmail.equals("")) {
           
            txtJAVASCRIPT.setText("&lt;script language='javascript'&gt;\nwindow.location=\"<a href="mailto:&quot;+sEmail+&quot;\&quot;;\n&lt;/script">mailto:"+sEmail+"\";\n&lt;/script</a>&gt;");
           
        } else {
           
            txtJAVASCRIPT.setText("");
        }
        return null;
    }</pre>
<p>5. To cancel the email request we add the following into the public void preprocess() code for the jsf page</p>
<pre>    txtJAVASCRIPT.setText(""); </pre>
<p>Using this technique you can pretty much make any javascript happen on a page based on an event.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/netbeansboy.wordpress.com/110/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/netbeansboy.wordpress.com/110/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=110&subd=netbeansboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2008/08/27/making-an-email-link-in-a-table-with-java-server-faces/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Beautiful Coding - The way to life.</title>
		<link>http://netbeansboy.com/2008/08/27/beautiful-coding-the-way-to-life/</link>
		<comments>http://netbeansboy.com/2008/08/27/beautiful-coding-the-way-to-life/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 08:51:07 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
		
		<category><![CDATA[Netbeans]]></category>

		<category><![CDATA[programming tools]]></category>

		<category><![CDATA[systems]]></category>

		<guid isPermaLink="false">http://netbeansboy.wordpress.com/?p=106</guid>
		<description><![CDATA[I often have to fix other people&#8217;s code. You can tell coders who have been coding for years simply by the feel of their code.
One of the problems with java is the simple fact that you can end up with a spaghetti-junction of objects all calling, calling back, implementing, sub classing, overriding, running ejb&#8217;s etc [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I often have to fix other people&#8217;s code. You can tell coders who have been coding for years simply by the feel of their code.</p>
<p>One of the problems with java is the simple fact that you can end up with a spaghetti-junction of objects all calling, calling back, implementing, sub classing, overriding, running ejb&#8217;s etc etc and it can be a bit of a nightmare to find your way through.</p>
<p>The key here (although you can reverse engineer into a UML Model with Netbeans) is really in the way that the code is written.</p>
<p><strong>Things I do to make code more readable</strong></p>
<p>- Initials of variables</p>
<p>All my strings for instance start with s - sName, sUsername<br />
integers I , iCount, iGold<br />
doubles d</p>
<p>and so on for different types of variables or objects.</p>
<p>Components on forms I use a 3 letter start up.</p>
<p>txtTEXTBOX<br />
lblLABEL<br />
stcSTATICTEXT<br />
cmbCOMBOBOX</p>
<p>Also in the code using the java doc function, within Netbeans if you type /** enter it will auto document the next function and you just &#8220;fill in the blanks&#8221;, javaDoc is fantastic and well worth looking into. If you have &#8220;java doced&#8221; your code, not only does Netbeans pick up the documentation when you are typing or using your own functions but also you can generate a website that documents your classes!!! How Call</p>
<p>ALT-SHIFT-F - auto format your code, very useful.</p>
<p>Comment long bracketed loops. I always put // from  next to a bracketed loop  that is too long to see in one screen. e.g.</p>
<pre>for (int iCount=0;iCount&lt;10;++iCount) {         
system.out.println("Hello World "+iCount); } // From count to 10 icount</pre>
<p>Also comment all calls to EJB&#8217;s to say what they do -</p>
<p>// Get this job&#8217;s History<br />
JobManagerBean.getHistory(sJobNumber);</p>
<p><strong>Beautiful Code!</strong></p>
<p>Lisp programmers write beautiuful code, why? Because you have to, it becomes unreadable otherwise. In a way I wish all programmers would learn Lisp - because it makes you think in a different way and see software development from an almost etherial height. When I get some further research time I want to work on a lisp implementation for netbeans.</p>
<p>Remember that you will not be around forever, don&#8217;t punish the next poor programmer who has to work on your code. I like my code to be really easy to read and understand.</p>
<p><strong>Code Rewriting</strong></p>
<p>You know that sometimes I will rewrite a whole subroutine if I&#8217;m not happy with it. Programmers are artists, the difference is that the result of our art is a system for people to use or some form of output. Well written, neat, fast, efficient code means happy users and that is the caling of a programmer, to make the lives of the users easier.</p>
<p>If your software makes it harder. It needs rewriting, or maybe replacing with a pen and paper.</p>
<p><strong>Be passionate about your coding and your users will be passionate about your software.</strong></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/netbeansboy.wordpress.com/106/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/netbeansboy.wordpress.com/106/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=106&subd=netbeansboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2008/08/27/beautiful-coding-the-way-to-life/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Jasper Reports &#8212; those empty reports.</title>
		<link>http://netbeansboy.com/2008/08/26/jasper-reports-those-empty-reports/</link>
		<comments>http://netbeansboy.com/2008/08/26/jasper-reports-those-empty-reports/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 08:26:25 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
		
		<category><![CDATA[Netbeans]]></category>

		<category><![CDATA[jasper reports]]></category>

		<guid isPermaLink="false">http://netbeansboy.wordpress.com/?p=103</guid>
		<description><![CDATA[Jasper reports is a wonderful product .. and it does integrate really nicely with netbeans. But when it goes wrong you can get blank reports with no clue to what the problem is.
Here are some short observations when coding it up with java and JSF that might help you.
1. Watch your field names - I [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Jasper reports is a wonderful product .. and it does integrate really nicely with netbeans. But when it goes wrong you can get blank reports with no clue to what the problem is.</p>
<p>Here are some short observations when coding it up with java and JSF that might help you.</p>
<p>1. Watch your field names - I noticed that when you generated reports Jasper Reports writes a pretty odd query especially with SQL server 2000 at the back end (yes I know, some people still use it, although this one WILL be upgraded to MYSQL):-</p>
<p>SELECT<br />
     tblZones.&#8221;ZoneDescription&#8221; AS tblZones_ZoneDescription<br />
FROM<br />
     &#8220;dbo&#8221;.&#8221;tblZones&#8221; tblZones<br />
ORDER BY<br />
  tblZones.&#8221;ZoneDescription</p>
<p>Now this is fine - so then the fields in the report are mapped to <strong>tblZones_ZoneDescription </strong>intead of just leaving it as is - so if you then have a custom query for the report make sure that you are using the right field names or you could get that &#8220;blank page thing&#8221;</p>
<p>2. Main/Subforms or header/details (you know, Purchase Order Header and lines) - getting sub forms to work is hard graft! - I will post a solution when we do it - but until then it&#8217;s easier to have a SINGLE query with a join have the lines in the detail and group by the header id.</p>
<p>3. When it all goes wrong - sometimes I&#8217;ve had it refusing to run the jasper reports report I created earlier in good Blue Peter fashion. Normally a restart of NetBeans does fix this - but sometimes I&#8217;ve found a CHKDSK.</p>
<p>4. BACK IT UP - EVERYONE who develops should use a repository system such as subversion or CVS it&#8217;s saved my life countless times.</p>
<p>Have fun!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/netbeansboy.wordpress.com/103/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/netbeansboy.wordpress.com/103/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=103&subd=netbeansboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2008/08/26/jasper-reports-those-empty-reports/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Solaris Development + Virtual Box cannot ping itself</title>
		<link>http://netbeansboy.com/2008/08/07/solaris-development-virtual-box-cannot-ping-itself/</link>
		<comments>http://netbeansboy.com/2008/08/07/solaris-development-virtual-box-cannot-ping-itself/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 08:52:52 +0000</pubDate>
		<dc:creator>pncblessed</dc:creator>
		
		<category><![CDATA[solaris]]></category>

		<category><![CDATA[wins server turn on netbios solaris]]></category>

		<guid isPermaLink="false">http://netbeansboy.wordpress.com/?p=101</guid>
		<description><![CDATA[If you have a Virtual Box WIndows server and you want to connect to it from the Solaris server it is running on..try this
1. Set the Virtual Box to DHCP and you will probably find you can ping the Solaris server and back again
2. Get up a command prompt and do IPCONFIG
3. Set up your [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you have a Virtual Box WIndows server and you want to connect to it from the Solaris server <strong>it is running on..try this</strong></p>
<p>1. Set the Virtual Box to DHCP and you will probably find you can ping the Solaris server and back again<br />
2. Get up a command prompt and do IPCONFIG<br />
3. Set up your static IP address and make sure you set up the <strong>WINS SERVER</strong> and <strong>TURN ON NETBIOS</strong></p>
<p>TADA!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/netbeansboy.wordpress.com/101/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/netbeansboy.wordpress.com/101/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/netbeansboy.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/netbeansboy.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/netbeansboy.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/netbeansboy.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/netbeansboy.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/netbeansboy.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/netbeansboy.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/netbeansboy.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/netbeansboy.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/netbeansboy.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=netbeansboy.com&blog=2851804&post=101&subd=netbeansboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://netbeansboy.com/2008/08/07/solaris-development-virtual-box-cannot-ping-itself/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>