|
Subject: RE: Column sorting in contrib:Table Newsgroups: gmane.comp.java.tapestry.user Date: 2004-09-20 23:51:04 GMT (4 years, 3 weeks, 2 days, 7 hours and 57 minutes ago)
I am sure I am missing something here ...
It is basically just ignoring the second block of code. I also can't
really see the tie in between
the two.
I have the following
<component id="table" type="contrib:Table">
<binding name="source" expression="callReport"/>
<binding name="columns">
'!select:select:select,' +
'extensionNo:Extns:extensionNo,' +
'username:Username:username,' +
'date:Date:dateFormatted,' +
'time:Time:timeFormatted,' +
'Duration:duration,' +
'numberCalled:Number Called:numberCalled,' +
'pabxLocation:Location:pabxLocation,' +
'departmentId:Department:department'
</binding>
<binding name="pageSize" expression="500"/>
<binding name="pagesDisplayed" expression="25"/>
<binding name="rowClass" expression="next"/>
</component>
<component id="durationColumnValue" type="Block"/>
<component id="formattedDuration" type="Insert">
<binding name="value" expression="table.currentRow.time"/>
</component>
Of course I am use the time as a value .. But this is just for a test.
I have tried
<binding name="value" expression="table.currentRow.formattedDuration"/>
and even silly things that I know will return a value. Nothing is
ever seen in the table.
Any ideas ?
-----Original Message-----
From: Jamie Orchard-Hays [mailto:jamie <at> dang.com]
Sent: Tuesday, 21 September 2004 9:13 AM
To: Tapestry users
Subject: Re: Column sorting in contrib:Table
You could insert any value you want into that blocked code. It doesn't
have to come from the jobOpsResultsTable even.
Or, it could be a value combined from different properties of the row:
<component id="formattedDuration" type="Insert">
<binding name="value
expression="jobOpsResultsTable.currentRow.someValue+ ' ' +
jobOpsResultsTable.someOtherValue"/>
</component>
----- Original Message -----
From: "Lindsay Steele" <lsteele <at> iinet.net.au>
To: "'Tapestry users'" <tapestry-user <at> jakarta.apache.org>
Sent: Monday, September 20, 2004 7:00 PM
Subject: RE: Column sorting in contrib:Table
> Hi Jamie,
> That is close - and as you say it is a very simple way of
> doing things.
>
> I am close to getting it running - the only problem is that I am
> sorting on a value that is quite different (munged) to the displayed
> valued. You are showing
> a value that is a date and using the date format.
>
> Is there a way to just insert the value from elsewhere ?? .. Or
> should I maybe convert the int I have to a date and use a date format
> on that.
>
> Thanks,
>
> Lindsay
>
>
> -----Original Message-----
> From: Jamie Orchard-Hays [mailto:jamie <at> dang.com]
> Sent: Tuesday, 21 September 2004 7:59 AM
> To: Tapestry users
> Subject: Re: Column sorting in contrib:Table
>
>
> I think you're over-complicating this.
>
> Here's an example:
>
> <component id="jobOpsResultsTable" type="Table">
> <binding name="data" expression="job"/>
> <static-binding name="columns" value="!jobTitle:jobTitle,
> company
> duration:duration,
> resumeDueDate,
> opportunityExpiryDate"/>
> </component>
>
>
> <component id="durationColumnValue" type="Block"/>
> <component id="formattedDuration" type="Insert">
> <binding name="value"
> expression="jobOpsResultsTable.currentRow.duration"/>
> <binding name="format"
> expression=":@some.package.SomeClass.@DATE_FORMAT"/>
> </component>
>
> the first "duration" in the Table is the label for the top of the
> column, the "duration" after the colon tells the Table what property
> to sort on. If it's left out and you have a block then it won't sort.
> With it there, it will sort on that value even though the column value
> is intercepted by the block.
>
> Hope this helps,
> Jamie
>
>
> ----- Original Message -----
> From: "Lindsay Steele" <lsteele <at> iinet.net.au>
> To: "'Tapestry users'" <tapestry-user <at> jakarta.apache.org>
> Sent: Monday, September 20, 2004 5:33 PM
> Subject: Column sorting in contrib:Table
>
>
> > Hi,
> > I am having some minor hassles with the column sorting in the
> > table.
> >
> > The problem is I have a duration field, this is an int for the
> > number
>
> > of seconds. I display from another method that shows the value
> > formatted in minutes and seconds.
> >
> > I have looked for solutions in the archives and have come up with
> > the
>
> > use of the
> > an ExpressionTableColumn. I am trying to have one of these
returned
> > in the data
> > object passed to the table - this is not working and I am unsure if
> > I
>
> > am doing it correctly.
> >
> > Does anyone have any code examples or ideas on how I might
> > implement column sorting in the table ??
> >
> > <binding name="columns">
> > '!select:select:select,' +
> > 'extensionNo:Extns:extensionNo,' +
> > 'username:Username:username,' +
> > 'date:Date:dateFormatted,' +
> > 'time:Time:timeFormatted,' +
> > 'duration:Duration:durationFormatted,' +
> > 'numberCalled:Number Called:numberCalled,' +
> > 'pabxLocation:Location:pabxLocation,' +
> > 'departmentId:Department:department'
> > </binding>
> >
> > Thanks,
> >
> > Lindsay
> >
> >
> >
> > --------------------------------------------------------------------
> > -
> > To unsubscribe, e-mail: tapestry-user-unsubscribe <at> jakarta.apache.org
> > For additional commands, e-mail:
tapestry-user-help <at> jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe <at> jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help <at> jakarta.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe <at> jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help <at> jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe <at> jakarta.apache.org
For additional commands, e-mail: tapestry-user-help <at> jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe <at> jakarta.apache.org
For additional commands, e-mail: tapestry-user-help <at> jakarta.apache.org
|
|
|