[OpenLayers-Users] problems with FramedCloud Popup and JSF pages

Ignacio Talavera ignacio.talavera at gmail.com
Tue Mar 31 11:40:25 EDT 2009


Hi I've tested FrameCloudPopup in an html page and work properly.I'm working
with RichFaces Facelets and JSF technologies to build my web application so
 I try to put it in a JSF page I found that the size of the popup is smaller
and not the suitable to show allof its contents div..

Here is a portion of my code

\\mapEvents.js
 function showPopup(feature) {
     if(feature==undefined) return;


     selectedFeature = feature;

            popup = new OpenLayers.Popup.FramedCloud("chicken",

feature.geometry.getBounds().getCenterLonLat(),
                                     null,
                                     "<div>" +
getFeatureInfo(feature)+"</div>",
                                     null, true, onFeatureUnselect);

            feature.popup = popup;
            map.addPopup(popup);
        }



 function getFeatureInfo(feature){

       tableStr='<table class="featureInfo">'+
         '<caption class="featureInfo">Proyecto</caption>'+
   '<tr>'+
     '<th >nombre</th>'+
     '<th >descripcion</th>'+
   '</tr>'+
   '<tr>'+
       '<td>'+feature.data.nombre+'</td>'+
       '<td>'+feature.data.descripcion+'</td>'+
   '</tr>'+
'</table>'
         hrefStr= "<a href=\""+feature.data.link_ver_pagina +"\"
target=\"_blank\">" +"Info"+"</a>";
        return tableStr+ hrefStr;

        }
The fundamental difference I noticed is that the JSF pages add additional
css that the html doesn't include and makes div elements inherit, so I
suppose the autosize property of the
OL Popup behaves different .
Any Help?
Thanks
Nacho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090331/7c9828fb/attachment.html


More information about the Users mailing list