<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-30694389</id><updated>2011-07-07T16:46:08.897-07:00</updated><category term='Struts'/><category term='web programming 1000'/><category term='Off-topic'/><category term='Java'/><category term='Javascript'/><category term='validation'/><category term='rant'/><title type='text'>Intuit-ive Tech-niques</title><subtitle type='html'>Learnings and pitfalls (among other things) that I've gained in my time with Intuit Canada</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://intuittech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://intuittech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Liam J.</name><uri>http://www.blogger.com/profile/05670587605642193711</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://i19.photobucket.com/albums/b181/hadaad/avatar.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-30694389.post-7537434589982793800</id><published>2008-01-17T11:18:00.001-08:00</published><updated>2008-01-17T11:18:29.279-08:00</updated><title type='text'>When is a Constant not a Constant?</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;When it's a java object.&lt;br/&gt;&lt;br/&gt;Oh, sure, you can declare a final object.  What that means is that you can't change the reference.  But values are up for grabs.  &lt;br/&gt;I wonder how many people this has torched in the past?  &lt;br/&gt;&lt;br/&gt;Thank god for SCJP where I learned that final is not final as in primitives final but somewhat less final than you would sometimes want.  &lt;br/&gt;&lt;br/&gt;I guess the next thing to find out is how you keep an object from changing its values (or rather, guarantee that it can't).  &lt;br/&gt;&lt;br/&gt;And final doesn't always mean the same thing.  Final in a primitive means you can't change the value.  Final in an object means you can't change the reference.  Final in a method means that you can't override the method on inheritance.  Final in a class means you can't inherit from it at all.  &lt;br/&gt;&lt;br/&gt;Interesting rules, and it doesn't seem like final is ever misused but it can be confusing.  At least to me, anyway.  &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p class='poweredbyperformancing'&gt;Powered by &lt;a href='http://scribefire.com/'&gt;ScribeFire&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30694389-7537434589982793800?l=intuittech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intuittech.blogspot.com/feeds/7537434589982793800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30694389&amp;postID=7537434589982793800' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/7537434589982793800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/7537434589982793800'/><link rel='alternate' type='text/html' href='http://intuittech.blogspot.com/2008/01/when-is-constant-not-constant.html' title='When is a Constant not a Constant?'/><author><name>Liam J.</name><uri>http://www.blogger.com/profile/05670587605642193711</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://i19.photobucket.com/albums/b181/hadaad/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30694389.post-4422232381671076812</id><published>2007-06-21T09:02:00.000-07:00</published><updated>2007-06-21T09:31:07.182-07:00</updated><title type='text'>Adding Rows Dynamically</title><content type='html'>I'm sure that every joe, bob, frank and jimmy already knows this but I'm not one of those guys so I figured I'd throw this out there for other relative newcomers to DHTML and Javascript.&lt;br /&gt;&lt;br /&gt;So, if you're creating a table, it goes something like this:&lt;br /&gt;&amp;lt;table&amp;gt;&lt;br /&gt;&amp;lt;tbody&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt; Something here &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt; Something else here&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/tbody&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;Right?  (note: tbody seems to be required for this by ie)&lt;br /&gt;So, if you want to add a row to this, all dynamic-like, the first thing to do is add an ID to the tbody (since that's the element you'll actually be adding to)&lt;br /&gt;&amp;lt;tbody id="tbody"&amp;gt;&lt;br /&gt;&lt;br /&gt;Then you can add a control to your page to add the row.  Something like&lt;br /&gt;&amp;lt;input type="button" value="Add Row" /&amp;gt;&lt;br /&gt;&lt;br /&gt;So, aside from the rest of the page declaration (&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;...etc) that's all the html that you need.&lt;br /&gt;&lt;br /&gt;What you need next is Javascript.&lt;br /&gt;In the button tag, you'll add an onclick handler like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;input type="button" value="Add Row" onclick="addRow()" /&amp;gt;&lt;br /&gt;&lt;br /&gt;Then you need the javascript.  Something like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;function addRow()&lt;br /&gt;{&lt;br /&gt;var tbody = document.getElementById("tbody");&lt;br /&gt;var newRow = document.createElement("tr");&lt;br /&gt;var newCell1 = document.createElement("td");&lt;br /&gt;var newCell2 = document.createElement("td");&lt;br /&gt;newCell1.innerHTML = "Something more";&lt;br /&gt;newCell2.innerHTML = "Something else more";&lt;br /&gt;newRow.appendChild(newCell1);&lt;br /&gt;newRow.appendChild(newCell2);&lt;br /&gt;tbody.appendChild(newRow);&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;Every time you click the Add Row button, it will add a row to the table.  Of course, you can extend this to include adding dynamic data or adding different elements to different parent elements (maybe adding a button when some condition is met... i dunno - I used it to add a row to a table - what you want to use it for is your own deal).&lt;br /&gt;&lt;br /&gt;Here's the code from top to bottom:&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;function addRow()&lt;br /&gt;{&lt;br /&gt;var tbody = document.getElementById("tbody");&lt;br /&gt;var newRow = document.createElement("tr");&lt;br /&gt;var newCell1 = document.createElement("td");&lt;br /&gt;var newCell2 = document.createElement("td");&lt;br /&gt;newCell1.innerHTML = "Something more";&lt;br /&gt;newCell2.innerHTML = "Something else more";&lt;br /&gt;newRow.appendChild(newCell1);&lt;br /&gt;newRow.appendChild(newCell2);&lt;br /&gt;tbody.appendChild(newRow);&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;table&amp;gt;&lt;br /&gt;&amp;lt;tbody id="tbody"&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt; Something here &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt; Something else here&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/tbody&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;input type="button" value="Add Row" onclick="addRow()" /&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;A couple of things:&lt;br /&gt;1) don't forget to add an ID to the element you want to add to.&lt;br /&gt;2) don't forget the second 'a' in javascript.  That one's a bugger.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30694389-4422232381671076812?l=intuittech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intuittech.blogspot.com/feeds/4422232381671076812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30694389&amp;postID=4422232381671076812' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/4422232381671076812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/4422232381671076812'/><link rel='alternate' type='text/html' href='http://intuittech.blogspot.com/2007/06/adding-rows-dynamically.html' title='Adding Rows Dynamically'/><author><name>Liam J.</name><uri>http://www.blogger.com/profile/05670587605642193711</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://i19.photobucket.com/albums/b181/hadaad/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30694389.post-2651242180326340756</id><published>2007-04-16T13:03:00.000-07:00</published><updated>2007-04-16T13:18:17.097-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='web programming 1000'/><title type='text'>Web Programming 1000</title><content type='html'>Okay, I know, you're wondering what the 1000 is.&lt;br /&gt;Well, I went to the &lt;a href="http://www.uleth.ca"&gt;University of Lethbridge&lt;/a&gt; and we had four-digit course numbers. So think of it as Web Programming 101 with a U of L flair.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Eclipse IDE&lt;/h4&gt;In general, I like &lt;a href="http://www.eclipse.org/"&gt;the Eclipse IDE&lt;/a&gt;. It's free, it's pretty rich as far as features:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Autocompletion&lt;br /&gt;&lt;/li&gt;&lt;li&gt;API navigation&lt;br /&gt;&lt;/li&gt;&lt;li&gt;quick switch to different classes/files&lt;br /&gt;&lt;/li&gt;&lt;li&gt;the always-popular code-colouring/syntax-highlighting&lt;br /&gt;&lt;/li&gt;&lt;li&gt;integration with lots and lots of different web servers &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;All but the last one I use quite often. I fought and I fought with the Tomcat integration plug-in. Sure, it installed just fine but I could not deploy an app to it to save my life. So, in my disappointment, I turned to ant. &lt;/p&gt;&lt;p&gt;&lt;a href="http://ant.apache.org/"&gt;Apache Ant&lt;/a&gt; is a program/framework which allows you to specify different targets (typically dist, deploy, test, clean) with tasks (including compilation, moving, copying, deleting, running certain programs). Gustavo, who I work with, helped me with learning Ant and I am excited with it. It means you don't have to be bound to an IDE for making your projects work (although compiling inside an IDE is a good way to work the bugs out) and your directory structure can be whatever you want it to be.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Directory Structure&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;I don't know standards, best-practices or conventions when it comes to directory structures. I know what tomcat wants when you deploy an application to it (since that's what I've been working on) so I have set up a directory structure that I'm comfortable with and I let my ant tasks put stuff where it needs to be.&lt;br /&gt;&lt;br /&gt;Here's my directory structure:&lt;br /&gt;&lt;br /&gt;Project folder&lt;br /&gt;- Java&lt;br /&gt;-com/org&lt;br /&gt;-continue ad nauseum&lt;br /&gt;&lt;em&gt;The java and subfolders are where you'll find the java source code for the classes that I have written.&lt;br /&gt;&lt;/em&gt;-Dependencies&lt;br /&gt;-jars&lt;br /&gt;-tlds&lt;br /&gt;&lt;em&gt;The dependency folder with its subfolders is where you will find the external classes/programs/libraries that I use in my project&lt;br /&gt;&lt;/em&gt;-html&lt;br /&gt;-jsp&lt;br /&gt;-javascript&lt;br /&gt;-html&lt;br /&gt;&lt;em&gt;The html folder is where you will find the front-end code - JSPs, HTMLs, javascript files, etc.&lt;br /&gt;&lt;/em&gt;-web.xml&lt;br /&gt;-struts.xml&lt;br /&gt;-validation.xml&lt;br /&gt;&lt;em&gt;these files are stored directly under the main project directory. web.xml describes the application - entry points, etc. struts.xml does the same thing if the project is a struts 2.0 project. validation.xml describes the validation required on some web-pages. It's just an example of the xml files that will be under the main directory. Obviously there could be more.&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;I'm pretty much a beginner on this stuff, myself. I want to learn more about web.xml and struts.xml and figure out how to frame these files properly. &lt;/p&gt;&lt;p&gt;That and the specific &lt;a href="http://ant.apache.org/manual/tasksoverview.html"&gt;ant tasks&lt;/a&gt; are what I'll write about next time. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30694389-2651242180326340756?l=intuittech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intuittech.blogspot.com/feeds/2651242180326340756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30694389&amp;postID=2651242180326340756' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/2651242180326340756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/2651242180326340756'/><link rel='alternate' type='text/html' href='http://intuittech.blogspot.com/2007/04/web-programming-1000.html' title='Web Programming 1000'/><author><name>Liam J.</name><uri>http://www.blogger.com/profile/05670587605642193711</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://i19.photobucket.com/albums/b181/hadaad/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30694389.post-3375809253457366689</id><published>2007-03-30T09:01:00.001-07:00</published><updated>2007-04-16T13:15:28.411-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Struts'/><title type='text'>Struts and messageResources.properties</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Collecting all of your strings in one file is a good idea (as long as they're sorted somehow -- otherwise it just becomes an incomprehensible jumble). Struts has a very smart way to do this. (That's right, I can admit when something is smart) messageResources.properties and &amp;lt;bean:message /&amp;gt; You can pass in arguments that round out the message and make it more dynamic-y. This is a good thing.&lt;br /&gt;&lt;br /&gt;I couldn't figure out how to get Javascript variables in there until Kevin, a sneaky-smart programmer who, like me has a background in C++, and who learned JSPs way faster than I did, pointed out a way to swap them in there after calling the bean:message.&lt;br /&gt;&lt;br /&gt;In the messageResources.properties entry, stick an @2bReplaced in there where 2bReplaced is a meaningful variable name. So like this:&lt;br /&gt;&lt;br /&gt;errors.badDate=The date @Date is bad.&lt;br /&gt;&lt;br /&gt;Then in Javascript, you would do this:&lt;br /&gt;&lt;br /&gt;var date = "02/25/-2007";//or something equally inane&lt;br /&gt;var badDateMessage = "&amp;lt;bean:message key='errors.badDate' /&amp;gt;"&lt;br /&gt;badDateMessage = badDateMessage.replace(/@Date/g, date);&lt;br /&gt;&lt;br /&gt;And then use the error message how you normally would.&lt;br /&gt;&lt;br /&gt;So thanks, Kevin, for chucking that piece of functionality my way and making me and the UE people feel better about ourselves.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="poweredbyperformancing"&gt;powered by &lt;a href="http://performancing.com/firefox"&gt;performancing firefox&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30694389-3375809253457366689?l=intuittech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intuittech.blogspot.com/feeds/3375809253457366689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30694389&amp;postID=3375809253457366689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/3375809253457366689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/3375809253457366689'/><link rel='alternate' type='text/html' href='http://intuittech.blogspot.com/2007/03/struts-and-messageresourcesproperties.html' title='Struts and messageResources.properties'/><author><name>Liam J.</name><uri>http://www.blogger.com/profile/05670587605642193711</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://i19.photobucket.com/albums/b181/hadaad/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30694389.post-8336927290842871718</id><published>2007-03-21T07:17:00.001-07:00</published><updated>2007-04-16T13:16:23.787-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Off-topic'/><title type='text'>Happy Anno-versary</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;This time, last year, I stepped into my cubicle and into a life of software development.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;It's been a fast year. The amount of stuff going on, the amount of work yet to do and the lack of sleep have all combined to speed this year along. &lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;It's hard to believe it's been a year but when I think about the way things were when I left Halliburton, maybe it's not so hard after all.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;Here's to many more anno-versaries.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;p class='poweredbyperformancing'&gt;powered by &lt;a href='http://performancing.com/firefox'&gt;performancing firefox&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30694389-8336927290842871718?l=intuittech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intuittech.blogspot.com/feeds/8336927290842871718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30694389&amp;postID=8336927290842871718' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/8336927290842871718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/8336927290842871718'/><link rel='alternate' type='text/html' href='http://intuittech.blogspot.com/2007/03/happy-anno-versary.html' title='Happy Anno-versary'/><author><name>Liam J.</name><uri>http://www.blogger.com/profile/05670587605642193711</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://i19.photobucket.com/albums/b181/hadaad/avatar.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30694389.post-4568697125551520774</id><published>2007-02-23T08:28:00.000-08:00</published><updated>2007-02-23T11:08:11.622-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='validation'/><category scheme='http://www.blogger.com/atom/ns#' term='Struts'/><title type='text'>Javascript</title><content type='html'>Yeah, I know.  It doesn't do everything you'd want.  It's got features that are incompatible with certain browsers.  It's a quick and dirty patch when things don't work the way you'd like them to.  My argument is:  So what?  If you don't like the browser-specific stuff, don't use it.  Take the long way around and things will work just fine.  Quick and dirty patches aren't necessarily a bad thing. &lt;br /&gt;&lt;br /&gt;I had to do some client-side validation for a form (after having spent a couple of weeks implementing the exact same validation, server-side).  It took me two days because Javascript just works.  You don't have to mess around with someone else's broken or crappy API.  You just have to make it work.&lt;br /&gt;&lt;br /&gt;[Ranterator: on]&lt;br /&gt;The server-side validation I was doing was for an update function.  It needs to be on the server-side.  The exact-same validation goes on client-side for a pay function.  Don't ask why we can't validate the server-side stuff client-side.  It hurts to think about it.  Anyway, we currently use Struts Commons validator for server-side.  It doesn't work.  If you have an indexed field (which we do) for validation, it will validate a certain field (amount, date, whatever) up until it runs into an error, &lt;em&gt;then it will crash and die&lt;/em&gt;. &lt;br /&gt;Okay, that was overly dramatic.  It will complete the rest of the form, it just won't continue to validate that one field.  So if you have five entries and it fails validation on, say email address for the second one, it will validate the rest of the form, but all of the other email addresses after the second one will not be validated.  Sure, that may be okay for some people, but we want all failed validations to show up.  Three lines of code.  Three lousy lines of code separated us from this functionality.  But I can't change struts code.  So I jumped in and tried to wrap their code, inherit from their code, &lt;em&gt;play nicely with their code&lt;/em&gt; but all of their stuff is sealed.  Not sealed so much as &lt;em&gt;every fucking thing I needed to use was private.&lt;/em&gt;  So, I said screw it.  I wrote my own validation method and used their validation results object (messily and with empty fields that just had names).  It worked but I felt like my brain needed a shower afterward.&lt;br /&gt;[Ranterator: off]&lt;br /&gt;&lt;br /&gt;When I was coding the Javascript side, I discovered why they put those three lines of code in there.  It's hard to properly label a failed validation when failing one causes it to fail a bunch. So I can understand why that would have been a thought.  But there are a thousand different ways to deal with that, two of which I implemented.  One in Java (server-side) and one in Javascript.&lt;br /&gt;&lt;br /&gt;Instead of validating all indexes of a field at once, validate the whole indexed thing at once, chaining the validations so that if it fails the most severe one, it doesn't move on.  (null before formatting before value-specific stuff)  But Struts can't do that for some reason, and they can't have us able to derive from their code, so the stupidity continued.  But I fought through it and checked in some ugly, ugly code that does what I want.&lt;br /&gt;&lt;br /&gt;So yeah, Javascript's cool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30694389-4568697125551520774?l=intuittech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intuittech.blogspot.com/feeds/4568697125551520774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30694389&amp;postID=4568697125551520774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/4568697125551520774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/4568697125551520774'/><link rel='alternate' type='text/html' href='http://intuittech.blogspot.com/2007/02/javascript.html' title='Javascript'/><author><name>Liam J.</name><uri>http://www.blogger.com/profile/05670587605642193711</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://i19.photobucket.com/albums/b181/hadaad/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30694389.post-117164333946110907</id><published>2007-02-16T08:25:00.000-08:00</published><updated>2007-04-16T13:17:41.596-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Making the leap to Java 1.5</title><content type='html'>Okay, so autoboxing sucks. &lt;br /&gt;&lt;br /&gt;This was supposed to be a big feature that would save some typing, save some  needless work and let things happen simply, the way the SUN intended.&lt;br /&gt;&lt;br /&gt;Not so much. &lt;br /&gt;&lt;br /&gt;There's no NULL handling behind the scenes, so with every autoboxing operation you do, you're just setting yourself up for an NPE.  Forget it.  Forget the three seconds of typing time you're saving and just leave the code the way it was.  Obscure?  Fine.  Fuck it. &lt;br /&gt;&lt;br /&gt;Don't use Objects, ever.  Ever.  Use primitives or you'll get some NPE you'll never chase down.  The Classes have enough static members that use primitives that you'll never have to use an Object (hopefully) and then you won't have to worry about whether you're unintentionally autoboxing a stupid Object and setting yourself up for debugging hell.&lt;br /&gt;&lt;br /&gt;Just use the primitives, man.  And forget about autoboxing. &lt;br /&gt;&lt;br /&gt;Until more later on,&lt;br /&gt;&lt;br /&gt;Liam&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30694389-117164333946110907?l=intuittech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intuittech.blogspot.com/feeds/117164333946110907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30694389&amp;postID=117164333946110907' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/117164333946110907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/117164333946110907'/><link rel='alternate' type='text/html' href='http://intuittech.blogspot.com/2007/02/making-leap-to-java-15.html' title='Making the leap to Java 1.5'/><author><name>Liam J.</name><uri>http://www.blogger.com/profile/05670587605642193711</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://i19.photobucket.com/albums/b181/hadaad/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30694389.post-117164309518381347</id><published>2007-02-16T08:19:00.000-08:00</published><updated>2007-04-16T13:17:11.070-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>This still exists?</title><content type='html'>Okay, so I'm not working on an installer anymore, I'm not working in C++, C# or anything like that right now.  I'm on a Java project.&lt;br /&gt;&lt;br /&gt;So my first post this year in Intuitive Techniques will be this:&lt;br /&gt;&lt;br /&gt;JAVA IS COMPLICATED.&lt;br /&gt;&lt;br /&gt;All you people out there who say that Java is easier than C++ have no idea what you're talking about. &lt;br /&gt;&lt;br /&gt;Sure there are a couple of things about C++'s memory management that are tricky, but Java has way more to it.  Add to that the learning curve with all sorts of code-generation, frameworks, web programming and just about every kind of technology you can add and still call it a Java project and you have COMPLICATIONS.&lt;br /&gt;&lt;br /&gt;Java-type and Java-based technologies on my current project:&lt;br /&gt;Java (duh)&lt;br /&gt;Ant tasks&lt;br /&gt;JSP&lt;br /&gt;Javascript&lt;br /&gt;Apache Struts&lt;br /&gt;JBOSS&lt;br /&gt;Tomcat&lt;br /&gt;Weblogic&lt;br /&gt;Apache Struts-Bridge (it really is different from Apache Struts)&lt;br /&gt;Liferay portal&lt;br /&gt;Portlets&lt;br /&gt;IntelliJ IDEA (which is the best IDE I've ever used)&lt;br /&gt;QCommon - our own architectural framework&lt;br /&gt;JUNIT&lt;br /&gt;&lt;br /&gt;Put all of these together and you have a recipe for disaster.  Somehow, though, the team I'm on has been able to keep up with a demanding schedule.  I just wish I didn't feel like I was drowning most of the time.&lt;br /&gt;&lt;br /&gt;I'll catch up.  It's just a matter of when.&lt;br /&gt;&lt;br /&gt;Yours in bugs,&lt;br /&gt;&lt;br /&gt;Liam&lt;br /&gt;&lt;br /&gt;(Next up:  Java 1.5 -or- how to make something complicated easier to mess up.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30694389-117164309518381347?l=intuittech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intuittech.blogspot.com/feeds/117164309518381347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30694389&amp;postID=117164309518381347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/117164309518381347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/117164309518381347'/><link rel='alternate' type='text/html' href='http://intuittech.blogspot.com/2007/02/this-still-exists.html' title='This still exists?'/><author><name>Liam J.</name><uri>http://www.blogger.com/profile/05670587605642193711</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://i19.photobucket.com/albums/b181/hadaad/avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30694389.post-115211890730073913</id><published>2006-07-05T09:54:00.000-07:00</published><updated>2007-04-16T13:17:24.754-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Off-topic'/><title type='text'>Obligatory Introduction to the New Blog</title><content type='html'>Welcome, all, to Intuit-ive Tech-niques.  By necessity, this blog is technical in nature, and will likely be of little interest or relevance to most of my friends and family.  However, if programming is in your life, and you're interested in my work projects, or if you need help with a project and something here can help you, feel free to look around.  I don't expect (or really want) any attribution for the code you've scavenged from this page.  I used code I found without attribution (though I would have, if they'd asked) and I extend the same invitation to you.&lt;br /&gt;&lt;br /&gt;However, if you see ways to improve on the code, or if you find something is useful beyond the pigeon holes I've found for it, please feel free to leave a comment about it.  It would be appreciated.&lt;br /&gt;&lt;br /&gt;For a non-technical (and much-less-focused) accounting of my life and times, please feel free to visit &lt;a href="http://liamj.blogspot.com/"&gt;In The Now&lt;/a&gt;, where I try my hand at wit, commentary and pseudo-intellectualism.&lt;br /&gt;&lt;br /&gt;Welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30694389-115211890730073913?l=intuittech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intuittech.blogspot.com/feeds/115211890730073913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30694389&amp;postID=115211890730073913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/115211890730073913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30694389/posts/default/115211890730073913'/><link rel='alternate' type='text/html' href='http://intuittech.blogspot.com/2006/07/obligatory-introduction-to-new-blog.html' title='Obligatory Introduction to the New Blog'/><author><name>Liam J.</name><uri>http://www.blogger.com/profile/05670587605642193711</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://i19.photobucket.com/albums/b181/hadaad/avatar.jpg'/></author><thr:total>0</thr:total></entry></feed>
