I'm trying to pass a localized string stored in a .properties file from
the page to a component. Here's my attempt, which throws a
NullPointerException. Any suggestions?
foo.properties:
key1 = title text
key2 = type text
foo.jwc:
<component id="some_id" type="DirectLink">
<binding name="listener" expression="listeners.myListenerMethod"/>
<string-binding name="title" key="key1"/>
<string-binding name="type" key="key2"/>
</component>
foo.java:
// I want to return "title text type text". This is called from
// myListenerMethod. This is where the NullPointerException gets
thrown.
protected String theStringIWant() {
return getBinding("title").getString() + ' '
+ getBinding("type").getString();
}
Thank you for your help.
Jim
--
Jim Menard, jimm@io.com, http://www.io.com/~jimm/
"I am sure that like Java, [C#] will be a 'no pointer' language, where
the
most common runtime error will be a 'NULL pointer exception'."
-- Jerry Kott, in comp.lang.smalltalk
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
|