【问题标题】:PrimeFaces Gmap does not showPrimeFaces Gmap 不显示
【发布时间】:2015-06-30 07:54:28
【问题描述】:

我想用primefaces gmap,我的xhtml文件是这样的:

<ui:fragment xmlns="http://www.w3.org/1999/xhtml"
         xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:p="http://primefaces.org/ui">
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript" ></script>
<p:dataGrid id="list" var="l" value="#{bean.list}" columns="1" style="width:100%">
    <h:form>
        <f:view contentType="text/html">
            <p:gmap center="41.381542,2.122893" zoom="15" type="HYBRID" style="width:100%;height:400px"/>
        </f:view>
    </h:form>
    <p:fieldset collapsed="true" toggleable="true" toggleSpeed="500" legend="#{l.username}"
                style="text-align:left">
        <h:panelGrid columns="2" style="width:100%">
            .
            .
            .
            .
        </h:panelGrid>
    </p:fieldset>
</p:dataGrid>

但是地图不显示,是什么问题?我该如何解决?

【问题讨论】:

    标签: google-maps jsf primefaces


    【解决方案1】:

    我使用 ui:fragment 而不是

    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-01
      • 2011-06-12
      • 1970-01-01
      • 1970-01-01
      • 2011-08-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多