use of com.vaadin.ui.Form in project Activiti by Activiti.
the class NewCasePopupWindow method initForm.
protected void initForm() {
form = new Form();
form.setValidationVisibleOnCommit(true);
form.setImmediate(true);
addComponent(form);
// name
nameField = new TextField(i18nManager.getMessage(Messages.TASK_NAME));
nameField.focus();
nameField.setRequired(true);
nameField.setRequiredError(i18nManager.getMessage(Messages.TASK_NAME_REQUIRED));
form.addField("name", nameField);
// description
descriptionArea = new TextArea(i18nManager.getMessage(Messages.TASK_DESCRIPTION));
descriptionArea.setColumns(25);
form.addField("description", descriptionArea);
// duedate
dueDateField = new DateField(i18nManager.getMessage(Messages.TASK_DUEDATE));
dueDateField.setResolution(DateField.RESOLUTION_DAY);
form.addField("duedate", dueDateField);
// priority
priorityComboBox = new PriorityComboBox(i18nManager);
form.addField("priority", priorityComboBox);
}
use of com.vaadin.ui.Form in project Activiti by Activiti.
the class AccountSelectionPopup method initImapComponent.
protected void initImapComponent() {
imapForm = new Form();
imapForm.setDescription(i18nManager.getMessage(Messages.IMAP_DESCRIPTION));
final TextField imapServer = new TextField(i18nManager.getMessage(Messages.IMAP_SERVER));
imapForm.getLayout().addComponent(imapServer);
final TextField imapPort = new TextField(i18nManager.getMessage(Messages.IMAP_PORT));
imapPort.setWidth(30, UNITS_PIXELS);
// Default imap port (non-ssl)
imapPort.setValue(143);
imapForm.getLayout().addComponent(imapPort);
final CheckBox useSSL = new CheckBox(i18nManager.getMessage(Messages.IMAP_SSL));
useSSL.setValue(false);
useSSL.setImmediate(true);
imapForm.getLayout().addComponent(useSSL);
useSSL.addListener(new ValueChangeListener() {
public void valueChange(ValueChangeEvent event) {
imapPort.setValue(((Boolean) useSSL.getValue()) ? 993 : 143);
}
});
final TextField imapUserName = new TextField(i18nManager.getMessage(Messages.IMAP_USERNAME));
imapForm.getLayout().addComponent(imapUserName);
final PasswordField imapPassword = new PasswordField(i18nManager.getMessage(Messages.IMAP_PASSWORD));
imapForm.getLayout().addComponent(imapPassword);
// Matching listener
imapClickListener = new ClickListener() {
public void buttonClick(ClickEvent event) {
Map<String, Object> accountDetails = createAccountDetails("imap", imapUserName.getValue().toString(), imapPassword.getValue().toString(), "server", imapServer.getValue().toString(), "port", imapPort.getValue().toString(), "ssl", imapPort.getValue().toString());
fireEvent(new SubmitEvent(AccountSelectionPopup.this, SubmitEvent.SUBMITTED, accountDetails));
}
};
}
use of com.vaadin.ui.Form in project Activiti by Activiti.
the class NewGroupPopupWindow method initForm.
protected void initForm() {
form = new Form();
form.setValidationVisibleOnCommit(true);
form.setImmediate(true);
addComponent(form);
initInputFields();
initCreateButton();
}
use of com.vaadin.ui.Form in project Activiti by Activiti.
the class AccountSelectionPopup method initAlfrescoComponent.
protected void initAlfrescoComponent() {
alfrescoForm = new Form();
alfrescoForm.setDescription(i18nManager.getMessage(Messages.ALFRESCO_DESCRIPTION));
final TextField alfrescoServer = new TextField(i18nManager.getMessage(Messages.ALFRESCO_SERVER));
alfrescoForm.getLayout().addComponent(alfrescoServer);
final TextField alfrescoUserName = new TextField(i18nManager.getMessage(Messages.ALFRESCO_USERNAME));
alfrescoForm.getLayout().addComponent(alfrescoUserName);
final PasswordField alfrescoPassword = new PasswordField(i18nManager.getMessage(Messages.ALFRESCO_PASSWORD));
alfrescoForm.getLayout().addComponent(alfrescoPassword);
// Matching listener
alfrescoClickListener = new ClickListener() {
public void buttonClick(ClickEvent event) {
Map<String, Object> accountDetails = createAccountDetails("alfresco", alfrescoUserName.getValue().toString(), alfrescoPassword.getValue().toString(), "server", alfrescoServer.getValue().toString());
fireEvent(new SubmitEvent(AccountSelectionPopup.this, SubmitEvent.SUBMITTED, accountDetails));
}
};
}
use of com.vaadin.ui.Form in project Activiti by Activiti.
the class NewUserPopupWindow method initForm.
protected void initForm() {
form = new Form();
form.setValidationVisibleOnCommit(true);
form.setImmediate(true);
addComponent(form);
initInputFields();
initCreateButton();
}
Aggregations