GWT integrated with JSF

30 views
Skip to first unread message

will.dutt

unread,
Dec 12, 2008, 6:11:10 PM12/12/08
to Google Web Toolkit
i've been look around for anything that was happening with these 2
great components. sadly the g4jsf is a dead end :(.

i've got a JSF website that is now hitting the boundaries of what is
possible in a static html refresh browser and needs GWT badly.

does anyone have any good examples of integrating GWT components to
pull information from the page its placed on and rpc the rest of the
content it needs?

i can place a GWT compenent on the page with div's which is good, but
i'm having trouble getting information from the page (eg ID that link
to a database). what is the command to do that?

olivier FRESSE

unread,
Dec 14, 2008, 2:50:14 AM12/14/08
to Google-We...@googlegroups.com
Hi will,
I work on a project where we use GWT, seam and facelet. The server is a glassfish one.
Seam is a great framework, and I really see it as a great enhancement to JSF.
It provides many components, including "Seam Remoting".
Seam Remoting allows a remote access to seam components,using Ajax.
And you can replace GWT Services by Remoting calls...
This allows you to easily share data between JSF/Facelet pages and GWT modules via
Seam contexts.

see : http://docs.jboss.com/seam/2.1.1.CR2/reference/en-US/html_single/#gwt

Of course, this may mean deep modifications in your project.
If you wan to integrate a simple GWT module in a page and read hidden input values
from the page I see 2 solutions :

JSNI : Allows you to call JScript in the page.

GWT DOM object : Allows you to manipulate DOM objects.

I'll find  a sample  and post it there :-)

O.

2008/12/13 will.dutt <will...@gmail.com>

will.dutt

unread,
Dec 14, 2008, 6:22:46 AM12/14/08
to Google Web Toolkit
The jboss doc link gives heaps of food for thought.

Just wondering, am i correct to say that G4JSF became ajax4jsf which
then became richfaces ?

This kinda makes it quite confusing when i have jsf and gwt and no
idea what i can use to glue it together :P

An example would be very helpful :) on the seam application, and maybe
on the other ways of pulling information. :)

I have used spring in the past, tho not starting out and it already
had a very structured hierarchy and as i'm a fresh out of uni, and
this is mostly a green feilds type project, there is way to many
technologies to look at and yet not enough time in the day. :/

The jsf website that i'm now working on had a pre existing database
backend in oracle. The developer before me used netbeans out of the
box features to generate a brand new interface to the oracle database.
(can't remember the backend infrastructure, will find out in the
morning when i'm at work)

The simple stuff is done and now its to the hard stuff.

i have thought of doing through GWT DOM objects, but i would like a
cleaner way of keeping state, the application will be doing big edits
to the database backend if they apply the changes they make and i
would like to allow any not pre-commited changes to either linger till
out of session of save for next session which means that GWT DOM
object pulling for the id/keys won't do.


Google group discussions seems to be quite nice, tho i do miss the
spell check feature that is in gmail. :)

On Dec 14, 5:50 pm, "olivier FRESSE" <olivier.fre...@gmail.com> wrote:
> Hi will,
> I work on a project where we use GWT, seam and facelet. The server is a
> glassfish one.
> Seam is a great framework, and I really see it as a great enhancement to
> JSF.
> It provides many components, including "Seam Remoting".
> Seam Remoting allows a remote access to seam components,using Ajax.
> And you can replace GWT Services by Remoting calls...
> This allows you to easily share data between JSF/Facelet pages and GWT
> modules via
> Seam contexts.
>
> see :http://docs.jboss.com/seam/2.1.1.CR2/reference/en-US/html_single/#gwt
>
> Of course, this may mean deep modifications in your project.
> If you wan to integrate a simple GWT module in a page and read hidden input
> values
> from the page I see 2 solutions :
>
> JSNI : Allows you to call JScript in the page.
>
> GWT DOM object : Allows you to manipulate DOM objects.
>
> I'll find  a sample  and post it there :-)
>
> O.
>
> 2008/12/13 will.dutt <will.d...@gmail.com>

