/** * Gets the accessorFactory. * * @param context * the action context. * @return the accessorFactory. */ protected IAccessorFactory getAccessorFactory(Map<String, Object> context) { return getController(context).getAccessorFactory(); }
/** * Gets the accessorFactory. * * @param context * the action context. * @return the accessorFactory. */ protected IAccessorFactory getAccessorFactory(Map<String, Object> context) { return getController(context).getAccessorFactory(); }
IAccessorFactory accessorFactory = getBackendController(context).getAccessorFactory(); List<Object> references = new ArrayList<>(); for (Object component : componentsToAdd) {
List<Object> sortedList = new ArrayList<>(existingResultList); Comparator<Object> beanComparator = new BeanComparator(queryComponent.getOrderingProperties(), getBackendController(context).getAccessorFactory(), queryComponent.getQueryContract()); Collections.sort(sortedList, beanComparator); queryComponent.setQueriedComponents(sortedList);
/** * {@inheritDoc} * * @param actionHandler * the action handler * @param context * the context * @return the boolean */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { Object selectedModel = getSelectedModel(context); Object username; try { username = getBackendController(context).getAccessorFactory().createPropertyAccessor(getUsernameProperty(), selectedModel.getClass()).getValue(selectedModel); } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException ex) { throw new ActionException(ex, "Could not extract username from model"); } context.put(AbstractResetPasswordAction.USERNAME_KEY, username); if (super.execute(actionHandler, context)) { getFrontendController(context).popupInfo(getSourceComponent(context), actionHandler.getTranslation("password.reset.title", getLocale(context)), getIconFactory(context).getInfoIconImageURL(), HtmlHelper.toHtml( actionHandler.getTranslation("password.reset.message", getLocale(context)) + HtmlHelper .emphasis((String) context.get(AbstractResetPasswordAction.GENERATED_PASSWORD_KEY)))); return true; } return false; }
try { String firstItemPropertyValue = getBackendController(context).getAccessorFactory().createPropertyAccessor( autoCompletePropertyName, firstItem.getClass()).getValue(firstItem); String secondItemPropertyValue = getBackendController(context).getAccessorFactory() .createPropertyAccessor( autoCompletePropertyName,