Appfuse – the next step

Appfuse – 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 the login properties for your smtp server.

./tree/src/main/resources/ApplicationResources.properties
Search for appfuse and change all to your product or company name. Depends on context.
I added on line 7 the following line
webapp.image=wr_logo3_230x100.jpg
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.
This file holds all of the localization (meaning strings to be translated) strings. You’ll see different file names each of which represent a language for a specific country code.

./tree/src/main/webapp/common/header.jsp
I’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.
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.
Now my header.jsp looks like this:
<%@ include file=”/common/taglibs.jsp”%>
<c:if test=”${pageContext.request.locale.language ne ‘en’}”>
<div id=”switchLocale”><a href=”<c:url value=’/?locale=en’/>”><fmt:message key=”webapp.name”/> in English</a></div>
</c:if>
<div id=”branding”>
<!– TAH 2/13/10
<h1><a href=”<c:url value=’/'/>”><fmt:message key=”webapp.name”/></a></h1>
<p><fmt:message key=”webapp.tagline”/></p>
–>
<a href=”http://www.joroto.com” title=”Logo”>
<img src=”<fmt:message key=”webapp.img” />”
alt=”<fmt:message key=”webapp.name” />” />
</a>
</div>
<hr />
<%– Put constants into request scope –%>
<appfuse:constants scope=”request”/>

Note: I wanted to use the <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’ll have time later to see.
My image is 100 pixels tall so I needed to change the CSS for the header.

Edit   ./tree/src/main/webapp/styles/simplicity/layout.css
I commented out line 22 and added a new line that looks like this:
height: 100px; /* TAH 2/13/10 */

Rerun the jetty:run-war and you’ll see the changes.

Share
This entry was posted in Miscellaneous Apps and Services and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>