private void translate(AbstractViewController controller, VLViewComponentXML configuration) { final Object datavalue = ReflectionUIUtils.invokeGetterOn(null, null); initEnumeratedTypeTranslater(configuration); if (datavalue != null) { if (enumeratedTypeTranslater != null) { // TO DO Asunch if long running final String realVal = enumeratedTypeTranslater.translate(controller, configuration, datavalue.toString()); label.setText(realVal); } else { label.setText(datavalue.toString()); } } }
/** * @{inheritedDoc} */ @Override public Node present(IEmaginController controller, VLViewComponentXML configuration, Object forModel) { final String attributePath = configuration.getPropertyValue("attributePath"); final Object datavalue = ReflectionUIUtils.invokeGetterOn(forModel, attributePath); initEnumeratedTypeTranslater(configuration); if (datavalue != null) { if (enumeratedTypeTranslater != null) { // TO DO Asunch if long running final String realVal = enumeratedTypeTranslater.translate(controller, configuration, datavalue.toString()); label.setText(realVal); } else { label.setText(datavalue.toString()); } } return label; }
/** * @{inheritedDoc} */ @Override public Node present(IEmaginController controller, VLViewComponentXML configuration) { if (StringUtils.isEmpty(attributePath)) { attributePath = configuration.getPropertyValue("attributePath"); } String dataValue = getModelAttribute(controller, attributePath); initEnumeratedTypeTranslater(configuration); if (dataValue != null) { if (enumeratedTypeTranslater != null) { // TO DO Asunch if long running String realVal = enumeratedTypeTranslater.translate(controller, configuration, dataValue.toString()); label.setText(realVal); } else { label.setText(dataValue.toString()); } } return label; }
/** * @{inheritedDoc} */ @Override public Node present(IEmaginController controller, VLViewComponentXML configuration, Object forModel) { if (StringUtils.isEmpty(attributePath)) { attributePath = configuration.getPropertyValue("attributePath"); } String dataValue = getModelAttribute((OperationData) forModel, attributePath); initEnumeratedTypeTranslater(configuration); if (dataValue != null) { if (enumeratedTypeTranslater != null) { // TO DO Asunch if long running String realVal = enumeratedTypeTranslater.translate(controller, configuration, dataValue.toString()); label.setText(realVal); } else { label.setText(dataValue.toString()); } } return label; }
/** * @{inheritedDoc} */ @Override public Node present(IEmaginController controller, VLViewComponentXML configuration) { final String attributePath = configuration.getPropertyValue("attributePath"); final IOperationResult model = (IOperationResult) controller.getModel(); if (model != null) { final OperationData data = (OperationData) model.rootData(); final Object datavalue = ReflectionUIUtils.invokeGetterOn(data, attributePath); initEnumeratedTypeTranslater(configuration); if (datavalue != null) { if (enumeratedTypeTranslater != null) { // TO DO Asunch if long running final String realVal = enumeratedTypeTranslater.translate(controller, configuration, datavalue.toString()); label.setText(realVal); } else { label.setText(datavalue.toString()); } } } return label; }