• Post Reply Bookmark Topic Watch Topic
  • New Topic

get the data of every row of a t:dataList element  RSS feed

 
xisco faulĂ­
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 5625
748
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"xisco ocsix", please check your private messages regarding an important administrative matter.
 
xisco faulĂ­
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!