Populating obectAdmin through custom query

View: New views
5 Messages — Rating Filter:   Alert me  

Populating obectAdmin through custom query

by James Buckingham-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hiya,

We're want to embed a custom query inside the same sortable table
layouts used by the FarCry types. Is that possible?

Looking at the tag I noticed we can pass in our own custom query
(attributes.qRecordset) and order, filter etc. but no matter what
combination I put in I get an error.

Latest error is " Element STFIELDS is undefined in ST." (Link 889) and
here is the code I'm currently using (based on a query from the
Livedocs):

<cfsetting enablecfoutputonly="true">

<cfimport taglib="/farcry/core/tags/formtools" prefix="ft" />
<cfimport taglib="/farcry/core/tags/admin/" prefix="admin" />

<!--- Create a new three-column query, specifying the column data
types --->
<cfset myQuery = QueryNew("Name, Time, Advanced", "VarChar, Time, Bit")
>

<!--- Make two rows in the query --->
<cfset newRow = QueryAddRow(MyQuery, 2)>
<!--- Set the values of the cells in the query --->
<cfset temp = QuerySetCell(myQuery, "Name", "The Wonderful World of
CMFL", 1)>
<cfset temp = QuerySetCell(myQuery, "Time", "9:15 AM", 1)>
<cfset temp = QuerySetCell(myQuery, "Advanced", False, 1)>
<cfset temp = QuerySetCell(myQuery, "Name", "CFCs for Enterprise
Applications", 2)>
<cfset temp = QuerySetCell(myQuery, "Time", "12:15 PM", 2)>
<cfset temp = QuerySetCell(myQuery, "Advanced", True, 2)>

<cfset columnArray = arrayNew(1) />
<cfset columnArray[1] = "Name" />
<cfset columnArray[2] = "Time" />
<cfset columnArray[3] = "Advanced" />

<ft:objectAdmin
        title="Test"
        qRecordSet="#myQuery#"
        typename="AtoZ"
        ColumnList="Name,Title,Advanced"
        aCustomColumns="#columnArray#"
        bSelectCol="false"
        SortableColumns="true"
        bShowActionList="false" />

<cfsetting enablecfoutputonly="false">

So the end result should be a table with the Columns
"Name,Title,Advanced" from the records I'm providing from my query.

Any help is appreciated.

Cheers,
James
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---


Re: Populating obectAdmin through custom query

by Chris Kent-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


James,

I have not used the qRecordSet, but have used stFilterMetaData to
filter the content in objectAdmin

Have a look at /core/webtop/customadmin/cutomlists/farFU.cfm or for /
core/webtop/customadmin/cutomlists/farLog_security.cfm examples

Chris.


On Oct 30, 3:01 pm, James Buckingham <clarke...@...> wrote:

> Hiya,
>
> We're want to embed a custom query inside the same sortable table
> layouts used by the FarCry types. Is that possible?
>
> Looking at the tag I noticed we can pass in our own custom query
> (attributes.qRecordset) and order, filter etc. but no matter what
> combination I put in I get an error.
>
> Latest error is " Element STFIELDS is undefined in ST." (Link 889) and
> here is the code I'm currently using (based on a query from the
> Livedocs):
>
> <cfsetting enablecfoutputonly="true">
>
> <cfimport taglib="/farcry/core/tags/formtools" prefix="ft" />
> <cfimport taglib="/farcry/core/tags/admin/" prefix="admin" />
>
> <!--- Create a new three-column query, specifying the column data
> types --->
> <cfset myQuery = QueryNew("Name, Time, Advanced", "VarChar, Time, Bit")
>
>
>
> <!--- Make two rows in the query --->
> <cfset newRow = QueryAddRow(MyQuery, 2)>
> <!--- Set the values of the cells in the query --->
> <cfset temp = QuerySetCell(myQuery, "Name", "The Wonderful World of
> CMFL", 1)>
> <cfset temp = QuerySetCell(myQuery, "Time", "9:15 AM", 1)>
> <cfset temp = QuerySetCell(myQuery, "Advanced", False, 1)>
> <cfset temp = QuerySetCell(myQuery, "Name", "CFCs for Enterprise
> Applications", 2)>
> <cfset temp = QuerySetCell(myQuery, "Time", "12:15 PM", 2)>
> <cfset temp = QuerySetCell(myQuery, "Advanced", True, 2)>
>
> <cfset columnArray = arrayNew(1) />
> <cfset columnArray[1] = "Name" />
> <cfset columnArray[2] = "Time" />
> <cfset columnArray[3] = "Advanced" />
>
> <ft:objectAdmin
>         title="Test"
>         qRecordSet="#myQuery#"
>         typename="AtoZ"
>         ColumnList="Name,Title,Advanced"
>         aCustomColumns="#columnArray#"
>         bSelectCol="false"
>         SortableColumns="true"
>         bShowActionList="false" />
>
> <cfsetting enablecfoutputonly="false">
>
> So the end result should be a table with the Columns
> "Name,Title,Advanced" from the records I'm providing from my query.
>
> Any help is appreciated.
>
> Cheers,
> James
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---


Re: Populating obectAdmin through custom query

by Blair McKenzie-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

objectadmin is the result of years of extension and revision and is quite complicated under the hood. It's possible that attribute no longer works, or that it depends on the database or schema in some way.

If you the admin is related to a type you can try simply using the sqlwhere and sqlorderby attributes to achieve the filtering you're after. We do this a lot when we want an admin that is filtered by status, or only showing objects using a particular media item.

Blair

On Sat, Oct 31, 2009 at 2:22 AM, Chris Kent <mxdesign@...> wrote:

James,

I have not used the qRecordSet, but have used stFilterMetaData to
filter the content in objectAdmin

Have a look at /core/webtop/customadmin/cutomlists/farFU.cfm or for /
core/webtop/customadmin/cutomlists/farLog_security.cfm examples

Chris.


On Oct 30, 3:01 pm, James Buckingham <clarke...@...> wrote:
> Hiya,
>
> We're want to embed a custom query inside the same sortable table
> layouts used by the FarCry types. Is that possible?
>
> Looking at the tag I noticed we can pass in our own custom query
> (attributes.qRecordset) and order, filter etc. but no matter what
> combination I put in I get an error.
>
> Latest error is " Element STFIELDS is undefined in ST." (Link 889) and
> here is the code I'm currently using (based on a query from the
> Livedocs):
>
> <cfsetting enablecfoutputonly="true">
>
> <cfimport taglib="/farcry/core/tags/formtools" prefix="ft" />
> <cfimport taglib="/farcry/core/tags/admin/" prefix="admin" />
>
> <!--- Create a new three-column query, specifying the column data
> types --->
> <cfset myQuery = QueryNew("Name, Time, Advanced", "VarChar, Time, Bit")
>
>
>
> <!--- Make two rows in the query --->
> <cfset newRow = QueryAddRow(MyQuery, 2)>
> <!--- Set the values of the cells in the query --->
> <cfset temp = QuerySetCell(myQuery, "Name", "The Wonderful World of
> CMFL", 1)>
> <cfset temp = QuerySetCell(myQuery, "Time", "9:15 AM", 1)>
> <cfset temp = QuerySetCell(myQuery, "Advanced", False, 1)>
> <cfset temp = QuerySetCell(myQuery, "Name", "CFCs for Enterprise
> Applications", 2)>
> <cfset temp = QuerySetCell(myQuery, "Time", "12:15 PM", 2)>
> <cfset temp = QuerySetCell(myQuery, "Advanced", True, 2)>
>
> <cfset columnArray = arrayNew(1) />
> <cfset columnArray[1] = "Name" />
> <cfset columnArray[2] = "Time" />
> <cfset columnArray[3] = "Advanced" />
>
> <ft:objectAdmin
>         title="Test"
>         qRecordSet="#myQuery#"
>         typename="AtoZ"
>         ColumnList="Name,Title,Advanced"
>         aCustomColumns="#columnArray#"
>         bSelectCol="false"
>         SortableColumns="true"
>         bShowActionList="false" />
>
> <cfsetting enablecfoutputonly="false">
>
> So the end result should be a table with the Columns
> "Name,Title,Advanced" from the records I'm providing from my query.
>
> Any help is appreciated.
>
> Cheers,
> James



--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---


Re: Populating obectAdmin through custom query

by James Buckingham-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks Chris / Blair,

Unforunately it's not a type. We've got some custom LDAP querying that
we're wanting to put in. Basically the LDAP plugins that comes with
FarCry only show us users that are connected to LDAP AND have logged
into FarCry. We're wanting to have a quick display of users that have
LDAP access to FarCry but haven't logged in yet.

Cheers,
James
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---


Re: Populating obectAdmin through custom query

by James Buckingham-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> > > <ft:objectAdmin
> > >         title="Test"
> > >         qRecordSet="#myQuery#"
> > >         typename="AtoZ"
> > >         ColumnList="Name,Title,Advanced"
> > >         aCustomColumns="#columnArray#"
> > >         bSelectCol="false"
> > >         SortableColumns="true"
> > >         bShowActionList="false" />

Sorry should have said. The typename I put in here was just a dumby
one so I could play around with the objectAdmin.
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev@...
To unsubscribe, email: farcry-dev+unsubscribe@...
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---