<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Official Joroto Blog &#187; web</title>
	<atom:link href="http://www.joroto.com/blog/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joroto.com/blog</link>
	<description>From the people at Joroto, Inc.</description>
	<lastBuildDate>Thu, 20 Oct 2011 21:10:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Appfuse &#8211; the next step</title>
		<link>http://www.joroto.com/blog/2010/02/14/appfuse-the-next-step/</link>
		<comments>http://www.joroto.com/blog/2010/02/14/appfuse-the-next-step/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 04:18:55 +0000</pubDate>
		<dc:creator>Tom CTO</dc:creator>
				<category><![CDATA[Miscellaneous Apps and Services]]></category>
		<category><![CDATA[appfuse]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[freemarker]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.joroto.com/blog/?p=376</guid>
		<description><![CDATA[Appfuse &#8211; personalizing the app 2/13/2010 Purpose: Which files to edit in order to personalize the existing app for my company. Remember: App name is: tree Company is: joroto.com Source is in: ./tree/src/ ./tree/src/main/resources/mail.properties Change to be your email and &#8230; <a href="http://www.joroto.com/blog/2010/02/14/appfuse-the-next-step/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Appfuse &#8211; personalizing the app<br />
2/13/2010</p>
<p>Purpose:<br />
Which files to edit in order to personalize the existing app for my company.</p>
<p>Remember:<br />
App name is: tree<br />
Company is: joroto.com<br />
Source is in: ./tree/src/</p>
<p>./tree/src/main/resources/mail.properties<br />
Change to be your email and the login properties for your smtp server.</p>
<p>./tree/src/main/resources/ApplicationResources.properties<br />
Search for appfuse and change all to your product or company name. Depends on context.<br />
I added on line 7 the following line<br />
webapp.image=wr_logo3_230x100.jpg<br />
This is our site logo. I can see it being translated into different languages. We can offer one per locale. Also the colors may be offensive in some cultures, and the picture might have cultural significance as well.<br />
This file holds all of the localization (meaning strings to be translated) strings. You&#8217;ll see different file names each of which represent a language for a specific country code.</p>
<p>./tree/src/main/webapp/common/header.jsp<br />
I&#8217;m putting an image (webapp.img) into the headers instead of the text I entered in the ApplicationResources.properties. First I copied my jpg to the ./tree/src/main/webapp/images directory.<br />
Editing this file, I am interested in commenting out lines 8 and 9. Never delete until release. You never know when you might return to the text version of the page.<br />
Now my header.jsp looks like this:<br />
&lt;%@ include file=&#8221;/common/taglibs.jsp&#8221;%&gt;<br />
&lt;c:if test=&#8221;${pageContext.request.locale.language ne &#8216;en&#8217;}&#8221;&gt;<br />
&lt;div id=&#8221;switchLocale&#8221;&gt;&lt;a href=&#8221;&lt;c:url value=&#8217;/?locale=en&#8217;/&gt;&#8221;&gt;&lt;fmt:message key=&#8221;webapp.name&#8221;/&gt; in English&lt;/a&gt;&lt;/div&gt;<br />
&lt;/c:if&gt;<br />
&lt;div id=&#8221;branding&#8221;&gt;<br />
&lt;!&#8211; TAH 2/13/10<br />
&lt;h1&gt;&lt;a href=&#8221;&lt;c:url value=&#8217;/'/&gt;&#8221;&gt;&lt;fmt:message key=&#8221;webapp.name&#8221;/&gt;&lt;/a&gt;&lt;/h1&gt;<br />
&lt;p&gt;&lt;fmt:message key=&#8221;webapp.tagline&#8221;/&gt;&lt;/p&gt;<br />
&#8211;&gt;<br />
&lt;a href=&#8221;<a href="../../">http://www.joroto.com</a>&#8221; title=&#8221;Logo&#8221;&gt;<br />
&lt;img src=&#8221;&lt;fmt:message key=&#8221;webapp.img&#8221; /&gt;&#8221;<br />
alt=&#8221;&lt;fmt:message key=&#8221;webapp.name&#8221; /&gt;&#8221; /&gt;<br />
&lt;/a&gt;<br />
&lt;/div&gt;<br />
&lt;hr /&gt;<br />
&lt;%&#8211; Put constants into request scope &#8211;%&gt;<br />
&lt;appfuse:constants scope=&#8221;request&#8221;/&gt;</p>
<p>Note: I wanted to use the &lt;c:url construct but this would need freemarker to produce a two pass per line mode. Not sure if it can do this, but maybe I&#8217;ll have time later to see.<br />
My image is 100 pixels tall so I needed to change the CSS for the header.</p>
<p>Edit   ./tree/src/main/webapp/styles/simplicity/layout.css<br />
I commented out line 22 and added a new line that looks like this:<br />
height: 100px; /* TAH 2/13/10 */</p>
<p>Rerun the jetty:run-war and you&#8217;ll see the changes.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.joroto.com%2Fblog%2F2010%2F02%2F14%2Fappfuse-the-next-step%2F&amp;title=Appfuse%20%26%238211%3B%20the%20next%20step" id="wpa2a_2"><img src="http://www.joroto.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.joroto.com/blog/2010/02/14/appfuse-the-next-step/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Appfuse &#8211; quick start guide for newbies.</title>
		<link>http://www.joroto.com/blog/2010/02/13/appfuse/</link>
		<comments>http://www.joroto.com/blog/2010/02/13/appfuse/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 06:03:45 +0000</pubDate>
		<dc:creator>Tom CTO</dc:creator>
				<category><![CDATA[Miscellaneous Apps and Services]]></category>
		<category><![CDATA[appfuse]]></category>
		<category><![CDATA[code generator]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[raible]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[struts]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.joroto.com/blog/2010/02/13/appfuse/</guid>
		<description><![CDATA[Appfuse Add classes to initial project creation 2/12/2010 Overview: You have done the QuickStart to see if you can get everything to work. This article assumes you DID indeed get the initial project working. You&#8217;re excited and want to &#8220;add &#8230; <a href="http://www.joroto.com/blog/2010/02/13/appfuse/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><a title="Appfuse web page home" href="http://appfuse.org">Appfuse</a></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Add classes to initial project creation</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">2/12/2010</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Overview:</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">You have done the QuickStart to see if you can get everything to work. This article assumes you DID indeed get the initial project working. You&#8217;re excited and want to &#8220;add something&#8221; to that project and begin working on your own. You need to read through this with a clear head because there is a gotcha once you get past adding ONE java class file. Not sure why but there is a fix.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Ok here&#8217;s the scoop.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Use the videos for the tutorial. They&#8217;re up to date. The other tutorials never worked for me.</p>
<p></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">This is the writeup translating the videos into text. I did not add ANYTHING to this except a little clarification for us newbies.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">All we&#8217;re doing here is generating CRUD which is not normally what is needed in a real app. However, we do this here to get a feel for how all these frameworks work.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">You want to create a Plain Old Java Object (POJO). This is a simply a java class file. One Object per file.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">I use cygwin for development on Windows. I need to resetup my Linux box. I will try to write clarifying statements so you can figure out what I am doing.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">So let&#8217;s say we create a Java Class called Person. Why? Because I need one in my project.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">My app name is tree. My company is Joroto.com.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">So the path to my source is:</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">./tree/src/main/java/com/joroto</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">We&#8217;re going to create this Person.java file in a NEW directory called model.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">So you now have a directory structure</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">./tree/src/main/java/com/joroto/model</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Step 1 of a &#8220;Template for working in Appfuse&#8221;. When I say execute Step 1 again, do this with a different Java Class (just trying to be clear).</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Create a Person.java file in ./tree/src/main/java/com/joroto/model</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Here&#8217;s mine so you can first test that this works for you, then extend it. There is a note about renaming files and objects, later in this tutorial. READ THOSE NOTES, maybe even before you do this here. Nothing devastating, but important just the same.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">package com.joroto.model;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">import org.appfuse.model.BaseObject;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">import javax.persistence.*;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">import org.compass.annotations.Searchable;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">import org.compass.annotations.SearchableComponent;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">import org.compass.annotations.SearchableId;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">import org.compass.annotations.SearchableProperty;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">import java.sql.Timestamp;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">// Entity tells the processing framework that you want this object to be backed by a database.</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">@Entity @Table(name=&#8221;person&#8221;)</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">// The searchable is to help identify tables that need a search engine, are highly searched. Might be a &#8220;Trails-hibernate&#8221; module for search engine like capability.</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">// </span><a href="http://docs.codehaus.org/display/TRAILS/Querying+entities+and+full-text+search"><span style="background: yellow none repeat scroll 0% 0%;">http://docs.codehaus.org/display/TRAILS/Querying+entities+and+full-text+search</span></a></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">@Searchable </span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">public class Person extends BaseObject /* implements java.io.Serializable */ {</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">private Long uid; </span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">private String title; // Mr., Dr. etc.</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">private String fName; // First name </span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">private String mName; // Anything other than first and last name</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">private String lName; // Last name</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>@Override</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public String toString() {</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>String s = new String();</span></p>
<p style="margin: 0in 0in 0in 1.125in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">if (mName.length() &gt; 0) {</span></p>
<p style="margin: 0in 0in 0in 1.5in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">s=String.format(&#8220;%s %s %s %s&#8221;, title, fName, mName, lName);</span></p>
<p style="margin: 0in 0in 0in 1.125in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">} else {</span></p>
<p style="margin: 0in 0in 0in 1.5in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">s=String.format(&#8220;%s %s %s&#8221;, title, fName, lName);</span></p>
<p style="margin: 0in 0in 0in 1.125in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">} // if-else</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>return s;</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>@Override</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public int hashCode() {</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>throw new UnsupportedOperationException(&#8220;Not supported yet.&#8221;);</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>@Override</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>@SuppressWarnings(&#8220;EqualsWhichDoesntCheckParameterClass&#8221;)</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public boolean equals(Object o) {</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>Person p = (Person)o;</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>return(p.uid == this.uid);</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>} // equals</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">// Getters and Setters</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">// Indicates that this is the primary key for this event</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>@Id@GeneratedValue(strategy=GenerationType.AUTO) </span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">@Column(name=&#8221;uid&#8221;)</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public Long getUid() {</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>return uid;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">@Column(name=&#8221;uid&#8221;)</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public void setUid(Long uid) {</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>this.uid = uid;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">@Column(name=&#8221;title&#8221;, length=20)</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public String getTitle() {</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>return title;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public void setTitle(String s) {</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>this.title = s;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">@Column(name=&#8221;firstname&#8221;, length=100)</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public String getFirstName() {</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>return fName;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public void setFirstName(String s) {</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>this.fName = s;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">@Column(name=&#8221;middlename&#8221;, length=100)</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public String getMiddleName() {</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>return mName;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public void setMiddleName(String s) {</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>this.mName = s;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">@Column(name=&#8221;lastname&#8221;, length=100)</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public String getLastName() {</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>return lName;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>public void setLastName(String s) {</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>this.lName = s;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>}</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">}</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">The statements with the @ signs are annotations that are used when this code generates the database table. The database table (in Hibernate) will store the information the flows into and out of this class.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">That&#8217;s all we need to do in this file so save it.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">We need to tell the system that we&#8217;ve created this and it needs to be backed by hibernate. Open the following file (it is already in the directory structure from your initial generation of the project.</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">./tree/src/main/resources/hibernate.cfg.xml</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Add a new line at line 8 below the other &lt;mapping class…&gt; members.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Add the following line to that new line.</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;mapping class=&#8221;com.joroto.model.Person&#8221;/&gt;</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Save and close that file.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">You&#8217;re ready for the cool automation that Matt and his Magical Minions dreamed up.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">In the ./tree directory execute the following command</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">mvn appfuse:gen -Dentity=Person</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">If the build is not successful, make a very basic Class file like I did up there. We WILL be able to regenerate the files with more of the Class attributes in it.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">After a successful build execute the next command (Matt thinks executing these two commands is &#8220;too much&#8221; and will release a future version combining the two. However, just &#8220;think&#8221; of all the work these two command are saving us and you should be sending the guy some percentage of your commercial profits)</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">mvn<span> </span>appfuse:install -Dentity=Person</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">And then execute</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">mvn test</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">It will work.</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">mvn jetty:run-war</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Point your browser to</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">Localhost:8080</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Go back to the step 1 of this tutorial and enter a new and different Java class. When you get to the mvn test, you&#8217;ll notice that it fails the test classes. The Person class is flagged. Matt (not me) to the rescue in his MarkMail app. On the appfuse home, click on Project Information, Mailing Lists and then MarkMail. Enter the error about creating the bean and up pops his answer. You&#8217;re asking &#8220;where is the error? The console displays where to go, but for clarity go to</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">./tree/target/surefire-reports</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Any .txt file that is not 1k is telling you about the test errors.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Here is Matt&#8217;s fix for the problem, then I&#8217;ll explain:</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Open the file</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">./tree/src/main/webapp/WEB-INF/applicationContext.xml</span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: Calibri;">There are now three things that need to be done to the file. As you add Classes for CRUD you&#8217;ll need to edit its Bean element after you do the</span><span style="font-family: monospace;"> mvn appfuse:install -Dentity=Person</span><span style="font-family: Calibri;"><span> </span>above. </span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: Calibri;">Add the </span><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">&lt;context:component-scan base-package=&#8221;org.appfuse&#8221;/&gt;</span><span style="font-family: Calibri;"> element.</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">AND you have to add the element &lt;property name=&#8221;sessionFactory&#8221; ref=&#8221;sessionFactory&#8221;/&gt; to each bean. One for the personManager bean and once for (in my case) teventManager bean. So the file now looks like this:</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">&lt;beans xmlns=&#8221;</span><a href="http://www.springframework.org/schema/beans"><span style="background: yellow none repeat scroll 0% 0%;">http://www.springframework.org/schema/beans</span></a><span style="background: yellow none repeat scroll 0% 0%;">&#8221; xmlns:xsi=&#8221;http://www.w3.org/2001/XMLSchema-instance&#8221;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>xmlns:context=&#8221;http://www.springframework.org/schema/context&#8221;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>xsi:schemaLocation=&#8221;http://www.springframework.org/schema/beans </span><a href="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"><span style="background: yellow none repeat scroll 0% 0%;">http://www.springframework.org/schema/beans/spring-beans-2.0.xsd</span></a></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span></span><a href="http://www.springframework.org/schema/context"><span style="background: yellow none repeat scroll 0% 0%;">http://www.springframework.org/schema/context</span></a><span style="background: yellow none repeat scroll 0% 0%;"> </span><a href="http://www.springframework.org/schema/context/spring-context.xsd"><span style="background: yellow none repeat scroll 0% 0%;">http://www.springframework.org/schema/context/spring-context.xsd</span></a><span style="background: yellow none repeat scroll 0% 0%;">&#8220;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>default-lazy-init=&#8221;true&#8221;&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;!&#8211; Activates scanning of @Autowired &#8211;&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 30px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;context:annotation-config/&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;!&#8211; Activates scanning of @Repository and @Service &#8211;&gt;</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;context:component-scan base-package=&#8221;com.joroto&#8221;/&gt;</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-weight: bold; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">&lt;context:component-scan base-package=&#8221;org.appfuse&#8221;/&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;!&#8211; Add new DAOs here &#8211;&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;!&#8211;PersonManager-START&#8211;&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 30px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;bean id=&#8221;personManager&#8221; class=&#8221;org.appfuse.service.impl.GenericManagerImpl&#8221;&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 60px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;constructor-arg&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 90px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;bean class=&#8221;org.appfuse.dao.hibernate.GenericDaoHibernate&#8221;&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 150px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;constructor-arg value=&#8221;com.joroto.model.Person&#8221;/&gt;</span></p>
<p style="margin: 0in 0in 0in 1.5in; font-weight: bold; font-family: &amp;amp;amp; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">&lt;property name=&#8221;sessionFactory&#8221; ref=&#8221;sessionFactory&#8221;/&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 90px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;/bean&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 60px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;/constructor-arg&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 30px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;/bean&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;!&#8211;PersonManager-END&#8211;&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;!&#8211;TeventManager-START&#8211;&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;bean id=&#8221;teventManager&#8221; class=&#8221;org.appfuse.service.impl.GenericManagerImpl&#8221;&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 30px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;constructor-arg&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 60px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;bean class=&#8221;org.appfuse.dao.hibernate.GenericDaoHibernate&#8221;&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 120px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;constructor-arg value=&#8221;com.joroto.model.Tevent&#8221;/&gt;</span></p>
<p style="margin: 0in 0in 0in 1.5in; font-weight: bold; font-family: &amp;amp;amp; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">&lt;property name=&#8221;sessionFactory&#8221; ref=&#8221;sessionFactory&#8221;/&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 60px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;/bean&gt;</span></p>
<p style="margin: 0in; font-size: 11pt; padding-left: 30px;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;/constructor-arg&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;/bean&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;!&#8211;TeventManager-END&#8211;&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;">
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;"><span> </span>&lt;!&#8211; Add new Managers here &#8211;&gt;</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">&lt;/beans&gt;</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Matt was right. This fixes the test errors and you&#8217;re off and running. The above file is generated during the gen and install command.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Notes:</p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: Calibri;"><span> </span></span><span style="background: yellow none repeat scroll 0% 0%; font-family: &amp;amp;amp;">mvn clean</span><span style="font-family: Calibri;"> will clear out the target directory.</span></p>
<p style="margin: 0in; font-weight: bold; font-family: Calibri; font-size: 11pt;">Renaming a class</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Ok so you want to rename a Class. You need to search the ./tree/src/ directory for your class and all variants and clear them out.</p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: Calibri;">First fix the </span><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">./tree/src/main/resources/hibernate.cfg.xml</span><span style="font-family: Calibri;"><span> </span>file</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Then rename your class, any references inside the file, and finally the name of your class file.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">In this case I&#8217;m going to rename the Tevent class (which was my second class added. I did not post that above) to Event. So I rename the @Table, the Class name is now Event. Inside the Class is a reference to Tevent that is now Event. Save your class in the</p>
<p style="margin: 0in; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">./tree/src/main/java/com/joroto/model</span><span style="font-family: Calibri;"><span> </span>directory.</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Run the following command from the command line.</p>
<p style="margin: 0in; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">mvn clean</span><span style="font-family: Calibri;"> command to get rid of the target files.</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">If in cygwin, issue the find command<span> </span><span style="background: yellow none repeat scroll 0% 0%;">find . -name &#8220;[tT]event*&#8221;</span><span> </span>to see all of the files leftover that need to be deleted. In windows search for the name of the OLD class. Delete all those files. In cygwin do this:</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">find . -name &#8220;[tT]event*&#8221; | xargs rm -f</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Let&#8217;s generate the files<span> </span>and test them by running the commands on the command line:</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">mvn appfuse:gen -Dentity=Event</span></p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">mvn appfuse:install -Dentity=Event</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Edit the file</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">./tree/src/main/webapp/WEB-INF/applicationContext.xml</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Delete the old Class reference for the bean. You have to take out the whole &lt;bean ….&gt; to &lt;/bean&gt;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Add the &lt;property … sessionFactory<span> </span>line from above. Save the file. Then enter on the command line:</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">mvn test</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Should be good to go. Lets check. At the command line:</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">mvn jetty:run-war</span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: Calibri;">Point your browser to </span><span style="background: yellow none repeat scroll 0% 0%; font-family: &amp;amp;amp;">localhost:8080</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">You&#8217;ll notice that ALL of the Classes are on the tab bar. You&#8217;ll need to clean out the jsp files for the classes that don&#8217;t exist. SO. . . Let&#8217;s look for all of these references. Change directory to the ./tree/src directory. Run the cygwin command:</p>
<p style="margin: 0in; font-family: monospace; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%;">grep -lri tevent main/*</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">This will list the files that need to be cleaned up. I don&#8217;t know how to do this automatically, so let&#8217;s edit each file looking for the reference to the old class name.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">My list is (Use this as a learning experience as to how to modify your web application. These are the pages and values that go to the final html that is output):</p>
<p style="margin: 0in; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">main/resources/ApplicationResources.properties</span><span style="font-family: Calibri;"><span> </span>- You&#8217;ll see the section for your old class. Pretty easy to delete it.</span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">main/resources/struts.xml</span><span style="font-family: Calibri;"><span> </span>- You&#8217;ll see the section for your old class. Pretty easy to delete it.</span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">main/webapp/common/menu.jsp</span><span style="font-family: Calibri;"> &#8211; You&#8217;ll see the section for your old class. Pretty easy to delete it.</span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">main/webapp/WEB-INF/menu-config.xml</span><span style="font-family: Calibri;"> &#8211; You&#8217;ll see the section for your old class. Pretty easy to delete it.</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Now edit these files:</p>
<p style="margin: 0in; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">test/resources/sample-data.xml</span><span style="font-family: Calibri;"> &#8211; You&#8217;ll see the section for your old class. Pretty easy to delete it.</span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">test/resources/web-tests.xml</span><span style="font-family: Calibri;"> &#8211; You&#8217;ll see the depends clause. Now each time you gen a Class you&#8217;ll see it added here. So if you mess up and keep gen&#8217;ing the Person class, it will have that many Person entries here. Then down further in the file you&#8217;ll see the section for that your old class created. Delete that section.</span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: Calibri;">Change directory back to</span><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;"> ./tree</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">At the command line run</p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: Calibri;"><span> </span></span><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">mvn clean</span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: Calibri;"><span> </span></span><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">mvn test</span><span style="font-family: Calibri;"> </span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">The test should be successful. If not, then recheck your editing. Mine always worked. However, your editing is definitely where the problem lies at this time since you&#8217;ve already tested the New class you generated above.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Finally, to make sure the old class &#8220;stuff&#8221; no longer displays in the web app. Execute from the command line:</p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: Calibri;"><span> </span></span><span style="background: yellow none repeat scroll 0% 0%; font-family: monospace;">mvn jetty:run-war</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">I&#8217;m done here. Hopefully this gets you quickly up to speed on this cool stuff that Matt and his Magic Minions create. Kudos to the the AppFuse team.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">
<p><span> </span></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.joroto.com%2Fblog%2F2010%2F02%2F13%2Fappfuse%2F&amp;title=Appfuse%20%26%238211%3B%20quick%20start%20guide%20for%20newbies." id="wpa2a_4"><img src="http://www.joroto.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.joroto.com/blog/2010/02/13/appfuse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

