protected void doOnEvent(final Actor actor) {
        // Checking optional condition:
        if (hasAttribute(IF_ATTRIBUTE)) {
            final boolean condition = new Equation(getParser(), actor).getBooleanResult(getAttribute(IF_ATTRIBUTE));
            if (!condition) {
                return;
            }
        }
        if (cachedActors != null) { // Actors already parsed - returning cached values:
            addActors(actor, cachedActors);
        } else { // Template not parsed or actors are not being cached - parsing template:
            addActors(actor, parseSnippet());
        }
    }
protected void doOnEvent ( final Actor actor ) { if ( hasAttribute ( IF_ATTRIBUTE ) ) { final boolean condition = new Equation ( getParser ( ) , actor ) . getBooleanResult ( getAttribute ( IF_ATTRIBUTE ) ) ; if ( ! condition ) { return ; } } if ( cachedActors != null ) { addActors ( actor , cachedActors ) ; } else { addActors ( actor , parseSnippet ( ) ) ; } }
@param actor has the listener attached.