will.dutt

unread,
Dec 14, 2008, 5:46:02 PM12/14/08
to Google Web Toolkit
the backend is Oracle TopLink

olivier FRESSE

unread,
Dec 17, 2008, 3:47:40 AM12/17/08
to Google-We...@googlegroups.com
I'm quite overloaded this week, so I won't have too much time to make a detailed answer :-(

From my understanding G4JSF is dead and replaced by ajax4jsf, which is quite different.
It makes no use of GWT.

If you want a clean and powerful way of keeping state in a GWT/Jsf mixed appication ,
seam is really a nice answer.

You can really use seam as a "glue" between facelets pages and GWT modules.

Basicaly, seam provides "components" (beans in fact) , which can be used from GWT modules and from JSF pages.
From a facelet view, it's really easy to get values and call methods with EL.

From GWT, seam remoting enables the use of seam components instead of OOTB  GWT services.

I hope to get some tme to make a little example. It's not easy to extract a sample from my current project...


 

I do agree that it's not easy to see the light in all these frameworks...
but here is the solution I use.... I' don't know if it's the best, but well it works for me.

We use EJB3 & Glassfish.






2008/12/14 will.dutt <will...@gmail.com>

William Dutton

unread,
Dec 17, 2008, 5:24:15 AM12/17/08
to Google-We...@googlegroups.com
thankyou for the reply.

what i'm working on is made from woodstock widgets from netbeans with jsf, we have ejb3 persistent objects so we could go via the ejb3 route, we just need some items to talk to the the database entities to change them, the jsf/woodstock components are written with alot of boolean switches to turn on and off parts of the really large pages. i'm talking about 3-4 large tables of information.

there is a menu system made with woodstock plugins. tho due to the complexity of the pages, they are quite hard to get in the correct position in all browsers.

i wonder how difficult getting seam into the mix or ejb3 is going to be?

olivier FRESSE

unread,
Dec 17, 2008, 5:55:30 AM12/17/08
to Google-We...@googlegroups.com
It's easy to mix both.

you just need an interceptor... and a few tricks :-)


Take a look at this excellent post : http://weblogs.java.net/blog/caroljmcdonald/archive/2008/01/sample_applicat_4.html

( and http://weblogs.java.net/blog/caroljmcdonald/archive/2007/07/sample_applicat_1.html
  the first link is an update to the latest versions of Seam & glassfish )

Once you've discovered the power of seam, you can't live without it :-)

O.


2008/12/17 William Dutton <will...@gmail.com>

will.dutt

unread,
Dec 26, 2008, 2:35:55 AM12/26/08
to Google Web Toolkit
hows your work/life load atm?

an example on jsf/gwt with seam in the background would be nice.

I'm still getting my head around what the last developer left (only
doing this project with under 1/2 day a week), it looks like its in a
MVC pattern, but its merged in some parts, which makes it difficult to
see where the the JSF parts should be, the clean model and the
controller which should pass between the 2.

I've found entity managers in the controllers and Javefaces as well.
so hmm. before i can start plugging seam/gwt into this project, i need
a good grasp of what i can plug my gwt into without the jsf items.

On Dec 17, 6:47 pm, "olivier FRESSE" <olivier.fre...@gmail.com> wrote:
> I'm quite overloaded this week, so I won't have too much time to make a
> detailed answer :-(
>
> From my understanding G4JSF is dead and replaced by ajax4jsf, which is quite
> different.
> It makes no use of GWT.
>
> If you want a clean and powerful way of keeping state in a GWT/Jsf mixed
> appication ,
> seam is really a nice answer.
>
> You can really use seam as a "glue" between facelets pages and GWT modules.
>
> Basicaly, seam provides "components" (beans in fact) , which can be used
> from GWT modules and from JSF pages.
> From a facelet view, it's really easy to get values and call methods with
> EL.
>
> From GWT, seam remoting enables the use of seam components instead of OOTB
>  GWT services.
>
> I hope to get some tme to make a little example. It's not easy to extract a
> sample from my current project...
>
> I do agree that it's not easy to see the light in all these frameworks...
> but here is the solution I use.... I' don't know if it's the best, but well
> it works for me.
>
> We use EJB3 & Glassfish.
>
> 2008/12/14 will.dutt <will.d...@gmail.com>

Raghunath

unread,
Jan 13, 2009, 7:16:28 AM1/13/09
to Google Web Toolkit
hi olivier,willi
nice discussion .. I'm also exploring seam and gwt .. I do have enough
exp
in both the areas , but integration is little bit tricky it seems, In
seam examples
remoting/gwt a simple example to demonstrate seam + jsf .

Im my point of view ..
1) Seam components can be well integrated to gwt remote services.
2)JSF/GWT - gwt is going load any component in division specified
3)On top of it we can use JSNI

