Plugin Developer DiscussionDiscussion for FogBugz Plugin developers |
|
Hi Trackstarr-
Of course there's no way for the API to limit what you can do in Javascript - you can have a look at the generated html and use raw Javascript to do any validation you like. See examples/CustomFields/Plugin.was for some JS used with CDialog. But the dialog Error methods are for setting errors via server roundtrip. Thanks! Brett
Ok, fair enough. Lets say I do round trip error checking. Are there any examples of that using the dialogs? I can only assume there is some way to extract the current dialog being displayed to validate it? And either close and continue or cancel closing it to display the errors?
Hi Tracstarr-
The Plugins/examples/Workflow plugin is a good example. It's in Wasabi, which is really not very different from C#, if that's what you are used to. You just want to do SetError on the item where you want to display the error. This plugin defines a convenience function AddErrorToItem so that it can throw all of its errors into a dictionary and then show errors on an item if the error was found. Have a look and see if it makes sense to you. Thanks! Brett |
Powered by FogBugz