try
{
newModel = (XModel) UnoRuntime.queryInterface( XModel.class,
getOrb().createInstance( "com.sun.star.xforms.Model" ) );
newModel.setID(_modelName);
XFormsUIHelper1 modelHelper = (XFormsUIHelper1) UnoRuntime.queryInterface(
XFormsUIHelper1.class, newModel );
modelHelper.newInstance( "Instance 1", new String(), true );
newModel.initialize();
m_forms.insertByName(_modelName, newModel);
}
catch (Exception ex)