Component editRuleLink(String id, IModel itemModel, Property<DataAccessRule> property) { return new SimpleAjaxLink(id, itemModel, property.getModel(itemModel)) { @Override protected void onClick(AjaxRequestTarget target) { setResponsePage(new EditDataAccessRulePage((DataAccessRule) getDefaultModelObject())); } }; }
/** * Returns a model for this property title. Default behaviour is to lookup for a resource name * <page>.th.<propertyName> * * @param property * @return */ IModel getPropertyTitle(Property<T> property) { String pageName = this.getPage().getClass().getSimpleName(); ResourceModel resMod = new ResourceModel("th." + property.getName(), property.getName()); return resMod; }
@Override protected IModel getPropertyTitle(Property<Integer> property) { return new Model(property.getName()); }