【问题标题】:how do I install gwtbootstrap3 tutorial?如何安装 gwtbootstrap3 教程?
【发布时间】:2015-08-05 18:21:56
【问题描述】:

我对 gwt 非常陌生,我需要将现有应用程序更改为 gwtbootstrap 以使用 uibinder 的模板。

我搜索了基本的安装说明。下载后文件在哪里。 来自https://github.com/gwtbootstrap3/gwtbootstrap3/tree/master/gwtbootstrap3

【问题讨论】:

    标签: gwt uibinder gwt-bootstrap gwtbootstrap3


    【解决方案1】:

    如果你没有 Maven

    1) 下载 JAR 文件并将其添加到类路径中 http://mvnrepository.com/artifact/org.gwtbootstrap3/gwtbootstrap3

    2) 在你的 GWT 模块中继承 GwtBootstrap3 模块:

    <module>
        <inherits name="org.gwtbootstrap3.GwtBootstrap3"/>
        ...
    </module>
    

    3) 使用 UiBinder XML 中的小部件:

    <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
                 xmlns:g="urn:import:com.google.gwt.user.client.ui"
                 xmlns:b="urn:import:org.gwtbootstrap3.client.ui">
    
        <b:Container>
            <b:PageHeader>Yay buttons!</b:PageHeader>
    
            <b:Button>Some button</b:Button>
            <b:Button type="DANGER" size="LARGE">Dangerous button</b:Button>
        </b:Container>
    
    </ui:UiBinder>
    

    【讨论】:

    • 我无法解析“b”命名空间,因此页面为空白。是否需要任何其他步骤才能正确解析命名空间?
    • 如果您使用的是 Eclipse,有时很难看到导入的依赖项。我建议通常的清洁(项目>清洁)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-25
    • 1970-01-01
    • 2012-12-29
    • 2012-09-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多