protected void addInnerHtmls ( final boolean updateClient , final AbstractHtml ... innerHtmls ) { boolean listenerInvoked = false ; final Lock lock = sharedObject . getLock ( ACCESS_OBJECT ) . writeLock ( ) ; try { lock . lock ( ) ; final AbstractHtml [ ] removedAbstractHtmls = children . toArray ( new AbstractHtml [ children . size ( ) ] ) ; children . clear ( ) ; initNewSharedObjectInAllNestedTagsAndSetSuperParentNull ( removedAbstractHtmls ) ; final InnerHtmlAddListener listener = sharedObject . getInnerHtmlAddListener ( ACCESS_OBJECT ) ; if ( listener != null && updateClient ) { final InnerHtmlAddListener . Event [ ] events = new InnerHtmlAddListener . Event [ innerHtmls . length ] ; int index = 0 ; for ( final AbstractHtml innerHtml : innerHtmls ) { AbstractHtml previousParentTag = null ; if ( innerHtml . parent != null && innerHtml . parent . sharedObject == sharedObject ) { previousParentTag = innerHtml . parent ; } addChild ( innerHtml , false ) ; events [ index ] = new InnerHtmlAddListener . Event ( this , innerHtml , previousParentTag ) ; index ++ ; } listener . innerHtmlsAdded ( this , events ) ; listenerInvoked = true ; } else { for ( final AbstractHtml innerHtml : innerHtmls ) { addChild ( innerHtml , false ) ; } } } finally { lock . unlock ( ) ; } if ( listenerInvoked ) { final PushQueue pushQueue = sharedObject . getPushQueue ( ACCESS_OBJECT ) ; if ( pushQueue != null ) { pushQueue . push ( ) ; } } }
Removes all children and adds the given tags as children .