Re: WOHyperlink Passing a value back...
Re: WOHyperlink Passing a value back...
- Subject: Re: WOHyperlink Passing a value back...
- From: James Cicenia <email@hidden>
- Date: Wed, 9 Jun 2004 19:10:21 -0500
Thank you Sam for your reply. I went ahead and wrote my own sorting
methods.
I didn't really want to write 14 different actions for the 14 different
headers but that
is what I did. The list has a default sort and then when the user
clicks the hyperlinked
header it toggles the sort ascending and then descending.
I didn't use the WODisplayGroup because I am
1) Inexperienced with it
2) Didn't know if it would be able to handle my custom methods in the
repetition.
Maybe my next utility page I will try to use WODisplayGroup
-James
On Jun 9, 2004, at 6:44 PM, Sam Barnum wrote:
Did you run into intractable difficulties with the WODisplayGroup?
Once you get comfortable with using WODisplayGroups they can save you
a lot of hassle like this.
You can create a new displayGroup, then set the object array (or pass
an EOArrayDataSource), and use WOSortOrder components in the headers
to sort the display group. Or, create your own custom MySortOrder
component (maybe by subclassing WOSortOrder) if you don't like the way
the WO one looks/works.
If you decide to just stick with a plain NSArray, you can still write
your own custom component which sorts an NSArray, which is probably
much preferable to appending sort keys to the end of custom actions in
the table header. It might have the following bindings:
list - array to sort (sets the value)
key - keypath to sort the array by
Only problem with this approach is, it's difficult to graphically
represent which column is the active sort column, since that
information isn't maintained anywhere. You would probably want a
third binding to manage that. Since the WODisplayGroup maintains its
own sorting order, this info can be retrieved from there by the
WOSortOrder component.
On Jun 8, 2004, at 4:44 PM, James Cicenia wrote:
Hello -
I have decided to implement my own sortable headers by allowing
the person to click a WOHyperLink on column headers. I was hoping
that it would allow me to pass back a constant which in this case
would be the key to sort on.
Without using directActions is this possible? OR, do I have to write a
action for every column... yuk.
Thanks again,
James Cicenia
_______________________________________________
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.
_______________________________________________
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.