Hallo Frank , pronto Paolo
Interesting discussion, I learned from my first real live frontend
application to minimize the number of FORM and SUBFORMS and then using
DIALOGS to pass data from or to the Tables.
BTW: oController.loadComponent( "my form",
com.sun.star.sdb.application.DatabaseObject.FORM,FALSE )
do not works , must be:
oController.loadComponent(com.sun.star.sdb.application.DatabaseObject.FORM,
"my form",FALSE )
greetz
Fernand
Hi Paolo,
Regarding the ThisDatabaseDocument thing, I'm experimenting.
The open() method is very simple and straightforward and I'm sure that
users will be very happy of it, but I noticed a possible problem.
Not sure which open method you refer to, ThisDatabaseDocument doesn't
have one.
The open method seems not able to create the first connection. This
means that you can use the open method only for the second form, but you
still have to launch manually a first form.
This makes impossible to use the open() method in order to launch a form
from the OnOpen method for example.
If you want to open a form (in the sense of: display UI) when the
document loads, you should use methods at the *controller* of the
document, not at the document. For this, XDatabaseDocumentUI [1] should
be used. It provides functionality which effectively mimics user input.
So, something like
oController = ThisDatabaseDocument.CurrentController
If ( Not oController.isConnected() ) Then
oController.connect()
End If
oController.loadComponent( "my form", _
com.sun.star.sdb.application.DatabaseObject.FORM,
FALSE ' not for editing, but for data entry
)
should do what you want.
Ciao
Frank
[1]http://api.openoffice.org/docs/common/ref/com/sun/star/sdb/application/XDatabaseDocumentUI.html
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org