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>
<html>
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>Debug Control</title>
		<link rel="shortcut icon" href="assets/favicon.ico"/>
		<!-- -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
		<meta name="apple-mobile-web-app-capable" content="yes"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
		<!-- Less.js (uncomment for client-side rendering of less stylesheets; leave commented to use only CSS) -->
		<!-- <script src="enyo/tools/minifier/node_modules/less/dist/less-1.3.0e.min.js"></script> -->
		<!-- enyo (debug) -->
		<script src="../../enyo/enyo.js"></script>
		<!-- application (debug) -->
		<script src="../package.js" type="text/javascript"></script> 
	</head>
	<body class="enyo-unselectable">
		<script>

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

		</script>
	</body>
</html>

Thanks in advanced!

Comments

Sign In or Register to comment.