如何更新对象Parse.com

时间:2018-09-01 04:56:50

标签: javascript jquery parse-platform

我不确定如何进一步,因为我能够从for循环内部更新对象,但是我希望if语句在单击按钮后起作用。我在页面加载时调用$headers = "Content-Type: text/html; charset=UTF-8\r\n". "From: ".$_POST['from']. "\r\n" . "Reply-To: ".$_POST['reply']."\r\n" . "X-Mailer: PHP/" . phpversion(); 函数。 这是我的代码:

public MainView() {
    Button button = new Button("Click me",
            event -> {
                Dialog dialog = new Dialog();
                HorizontalLayout horizontalLayout = new HorizontalLayout();
                VerticalLayout verticalLayout = new VerticalLayout();
                Div headerDiv = new Div();
                Div bodyDiv = new Div();
                bodyDiv.getElement().getStyle().set("overflow", "auto");
                bodyDiv.getElement().getStyle().set("max-height", "420px"); // !!!
                dialog.add(headerDiv, bodyDiv);
                headerDiv.add(horizontalLayout);
                bodyDiv.add(verticalLayout);
                horizontalLayout.add(new Label("Hi there !"));
                for (int i = 1; i <= 20; i++) {
                    verticalLayout.add(new TextField("TextField_" + i));                        
                }
                dialog.open();                  
            });
    add(button);
}

我希望if语句在按钮下工作,但是它仅在for循环下工作..因此不起作用。我是新来解析。请帮忙。

0 个答案:

没有答案