The default binding prefix for the format parameter is literal; use t:format="prop:dateFieldFormat".
Also, in your onPrepare method you are setting the myFormat field while your DateFormat field is
called dateFieldFormat.
Uli
On 26.11.2010 10:07, Stephan Windmüller wrote:
Hi!
I am trying to set the format of two DateFields with this code
-----
@Property
private DateFormat dateFieldFormat;
@Inject
private Locale currentLocale;
void onPrepare() {
myFormat = DateFormat.getDateInstance(DateFormat.DEFAULT,
currentLocale);
}
-----
In the tml I tried to define it with any of these combinations:
<t:datefield t:id="date" format="dateFieldFormat"/>
<t:datefield t:id="date" t:format="dateFieldFormat"/>
<t:datefield t:id="date" format="${dateFieldFormat}"/>
<t:datefield t:id="date" t:format="${dateFieldFormat}"/>
None of these works. In one case it tries to parse the string
"dateFieldFormat", in another the String "java.text.datefi...@..."
I could not find and example code for this in the documentation. Am I
using the dateFormat wrong?
Regards
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org