@Override public void afterRender(Component aComponent) { for (IBehavior behavior : behaviors) { behavior.afterRender(aComponent); } }
/** * {@link IBehavior#afterRender(Component)} Notify all behaviors that are assigned to this * component that the component has rendered. */ private void notifyBehaviorsComponentRendered() { // notify the behaviors that component has been rendered List behaviors = getBehaviorsImpl(); if (behaviors != null) { for (Iterator i = behaviors.iterator(); i.hasNext();) { IBehavior behavior = (IBehavior)i.next(); if (isBehaviorAccepted(behavior)) { behavior.afterRender(this); } } } }
/** * {@link IBehavior#afterRender(Component)} Notify all behaviors that are assigned to this * component that the component has rendered. */ private void notifyBehaviorsComponentRendered() { // notify the behaviors that component has been rendered for (IBehavior behavior : getBehaviors()) { if (isBehaviorAccepted(behavior)) { behavior.afterRender(this); } } }
public void visitItem(TreeItem item) { // rewind markupStream markupStream.setCurrentIndex(index); // render child item.onRender(markupStream); // go through the behaviors and invoke IBehavior.afterRender List<IBehavior> behaviors = item.getBehaviors(); for (IBehavior behavior : behaviors) { behavior.afterRender(item); } } });