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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to