href和iframe webcenter上的java动态值
我正在尝试为基于Portlet的web应用程序生成一个自定义地图,正如我所看到的,google maps提供了一个框架,它获取一些坐标并在地图上绘制它们。我想根据我存储的一些变量进行操作,但我无法将它们包括在href或iframe中,它只是打印对变量的整个引用,即#{EntregaListaBean.entregaActual.longitud}。 有人知道我犯了什么错吗?我能做些什么来动态生成它
下面是一段代码,它可以工作并使用存储的值:
<h:outputLabel value="Etapa actual" id="ol3"
style="font-weight:bold;"/>
<h:outputText value="#{EntregaListaBean.entregaActual.etapa}" id="ot4"/>
下面是一个根本不起作用的代码:
<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}&ie=UTF8&t=w&z=14&ll=#{EntregaListaBean.entregaActual.latitud},-#{EntregaListaBean.entregaActual.longitud}&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?q=#{EntregaListaBean.entregaActual.latitud},#{EntregaListaBean.entregaActual.longitud}&ie=UTF8&t=w&z=14&ll=#{EntregaListaBean.entregaActual.latitud},#{EntregaListaBean.entregaActual.}&source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>
# 1 楼答案
你可以使用
<af:inlineFrame>
标签,它呈现一个iframe,你可以像你的例子一样使用EL