| View previous topic :: View next topic |
| Author |
Message |
willow35 Newbie

Joined: 10 May 2003 Posts: 3
|
Posted: Sat May 10, 2003 1:33 am Post subject: Parameters with LoadComponentURL |
|
|
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 |
|
 |
dfrench Moderator

Joined: 03 Mar 2003 Posts: 1605 Location: Wellington, New Zealand
|
Posted: Sat May 10, 2003 12:31 pm Post subject: |
|
|
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 |
|
 |
willow35 Newbie

Joined: 10 May 2003 Posts: 3
|
Posted: Sun May 11, 2003 11:12 pm Post subject: |
|
|
| 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 |
|
 |
dfrench Moderator

Joined: 03 Mar 2003 Posts: 1605 Location: Wellington, New Zealand
|
Posted: Mon May 12, 2003 1:03 pm Post subject: |
|
|
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 |
|
 |
willow35 Newbie

Joined: 10 May 2003 Posts: 3
|
Posted: Mon May 12, 2003 1:42 pm Post subject: |
|
|
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 |
|
 |
|