将Htmls集成到GWT中 [英] Integrate Htmls into GWT

查看:148
本文介绍了将Htmls集成到GWT中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Web应用程序,其UI基于GWT。
我们对这项技术非常满意,但是我们遇到了一个主要问题:我们从设计人员那里获取html文件,并且需要很长时间才能将它们集成到我们的GWT代码中。



有没有快速的方法或规则来做到这一点?



例如,我想将html放在ui.xml文件中,按照原样放入,然后开始将组件绑定到UiBinder字段。
最快的方法是什么?我应该如何处理获得的CSS和JS文件?



我需要一些指导来进行此转换,所以它会很快并且很快就会完成。容易。

解决方案

Errai似乎符合您的要求。

基本上是使用常规的HTML5模板,绑定到GWT逻辑。
$ b 创建符合标准的HTML5模板或使用现有的HTML和CSS文件来设计您的网络和移动应用程序。



http://errai.github.io/



以下是登录页面的示例:

 <!DOCTYPE html> 
< link rel = stylesheet href =css / TodoList.css>
< div data-field =main>
< h1>使用Errai完成它。< / h1>
< div class = form>
< p class = error data-field = loginError>
登录失败。请检查您的电子邮件地址和密码是否正确输入。
< / p>
< input type = text data-field = username placeholder =Email>
< input type = password data-field = password placeholder =Password>
<按钮数据字段= loginButton>登录< /按钮>
< p>新的在这里? < a href =SignupPage.htmldata-field =signupLink>以秒为单位注册!< / a>< / p>
< / div>
< / div>

source



(ps我从来没有用过它)


We have a web application that its UI is based on GWT. We are pretty satisfied from the technology, but we have one major problem: We get html files from our designer, and it takes a lot of time to integrate them into our GWT code.

Is there a quick way or rules to do that?

For instance, I would like to take the html, put it almost "as is" in a ui.xml file, and then start binding the components to UiBinder fields. What is the quickest way to do that? What should I do with the CSS and JS files that I get?

I need some guidelines to make this conversion, so it will be quick & easy.

解决方案

Errai seems to fit your requirements.

Basically is uses regular HTML5 templates, binded to GWT logic.

"Create standard conform HTML5 templates or use existing HTML and CSS files to design your web and mobile applications."

http://errai.github.io/

Here is an example of a sign-in page:

<!DOCTYPE html>
<link rel=stylesheet href="css/TodoList.css">
<div data-field="main">
  <h1>Get it done with Errai.</h1>
  <div class=form>
    <p class=error data-field=loginError>
      Login failed. Please check that your email address and password were entered correctly.
    </p>
    <input type=text data-field=username placeholder="Email">
    <input type=password data-field=password placeholder="Password">
    <button data-field=loginButton>Sign In</button>
    <p>New here? <a href="SignupPage.html" data-field="signupLink">Sign up in seconds!</a></p>
  </div>
</div>

source

(p.s. I've never used it, yet)

这篇关于将Htmls集成到GWT中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