Geert,
I setted globally my properties with
TEMPLATE_DEFAULT_RESOURCEBUNDLES_ENGINEHTML in config.xml and that's great.
But unfortunately that didn't solve my problem for the radio button,
even if i call evaluateL10nTags().
Another clue ?
Geert Bevin a écrit :
Hi Laki,
I add the properties file this way :
ResourceBundle bundle = Localization.getResourceBundle("text", "en");
template.addResourceBundle(bundle);
and i use it for the labels on my form. It works all right, except
for my radio buttons...
Try calling template.evaluateL10nTags() after manually adding the
resource bundles:
http://rifers.org/docs/api/com/uwyn/rife/template/Template.html#evaluateL10nTags()
By the way, is it possible to define my properties files for all my
application, in order to avoid declaring it for each form ?
Yes:
http://rifers.org/wiki/display/RIFE/Type+specific+default+resource+bundles
Thanks.
Laki
Geert Bevin a écrit :
Hi Laki,
are you somehow adding the properties file to the template? Either
through default properties files or by explicitly adding it?
Geert
On 28 May 2006, at 23:21, Laki roganovic wrote:
Hello,
I'd like to display I18N values for a radio button in a form.
I have a class Gender, with String id field.
A GenderMetaData, with addConstraint(new
ConstrainedProperty("id").inList("m",
"f").notNull(true).notEmpty(true));
I have this in my template :
<!--V 'FORM:RADIO:g_id' /-->
It displays "m" or "f". I'd like to display male or female, so i
followed the procedure mentioned in the WIKI :
template.addResourceBundle(new ListResourceBundle() {
public Object[][] getContents() {
return new Object[][] { { "g_id:m", "male" },
{ "g_id:f", "female" }, };
}
});
It works great, but my app is I18N aware, so i use text properties.
I tried to manually add in my text_en.properties :
g_id:m=male
g_id:f=female
but that doesn't work. Is there a way to achieve this ?
Thanks.
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users
--Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users