private void decodeAndSetPropertyValue(String mapPropertyName, Object dataObject, ExecutionContext executionContext, Fragment source) { if(dataObject instanceof String) { setPropertyValue(mapPropertyName, decodeDataString((String) dataObject, executionContext), executionContext, source); } else { setPropertyValue(mapPropertyName, dataObject, executionContext, source); } }
private void decodeAndSetPropertyValue(String mapPropertyName, Object dataObject, ExecutionContext executionContext, Fragment source) { if(dataObject instanceof String) { setPropertyValue(mapPropertyName, decodeDataString((String) dataObject, executionContext), executionContext, source); } else { setPropertyValue(mapPropertyName, dataObject, executionContext, source); } }
private void decodeAndSetPropertyValue(String mapPropertyName, Object dataObject, ExecutionContext executionContext, Fragment source) { if(dataObject instanceof String) { setPropertyValue(mapPropertyName, decodeDataString((String) dataObject, executionContext), executionContext, source); } else { setPropertyValue(mapPropertyName, dataObject, executionContext, source); } }
public void populateAndSetPropertyValue(Object bean, BeanContext beanContext, BeanId targetBeanId, final ExecutionContext executionContext, Fragment source) { BeanRuntimeInfo wiredBeanRI = getWiredBeanRuntimeInfo(); // When this observer is triggered then we look if we got something we can set immediately or that we got an array collection. // For an array collection, we need the array representation and not the list representation, so we register and observer that // listens for the change from the list to the array... if(wiredBeanRI != null && wiredBeanRI.getClassification() == Classification.ARRAY_COLLECTION ) { if(logger.isDebugEnabled()) { logger.debug("Registering bean CHANGE wiring observer for wiring bean '" + targetBeanId + "' onto target bean '" + beanId.getName() + "' after it has been converted from a List to an array."); } // Register an observer which looks for the change that the mutable list of the selected bean gets converted to an array. We // can then set this array beanContext.addObserver(listToArrayChangeObserver); } else { setPropertyValue(property, bean, executionContext, source); } }
public void populateAndSetPropertyValue(Object bean, BeanContext beanContext, BeanId targetBeanId, final ExecutionContext executionContext, Fragment source) { BeanRuntimeInfo wiredBeanRI = getWiredBeanRuntimeInfo(); // When this observer is triggered then we look if we got something we can set immediately or that we got an array collection. // For an array collection, we need the array representation and not the list representation, so we register and observer that // listens for the change from the list to the array... if(wiredBeanRI != null && wiredBeanRI.getClassification() == Classification.ARRAY_COLLECTION ) { if(logger.isDebugEnabled()) { logger.debug("Registering bean CHANGE wiring observer for wiring bean '" + targetBeanId + "' onto target bean '" + beanId.getName() + "' after it has been converted from a List to an array."); } // Register an observer which looks for the change that the mutable list of the selected bean gets converted to an array. We // can then set this array beanContext.addObserver(listToArrayChangeObserver); } else { setPropertyValue(property, bean, executionContext, source); } }
public void populateAndSetPropertyValue(Object bean, BeanContext beanContext, BeanId targetBeanId, final ExecutionContext executionContext, Fragment source) { BeanRuntimeInfo wiredBeanRI = getWiredBeanRuntimeInfo(); // When this observer is triggered then we look if we got something we can set immediately or that we got an array collection. // For an array collection, we need the array representation and not the list representation, so we register and observer that // listens for the change from the list to the array... if(wiredBeanRI != null && wiredBeanRI.getClassification() == Classification.ARRAY_COLLECTION ) { if(logger.isDebugEnabled()) { logger.debug("Registering bean CHANGE wiring observer for wiring bean '" + targetBeanId + "' onto target bean '" + beanId.getName() + "' after it has been converted from a List to an array."); } // Register an observer which looks for the change that the mutable list of the selected bean gets converted to an array. We // can then set this array beanContext.addObserver(listToArrayChangeObserver); } else { setPropertyValue(property, bean, executionContext, source); } }
public void onBeanLifecycleEvent(BeanContextLifecycleEvent event) { if(event.getBeanId() == watchedBean && event.getLifecycle() == BeanLifecycle.CHANGE) { ExecutionContext executionContext = event.getExecutionContext(); // Set the array on the object, via the populator... populator.setPropertyValue(property, event.getBean(), executionContext, event.getSource()); // Remove this observer... executionContext.getBeanContext().removeObserver(this); } } }
public void onBeanLifecycleEvent(BeanContextLifecycleEvent event) { if(event.getBeanId() == watchedBean && event.getLifecycle() == BeanLifecycle.CHANGE) { ExecutionContext executionContext = event.getExecutionContext(); // Set the array on the object, via the populator... populator.setPropertyValue(property, event.getBean(), executionContext, event.getSource()); // Remove this observer... executionContext.getBeanContext().removeObserver(this); } } }
public void onBeanLifecycleEvent(BeanContextLifecycleEvent event) { if(event.getBeanId() == watchedBean && event.getLifecycle() == BeanLifecycle.CHANGE) { ExecutionContext executionContext = event.getExecutionContext(); // Set the array on the object, via the populator... populator.setPropertyValue(property, event.getBean(), executionContext, event.getSource()); // Remove this observer... executionContext.getBeanContext().removeObserver(this); } } }