aspose file tools*
The moose likes Other Open Source Projects and the fly likes Highlighting a row when it's selected Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Highlighting a row when it Watch "Highlighting a row when it New topic
Author

Highlighting a row when it's selected

David Mc Dyre
Greenhorn

Joined: Dec 18, 2007
Posts: 11
Hi i want the background colour of a row i select to change colour to yellow when i select it.

I am using 2 dataTables and rendering the second if a certain action is called, i want the second dataTable to to highlight the selected row, the problem is it changes the background colour of all the rows from white to yellow when 1 row is selected.

If anyone has a solution or a suggestion or can help if any way i would really appreciate it.
Thanks in advance.
Here are the dataTables:

<t:dataTable id="routeList" value="#{RouteHandler.routeWithIdList}" var="rowElement" cellspacing="0" cellpadding="3"
border="0" headerClass="listhead" columnClasses="listresults" bgcolor="#FFFFFF" rendered="#{!RouteHandler.selected}">
<t:column width="104">
<h:commandLink id="editLink" action="#{RouteHandler.prepareAddScheduleAction}" >
<hutputText value="#{rowElement.carrierCode}"/>
<f:param name="routeDisplayId" value="#{rowElement.routeDisplayId }"/>
</h:commandLink>
</t:column>
<t:column width="165">
<h:commandLink id="editLink" action="#{RouteHandler.prepareAddScheduleAction}" >
<hutputText value="#{rowElement.departureAirport}"/>
<f:param name="routeDisplayId" value="#{rowElement.routeDisplayId }"/>
</h:commandLink>
</t:column>
<t:column width="920">
<h:commandLink id="editLink" action="#{RouteHandler.prepareAddScheduleAction}" >
<hutputText value="#{rowElement.arrivalAirport}" />
<f:param name="routeDisplayId" value="#{rowElement.routeDisplayId }"/>
</h:commandLink>
</t:column>
</t:dataTable>
<t:dataTable id="routeList" value="#{RouteHandler.routeWithIdList}" var="rowElement" cellspacing="0" cellpadding="3"
border="0" headerClass="listhead" columnClasses="listresults" bgcolor="##FFFF66" rendered="#{RouteHandler.selected}">
<t:column width="104" style="background-color:#FFFF66;">
<h:commandLink id="editLink" action="#{RouteHandler.prepareAddScheduleAction}" >
<hutputText value="#{rowElement.carrierCode}"/>
<f:param name="routeDisplayId" value="#{rowElement.routeDisplayId }" />
</h:commandLink>
</t:column>
<t:column width="165" style="background-color:#FFFF66;">
<h:commandLink id="editLink" action="#{RouteHandler.prepareAddScheduleAction}" >
<hutputText value="#{rowElement.departureAirport}"/>
<f:param name="routeDisplayId" value="#{rowElement.routeDisplayId }" />
</h:commandLink>
</t:column>
<t:column width="920" style="background-color:#FFFF66;">
<h:commandLink id="editLink" action="#{RouteHandler.prepareAddScheduleAction}" >
<hutputText value="#{rowElement.arrivalAirport}" />
<f:param name="routeDisplayId" value="#{rowElement.routeDisplayId }" />
</h:commandLink>
</t:column>
</t:dataTable>
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

<t:dataTable id=


What is t:dataTable?
Is it your own custom tag or are you using a 3rd party library.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
David Mc Dyre
Greenhorn

Joined: Dec 18, 2007
Posts: 11
Hey Ben,

It's a tomahawk dataTable i'm not sure why it has to be t:dataTable, but it does everything else that it should do expect the outlined problem.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If the issue involves a 3rd party library, it's a good idea to mention which one you're using in the first post.

Since the output isn't being build with JSP, I'm going to move this to our Other Open Source Projects forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Highlighting a row when it's selected