Errai 3.0.1-SNAPSHOT

org.jboss.errai.ui.shared.api.annotations
Annotation Type Bundle


@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
    }
 }
 

Author:
eric.wittmann@redhat.com

Required Element Summary
 String value
          Indicates the name of the Errai i18n bundle to use for i18n replacements for this class.
 

Element Detail

value

public abstract String value
Indicates the name of the Errai i18n bundle to use for i18n replacements for this class.


Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.