private String deriveId ( final String idName ) { // Find parent naming context NamingContextable parent = WebUtilities . getParentNamingContext ( this ) ; // No Parent if ( parent == null ) { return idName ; } // Get ID prefix String prefix = parent . getNamingContextId ( ) ; // No Prefix, just use id name if ( prefix . length ( ) == 0 ) { return idName ; } // Add Prefix StringBuffer nameBuf = new StringBuffer ( prefix . length ( ) + idName . length ( ) + 1 ) ; nameBuf . append ( prefix ) ; nameBuf . append ( ID_CONTEXT_SEPERATOR ) ; nameBuf . append ( idName ) ; return nameBuf . toString ( ) ; }
Derive the full id from its naming context .