Search in sources :

Example 16 with UiSchema

use of org.talend.sdk.component.form.model.uischema.UiSchema in project component-runtime by Talend.

the class TextAreaWidgetConverter method convert.

@Override
public CompletionStage<PropertyContext> convert(final CompletionStage<PropertyContext> cs) {
    return cs.thenApply(context -> {
        final UiSchema schema = newUiSchema(context);
        schema.setWidget("textarea");
        return context;
    });
}
Also used : UiSchema(org.talend.sdk.component.form.model.uischema.UiSchema)

Example 17 with UiSchema

use of org.talend.sdk.component.form.model.uischema.UiSchema in project component-runtime by Talend.

the class TextWidgetConverter method convert.

@Override
public CompletionStage<PropertyContext> convert(final CompletionStage<PropertyContext> cs) {
    return cs.thenApply(context -> {
        final UiSchema schema = newUiSchema(context);
        schema.setWidget("text");
        return context;
    });
}
Also used : UiSchema(org.talend.sdk.component.form.model.uischema.UiSchema)

Example 18 with UiSchema

use of org.talend.sdk.component.form.model.uischema.UiSchema in project component-runtime by Talend.

the class ToggleWidgetConverter method convert.

@Override
public CompletionStage<PropertyContext> convert(final CompletionStage<PropertyContext> cs) {
    return cs.thenApply(context -> {
        final UiSchema schema = newUiSchema(context);
        schema.setWidget("toggle");
        return context;
    });
}
Also used : UiSchema(org.talend.sdk.component.form.model.uischema.UiSchema)

Aggregations

UiSchema (org.talend.sdk.component.form.model.uischema.UiSchema)18 Collection (java.util.Collection)9 ArrayList (java.util.ArrayList)7 CompletableFuture (java.util.concurrent.CompletableFuture)7 CompletionStage (java.util.concurrent.CompletionStage)7 Collectors.toList (java.util.stream.Collectors.toList)7 SimplePropertyDefinition (org.talend.sdk.component.server.front.model.SimplePropertyDefinition)7 Stream (java.util.stream.Stream)6 PropertyContext (org.talend.sdk.component.form.internal.converter.PropertyContext)6 ActionReference (org.talend.sdk.component.server.front.model.ActionReference)6 Map (java.util.Map)5 Optional.ofNullable (java.util.Optional.ofNullable)5 Test (org.junit.jupiter.api.Test)5 Ui (org.talend.sdk.component.form.model.Ui)5 Collections.singletonList (java.util.Collections.singletonList)4 List (java.util.List)4 Collectors.toSet (java.util.stream.Collectors.toSet)4 Client (org.talend.sdk.component.form.api.Client)4 Iterator (java.util.Iterator)3 UiSchemaConverter (org.talend.sdk.component.form.internal.converter.impl.UiSchemaConverter)3