You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Emmanuel Sowah <es...@gmail.com> on 2006/12/13 22:10:34 UTC

How to Intergrate GWT into Tapestry pages Article by Geoff Longman

Hi all,

Geoff Longman, our Spindle man and former Tapestry commiter has written an
article on how to integrate Google Web Toolkit into a generated Tapestry
page.
http://www.cleancode.com/blog/2006/12/13/glongman/gwt-article/

Enjoy.
Emmanuel

Re: How to Intergrate GWT into Tapestry pages Article by Geoff Longman

Posted by neo anderson <ja...@yahoo.co.uk>.
I follow this article -
http://www.ibm.com/developerworks/opensource/library/os-eclipse-ajaxcypal/?S_TACT=105AGX52&S_CMP=cn-a-os
and http://www.cleancode.com/downloads/gwt-article/ to integrate GWT with
tapestry. 

The library I use include tapestry 4.0.2; GWT 1.4.60; Eclipse EE; Cypal
Studio plugin RC4. 

Now I can use Cypal + Eclpise to produce GWT project. However, whilst
following the instruction from
http://www.cleancode.com/downloads/gwt-article/, It fails. I move the
FirstModule.html (in the instruction it is MortgageCalc.html) to the webapp/
and add meta info to xxx.application. This step I think it works because
from the browser I can found the FirstModule.html is generated with Title
replaced  by tag coded in the FirstModule.html. Unfortunately, it looks like
that the the page can not recognized GWT components even I add "<meta
name='gwt:module' ccontent='/taepstry-gwt=com.sample.client.FirstModule'>"
(FirstModule is the Java class exactly the same as IBM tutorial instructs.)
The browser simply generate blank page (html code exists) because in the IBM
tutorial only contains table html tag. 

So the structure of my project should looks like

tapestry-gwt
src/com/sample/client/FirstModule (.java)
webapp/web-inf/tapestry-gwt.application
webapp/FirstModule.html

What should I do in order to get tapestry+gwt works?

Thank you very much.

Code:
=====FirstModule.java BEG =====
package com.sample.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;

public class FirstModule implements EntryPoint {

	 int count = 0;

	    public void onModuleLoad() {
	        final Button button = new Button("Count Your Clicks!");
	        final Label label = new Label(String.valueOf(count));
	        button.addClickListener(new ClickListener() {
	            public void onClick(Widget sender) {
	                count += 1;
	                label.setText(String.valueOf(count));
	            }
	        });
	        RootPanel.get("button").add(button);
	        RootPanel.get("count").add(label);
	    }
}

===== FirstModule.java END =====

