Hi Folks,

        Thanks again for all the help with my questions to date â. I have a 
new question though (more of a request for advice really).

        I have set up a system where I have a âgenericâ list form that 
takes as its input a list of objects (theObjects) and a list of property names 
(theNames) and then proceeds to use the names as column titles and accessor 
methods. Example:

        Given this object definition:

        Solider (name, rank, serial_number)

        This list of objects:

        {Patton, General, 4}
        {Benjamin, Private, 6}

        And this List of properties:
        {rank, name}

        I output a list that looks like:

        Rank:           Name:
        General Patton
        Private Benjamin

        It works fine.

        Now, however, I want to add sorting behavior to the column headers. I 
read through my (somewhat dog eared) copy of tapestry in action, but the 
section on column sorting seems to be based on the assumption I know at design 
time what class of objects and what properties will be on screen at runtime 
(which I won't). So it appears I won't be able to use the built in sortColumn 
code (maybe I'm wrong here, if there's a way I'd love to hear it).

        Traditionally my solution to this problem was to hide a <form> on 
screen, put a javascript "onClick" handler on each <th> item and then 
programmatically submit the hidden form after setting its hidden "sort" field 
to indicate the column which was just clicked upon. I can do this again if I 
have to, but it strikes me as a decidedly "un-tapestryish" approach to the 
problem.

        Can anyone suggest a more paradigm appropriate solution here? Some sort 
of bodged directlink approach (make the <th> into directlinks and stuff their 
column names in as parameters)? Is there a way to make the sortColumn approach 
work for me? Something else entirely?

        --- Pat



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to