jimminybob
jimminybob

Reputation: 1442

displaying prompt box from plugin

I have a plugin that i would like to show a pop up where a user can enter some text, which when completed the plugin can use. Is such a thing possible or are prompts only available using javascript?

Thanks

Upvotes: 1

Views: 1291

Answers (2)

Konrad Viltersten
Konrad Viltersten

Reputation: 39058

Can't be done the way you think. That's because the plugin is run directly on the server. However, you've got two options.

  1. If it's for debug, you can use a tracer and write to it. The downside is that you need to crash the plugin to deliver the message to the GUI. Hardly recommendable for a common user.
  2. If you absolutely must (and I know you don't must that much), you could invoke a web service from the plugin. If the web service gets to communicate with the desktop somehow, you'll be able to start desktop-ish application and show the message box from there.

What would you like to achieve by the message box, by the way? Plugins are meant to handle the internal logic on the server so there might be a better approach to what you had in mind.

Upvotes: 0

James Wood
James Wood

Reputation: 17552

This isn't possible. You can pass a message from a plugin to a user by throwing an exception, the user will get the exception message but they wont be able to reply.

I would suggest a dialog using custom workflow activities.

Upvotes: 2

Related Questions