root gets auto created in gwt app -
hi
i wrote code in 1 of entry point class as:
if(rootpanel.get("fb-root") != null) form = new blooddonorform(constants.insert, null, constants.facebook, constants.blood_donor_register_form); else form = new blooddonorform(constants.insert, null, null, constants.blood_donor_register_form); this used work fine sometime sure (don't remember when checked last time). when run page in firefox firebug enabled see message like:
the "fb-root" div has not been created, auto-creating
so why done if not exist? sure have tested in past , not happening earlier.
this may change in gwt itself. said, isn't best way check dom element existing.
instead, use document.get().getelementbyid(string) check element id, , compare null. compile down simple (probably $doc.getelementbyid(id)), , won't create widget yet (rootpanel widget) , overhead comes that.
Comments
Post a Comment