use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationWidgetViewImpl method initBody.
private void initBody() {
PopoverTextCell typeCell = new PopoverTextCell();
Column<NotificationRow, String> bodyColumn = new Column<NotificationRow, String>(typeCell) {
@Override
public String getValue(NotificationRow object) {
if (object.getBody() != null) {
return object.getBody();
}
return "";
}
};
bodyColumn.setSortable(false);
table.addColumn(bodyColumn, presenter.getBodyLabel());
table.setColumnWidth(bodyColumn, 160, Style.Unit.PX);
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationWidgetViewImpl method initExpiresAt.
private void initExpiresAt() {
PopoverTextCell expiresAt = new PopoverTextCell();
Column<NotificationRow, String> expiresAtColumn = new Column<NotificationRow, String>(expiresAt) {
@Override
public String getValue(NotificationRow object) {
if (object.getExpiresAt() != null) {
return object.getExpiresAt();
}
return "";
}
};
expiresAtColumn.setSortable(false);
table.addColumn(expiresAtColumn, presenter.getExpiresAtLabel());
table.setColumnWidth(expiresAtColumn, 80, Style.Unit.PX);
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationWidgetViewImpl method initFrom.
private void initFrom() {
TextCell typeCell = new TextCell();
Column<NotificationRow, String> fromColumn = new Column<NotificationRow, String>(typeCell) {
@Override
public String getValue(NotificationRow object) {
if (object.getFrom() != null) {
return object.getFrom();
}
return "";
}
};
fromColumn.setSortable(false);
table.addColumn(fromColumn, presenter.getFromLabel());
table.setColumnWidth(fromColumn, 70, Style.Unit.PX);
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationWidgetViewImpl method initEmails.
private void initEmails() {
PopoverTextCell toEmails = new PopoverTextCell();
Column<NotificationRow, String> toEmailsColumn = new Column<NotificationRow, String>(toEmails) {
@Override
public String getValue(NotificationRow object) {
if (object.getEmails() != null) {
return join(",", object.getEmails());
}
return "";
}
};
toEmailsColumn.setSortable(false);
table.addColumn(toEmailsColumn, presenter.getToEmailsLabel());
table.setColumnWidth(toEmailsColumn, 160, Style.Unit.PX);
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.NotificationRow in project kie-wb-common by kiegroup.
the class NotificationValueValidatorTest method testR0PT1H.
@Test
public void testR0PT1H() {
NotificationRow notification = new NotificationRow();
notification.setExpiresAt("R0/PT1H");
boolean result = validator.isValid(notification, context);
assertFalse(result);
assertEquals(NotificationValueValidator.WRONG_EXPIRES_AT_EXPRESSION, errorMessages.get(0));
}
Aggregations