Published event not being set

Hello,

I have a custom component encapsulating a TextArea. I'm trying to set the TextArea's text content when this custom component is initialized but the published property is never being set. Here is the code for TexaArea and HTML file used to test the component:
// FeedbackTextArea.js
enyo.kind({
	name: 'FeedbackTextArea',
	kind: 'onyx.InputDecorator',
	tag: 'div',
	classes: 'text-area-style',
	style: 'width: 100%',

	published: {
		wtf: '',
		enabled: true
	},

	components: [
		{
			name: "textArea",
			kind: "onyx.TextArea",
		//	placeholder: "Enter comments here.",
			onchange: "wtfChanged",
		}
	],

	create: function() {
		this.inherited(arguments);
		this.wtfChanged();
		this.enabledChanged();
	},

	wtfChanged: function() {
		this.log(this.wtf)
    this.$.textArea.setValue(this.wtf);
	},

	enabledChanged: function() {
		this.log(this.enabled)
		this.$.textArea.setDisabled(this.enabled);			
	}

});
<!DOCTYPE html>



Debug Control




var debugControl = new enyo.Control; debugControl.createComponent({ kind: "FeedbackTextArea", wtf: 'dfdfs', enabled: false, }); this.log(debugControl); debugControl.renderInto(document.body);

Thanks in advanced!

Comments

Sign In or Register to comment.