Forum Discussion
7 Replies
- rohithmadhavanEmployee
You’ll need to implement
SuggestExecutionProvider
and override theexecuteForSuggest
method for “executing” during validation.Since you don’t need the “Execute during preview” property, the easiest approach will be to call the
execute
method withinexecuteForSuggest
as follows:@Override public void executeForSuggest() { execute(); }
- robinFormer Employee
@del adding
@Category(snap = SnapCategory.WRITE)
to the class definition will automatically expose the “Execute during preview” checkbox. As @rohithmadhavan stated, behavior can be customized withSuggestExecutionProvider
.See Snap Development Documentation and Snap Development Documentation
- delContributor III
Thank you very much for your lighting-speed responses @rohithmadhavan and @robin.
I started on @rohithmadhavan’s suggestion first and the path was very educational for me as I started to implement it. However, my question was vague in detail, and a little misdirecting, so @robin’s response was the simpler solution I was looking for. I’ve developed 4 simple snaps, but none were write snaps, so that answer was not yet obvious to me.
It’s now working like a charm, so thank you both very much!
– Del
- JiWonNew Contributor II
Can you please share how did you create that checkbox UI feature for a custom snap by sharing the codes?
Thank you- ptaylorEmployee
Hi JiWon,
I’m not sure exactly what you’re asking. If you want to know how to define a checkbox property in a custom snap, you’d have code something like this in your defineProperties method:
propertyBuilder.describe("name", "label", "description") .type(SnapType.BOOLEAN) .defaultValue(true) .add();
- JiWonNew Contributor II
Thanks ptaylor 🙂