用于GWT的Twitter Bootstrap不起作用

时间:2012-06-23 10:32:58

标签: gwt twitter-bootstrap

我正在尝试使用Twitter Bootstrap for GWT并获得与展示here相同的漂亮和漂亮的视图,这就是我所做的:

1-从git

下载了该模块

在pom.xml中运行包任务

3-在我的项目类路径中包含了创建的jar。

4-使用

继承了project.gwt.xml文件中的模块
<inherits name="com.github.nyao.bootstrap4gwt.Bootstrap"/>

5-将模块包含在我的root xml

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
             xmlns:g='urn:import:com.google.gwt.user.client.ui'
             xmlns:m='urn:import:com.clouway.exreport.client.accountcreation.view'
             xmlns:t='urn:import:com.github.nyao.bootstrap4gwt.client.ui'
        >

  <ui:style src="newRegistrationStyle.css"/>
  <g:HTMLPanel addStyleDependentNames="{style.mainPanel}">
    <div class="{style.headdistance}"/>
    <div class="{style.container}">

      <g:DecoratorPanel addStyleDependentNames="{style.decoratorPanel}">

        <g:VerticalPanel addStyleDependentNames="{style.verticalPanel}}">

          <m:AccountEditor ui:field="accountEditor"/>

          <!--<g:Button ui:field="create" text="create"/>-->
         <t:Button type="Success"   text="sing in"/>
          <g:Label ui:field="errorsLabel"/>
...

</ui:UiBinder> 

但什么都没发生。我有正常的文本框和普通按钮。

enter image description here 我看了一下非常好的this教程,那个人把事情搞定了,他的应用程序看起来很漂亮。我看了看他的代码,但没有找到任何理由为什么我看起来仍然正常,他得到了很好的看法。感谢您的帮助

1 个答案:

答案 0 :(得分:11)

尝试使用gwtbootstrap而不是使用bootstrap4gwt,这比前者更好,并且具有更多的组件。该论坛在gwtbootstrap中也非常活跃。