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.

If you implement an XJobExecutor you use an URL like "service:<servicename>". You can use "service:<servicename>?argument". In such case your implementation will be called within "trigger('argument')".

Some examples:

Button 1 URL = "service:YourService?button1" => trigger('button1')
Button 2 URL = "service:YourService?button2?somethingspecial" => trigger('button2?somethingspecial')

You will get the whole string from the first "?" till the end as one string argument. Parsing these string value is up to your code.

  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.

Implementing a ProtocolHandler is the better way ...
Because you can specify your own URL schema as e.g. "vnd.your_url:/param1?arg1=value1".

Further a ProtocolHandler will be initialized with the right environment. It will get the current frame/controller/model so it can
start working directly, without the need fort searching those resources.


Please reply and suggest me how to accomplish this..


With Regards,
  Bharathy B

                
---------------------------------
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail Beta.

Regards
Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to