OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Parameters with LoadComponentURL

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
willow35
Newbie
Newbie


Joined: 10 May 2003
Posts: 3

PostPosted: Sat May 10, 2003 1:33 am    Post subject: Parameters with LoadComponentURL Reply with quote

I must be stupid but I can't figure how to use LoadComponentURL to pass parameters to
a document, especially how this new document can get the values

maybe someone can help me
Back to top
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Sat May 10, 2003 12:31 pm    Post subject: Reply with quote

The parameters are property values so first define an array to contain them

dim args1(1) as new com.sun.star.beans.PropertyValue ' 2 properties

Then set the Name - Value pairs up in the array

args1(0).Name = "PropertyName1" 'what ever the property is
args1(0).Value = "XXXXX" ' parameter value
args1(1).Name = "PropertyName1" 'what ever the property is
args1(1).Value = "XXXXX" ' parameter value

Then use this array in the load
loadComponentFromURL(loadUrl, "_blank", 0, args1())
Back to top
View user's profile Send private message
willow35
Newbie
Newbie


Joined: 10 May 2003
Posts: 3

PostPosted: Sun May 11, 2003 11:12 pm    Post subject: Reply with quote

Thanks for answer, it confirms what I was thinking, but I don't see how to get this parameters in the target doc.
Back to top
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Mon May 12, 2003 1:03 pm    Post subject: Reply with quote

I think we may be talking avout different things here. The 'parameters' set in the load... are properties of the component or document and are described in the api documentation. If you are referring to values of 'fields' within the document itself like title, author etc these are different ... they can be set through the api through macros, scripting, java ...
Could you describe what you are trying to do in more detail?
Back to top
View user's profile Send private message
willow35
Newbie
Newbie


Joined: 10 May 2003
Posts: 3

PostPosted: Mon May 12, 2003 1:42 pm    Post subject: Reply with quote

I've one form which call a subform, but I would like that the subform get a parameter from the his parent and pass it to a query.
I ve done it a long time ago in access but I dont know how to do same in Openoffice.org.

I can't manage to get the parameter in the subform, and I don't know how to pass it to the query.

In fact I want to make a subform with a (some) parameter
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group