Dan O'Keefe wrote:
Jeff,
This thread does not deal with sort orders on a cf_DisplayFilteredSelect,
does it?
Nah. DisplayList
I have a plum Generated tage of:
<cf_DisplayFilteredSelect
parentTable="tblFieldType"
primaryKey="n_fieldTypeID"
primaryKeyType="integer"
foreignKey="n_fieldTypeID"
displayColumn="n_fieldTypeID"
displayColumnType="integer"
label="Field Type"
required="Yes">
Which I have changed to:
<cf_DisplayFilteredSelect
parentTable="tblFieldType"
primaryKey="n_fieldTypeID"
primaryKeyType="integer"
foreignKey="n_fieldTypeID"
displayColumn="c_type"
displayColumnType="varchar(15)"
label="Field Type"
required="Yes">
Changing the displayColumn and displayColumnType so it displays a user
friendly name, however, I would still like that display list sorted on
n_fieldTypeID. I do not see an option to do that in the VTM.
There is an orderByClause attribute that does this. How are you checking
for attributes when you say VTM? The orderByClause shows up on mine.
Are you using the tag completion or graphical tag editors to check?
Jeff
Dan
----- Original Message -----
From: "Jeff Fleitz" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, December 03, 2004 11:20 AM
Subject: RE: [plum] Custom Query Sorting
Actually, here is another option that is easy and appears to work. I am
just
taking the URL.sortOrder value from the pulldown and adjusting the query
accordingly. Do you see a drawback to this?
<cfparam name="URL.sortOrder" default="1" type="integer">
<cfscript>
// Select query parameters
selectClause = "Employee.EmployeeID AS Employee_EmployeeID,
Employee.OfficeID AS Employee_OfficeID, Company.CompanyName AS
Company_CompanyName, Office.OfficeName AS Office_OfficeName,
Employee.LastName AS Employee_LastName, Employee.FirstName AS
Employee_FirstName, Employee.MiddleName AS Employee_MiddleName,
Employee.Title AS Employee_Title, Employee.Email AS Employee_Email";
fromClause = "Company, Office, Employee";
whereClause = "Company.CompanyID = Office.CompanyID AND
Employee.OfficeID = Office.OfficeID AND Office.OfficeID = #URL.OfficeID#";
if(URL.sortOrder EQ 1)
orderByClause = "Employee.LastName ASC, Employee.FirstName ASC";
else
orderByClause = "Employee.Email ASC";
GetPersonnel =
Application.DatabaseBlocks.SelectRecords(selectClause:selectClause,
fromClause:fromClause, whereClause:whereClause, orderByClause:
orderByClause);
</cfscript>
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Adam Churvis
Sent: Thursday, December 02, 2004 11:06 PM
To: [email protected]
Subject: Re: [plum] Custom Query Sorting
When you pass a custom query object to the DisplayList Plum
custom tag, it completely circumvents the query building
code, so the sort order cannot act upon it.
However, you bring up an excellent point that could be
approached using a couple of different techniques. Consider this:
1) When you choose a different sort order from the sort order
menu on a list, it re-queries the database using the new sort
order. We *could* approach this problem by enabling
developers to map each sort order choice in the sort order
menu to a method call that returns a specific query object
already sorted in the desired order.
2) There is also the idea of using query of queries to
re-sort the query object, but those of you who have taken our
ColdFusion MX Master Class understand the very negative
internal ramifications of doing this. Still, it might be worth a try.
Anyway, David and I are discussing it and will have an answer
before the final release. I don't know if we'll add the
feature in this release, but we'll have an answer for what and when.
Respectfully,
Adam Phillip Churvis
Member of Team Macromedia
http://www.ProductivityEnhancement.com
Download Plum and other cool development tools, and get
advanced intensive Master-level training:
* C# & ASP.NET for ColdFusion Developers
* ColdFusion MX Master Class
* Advanced Development with CFMX and SQL Server 2000
----- Original Message -----
From: "Jeff Fleitz" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, December 02, 2004 5:57 PM
Subject: [plum] Custom Query Sorting
If you specify a custom query for use in a DisplayList tag,
is there a way
to get the list to honor multiple sort orders? The original
sort orders
specified by Plum don't work now that I am using the custom query.
Jeff
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************