view _test/Resources/TTView/My/Org/Panel.tt @ 320:28eba7e0c592

*web application action: added method to access HTTP request header.
author sergey
date Thu, 16 May 2013 17:16:41 +0400
parents aeeb57a12046
children
line wrap: on
line source

[%
    META version = 1;
    BLOCK INIT;
    # this is a document scope
        dojoDefaultClass = 'dijit.form.Input'; 
        dojo.require.push( dojoDefaultClass );
    END;
    
    TPreview = require('My/Org/TextPreview');
    this.dojoClass = this.dojoClass || dojoDefaultClass;
    this.visualClass = this.visualClass || 'classic';
    this.childNodes = [];
    FOREACH text IN this.data;
        this.childNodes.push( TPreview.new(nodeValue = text ) );
    END;
    
%]
<div class="$this.visualClass" data-dojo-type="$this.dojoClass">
    [% FOREACH node IN this.childNodes %]
        [% node.Render() %]
        <hr />
    [% END %]
</div>