Closed mkhayes closed 11 years ago
I would say that when you do your onSubmit, do not hide the display until you get the async response back from the server. So here, RfParametersViewImpl.java#L72, do a call back into the presenter rather than fire the event. The RfParametersPresenterImpl would then make this async call, DataPanelPresenterImpl.java#L76. Then in the onSuccess handler you can hide the view, and in the onFailure handler you can display the error in the form and possibly do some field highlighting if the error gives you enough info for that.
I think we should validate the parameters before we communicate with the server. Additionally, we need to be prepared for errors from H2O, but we should not waste a trip to the server if the parameters are known to be invalid. That kind of logic belongs in the presenter. Effectively, the "Submit" button should be invalid until the parameters are correct. The button should either be disabled (greyed-out) or on-click the errors should be identified. The presenter can include a bool which defines the state of the "Submit" button (enabled, disabled)
Duplicate involving other issues. See #40, #28, #14.
We need a good way to notify the user when they have entered invalid parameters. H2O will return an error when it receives a bad parameter. Some parameters such as number of trees are easy enough to check ahead of time... it needs to be an integer. Should we attempt checks when the user presses submit and then label invalid fields (put a red x or something similar)? Since H2O returns error information, we should probably wait for a response before closing the parameters form.