Search in sources :

Example 6 with TemplateParam

use of org.guvnor.ala.ui.openshift.model.TemplateParam in project kie-wb-common by kiegroup.

the class OpenShiftClientServiceImplTest method buildExpectedParams.

private List<TemplateParam> buildExpectedParams(int count) {
    List<TemplateParam> params = new ArrayList<>();
    for (int i = 0; i < count; i++) {
        String name = String.format("PARAM%d", i);
        String displayName = String.format("PARAM%d display name", i);
        String description = String.format("PARAM%d description", i);
        boolean required = i % 2 == 0;
        String value = String.format("PARAM%d value", i);
        params.add(new TemplateParam(name, displayName, description, required, value));
    }
    return params;
}
Also used : ArrayList(java.util.ArrayList) TemplateParam(org.guvnor.ala.ui.openshift.model.TemplateParam)

Example 7 with TemplateParam

use of org.guvnor.ala.ui.openshift.model.TemplateParam in project kie-wb-common by kiegroup.

the class TemplateParamsTableView method addParamNameColumn.

private void addParamNameColumn() {
    Column<TemplateParam, String> column = new Column<TemplateParam, String>(new TextCell()) {

        @Override
        public String getValue(TemplateParam templateParam) {
            return templateParam.isRequired() ? templateParam.getName() : templateParam.getName();
        }
    };
    dataGrid.addColumn(column, translationService.getTranslation(TemplateParamsTableView_ParamNameColumn));
    dataGrid.setColumnWidth(column, 40, Style.Unit.PCT);
}
Also used : TemplateParamsTableView_ParamNameColumn(org.guvnor.ala.ui.openshift.client.resources.i18n.GuvnorAlaOpenShiftUIConstants.TemplateParamsTableView_ParamNameColumn) TemplateParamsTableView_ParamValueColumn(org.guvnor.ala.ui.openshift.client.resources.i18n.GuvnorAlaOpenShiftUIConstants.TemplateParamsTableView_ParamValueColumn) TemplateParamsTableView_ParamRequiredColumn(org.guvnor.ala.ui.openshift.client.resources.i18n.GuvnorAlaOpenShiftUIConstants.TemplateParamsTableView_ParamRequiredColumn) Column(com.google.gwt.user.cellview.client.Column) TemplateParam(org.guvnor.ala.ui.openshift.model.TemplateParam) TextCell(com.google.gwt.cell.client.TextCell) EditTextCell(com.google.gwt.cell.client.EditTextCell)

Aggregations

TemplateParam (org.guvnor.ala.ui.openshift.model.TemplateParam)7 EditTextCell (com.google.gwt.cell.client.EditTextCell)3 Column (com.google.gwt.user.cellview.client.Column)3 TemplateParamsTableView_ParamNameColumn (org.guvnor.ala.ui.openshift.client.resources.i18n.GuvnorAlaOpenShiftUIConstants.TemplateParamsTableView_ParamNameColumn)3 TemplateParamsTableView_ParamRequiredColumn (org.guvnor.ala.ui.openshift.client.resources.i18n.GuvnorAlaOpenShiftUIConstants.TemplateParamsTableView_ParamRequiredColumn)3 TemplateParamsTableView_ParamValueColumn (org.guvnor.ala.ui.openshift.client.resources.i18n.GuvnorAlaOpenShiftUIConstants.TemplateParamsTableView_ParamValueColumn)3 TextCell (com.google.gwt.cell.client.TextCell)2 TemplateDescriptorModel (org.guvnor.ala.ui.openshift.model.TemplateDescriptorModel)2 ArrayList (java.util.ArrayList)1 OpenShiftTemplate (org.guvnor.ala.openshift.access.OpenShiftTemplate)1 Test (org.junit.Test)1