7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Help with basic table - managed via modelAdmin - with display limit & multiple page results
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | ||
| Author | Topic: | 1848 Views |
-
Re: Help with basic table - managed via modelAdmin - with display limit & multiple page results

29 August 2010 at 11:09pm
P.P.S - been exploring the code of the default search function. found this:
$this->disableSecurityToken();so i've implemented that into the code you gave earlier to give a cleaner way of getting around that security issue we were having!
public function ProductSearchForm() {
$f = new Form (
$this,
"ProductSearchForm",
new FieldSet(new TextField('s','','Search by title')),
new FieldSet(new FormAction('doProductSearch','Search'))
);
$f->setFormMethod('get');
$f->disableSecurityToken();
return $f;
}not sure if we can take out: $f->setFormMethod('get'); now?
i tried that but then the second page of search results threw an error up, so ive left it in for now. -
Re: Help with basic table - managed via modelAdmin - with display limit & multiple page results

29 August 2010 at 11:50pm
Update: as for the "clear on focus" question i had, found a nice tutorial for anybody else who may require this:
works perfectly.
-
Re: Help with basic table - managed via modelAdmin - with display limit & multiple page results

30 August 2010 at 4:51am
Why would you remove the security token? Is it causing problems? You definitely want the form method as "get", because it allows users to bookmark the search results or send someone a link. POST doesn't have that capability.
-
Re: Help with basic table - managed via modelAdmin - with display limit & multiple page results

30 August 2010 at 5:04am
no, but before it was parsing the secure token in the URL.
which would expire (i think) making the bookmark and sending URLs useless.its not needed at all for the search function so may as well just disable it, just for this function.
plus other posts in this forum said the only6 option was to disable ALL tokens in the config file, which isn'tideal.fine to leave the "get" method in, i just wondered if it was obsolete now i had found another way round the secure token.
(p.s- if i've missed something important with this secure token issue please do correct me!)
can you shed any light on the "sort" issues im having?
i started a new thread here: http://www.silverstripe.org/data-model-questions/show/291224#post291224
| 1848 Views | ||
| Go to Top |

