Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/344.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps PrimeFaces Gmap不显示_Google Maps_Jsf_Primefaces - Fatal编程技术网

Google maps PrimeFaces Gmap不显示

Google maps PrimeFaces Gmap不显示,google-maps,jsf,primefaces,Google Maps,Jsf,Primefaces,我想使用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:

我想使用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>

.
.
.
.


但是地图没有显示,问题是什么?我如何解决它?

而不是我使用的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">

代替ui:我使用的片段

<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">