开发者

GWT Dynamic page generation

I have written a webpage with GWT which contains auto-generated Hyperlinks. These hyperlinks currently dont point to anything, however, I want them to display certain dynamic information based on the name of the hyperlink. For instance if the hyperlink says iPhone, it should open up开发者_运维问答 another URL with dynamic information about the iPhone which I retrieve from my database. I know JSP/Servlets are used to generate dynamic information on webpages, but how can I integrate such functionality into my GWT webpage?

Thanks


Great this certainly helps in giving me an idea on how I can go about my design.

As a follow up though I have a question on how I can access my backend DB. Now I have stored some data in a SQLite DB which I want to be displayed on the webpage. I was able to implement backend access via GWT's RPC, however, it doesnt seem to allow transfer of a ResultSet object returned by a query. How can ResultSets be transferred? In my browsing I have seen a few keywords such as DTO, JPA etc thrown around but I dont quite have a picture on how they will plug in.


How about this:

  1. [CLIENT]: add a ClickHandler to your hyperlinks where you execute the following steps:
  2. [CLIENT]: retrieve token from hyperlink (i.e. iPhone).
  3. [CLIENT]: access the backend (RPC, RequestFactory or normal RequestBuilder) and pass the token (iPhone) to the backend
  4. [SERVER]: On the backend (servlet, python, php, etc) handle the AJAX call from your GWT app and return the dynamic information based on the token.
  5. [CLIENT]: Display the dynamic information returned by the server call (step 3) in a HTMLPanel or SimplePanel
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