Hello,
I would like to check if the content of a text field of a repeatable property
is unique (in the context of the project) when the user enters a text.
Let's say I have a Plugin with a structure like that:
class Parent extends Builder {
List<Child> objectsWithUniqueName;
}
class Child implements Describable<Child> {
String name; // has to be unique in project
public static final class DescriptorImpl extends
Descriptor<JenkinsConfiguration> {
FormValidation doCheckName(@QueryParameter String value, @AncestorInPath
AbstractProject project) {
// TODO: check uniqueness of name
}
}
}
<f:entry>
<f:repeatableProperty field="objectsWithUniqueName" header="Unique Child"
noAddButton="false" />
</f:entry>
I am able to get the List of Child-Objects of the Project that were saved the
last time via the AbstractProject (cast to Project and use
getBuilkders()-Method). Since the user is currently configuring the project he
could have made cahnged (changed the name value of different Children or
added/removed Children) there could be name clashes that are not yet saved or
already solved.
Is it possible to get the currently not yet stored values for the siblings of
form?
Best Regards,
Joachim
---------------------------------------------------
Joachim Kuhnert
fon: +49 30 394 09 683 39
mail: [email protected]
PikeTec GmbH, Waldenserstr. 2-4, 10551 Berlin
Management: Eckard Bringmann, Andreas Krämer, Jens Lüdemann
Location of the company: Berlin (Germany)
Trade register: Amtsgericht Berlin HRB 105491 B
Website: www.piketec.com
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/4e635b05567d409485c8eb4e61e695f7%40piketec.com.
For more options, visit https://groups.google.com/d/optout.