Я новичок ie в разработке Vaadin. попробуйте настроить проект для Wildfly. Я использую Vaadin 14.1.16 с Wildfly 18 и Java 8. Я получаю сообщение об ошибке при загрузке страницы, как показано ниже.
(TypeError) : Cannot read property 'initLazy' of undefined
Кроме того, textArea не отображается на странице .
comment label
находится на правой стороне, в то время как я ожидал быть под select component
. Я уже пытался в Google найти что-нибудь, связанное с этой проблемой, но ничего на борту.
Vaadin genius, есть ли у вас какие-либо идеи, почему и как мне это решить?
@Route(value = "maintenance", layout = MainView.class)
@PageTitle("Maintenance Mode Selector")
public class MaintenanceView extends Div implements AfterNavigationObserver {
@Inject
private Maintenance maintenance;
private ComboBox<MaintenanceMode> operationComboBox = new ComboBox<>(MaintenanceMode.NORMAL_OPERATION.getDescription());
private Select<String> maintenanceSelector = new Select();
private TextArea commentTextArea = new TextArea();
private PasswordField passwordField = new PasswordField();
private Button btnOperation = new Button("Set Operation Mode");
public MaintenanceView() {
setId("maintenance-view");
operationComboBox.setItemLabelGenerator(MaintenanceMode::getDescription);
operationComboBox.setItems(MaintenanceMode.values());
maintenanceSelector.setItems("MAINTENANCE OPERATION", "NORMAL OPERATION");
maintenanceSelector.getStyle().set("width", "40em");
maintenanceSelector.setPlaceholder("CHOOSE AN OPERATION");
commentTextArea.getStyle().set("minHeight", "200em");
commentTextArea.setPlaceholder("Down time is expected to be 30 minute ...");
commentTextArea.addThemeVariants(TextAreaVariant.LUMO_SMALL);
btnOperation.addThemeVariants(ButtonVariant.LUMO_PRIMARY);
btnOperation.addClickListener(buttonClickEvent -> {
maintenance.setMode("MAINTENANCE OPERATION".equals(maintenanceSelector.getValue()) ? "1" : "0");
maintenance.setComment(commentTextArea.getValue());
});
SplitLayout splitLayout = new SplitLayout();
splitLayout.setOrientation(SplitLayout.Orientation.HORIZONTAL);
splitLayout.setSizeFull();
createEditorLayout(splitLayout);
add(splitLayout);
}
private void createEditorLayout(SplitLayout splitLayout) {
FormLayout formLayout = new FormLayout();
formLayout.setResponsiveSteps(
new FormLayout.ResponsiveStep("40em",2, FormLayout.ResponsiveStep.LabelsPosition.TOP),
new FormLayout.ResponsiveStep("40em",1, FormLayout.ResponsiveStep.LabelsPosition.TOP),
new FormLayout.ResponsiveStep("40em",2, FormLayout.ResponsiveStep.LabelsPosition.TOP),
new FormLayout.ResponsiveStep("40em",1, FormLayout.ResponsiveStep.LabelsPosition.TOP)
);
formLayout.addFormItem( operationComboBox, "Combobox Component:");
formLayout.addFormItem( maintenanceSelector, "Select Component:");
formLayout.addFormItem( commentTextArea, "Comments:");
formLayout.addFormItem( passwordField, "Password:");
formLayout.addFormItem( btnOperation,"");
formLayout.setColspan(operationComboBox,2);
formLayout.setColspan(maintenanceSelector,2);
formLayout.setColspan(commentTextArea,2);
formLayout.setColspan(passwordField,2);
formLayout.setColspan(btnOperation,1);
splitLayout.addToSecondary(formLayout);
}
@Override
public void afterNavigation(AfterNavigationEvent afterNavigationEvent) {
}
}
Я немного изменил макет, но теперь получаю эти ошибки.
(TypeError) : Cannot read property 'confirm' of undefined
(TypeError) : Cannot read property 'set' of undefined
(TypeError) : Cannot read property 'updateSize' of undefined
Скриншот страницы.