protected String applyNamingChain(String name)
            throws JspException
    {
        assert (name != null) : "The name parameter may not be null";

        List namingChain = getNamingChain();
        if (namingChain == null)
            return rewriteName(name);

        //if (logger.isDebugEnabled())
        //    logger.debug("rewrite name \"" + name + "\" on tag of type \"" + getClass().getName() + " with namingChain " +
        //            (namingChain != null ? "size " + namingChain.size() : "null"));

        try {
            String newName = name;
            int cnt = namingChain.size();
            for (int i = 0; i < cnt; i++) {
                //if (logger.isDebugEnabled())
                //    logger.debug("rewriteName: \"" + newName + "\" with INameInterceptor: " + namingChain.get(i).getClass().getName());

                newName = ((INameInterceptor) namingChain.get(i)).rewriteName(newName, this);

                //if (logger.isDebugEnabled())
                //    logger.debug("rewrite result: " + newName);
            }

            return rewriteName(newName);
        }
        catch (ExpressionEvaluationException ee) {
            // if there is an expression evaluation error set the error and return null;
            logger.error(Bundle.getString("Tags_ExpressionQualifyingFailure", name));

            // create the expression info an add it to the error tracking
            EvalErrorInfo info = new EvalErrorInfo();
            info.evalExcp = ee;
            info.expression = name;
            info.attr = "dataSource";
            info.tagType = getTagName();

            // report the error
            registerTagError(info);
            return null;
        }
    }
protected String applyNamingChain ( String name ) throws JspException { assert ( name != null ) : "The name parameter may not be null" ; List namingChain = getNamingChain ( ) ; if ( namingChain == null ) return rewriteName ( name ) ; try { String newName = name ; int cnt = namingChain . size ( ) ; for ( int i = 0 ; i < cnt ; i ++ ) { newName = ( ( INameInterceptor ) namingChain . get ( i ) ) . rewriteName ( newName , this ) ; } return rewriteName ( newName ) ; } catch ( ExpressionEvaluationException ee ) { logger . error ( Bundle . getString ( "Tags_ExpressionQualifyingFailure" , name ) ) ; EvalErrorInfo info = new EvalErrorInfo ( ) ; info . evalExcp = ee ; info . expression = name ; info . attr = "dataSource" ; info . tagType = getTagName ( ) ; registerTagError ( info ) ; return null ; } }
This method walks all of the naming chains and allows them to rewrite the <code>name</code> parameter.
After the naming chain processes the name, it will be passed to <code>rewriteName</code> for final processing.
If the naming chaing returned from <code>getNamingChain</code> returns null, the name will be passed to
<code>rewriteName</code> and returned.  If there is an <code>ExpressionEvaluationException</code> thrown
by a <code>INameInterceptor</code>, the error will be registered with the tag and <code>null</code> will
be returned.
@param name the name to rewrite
@return the name after it was passed to all <code>INameInterceptor</code>s in the naming chain.
@see #rewriteName
@see org.apache.beehive.netui.tags.naming.INameInterceptor