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]

Reply via email to