RAD search page

it would be nice if the CRUD generator also generated a search page, containing a form in which you could enter values for a database query. when you submit the form, you get back a CGridView page, with records returned by the database query.

totally agreed!!

:)

Just enhanced CGridView to support filtering. Please help test this new feature. For an example, you may check the updated blog demo (in post admin page). Remember to clean up your "assets" folder first.

i took a quick glance at your changes, and, if i’m reading it correctly, you can now type strings into the column headings in the grid view, and the grid widget will treat them as search strings and filter the results accordingly.

that’s very cool, but not exactly what i was looking for, because i put only a subset of my fields into the grid view, and i want to search on some fields that i don’t want to have in the grid view.

thus, i want a separate search page, which allows me to enter values for all my fields, and then, when the search page is submitted, i want to see the grid view. actually, i think the ‘admin’ action created by the yiic crud generator is not all that useful without it, because, any time you have a large amount of data, it’s not practical to page thru it linearly. (although the filters you’ve just added obviously improve the situation).

for the project i’m currently working on, i made ‘search’ views (which are forms) and have my ‘admin’ actions always invoke the ‘search’ views when when they get a GET request and then just render the normal ‘admin’ views when they get a POST request. so when a user clicks a link that invokes the ‘admin’ action, they see a page like this:

463

SearchPageAdminAction.jpg

if the user really wants to see all the records in the table, they can immediately click the ‘search’ button without entering any search strings, and they’ll get the whole table, just like they would with the default ‘admin’ action.

i think it would be a useful RAD feature if yiic generated a ‘search’ view (form) for each model.

Thanks. Done.

dude, you are fast!! B)

thanks!!

i’ll try it out in the next nightly build.

tried it out. works great!

only the generated ‘list’ view had the search functionality.

i suggest you also add it to the ‘admin’ view.

(i suspect you had intended to.)

thanks!

If javascript is off, the Search boxes at the top of the table in the Admin view does not work and there is no way to kick off the search.

Can there be a search button added?

Great work on the search box…

I actually thought about this problem. The question is where to put the search button?

Right above the "CButtonColumn" all the way on the right might be a potential location…

Edward

CButtonColumn is not necessarily there…

How to use RAD to create search page?

How to get RAD ?

These are the new features of "yiic shell" tool to be available in v1.1.1.

I have a problem … I have the version 1.1.1 but when I created with command yiic the crud I was not generated automatically the search as it appears in the guida.Someone can tell me why? Or can tell me how I can fix this?