PrimeJS

JS implementation of JSF

HTML

<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/ui-lightness/jquery-ui.css">
<div id="main" class="container">
		
		<p-panel p-header="Hello">
			Name: 
			<p-inputtext p-value="#{testModel.person.name}" id="name" class="form-control" placeholder="Enter name"></p-inputtext>
			<p-button p-process="main" p-listener="#{testModel.handleClick}" p-value="Click" class="btn btn-default"></p-button>
			<br />		
			<p-outputtext p-value="#{testModel.person.name}" style="color:blue"></p-outputtext>
		</p-panel>
		
	</div>

CSS

.ui-panel {
	padding: 0.2em;
}

.ui-panel .ui-panel-titlebar {
	padding: 0.5em 1em 0.3em;
}

.ui-panel .ui-panel-title {
	margin: 0.1em 16px 0.2em 0;
}

.ui-panel .ui-panel-titlebar-icon {
	float: right;
    cursor: pointer;
}

.ui-panel .ui-panel-titlebar-icon,
.ui-panel .ui-panel-titlebar-icon:hover,
.ui-panel .ui-panel-titlebar-icon:focus {
	margin-left:0.2em;
    margin-top:-0.2em;
    *margin:-1.5em 0em 0em 0.2em;
}

.ui-panel .ui-panel-content {
	border: 0;
    background: none;
	padding: 0.5em 1em;
}

.ui-panel .ui-panel-footer {
	border-width:1px 0 0;
	margin:0.5em 0 0;
	padding:0.5em 1em;
	text-align:left;
}

.ui-panel-collapsed-h .ui-panel-titlebar-icon,
.ui-panel-collapsed-h .ui-panel-titlebar-icon:hover,
.ui-panel-collapsed-h .ui-panel-titlebar-icon:focus {
    *margin:-0.2em 0em 0em 0.1em;
}

.ui-panel.ui-panel-collapsed-h {
    width: 42px;
}

.ui-panel.ui-panel-collapsed-h .ui-panel-title {
    display:none;
}

JavaScript

/* Simple JavaScript Inheritance
 * By John Resig http://ejohn.org/
 * MIT Licensed.
 */
// Inspired by base2 and Prototype
(function(){
  var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
  // The base Class implementation (does nothing)
  this.Class = function(){};

  // Create a new Class that inherits from this class
  Class.extend = function(prop) {
    var _super = this.prototype;

    // Instantiate a base class (but only create the instance,
    // don't run the init constructor)
    initializing = true;
    var prototype = new this();
    initializing = false;

    // Copy the properties over onto the new prototype
    for (var name in prop) {
      // Check if we're overwriting an existing function
      prototype[name] = typeof prop[name] == "function" && 
        typeof _super[name] == "function" && fnTest.test(prop[name]) ?
        (function(name, fn){
          return function() {
            var tmp = this._super;

            // Add a new ._super() method that is the same method
            // but on the super-class
            this._super = _super[name];

            // The method only need to be bound temporarily, so we
            // remove it when we're done executing
            var ret = fn.apply(this, arguments);        
            this._super = tmp;

            return ret;
          };
        })(name, prop[name]) :
        prop[name];
    }

    // The dummy class constructor
    function Class() {
      // All construction is actually done in the init method
      if ( !initializing && this.init )
        this.init.apply(this, arguments);
    }

    // Populate our constructed prototype object
    Class.prototype = prototype;

    // Enforce the constructor to be what we expect
    Class.prototype.constructor = Class;

    // And make this class extendable
    Class.extend = arguments.callee;

    return Class;
  };
})();

var PrimeJS = {

	idx: 0,
	
	modelMetadata: {},
	
	modelInstances:...