/* ------------------------------------------------------------------ */
/** retrieves the document model which a given form component belongs to
*/
static public DocumentHelper getDocumentForComponent( Object aFormComponent, XMultiServiceFactory orb )
{
XChild xChild = (XChild)UnoRuntime.queryInterface( XChild.class, aFormComponent );
XModel xModel = null;
while ( ( null != xChild ) && ( null == xModel ) )
{
XInterface xParent = (XInterface)xChild.getParent();
xModel = (XModel)UnoRuntime.queryInterface( XModel.class, xParent );
xChild = (XChild)UnoRuntime.queryInterface( XChild.class, xParent );
}
return new DocumentHelper( orb, xModel );