div equivelant in enyo..

edited May 2014 in Newbie Questions
I need to dynamically print a kind/some code to a particular div/area in my code. In normal html/javascript I would just output it from a function to a div, but in enyo I do not know exactly how I should go about doing this.
The exact job I am doing is onSelect of a drop down menu, it triggers a function that will print the selected amount of a kind into the view. (ya the below code doesn't print the selected amount, I just don't know how to output it).
{content: "Number of Lines", onSelect: "linesSelected", classes: "text-divider"},
{kind: "onyx.PickerDecorator", components: [
	{classes: "onyx-dark input-box number-size"},
	{name: "lines", kind: "onyx.IntegerPicker", min: 1, max: 10, value: 1}
{name: "printer"} //place I want to output
linesSelected: function(inSender, inEvent) {
	this.$.printer.set("value", kind_I_want_to_print_out);


  • Use content instead of value. In the absence of any child controls, the content of a control is rendered as the content of the tag
    this.$.printer.set("content", kind_I_want_to_print_out);
  • Thanks! That helps me out a ton!

    Another other question:
    -How do you reference objects that a repeater has made?
    --If need be, how would you give each repeat a different name?
    {kind: "Repeater", name: "repeater", count: 3, onSetupItem: "dostuff", components: [
    	{kind: "someKind"}
    dostuff: function (inSender, inEvent) {
    	theName = "name" + inEvent.index;
    	item = inEvent.item;
    	item.$.someKind.set("name", theName);
    referenceRepeated: function(inSender, inEvent) {
    	this.$.repeater.name0.api_from_kind(); //referencing function from someKind
  • edited May 2014
    Another other question:
    Hmm, how does this relate to your "div" question ?
    Please start a new forum thread for new unrelated topics.
  • Point taken. Sorry about the unrelativeness...
Sign In or Register to comment.