• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie question about highlighting rows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question about highlighting rows


  • Subject: Re: Newbie question about highlighting rows
  • From: Sacha Michel Mallais <email@hidden>
  • Date: Tue, 25 Jul 2006 08:54:06 -0700

On Jul 25, 2006, at 7:13 AM, Chip Myers wrote:

I'm currently generating a series of rows within a WORepetition. The best way to show the structure is as follows:

SELECT     PERSON A    CITY A    STATE A
________________________________________

SELECT     PERSON B    CITY B    STATE B
________________________________________

SELECT     PERSON C    CITY C    STATE C

Upon clicking the 'select' hyperlink, I'd like to highlight this entire row, and only this row. Unfortunately, I end up highlighting the entire table when the page refreshes itself. I should add that I have an alternating white and gray row pattern which is generated from a few session variables. Since this occurs in the session, I've also tried creating a session flag called boolThisRowSelected, to determine when the highlight should occur, but it just hasn't worked yet.

Is there an easy way to highlight just one row within a WORepetition without having to create more session variables?

You can't highlight a row only using WORepetition, nor should you be using the session to store temporary (page-based) information.


I would do the following (note that this assumes you are alright with the page reloading in order to accomplish the row highlight): first, add an index binding to the repetition. Then, inside the repetition, modify the <tr> tag to be <tr <WEBOBJECT NAME=HighlightConditional>style="background: grey;"</WEBOBJECT>>, where HighlightConditional is a WOConditional bound to a method that returns true only when the selected index equals the current index. Finally, modify the action method that the SELECT hyperlink is bound to so that it sets the selected index when it is clicked.

HTH,


sacha


-- Sacha Michel Mallais Senior Developer / President Global Village Consulting Inc. http://www.global-village.net/ PGP Key ID: 7D757B65 AIM: smallais


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Newbie question about highlighting rows
      • From: Guido Neitzer <email@hidden>
    • Re: Newbie question about highlighting rows
      • From: Robert Walker <email@hidden>
References: 
 >Newbie question about highlighting rows (From: Chip Myers <email@hidden>)

  • Prev by Date: RE: EOObjectNotAvailableException
  • Next by Date: Re: JDBCChannel method failed to update
  • Previous by thread: Newbie question about highlighting rows
  • Next by thread: Re: Newbie question about highlighting rows
  • Index(es):
    • Date
    • Thread