gwt integration with HTML page file handling

2010-06-18  来源:本站原创  分类:Web  人气:208 

GWT itself provides some basic WIDGET easy to interface development. Use these WIDGET can develop a very nice system, if your page can not WIDGET developed, if the more difficult times, can use the DOM tool, using tools you can use the HTML DOM syntax to draw the page. Can be completed by the graphic page design, developer, only need to use the DOM tool to carry out, the background of a number of treatment can be.

Such as Element userIdElement = DOM.getElementById ("userId"); so that I can get to the HTML, an element id as userId,
For example in the word, for example page has a login button, I now point the button to trigger the login time. Can do
DOM.sinkEvents (dengluElement, Event.ONCLICK);
public void onBrowserEvent (Event event) (

if (DOM.eventGetType (event) == Event.ONCLICK) (
String userId = userIdElement.getAttribute ("value");
String password = passwordElement.getAttribute ("value");
doLogin (userId, password);
)
)
));

Access to page elements by DOM.getElementById here can be any HTML element.
Then DOM.sinkEvents HTML elements to trigger events.
Finally, DOM.setEventListener adding event listeners.

I believe we should look to understand,

相关文章
  • gwt integration with HTML page file handling 2010-06-18

    GWT itself provides some basic WIDGET easy to interface development. Use these WIDGET can develop a very nice system, if your page can not WIDGET developed, if the more difficult times, can use the DOM tool, using tools you can use the HTML DOM synta

  • [Change] on the page file on the / WEB-INF directory 2010-03-29

    I see "J2EE Core Model" ( "Core J2ee Patterns", Liu Tin North, Bear Festival translation), which referred to a way to achieve resource protection, that is to restrict access to those resources (such as jsp source code) into the Web app

  • Lazy Strategy: Tapestry4 in removing cumbersome. Page file 2010-04-02

    Addressed to the lazy like me. /** * * Ô­ìûóé address: http ://huxiao.javaeye.com/blog/604053 * Reprint, you keep the author information * * @author Yangkai http ://www.blogjava.net/ycyk168 * @author Hu http ://huxiao.javaeye.com [email protected] QQ:37666

  • Jsp page file error introduced Js 2011-01-07

    1) the introduction of the js file error, check the method: write the contents of the Js in the current page <script ...> </ script> between the normal operation to see whether, and if not, please check the code 2) If the introduction of the c

  • Path problem: servlet turn. Simple page browsing. Js file handling 2010-04-29

    Using the code highlighting the evening when, needed to shCoreCommon.js, which used to set up a copy of img and flash path, similar to the javaeye copy the code. Jsp page using the simple (non-jump, but directly enter the URL in the address bar to us

  • gwt integration with hibernate problems encountered 2010-03-25

    ------------------------ ---------------------- March 25 --------------- Always reported so one exception: com.google.gwt.user.client.rpc.SerializationException: Type 'org.hibernate.collection.PersistentBag' was not included in the set of types which

  • JSP page error handling 2010-08-14

    The code is as follows: <% @ Page language = "java" contentType = "text / html" import = "java.util .*"%> <% @ Taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c"%> <html> <b

  • Page and the page file transfer between the case 2010-08-18

    //JSP To submit the page code <form action="upload/result.jsp" method="post" enctype="multipart/form-data"> Information:<input type="text" name="info"><br> File:<input type="file&

  • JSP page error handling in web.xml to achieve production of 404, and 500 2010-12-03

    Add the following code in web.xml file copied to the clipboard Print View <error-page> <error-code> 404 </ error-code> <location> / building.jsp </ location> </ Error-page> <error-page> <error-code> 500 <

  • Maven + Jetty deadlock-free static file handling 2010-03-29

    The Internet looking for a long time, including the official website for a similar solution, but versions of the reason may be because I have been unable to experiment was a success. After careful analysis and see the results, After that success, spe

  • Spring + Struts + Ibatis framework of the integration of the configuration file 2010-03-29

    applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <!-- Load config .pr

  • PHP file handling functions order 2010-02-21

    Installation Filesystem function is an integral part of PHP core. No installation needed to use these functions. Runtime Configuration The conduct of the file system function set of php.ini. File system configuration options: Name Default Description

  • Set the page file upload control for the non-editable text box approach 2010-12-13

    ContentEditable property set to false <input type="file" contentEditable="false"/> Or set checked = "checked" <input type="file" checked="checked"/>

  • python file handling ecel 2010-09-01

    Lf layout today received the task to the effect that reading from a database table, some data and then put exel sheet reconciliations If so thought to write a script python not be very convenient So check the program files python processing exel Then

  • Page document called CSS file 2010-05-31

    Page document called the dark horse CSS file ◇ CSS as efficient, flexible and is widely used in web page production. Unusual is that, CSS both embedded HTML files in various ways, also can file the form of independent existence has been and always ca

  • [Excellent] seizing those gloves (Pillager's Gloves): read http page generated html file (generated static page very convenient) 2010-06-21

    Seizing those gloves lock a hand binding equipment 131 Armor Durability 35/35 Requires Level 29 - The gloves can fetch a lot of web content, a better effect on their own after the upgrade. /** * */ package com.test; import java.io.FileWriter; import

  • Data URI in a web page embedded with Base64 encoded file 2011-05-15

    Base64 encoding embedded in the page file This approach can be converted to Base64 encoding of any file Here are online conversion site: http://www.motobit.com/util/base64-decoder-encoder.asp Example: Display is stored as a Base64 encoded string usin

  • Super file, directory handling classes (upload files) 2011-04-04

    Uploading the project to use some time ago, can someone upload class, with a very bad mood, so I wrote a yourself, we can see. Well, back to the question: The Upload class in support of directory operations, multi-file upload .. function; File.class.

  • Notes from Tomcat and IIS integration 2010-03-29

    Documents and version: Download Tomcat: Apache Tomcat 6.0.18 File Name: apache-tomcat-6.0.18.exe Java JDK: JDK 1.6.11 (JDK 6 u11) the file name: jdk-6u11-windows-i586-p.exe Connector: jk2 file name: isapi_redirector2.dll Registry file name: jk2.reg I

  • GWT Introduction Introduction 2010-03-19

    GWT Introduction Introduction GWT Introduction Introduction GWT is the Google Web Toolkit short. GWT is a Java language as a tool in a similar way to write UI components Swing, followed by GWT Compiler Compiler To JavaScritp and HTML in the client br