Re: WORepitition - Flaging a single row
Re: WORepitition - Flaging a single row
- Subject: Re: WORepitition - Flaging a single row
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 25 Aug 2003 10:43:48 -0500
Well, you've got to figure out: how is my particular WOComponent object
going to know which row it's supposed to hilight? If it knew the pk of the
row it was supposed to hilight, it would be easy to compare this to the pk
of the 'item' binding, and hilight the right row, right? Right now, I'm
guessing you are comparing the pk of the 'item' binding to.... what the
fragment identifier of that item binding should be! But of course, for a
particular row, the fragment identifier should be.... the EO in that row.
So you get a flag on every row.
But you've got to get in a variable somewhere (which isn't the WORepetition
item!), the pk of the proper 'hilighted' row. Now, when the user clicks
on a hyperlink with the fragment ID------the server (that includes your
WOComponent object) doesn't know which fragment (#value) was included in
the URL, that fragment info is just kept by the browser, the browser just
makes a request to the server with the URL up to the fragment ID, and then
uses the fragment ID to jump to a point in the received page.
But, the action method tied to the hyperlink knows which 'item' was clicked
on. Have the action method store this information in an iVar somewhere
(item which was clicked on), and then later you can compare the
itemWhichWasPreviouslyClicked to the currentItem inside your WORepetition,
and if they are the same, flag the row.
Hopefully this will get you started with the right way to think about
things to arrive at a solution.
--Jonathan
At 01:20 AM 8/22/2003 +0100, Jonathan Fleming wrote:
This is purely a cosmetic thing. I use fragmentIdentifier in a WOHyperlink
to go to a row in a WORepitition, however, to the user (it even catches me
out at times), it's not evedent where the row is he's gone back to.
Eventhough we all know it's at the top of the page or somewhere in view if
the anchor can not achieve this, it can have us looking up and down the
page for where we are.
What I'd like to do is flag this row with a tiny flag.gif so the user can
immediatly see where he's at.
The problem I have is even if I use a unique identifier like a PK to
render a conditional true so that the flag shows, this actually show the
flag in every row. How can I achieve showing the flag in only that row of
a WORepitition?
Respect
Jonathan :^)
_________________________________________________________________
Sign-up for a FREE BT Broadband connection today!
http://www.msn.co.uk/specials/btbroadband
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.