Enyo Framework

Hello Everybody,

I am a newbie to Enyo and has been learning Enyo from the past couple of weeks. I want to understand the framework fully. I am able to create components, rather kinds. I am not getting "this.$", what purpose does it serves. Also, I am creating a page having 5-6 input fields, text inputs, date pickers and time picker. After I save the details, I want to view them in a seperate page. Like, ABC is having meeting on 13-05-2016 at 3:00PM. How do I pass these pieces of data to the second page.

Also, I have to develop an App for LG WebOS TV using Enyo.

I am learning but not confident enough. Kindly help.



  • If you haven't already, I'd suggest reading through the developer guide to get an overview of the concepts of Enyo.

    To your specific questions, the $ hash maintains references to everything a component owns. If you had the following kind, its $ has would contain references to myButton as this.$.myButton and textField as this.$.textField.
    var View = kind({
    components: [
    {name: 'myButton', kind: Button},
    {name: 'textField', kind: Input}
    The purpose of the hash is to provide a means to interact with those controls. So, if you wanted to get the value of the input when the button was clicked, you might:
    var View = kind({
    components: [
    {name: 'myButton', kind: Button, onclick: 'handleButtonClicked'},
    {name: 'textField', kind: Input}
    handleButtonClicked: function (sender, ev) {
    console.log(this.$.textField.get('value')); // logs the value of textField
    In your scenario, when the user completes the form, you might put the data into a Model and then pass that model to the next view to be displayed. I'd suggest exploring Bindings as well to simplify that interaction.

    Hope that helps gets you started!
  • Thanks for your reply. I have already done these things. I have to run the app on LG WebOS TV Emulator. I will still try to explore with bindings.

    Its indeed a good reply. Thanks a lot.
Sign In or Register to comment.