| Author |
get the data of every row of a t:dataList element
|
xisco faulĂ
Greenhorn
Joined: Apr 09, 2010
Posts: 2
|
|
Hi,
i'm doing a web to show different imageMaps with links to other pages. Every Imagemap has a link to a different page, so I need to know which picture the user is clicking to, but I can't figure out how to do it. I have tried f:param and HtmlDataList@getRowData() but both always point to the first row. Any idea ?
thanks
|
 |
Devaka Cooray
Saloon Keeper
Joined: Jul 29, 2008
Posts: 2692
|
|
|
"xisco ocsix", please check your private messages regarding an important administrative matter.
|
Author of ExamLab (Download) - the free mock exam kit for SCJP / OCPJP
Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
|
 |
xisco faulĂ
Greenhorn
Joined: Apr 09, 2010
Posts: 2
|
|
After long time looking for the solution I fixed it. It was easier than I though. I'm so glad i'm done with this. The solution:
<t:dataList value="#{image.map}"
var="item">
<h:commandLink immediate="true" actionListener="#{image.getImage}" shape="rect" coords="#{item.clickableArea.posX},#{item.clickableArea.posY},#{item.clickableArea.width},#{item.clickableArea.height}">
<h:graphicImage value="img/#{item.thumbnail.url}" style="position:absolute; left :#{item.thumbnail.posY}; top:#{item.thumbnail.posX};" height="#{item.thumbnail.height}" width="#{item.thumbnail.width}">
</h:graphicImage>
<f:attribute name="docNum" value="#{item.locationIDRef}"/>
</h:commandLink>
</t:dataList>
|
 |
 |
|
|
subject: get the data of every row of a t:dataList element
|
|
|