public void setContent ( final WComponent content ) { WindowModel model = getOrCreateComponentModel ( ) ; // If the previous content had been wrapped, then remove it from the wrapping WApplication. if ( model . wrappedContent != null && model . wrappedContent != model . content ) { model . wrappedContent . removeAll ( ) ; } model . content = content ; // Wrap content in a WApplication if ( content instanceof WApplication ) { model . wrappedContent = ( WApplication ) content ; } else { model . wrappedContent = new WApplication ( ) ; model . wrappedContent . add ( content ) ; } // There should only be one content. holder . removeAll ( ) ; holder . add ( model . wrappedContent ) ; }
Set the WComponent that will handle the content for this pop up window .