best approach to create webpart?

LabKey Support Forum
best approach to create webpart? Ben Bimber  2010-10-23 05:38
Status: Closed
 
Ext.Id() returns an ID string I think. i think it does what matt's describing with LABKEY.makeId(). as a general rule most of our webparts already work somewhat like this. they start with one top-level div, then the JS code creates whatever other elements you need. most webparts are rendered to these new elements. however, you still start with 1 div and you need ID to identify it.

With an approach like above, my only concern was 'where's it create that div?'. If we have a bunch of webparts on a page, how do I make sure that the code creates that div in the right place? isnt is going to tack that div on the bottom of the page, which isnt what you want when you have multiple webparts? seems like you want a 'get the body of this webpart' method.