Login | Register
My pages Projects Community openCollabNet

Discussions > dev > [propel-dev] propel pager update and column question.

propel
Discussion topic

Back to topic list

[propel-dev] propel pager update and column question.

Reply

Author rhalff
Full name Rob Halff
Date 2005-03-15 12:14:43 PST
Message Hi,

I've updated the propelPager class in cvs, instead of manually trying to
count the records the getTotalRecordCount() method now uses the
doCount() method of the generated Peer Base classes.

Also $this->criteria was overridden by the getTotalRecordCount() method,
which made propelPager::getCriteria() pretty useless because it returned
the count criteria instead of the criteria used to get the result set.

So far for what I did, now something that I would like to do and would
like to have some help with.

The reason I was interested in getting the criteria() in the first place
was to be able to retrieve the column names, by doing something like:
$pager->getCrite​ria()->getSelectC​olumns()

This will give me an array like:

array(20) {
  [0]=>
  string(16) "poem_stories.SID"
  [1]=>
  string(18) "poem_stories.CATID"
  [2]=>

it's the closest I can get to what columns are used, but what I would
like is to retrieve the phpNames of the columns or even an array of
objects of the type column, so I can translate those into the right
methods to call to retrieve the properties and also to generate html
table header cells.

Is there any way to retrieve this information currently ?

I need this to make a general purpose data grid kind of thing for
propel.

Ultimately, I would like to give titles to the column names from within
the xml schema, a simple title attribute would do, although this will
immediately raise the question of how to make these titles multilingual.
But having title information available for a column, will make
generating forms and dynamic grids a lot easier. Any chance this could
be implemented ?

Greetings,

Rob Halff





--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
For additional commands, e-mail: dev-help at propel dot tigris dot org

« Previous message in topic | 1 of 2 | Next message in topic »

Messages

Show all messages in topic

[propel-dev] propel pager update and column question. rhalff Rob Halff 2005-03-15 12:14:43 PST
     Re: [propel-dev] propel pager update and column question. hlellelid Hans Lellelid 2005-03-16 04:31:34 PST
Messages per page: