You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to closure-lib...@googlegroups.com
you could use:
var checkBox = goog.dom.htmlToDocumentFragment('<input type="checkbox" id="' + storyId + '=checkbox">');
Why don't you want to use goog.dom.createDom? What would you like to do?
Chris Wilson
unread,
May 17, 2012, 5:11:20 AM5/17/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Closure Library Discuss
Hi Siddharth,
Look at the Checkbox demo, especially the render() method, to see how it
uses the checkbox object's render() method to dynamically create the DOM
(which does for you more or less what you do above).
You may not easily be able to control the ID of the component without
creating the DOM element yourself.
Cheers, Chris.
--
_____ __ _
\ __/ / ,__(_)_ | Chris Wilson <chri...@qwirx.com> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |
siddharth trikha
unread,
May 18, 2012, 7:46:45 AM5/18/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Closure Library Discuss
I want to use Closure Library widgets as much as possible, not
createDom.
Rhys Brett-Bowen
unread,
May 19, 2012, 10:04:42 AM5/19/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Closure Library Discuss
You could extend goog.ui.checkbox and add in a createDom method
open up your javascript console and type these in:
a = new goog.ui.Checkbox;
a.render(document.body);
that's it! the goog.ui.Checkbox has a default renderer that will
create the dom for you (render will run the createDom method which
will run the createDom method of the renderer which by default is
goog.ui.CheckboxRenderer). the render will then append the element to
whatever you pass in - in this case I just added it to the body so you
should see a new checkbox at the bottom.