Ejemplo n.º 1
0
 /**
  * Factory method to create a new {@link IModel} for the MailtoViewModel. This method is invoked
  * in the constructor from this class and can be overridden so users can provide their own version
  * of a new {@link IModel} for the MailtoViewModel.
  *
  * @param params the params
  * @return the new {@link IModel} for the MailtoViewModel.
  */
 protected IModel<String> newMailToViewModel(final Object[] params) {
   return ResourceModelFactory.newResourceModel(
       ResourceBundleKey.builder().key("global.compamy.mailto.view").parameters(params).build(),
       this);
 }
 /**
  * Factory method that can be overwritten for new meta tag content for keywords.
  *
  * @return the new <code>IModel</code>
  */
 protected IModel<String> newKeywords() {
   return ResourceModelFactory.newResourceModel(
       ResourceBundleKey.builder().key("page.meta.keywords").defaultValue("").build(), this);
 }
 /**
  * Factory method that can be overwritten for new meta tag content for the title.
  *
  * @return the new <code>IModel</code>
  */
 protected IModel<String> newTitle() {
   return ResourceModelFactory.newResourceModel(
       ResourceBundleKey.builder().key("page.title").defaultValue("Home page").build(), this);
 }
Ejemplo n.º 4
0
 /**
  * Instantiates a new localized label.
  *
  * @param id the id
  * @param resourceBundleKey the resourceBundleKey
  */
 public LocalizedLabel(final String id, final ResourceBundleKey resourceBundleKey) {
   super(id);
   setDefaultModel(ResourceModelFactory.newResourceModel(resourceBundleKey, this));
 }