File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes get the data of every row of a t:dataList element Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "get the data of every row of a t:dataList element" Watch "get the data of every row of a t:dataList element" New topic
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
    
    3

"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>
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: get the data of every row of a t:dataList element
 
Similar Threads
Problem with MyFaces t:popup tag
how to search equalignorecase search with hashmap
How to merge two hashtables elements in another hashtable?
Dynamically populate java bean tree
how to store the vector values in bean