===== FirstModule.html BEG =====
<html>
	<head>
	
		<!--                                           -->
		<!-- Any title is fine                         -->
		<!--                                           -->
		<title>Wrapper HTML for FirstModule</title>

		<!--                                           -->
		<!-- Use normal html, such as style            -->
		<!--                                           -->
		<style>
			body,td,a,div,.p{font-family:arial,sans-serif}
			div,td{color:#000000}
			a:link,.w,.w a:link{color:#0000cc}
			a:visited{color:#551a8b}
			a:active{color:#ff0000}
		</style>

		<!--                                           -->
		<!-- This script loads your compiled module.   -->
		<!-- If you add any GWT meta tags, they must   -->
		<!-- be added before this line.                -->
		<!--                                           -->
		<meta name='gwt:module'
content='/tapestry-gwt=com.sample.client.FirstModule'>
		<script language='javascript' src='/tapestry-gwt/nocache.js'></script>
		
	</head>

	<!--                                           -->
	<!-- The body can have arbitrary html, or      -->
	<!-- you can leave the body empty if you want  -->
	<!-- to create a completely dynamic ui         -->
	<!--                                           -->
	<body>

		
		<!-- OPTIONAL: include this if you want history support -->
		<iframe src="javascript:''" id="__gwt_historyFrame"
style="width:0;height:0;border:0"></iframe>
                
<table align=center>
    <tr>
        <td id="button"></td>
        <td id="count"></td>
    </tr>
</table>

	</body>
</html>

===== FirstModule.html END =====

===== tapestry-gwt.application BEG =====
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Apache Software Foundation//Tapestry
Specification 4.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd"> 
<application name="tapestry-gwt">
	<meta key="org.apache.tapestry.home-page" value="FirstModule"/>
	<library id="Contrib"
specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
</application>
===== tapestry-gwt.application END =====



Jessek wrote:
> 
> Awesome! Thanks for the link. I was worried/wondering how hard this
> was for tap users and now I remember Geoff's work. Maybe we should add
> a link to the home page referencing gwt support via this article.
> 
> On 12/13/06, Emmanuel Sowah <es...@gmail.com> wrote:
>> Hi all,
>>
>> Geoff Longman, our Spindle man and former Tapestry commiter has written
>> an
>> article on how to integrate Google Web Toolkit into a generated Tapestry
>> page.
>> http://www.cleancode.com/blog/2006/12/13/glongman/gwt-article/
>>
>> Enjoy.
>> Emmanuel
>>
>>
> 
> 
> -- 
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
> 
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Intergrate-GWT-into-Tapestry-pages-Article-by-Geoff-Longman-tf2816691.html#a13939764
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to Intergrate GWT into Tapestry pages Article by Geoff Longman

Posted by neo anderson <ja...@yahoo.co.uk>.
Do you use Eclipse? After searching around on the internet, I think Cypal
plugins is good enough for using gwt. Then you can keep tapestry stuff as it
were because Cypal plugin will copy html to the place of web context. Yet
the tapestry version I use is version 4.0.2 not 5.



mad7777 wrote:
> 
> Hi,
> 
> I'd just like to revive this thread.  Has anybody had any good/bad
> experiences integrating Tapestry and GWT?  I am especially interested in
> T5, as we are considering using this mix for an enterprise application.
> 
> Thanks for your input,
> Marc
> 
> 
> Jessek wrote:
>> 
>> Awesome! Thanks for the link. I was worried/wondering how hard this
>> was for tap users and now I remember Geoff's work. Maybe we should add
>> a link to the home page referencing gwt support via this article.
>> 
>> On 12/13/06, Emmanuel Sowah <es...@gmail.com> wrote:
>>> Hi all,
>>>
>>> Geoff Longman, our Spindle man and former Tapestry commiter has written
>>> an
>>> article on how to integrate Google Web Toolkit into a generated Tapestry
>>> page.
>>> http://www.cleancode.com/blog/2006/12/13/glongman/gwt-article/
>>>
>>> Enjoy.
>>> Emmanuel
>>>
>>>
>> 
>> 
>> -- 
>> Jesse Kuhnert
>> Tapestry/Dojo team member/developer
>> 
>> Open source based consulting work centered around
>> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Intergrate-GWT-into-Tapestry-pages-Article-by-Geoff-Longman-tf2816691.html#a13969844
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to Intergrate GWT into Tapestry pages Article by Geoff Longman

Posted by mad7777 <ma...@runbox.com>.
Hi,

I'd just like to revive this thread.  Has anybody had any good/bad
experiences integrating Tapestry and GWT?  I am especially interested in T5,
as we are considering using this mix for an enterprise application.

Thanks for your input,
Marc


Jessek wrote:
> 
> Awesome! Thanks for the link. I was worried/wondering how hard this
> was for tap users and now I remember Geoff's work. Maybe we should add
> a link to the home page referencing gwt support via this article.
> 
> On 12/13/06, Emmanuel Sowah <es...@gmail.com> wrote:
>> Hi all,
>>
>> Geoff Longman, our Spindle man and former Tapestry commiter has written
>> an
>> article on how to integrate Google Web Toolkit into a generated Tapestry
>> page.
>> http://www.cleancode.com/blog/2006/12/13/glongman/gwt-article/
>>
>> Enjoy.
>> Emmanuel
>>
>>
> 
> 
> -- 
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
> 
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Intergrate-GWT-into-Tapestry-pages-Article-by-Geoff-Longman-tf2816691.html#a13839868
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to Intergrate GWT into Tapestry pages Article by Geoff Longman

Posted by Jesse Kuhnert <jk...@gmail.com>.
Awesome! Thanks for the link. I was worried/wondering how hard this
was for tap users and now I remember Geoff's work. Maybe we should add
a link to the home page referencing gwt support via this article.

On 12/13/06, Emmanuel Sowah <es...@gmail.com> wrote:
> Hi all,
>
> Geoff Longman, our Spindle man and former Tapestry commiter has written an
> article on how to integrate Google Web Toolkit into a generated Tapestry
> page.
> http://www.cleancode.com/blog/2006/12/13/glongman/gwt-article/
>
> Enjoy.
> Emmanuel
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org