GWT Popup with Editor Framework -
GWT Popup with Editor Framework -
in simple inventory management app have activity handle assigning equipment types employees (if user checks out). wondering this:
currently have drag , drop equipment can dragged on employee. want have is, equipment dragged, popup opens asking user confirmation amount wishes assign. deed editor around 2 entities (equipmentcheckin , equipmentcheckout).
here's issues i'm running into: 1. should popup initialized in view , set visible on drop event (this planned on doing) - in doing how initialize editor (should there separate activity called on drop - don't imagine there editor part confusing me) 2. should each popup have own class , ui.xml file - way going go , phone call set visible true on drop event (i think right way go) guess i'm asking here validation on how of this, can't find decent illustration stuff. that's used google music before want they're doing when go edit album or song info - imagine behind scenes they're using editor popup - want know right way before go hack solution
i think on right track, making popup self-contained, , keeping single instance of if can help it.
as far editor details, isn't making sense? general thought can create driver once, initialize popup (implementing editor), phone call edit on driver each time ready display new model.
i end (assuming class extends popup, implements editor, , has driver defined internally)
public mypopup() { //uibinder or other layout this.driver = gwt.create(driver.class); driver.initialize(this); } public void edit(mymodel model) { driver.edit(model); show(); } to flavor reply own approach/biases, mvp setup view , presenter both interfaces, , presenter impl doesn't know how view end drawing. looks me
public interface mymodeleditorview extends editor<mymodel> { // param used in mobile/table situation, popups aren't friendly void show(acceptsonewidget parent); // exposes driver presenter * simplebeaneditordriver<mymodel, ?> getdriver(); void setpresenter(presenter presenter); public interface presenter { // method called externally void show(acceptsonewidget parent, mymodel model); // called click handlers in view impl, @uihandler methods void onsaveclicked(); void oncancelclicked(); } } * presenter should command driver can check errors, pass in errors server if needed, edit new models, , flush out results.
gwt popup gwt-editors
Comments
Post a Comment