To let you understand what I want, please read this:

Suppose you have a GWT page (mydomain.com#!article). That page contain many 
widgets and data downloaded from DB. The DB data & the widgets are mixed 
into each other, for example a label can hold Customer Name (customer name 
came from DB). 

So, everything on that page is javascript, ie when you view source you can 
only see Javascript. However, if you open that GWT page in Chrome & save it 
as "myGwtArticlePage.htm" into your local PC, then reopen the "
myGwtArticlePage.htm", you can see that all the text, widgets... in "
myGwtArticlePage.htm" is exactly the same as the ones in "
mydomain.com#!article".

Now, you right-click & view-source of "myGwtArticlePage.htm", you will see 
not just Javascript but all text, & Db data & widget still in there.

So, the "myGwtArticlePage.htm" is called the Html Snapshot of the "
mydomain.com#!article". 

Are you Clear?

Now I want program at client side to be able to capture all texts of "
myGwtArticlePage.htm".

So, MyArticlePresenter.java (in Client package) should work like this:

private AsyncCallback<GetArticleResult> getArticleCallback=new 
AsyncCallback<GetArticleResult>(){
    @Override
public void onSuccess(GetArticleResult result) {
        String articleData=result.getArticleData;
        //... many other data from DB .....

        myLabel.setText(articleData);
        //... many other widgets that setText of the DB data ....

        // Now what I should do here to get Html Snapshot of 
"`mydomain.com#!article`" ??

    }
}

Note: people say that I can use HTMLUnit, but HtmlUnit work at server not 
at client package. Besides, HTMLUnit couldn't parse GWTP page properly. 
GWTP is GWT app buit under GWTP framework.

I hope someone can help me to ask this question.

http://stackoverflow.com/questions/23718282/how-to-program-at-client-side-to-get-html-snapshot-or-to-capture-all-texts-of

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to