Skip to content

Instantly share code, notes, and snippets.

@aasikka
Created July 2, 2018 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aasikka/9bd1b87e90b0d0810f55f7da893673d3 to your computer and use it in GitHub Desktop.
Save aasikka/9bd1b87e90b0d0810f55f7da893673d3 to your computer and use it in GitHub Desktop.
@Model(adaptables = Resource.class)
public class ContactUsModel {
private String mailAddress;
private String phoneNumber;
@Inject
protected String title;
@Inject
protected String officeCode;
@PostConstruct
protected void init() {
// Business logic to transform injected values and assign to bean variables
// Example: Resolve mailAddress/phoneNumber applicable for the user's region, based on officeCode
}
public String getMailAddress(){
return mailAddress;
}
public String getPhoneNumber(){
return phoneNumber;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment