show all

A place for users and developers of the Xataface to discuss and receive support.

show all

Postby fantomasdm » Wed Jun 18, 2008 10:10 am

Hi I have a question about showall button.
If I press it when see a records on a relative table, return to view all records of table and not only relative records. Is possible to view only relative records? Or to catch showAll event for redirect on other url/action?

My English is very bed! I wish that is understable!!
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby shannah » Wed Jun 18, 2008 7:46 pm

So you want a "Show All" for related records. The Show All button does something slightly different than what you are thinking here. It clears all search and find queries so that the entire table becomes the "found set".

With related records (until recently) you couldn't filter the related records or do finds on them. (in 1.0 you can do keyword searches by clicking the little magnifying glass above the related list - but you clear the searches a different way).

Hence I think perhaps you are looking for a way to increase the number of related records per page to show all of the records -- the default is 30 records per page.

Am I correct?

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby fantomasdm » Thu Jun 19, 2008 6:16 am

I whant to disable Show All, becose in conf.ini I have to see only one table, and from here, by relationship, other relative records on other tables, but only from parents table!

Sorry for my very bad english...
Thanks for help!
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby shannah » Thu Jun 19, 2008 8:33 am

Add an empty section to your application's actions.ini file (create it if it doesn't already exist):

Code: Select all
[show_all]


What this does is create a new show_all actions that is empty that overwrites the default action.

This will get rid of it.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby fantomasdm » Thu Jun 19, 2008 11:51 pm

Hi, thanks for hlep,
Is possible to do something like this:

Code: Select all
[show_all]
url = "{$this->url('-action=related_records_list&assistitoID=$_SESSION[\"idanagrafica\"]&-relationship=Autopsia')}"


I try to add this but ShowAll fade away!
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby shannah » Fri Jun 20, 2008 7:08 am

You have the right idea, but just need a couple more pieces of info.

If you define an action [show_all] in your actions.ini file it overwrites the previous action named [show_all] that was defined in the dataface actions.ini file. What you want to do is extend and override the action.

You do that with the following:

[show_all > show_all]

That way it keeps all of the definitions from the dataface actions.ini file and allows you to add your own parameters.

e.g.

Code: Select all
[show_all > show_all]
url = "{$this->url('-action=related_records_list&assistitoID=$_SESSION[\"idanagrafica\"]&-relationship=Autopsia')}"


You may have to tinker with the url you specified too to make it work that way you want.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby fantomasdm » Mon Jun 23, 2008 11:59 pm

Hi,before all, thanks for your help!
If I use this:
Code: Select all
[show_all > show_all]
url = "{$this->url('-action=related_records_list&assistitoID=$_SESSION[\"idanagrafica\"]&-relationship=Autopsia')}"


I get this error:
Fatal error: ActionTool::getAction() requires 'name' parameter to be specified. in C:\xampp\htdocs\xataface-1.0-beta-3\Dataface\ActionTool.php on line 94
the link is: http://inmilss007/GestPatologia/index.p ... =istologia

so I prefer to create my own ShowAll Action like this:

Code: Select all
class actions_myShowAll  {
    function handle(&$params)
    {
      $app =& Dataface_Application::getInstance();
      $record =& $app->getRecord();
      $relation= ucfirst($record->_tablename);
      $url =  '?-action=related_records_list&assistitoID='.$record->val('idanagrafica')."&-relationship=".$relation;
      header ('Location: '.$url);
      exit;
    }
}


and using it on action.ini:
Code: Select all
[show_all > show_all]
url = "{$this->url('-action=myShowAll')}"


but if there is a better way to do it please give it to me!
Very sorry for my English!!
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby shannah » Tue Jun 24, 2008 10:04 am

I get this error:
Fatal error: ActionTool::getAction() requires 'name' parameter to be specified. in C:\xampp\htdocs\xataface-1.0-beta-3\Dataface\ActionTool.php on line 94
the link is: http://inmilss007/GestPatologia/index.p ... =istologia

Do you get this after you click on your show_all button, or before.


-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby fantomasdm » Tue Jun 24, 2008 11:38 pm

after click on mine show_all button!
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 22 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved