Question

I'm trying to generate a custom map for a web application based on portlets, for what I've seen so far, google maps offers and i frame which takes some coordinates and draws them on the map. I want to do it according to some variables i have stored but i cna't manage to include them in the href nor in the iframe it just prints the whole reference to the variable i.e #{EntregaListaBean.entregaActual.longitud}. Does anybody know what's my error? what can i do to generate it dynamically?

here's a piece of code that does work and uses the values stored:

 <h:outputLabel value="Etapa actual" id="ol3"
                     style="font-weight:bold;"/>
      <h:outputText value="#{EntregaListaBean.entregaActual.etapa}" id="ot4"/>

And heres a code that simply doesnt work:

      <a href="https://maps.google.com/maps?q=#{EntregaListaBean.entregaActual.latitud}",#{EntregaListaBean.entregaActual.longitud}"&t=w&z=17" target="_blank">Ver posicion actual</a>
  <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q=#  {EntregaListaBean.entregaActual.latitud},#{EntregaListaBean.entregaActual.longitud}&amp;ie=UTF8&amp;t=w&amp;z=14&amp;ll=#{EntregaListaBean.entregaActual.latitud},-#{EntregaListaBean.entregaActual.longitud}&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?q=#{EntregaListaBean.entregaActual.latitud},#{EntregaListaBean.entregaActual.longitud}&amp;ie=UTF8&amp;t=w&amp;z=14&amp;ll=#{EntregaListaBean.entregaActual.latitud},#{EntregaListaBean.entregaActual.}&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>     
Was it helpful?

Solution

you can use the <af:inlineFrame> tag, it renders an iframe and you can use EL like your example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top