Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
GridFieldAddExistingAutocomple ter searches only Title or Name of related classes
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
baba-papa  
View profile  
 More options Sep 22 2012, 5:12 am
From: baba-papa <rol...@musik-lehmann.de>
Date: Sat, 22 Sep 2012 02:12:03 -0700 (PDT)
Local: Sat, Sep 22 2012 5:12 am
Subject: GridFieldAddExistingAutocompleter searches only Title or Name of related classes

I like the idea of adding relations with an autocomplete field.Our
ecommerce module SilverCart often deals with large amounts of objects and
the checkboxes of the ComplexTableField and its descendants weren't very
user friendly.
However, the GridFieldAddExistingAutocompleter just searches the attributes
'Title' and/or 'Name' of the related object:
protected function scaffoldSearchFields($dataClass) {
$obj = singleton($dataClass);
if($obj->hasDatabaseField('Title')) {
return array('Title');

} else if($obj->hasDatabaseField('Name')) {

return array('Name');
} else {
return null;
}
}

In case these fields do not exist the autocompleters request throws an
exception.
I expected the autocompleter to use the information of the
searchableFields() array. In SilverCart we often need to search the
attributes of a further relation. For searchableFields() this was passible
with dot-notation.
Should I provide a patch for this or is anyone still working on this issue?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingo Schommer  
View profile  
 More options Sep 26 2012, 5:51 am
From: Ingo Schommer <ingo.schom...@gmail.com>
Date: Wed, 26 Sep 2012 02:51:49 -0700 (PDT)
Local: Wed, Sep 26 2012 5:51 am
Subject: Re: GridFieldAddExistingAutocompleter searches only Title or Name of related classes

Hello Roland,

Yep, I think that's patch-worthy, since it kind of breaks developer
expectations at the moment.
If we have a thing called "searchable fields", it should be used
consistently.

There's a couple of tickets around this
http://open.silverstripe.org/ticket/7066:
http://open.silverstripe.org/ticket/7194
http://open.silverstripe.org/ticket/7793

BTW: In case you encounter problems with dot notation,
those most likely need to be fixed in DataList and DataQuery, not in
GridField itself.

Patch away! :)
Ingo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
baba-papa  
View profile  
 More options Sep 27 2012, 9:11 am
From: baba-papa <rol...@musik-lehmann.de>
Date: Thu, 27 Sep 2012 06:11:38 -0700 (PDT)
Local: Thurs, Sep 27 2012 9:11 am
Subject: Re: GridFieldAddExistingAutocompleter searches only Title or Name of related classes

Hello Ingo,

tanks for your answer. I wasn't aware of the tickets.
Sebastian and me are already working on this issue. We should be done by
the end of next week.

Greetings,
Roland


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
baba-papa  
View profile  
 More options Oct 4 2012, 10:25 am
From: baba-papa <rol...@musik-lehmann.de>
Date: Thu, 4 Oct 2012 07:25:55 -0700 (PDT)
Local: Thurs, Oct 4 2012 10:25 am
Subject: Re: GridFieldAddExistingAutocompleter searches only Title or Name of related classes

I finished my work on this issue, provided a pull request, unit testing and
documentation.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »