Sheila's Blog

Software Development

Sheila's Blog header image 5

Entries from March 13th, 2009

Beginner's introduction to Seam

March 13th, 2009 No Comments

A quick summary of what Seam is, and why you might be interested in learning more about it.

Tags:  

Editing LRF files for the Sony EReader

March 12th, 2009 1 Comment

One of the things that took me a while to figure out with the Sony Ereader was the best way to manage my book collection, and what to do if I wanted to fix an annoying typo in one of my books. As it turns out, it was easier to do than I thought…
Rather [...]

Tags:   · ·

Passing a parameter to a page fragment in Seam

March 11th, 2009 No Comments

In the main .xhtml page within the ui:include tag you pass in a ui:param value:
<ui:include src=”#{fragmentPage}”>
<ui:param name=”location” value=”1″ />
</ui:include>
In the frament page you can reference the location value in the normal way:
<ice:outputText value=”#{manager.getLocation( ‘#{location}’)}” />
And can use that value to pass to a backing bean method called from the fragment.

Tags:  

Serving static external content in JBoss

March 10th, 2009 No Comments

To serve external static content in JBoss you need to add a Context element mapping the url eg. /application/test_data to the external folder as follows:
Edit /server/default/deploy/jbossweb-tomcat50.sar/server.xml and add a Context element just under the host tag.
<host name=”localhost”
autoDeploy=”false” deployOnStartup=”false” deployXML=”false”
configClass=”org.jboss.web.tomcat.security.config.JBossContextConfig”>

<Context path=”/app/test_data” appBase=”"
docBase=”C:/test_data”
debug=”99″ reloadable=”true”>
</Context>
Replace C:/test_data with the path to the folder on the server.
Redeploy the application to [...]

Tags:  

Icefaces link issue in Seam – missing dataModel

March 9th, 2009 No Comments

The problem is:
We have a list of objects (we’ll call them Cars) displayed as results from a search in a seam web application. This is displayed as rows, iterating through the results to reference thisCar for the current result in each row. We want to be able to select one of the Cars [...]

Tags:   ·

Use a different compiler with ant’s javac task

March 9th, 2009 No Comments

To ignore the JAVA_HOME settings and specify the compiler to use in ant’s javac task set the following properties:
build.properties:
# Set the jdk compiler properties
build.javac.executable=C:/Applications/Java/jdk1.5.0_13/bin/javac.exe

build.javac.compiler=javac1.5
Then in the build script use:
<javac srcdir=”${src.dir}” destdir=”${classes.dir}”
classpath=”${classpath}” debug=”${debug.flag}”
fork=”yes” executable=”${build.javac.executable}”
compiler=”${build.javac.compiler}”/>

Tags:  

First impressions of the Sony EReader

March 6th, 2009 No Comments

After much debate over the merits of Amazon’s Kindle over Sony’s Ereader, I’ve finally found myself the owner of a Sony PRS-505 ereader.  So far, the only possible advantage to a Kindle for me would be easier access to extra content.  However the Kindle is too closely tied to use in the United States, and [...]

Tags: