2

我正在尝试使用 JSF 复制以下 html 页面。但是找不到正确的 JSF 标记来执行此操作。

HTML 内容(必需的 HTML):

<body>
<div class="image">
    <img src="image.jpg" alt="Image" usemap="#Map" border="0" />
    <map name="Map" id="Map">
        <area shape="circle" id="circle" coords="135,596,34" href="http://www.google.co.in" alt="Circle" />
        <area shape="rect" id="square" coords="192,567,249,628" href="http://www.youtube.com" alt="Square" />
    </map>
</div>
</body>

JSF 页面(要修改 JSF 以获取 HTML 之上):

<body>
<f:view>
<h:outputText value="This is a JSF page"></h:outputText>
<br/>
<h:form>
<h:graphicImage id="image" value="image.jpg" usemap="true">
    <h:commandLink action="#{managedBean.method}" id="links1" value="map1" coords="135,596,34" shape="circle"></h:commandLink>
    <h:commandLink action="#{managedBean.method}" id="links2" value="map2" coords="192,567,249,628" shape="rec"></h:commandLink>
</h:graphicImage>
</h:form>
</f:view>
</body>

请建议正确的 JSF 格式以使用 JSF 页面复制上述 HTML 页面,并在单击链接时调用 ManagedBean 的方法。

4

0 回答 0