users@javaserverfaces-spec-public.java.net

[jsr372-experts mirror] [jsr372-experts] Re: JS implementation of JSF

From: Kito Mann <kito.mann_at_virtua.com>
Date: Thu, 19 Mar 2015 22:38:26 -0400

Very cool, Cagatay. I'm thinking about how this would work with HTML5
custom elements and other web component specs. What I like about the data
binding is that it binds to the model, while Polymer binds to the
component. More thoughts later.

___

Kito D. Mann | @kito99 | Author, JSF in Action
Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
http://www.JSFCentral.com | @jsfcentral
+1 203-998-0403

* Listen to the Enterprise Java Newscast: *http://
<http://blogs.jsfcentral.com/JSFNewscast/>enterprisejavanews.com
<http://ww.enterprisejavanews.com>*
* JSFCentral Interviews Podcast:
http://www.jsfcentral.com/resources/jsfcentralpodcasts/
* Sign up for the JSFCentral Newsletter: http://oi.vresp.com/?fid=ac048d0e17

On Thu, Mar 19, 2015 at 4:49 PM, Cagatay Civici <cagatay.civici_at_gmail.com>
wrote:

> Hi,
>
> Mostly for fun, I'm working on a crazy but interesting concept that
> implements the core idea of JSF on client side. Main parts of JSF like
> beans, components, el and lifecycle are all javascript objects.
>
> I've done a proof of concept implementation today as well, jsfiddle is at;
>
> http://jsfiddle.net/cagataycivici/r7gxsmy7/
>
> Basically view part (counterpart of JSF xhtml view) is;
>
> <body>
>
> <div id="main" class="container">
> <p-inputtext value="#{testModel.person.name}" class="form-control"
> placeholder="Enter name"></p-inputtext>
>
> <p-button value="Click Me" process="main"
> listener="#{testModel.handleClick}" class="btn btn-default"></p-button>
>
> <p-outputtext value="#{testModel.person.name}"></p-outputtext>
> </div>
>
> </body>
>
> and the model part (counterpart of JSF managed bean);
>
> PrimeJS.model({name:'testModel'}, Class.extend({
>
> init: function() {
> this.person = {
> name: null
> };
> },
> handleClick: function() {
> alert('Hello ' + this.person.name);
> }
> })
> );
>
> I'm not sure if I'll pursue this, as I've mentioned it is a proof of
> concept for fun but I'd really like to hear your opinions.
>
> Regards,
>
> Cagatay Civici
> PrimeFaces Lead
> PrimeTek Informatics
> www.primefaces.org
>
>