@Documented @Target(value={TYPE,PARAMETER,FIELD}) @Retention(value=RUNTIME) public @interface Bundle
An annotation that provides a mechanism for the developer to specify the name of an i18n bundle to use when doing i18n replacements within an Errai UI Template. Note that multiple bundles can be used, but all bundles are ultimately aggregated together prior to translating any of the Errai UI Templates. In other words, developers are free to break up their bundles in whatever way makes sense, but at the end of the day all bundles will be merged and indexed by locale.
package org.example; @Dependent @Templated @Bundle("loginBundle.json") public class CustomComponent extends Composite { @Inject @DataField("username.label") private InlineLabel usernameLabel; @Inject private TextBox username; @Inject @DataField("password.label") private InlineLabel passwordLabel; @Inject private TextBox password; @Inject @DataField("login") private Button login; @Inject @DataField("cancel") private Button cancel; @EventHandler("login") private void doLogin(ClickEvent event) { // log in } }
public abstract String value
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.