Ayeps / gmaps4jsf

Automatically exported from code.google.com/p/gmaps4jsf
0 stars 0 forks source link

Facelet m:map seemed not to be rendered under Glassfish 3.0.1 / Eclipse 3.5.1 / gmaps4jsf-1.1.3-u3.jar #119

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. I downloaded and installed "GlassFish Tools Bundle For Eclipse 1.2" 
containing Glassfish 3.0.1 and Eclipse 3.5.1

2. Created simple JSF 2.0 test project and placed gmaps4jsf-1.1.3-u3.jar in 
WEB-INF/lib folder. Source code of maps.xhtml:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

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

    <f:view contentType="text/html">

    <h:head> 
    <title>Welcome to GMaps4JSF</title> 
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />       
<script 
src="http://maps.google.com/maps?file=api&amp;v=3&amp;sensor=true_or_false&amp;
        key=ABQIAAAA0RhBrxmu1ruU2HK1J7bSIxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRDGkgrKK9ajQ0PA0hpfEmydHhfVQ" 
        type="text/javascript">
        </script>
    <style>
        html, body { height: 100% }
    </style>
    </h:head>

    <h:body onunload="GUnload()">
        <h:form id="form">
            <div>Ground Overlay</div>       
            <m:map width="90%" height="90%" latitude="24" longitude="15" zoom="2">
                <m:groundoverlay imageURL="http://www.jroller.com/HazemBlog/resource/gmaps4jsf-logo.png" 
                startLatitude="7" endLatitude="23" 
                startLongitude="-54" endLongitude="84" />               
            </m:map>        
        </h:form>
    </h:body>
    </f:view>    
</html>

3. When requesting the page "http://localhost:8084/Maps_test/maps.jsf" I got 
unrendered m:map and other m-coded namespace facelets in html code, while other 
facelets were rendered:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
xmlns:m="http://code.google.com/p/gmaps4jsf/">
<head> 
    <title>Welcome to GMaps4JSF</title> 
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />       
<script 
src="http://maps.google.com/maps?file=api&amp;v=3&amp;sensor=true_or_false&amp; 

key=ABQIAAAA0RhBrxmu1ruU2HK1J7bSIxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRDGkgrKK9ajQ0PA0hp
fEmydHhfVQ" type="text/javascript">
</script>
<style>
    html, body { height: 100% }
</style>
</head>
<body onunload="GUnload()">
<form id="form" name="form" method="post" action="/Maps_test/maps.jsf" 
enctype="application/x-www-form-urlencoded">
<input type="hidden" name="form" value="form" />
    <div>Ground Overlay</div>       
        <m:map width="90%" height="90%" latitude="24" longitude="15" zoom="2">
        <m:groundoverlay imageURL="http://www.jroller.com/HazemBlog/resource/gmaps4jsf-logo.png" startLatitude="7" endLatitude="23" startLongitude="-54" endLongitude="84">
    </m:groundoverlay>
    </m:map><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-6158593230651646131:-8225549783622516372" autocomplete="off" />
</form>
</body>
</html>

See also attached WAR for Glassfish 3.0.1

Original issue reported on code.google.com by shul...@gmail.com on 6 Jul 2010 at 10:37

Attachments:

GoogleCodeExporter commented 9 years ago
To solve this issue then you must create a (faces-config.xml) file as follows:
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
              http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
              version="2.0">
...
</faces-config>

This should solve your problem. for further assistance please let us know.

Original comment by Hazem.sa...@gmail.com on 24 Jul 2010 at 11:19

GoogleCodeExporter commented 9 years ago
Yes, it was useful. Thanks.

Original comment by shul...@gmail.com on 26 Jul 2010 at 9:16