jsr372-experts@javaserverfaces-spec-public.java.net

[jsr372-experts] Re: JS implementation of JSF

From: Josh Juneau <juneau001_at_gmail.com>
Date: Thu, 19 Mar 2015 21:02:09 -0500

Looks interesting. The proof of concept seems to work nicely. I'll try
and find some time to play around with it a bit and provide feedback.

Josh Juneau
juneau001_at_gmail.com
http://jj-blogger.blogspot.com
https://www.apress.com/index.php/author/author/view/id/1866


On Thu, Mar 19, 2015 at 3: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
>
>