How about your ATM application .. are you able to complete it

thanks
raghu

On Dec 26 2008, 12:35 pm, "will.dutt" <will.d...@gmail.com> wrote:
> hows your work/life load atm?
>
> an example onjsf/gwt with seam in the background would be nice.
>
> I'm still getting my head around what the last developer left (only
> doing this project with under 1/2 day a week), it looks like its in a
> MVC pattern, but its merged in some parts, which makes it difficult to
> see where the theJSFparts should be, the clean model and the
> > > This kinda makes it quite confusing when i havejsfand gwt and no
> > > idea what i can use to glue it together :P
>
> > > An example would be very helpful :) on the seam application, and maybe
> > > on the other ways of pulling information. :)
>
> > > I have used spring in the past, tho not starting out and it already
> > > had a very structured hierarchy and as i'm a fresh out of uni, and
> > > this is mostly a green feilds type project, there is way to many
> > > technologies to look at and yet not enough time in the day. :/
>
> > > Thejsfwebsite that i'm now working on had a pre existing database
> > > backend in oracle.  The developer before me used netbeans out of the
> > > box features to generate a brand new interface to the oracle database.
> > > (can't remember the backend infrastructure, will find out in the
> > > morning when i'm at work)
>
> > > The simple stuff is done and now its to the hard stuff.
>
> > > i have thought of doing through GWT DOM objects, but i would like a
> > > cleaner way of keeping state, the application will be doing big edits
> > > to the database backend if they apply the changes they make and i
> > > would like to allow any not pre-commited changes to either linger till
> > > out of session of save for next session which means that GWT DOM
> > > object pulling for the id/keys won't do.
>
> > > Google group discussions seems to be quite nice, tho i do miss the
> > > spell check feature that is in gmail. :)
>
> > > On Dec 14, 5:50 pm, "olivier FRESSE" <olivier.fre...@gmail.com> wrote:
> > > > Hi will,
> > > > I work on a project where we use GWT, seam and facelet. The server is a
> > > > glassfish one.
> > > > Seam is a great framework, and I really see it as a great enhancement to
> > > >JSF.
> > > > It provides many components, including "Seam Remoting".
> > > > Seam Remoting allows a remote access to seam components,using Ajax.
> > > > And you can replace GWT Services by Remoting calls...
> > > > This allows you to easily share data betweenJSF/Facelet pages and GWT
> > > > modules via
> > > > Seam contexts.
>
> > > > see :
> > >http://docs.jboss.com/seam/2.1.1.CR2/reference/en-US/html_single/#gwt
>
> > > > Of course, this may mean deep modifications in your project.
> > > > If you wan to integrate a simple GWT module in a page and read hidden
> > > input
> > > > values
> > > > from the page I see 2 solutions :
>
> > > > JSNI : Allows you to call JScript in the page.
>
> > > > GWT DOM object : Allows you to manipulate DOM objects.
>
> > > > I'll find  a sample  and post it there :-)
>
> > > > O.
>
> > > > 2008/12/13 will.dutt <will.d...@gmail.com>
>
> > > > > i've been look around for anything that was happening with these 2
> > > > > great components. sadly the g4jsf is a dead end :(.
>
> > > > > i've got aJSFwebsite that is now hitting the boundaries of what is
Reply all
Reply to author
Forward
0 new messages