• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

how to highlight row in table ( no radio or check boxes)?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know, how to highlight row background by clicking on a row (onclick or commandLink)? I am using adf jsf table (oracle).
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That can easily be done using Javascript - check out this code at equinox.dev.java.net:

<%-- Step 2. Create a dummy actionLink, w/ no value --%>
<h:commandLink action="#{userForm.edit}" id="editUserLink">
<f aram name="id"/>
</h:commandLink>
<%-- Step 3. Write your own JavaScript function that's easy to call --%>
<script type="text/javascript">
function viewUser(id) {
var f = document.forms['editUser'];
f.elements['editUser:_link_hidden_'].value='editUser:editUserLink';
f.elements['id'].value=id;
f.submit();
}
highlightTableRows("userList");
</script>

Hope that helps,
Anoop Kumar V.
 
Wanna see my flashlight? How about this tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic