title: Template method in javascript
body: <p>I want, in javascript, to implement the template method pattern.</p>
  
  <p>I have a PropertyDecorator with some subclasses: OpenButtonDecorator, SeeButtonDecorator and so on. I want to have in Property decorator the next function:</p>
  
  <pre><code>var build = function(){
     decorate(); //Abstract in PropertyDecorator, defined in subclasses
     return le.build();
  }
  </code></pre>
  
  <p>How can I get this scenario working? Maybe I implemented wrong the inheritance :S (help with that too :) )</p>
  
  <p>Thank you in advance.</p>