All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.nemerosa.ontrack.model.form.Selection Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.model.form;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

@EqualsAndHashCode(callSuper = false)
@Data
public class Selection extends AbstractField {

    public static Selection of(String name) {
        return new Selection(name);
    }

    private List items = new ArrayList<>();
    private String itemId = "id";
    private String itemName = "name";

    protected Selection(String name) {
        super("selection", name);
    }

    public Selection items(List values) {
        this.items = values;
        return this;
    }

    public Selection itemId(String value) {
        this.itemId = value;
        return this;
    }

    public Selection itemName(String value) {
        this.itemName = value;
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy