[Cosmo-dev] Re: Cosmo UI question - adding a simple list in the modify dialog

Vinubalaji Gopal vinu at osafoundation.org
Tue Jan 23 08:19:19 PST 2007


On Tue, 2007-01-23 at 11:34 -0800, Travis Vachon wrote:
> Hi Vinu
> 
> Sorry it took me a little while to look at this..
> 
> The trouble you're having is coming from document.getElementById 
> ('allMembersList'). There are actually two elements with that id on  
> the admin page, because there is both a "create" dialog and a  
> "modify" dialog (not the best situation, and the result of my  
> inexperience when I wrote this code, so it will probably change in  
> the future, but ok for now).
> 
> Instead of doing this, you should declare a "dojoAttachPoint" in the  
> template and reference the list using that.
> 
> So, instead of:
> 
> >>> <div id="allMembers"><ul id="allMembersList">
> 
> and
> 
> >>>                          var allMembersList =  
> >>> document.getElementById('allMembersList');
> 
> use
> 
> <div id="allMembers"><ul id="allMembersList"  
> dojoAttachPoint='allMembersList'>
> 
> and
> 
> var allMembersList = self.allMembersList;
> 
> 

Wow it worked :). Thanks everyone for helping!





More information about the cosmo-dev mailing list