Hi Mathias Thankyou...
Regarding the ProtocolHandlerAddon method..
I want to know where should i define sayHello( ).
public String sayHello() { return "Hello world"}
This is XTestFunction1.idl in C:\ProtoToolbar\Code\com\sun\star\demo
#include <com/sun/star/uno/XInterface.idl>
module com { module sun { module star { module demo {
interface XTestFunction1 : com::sun::star::uno::XInterface {
String sayHello();
};
};};};};
This is TestFunction1.idl in C:\ProtoToolbar\Code\com\sun\star\demo
#include "XTestFunction1.idl"
module com { module sun { module star { module demo {
service TestFunction1
{
interface com::sun::star::demo::XTestFunction1;
};};};};};
C:\ProtoToolbar\Code\com\sun\star\demo also contains TestFunction1.urd,
XTestFunction1.urd and demo.rdb
Should i define sayHello( ) in TestFunction1.java or XTestFunction1.java? so
that sayHello( ) gets called onclick of the button
Should the value of the URL in the Addons.xcu be
<prop oor:name="URL" oor:type="xs:string">
<value>
com.sun.star.demo:sayHello</value>
</prop>
With regards,
Bharathy B
Mathias Bauer <[EMAIL PROTECTED]> wrote:
bharathy b wrote:
> Hi i wanted to know if the following is possible using the
> XJobExecutor.
>
> Is it possible to have more than one trigger method for an
> XJobExecutor?
>
> At present i have added a toolbar button to the writer document using
> an Addon. (Using an UNO Component in Java). Onclick of the button
> creates an htm file in C drive.
>
> But now i need to add more buttons to the writer document using a
> Addon. Suppose i want to add 3 buttons using a single addon. how can
> i specify the trigger method for the remaining 2 buttons.
>
> Are there any better ways of doing this? I tried using
> ProtocolHandlerAddon but i am still not able to understand dispatcher
> implementation and how to get the Add-on register itself for the
> protocol part of the command URL.
>
> Please reply and suggest me how to accomplish this..
The ProtocolHandler is the right way to do it. The JobExecutor is not a
tool for command dispatching, it's a means to react on events and e.g.
register a service.
The idea of a ProtocolHandler is quite simple: register your component
to be the handler for all commands starting with a particular string
that has the shape of a URL protcocol (like "http:"). So if any command
with your "protocol" in front is found in any UI element your component
will be asked for the execution once it is requested by the user.
Tha AddOn.xcu file is the way how you can put commands in your
toolbar(s) or menu.
Please find more about this topic in the DevGuide.
Best regards,
Mathias
--
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.