@AncestorInPath, but this only works for items and not for views.public FormValidation doCheckView(@AncestorInPath View view, @QueryParameter String value) {
//Do something with view.
...
}
AFAIK non-default `View`s should be in the ancestor list.
Tip: from `mvn hpi:run` dev mode, look at HTTP headers to see Stapler traces.
public FormValidation doCheckView(@QueryParameter String value) {
String viewpath = Stapler.getViewURL(View.class, "Testview");
String viewname = viewpath.substring(viewpath.lastIndexOf("/")+1);
View view = Jenkins.getActiveInstance().getView(viewname);
...
}
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/8e62679f-a289-45fc-8c2f-675d028722cb%40googlegroups.com.