Clone wiki

AspectFaces / 7.4.@UiUse-and-@UiType

@UiUse enforces the use of a specific template. This basically means that field annotated with @UiUse bypasses the mapping rules and uses a specific template.

public class Address {
 public Country getCountry() {
    return country;

@​UiType is allowing you to use the mapping and also preserves the field type and help to specify the mapping.

public class Address {
 public String getInformation() {
    return information;

And in the mapping

Mapping profile

    <default tag="inputTextTag.xhtml" maxLength="255" size="30" required="false" />
    <var name="username" tag="inputUsernameTag.xhtml" />
    <var name="" tag="inputUsernameTag.xhtml" />
    <condition expression='${not empty type and type == "readOnly"}' tag="outputTextTag.xhtml" />