Jump to content


Question about the docs for setModel


  • Please log in to reply
6 replies to this topic

#1 NadimD

NadimD

    Member

  • Members
  • PipPip
  • 13 posts

Posted 13 January 2019 - 11:29 PM

Hello John :)

 

I was reading the docs (Entreprise Edition) about callbackColumn here : https://www.groceryc.../callbackColumn

 

And I'm facing the problem you talk about. Making a custom column affects the search function and it won't work properly.

What did you mean when you said to use a setModel ? I don't see how you would use a Model in this case !

 

Could you tell me more ? Thanks ! :)

 

Update : I did a patch in order to make the search function work with a relation and its custom fields.

I will release it if you agree, but since it is Entreprise Edition, please let me know what to do with the patch.

 

That's how it works now, first I can search as always in a non related field, and I can make a callback on the column "page_id" with the name "Page associƩe" displayed here :

 

YdAAMEc.png

 

 

And I can type in multiple words, multiple "like" queries will be added to the whereStatements function and explode each keyword typed to give this result :

 

DxP6rRU.png

 

Also, spaces will be ignored so that you can make a copy&paste without worrying about formatting the text.



#2 larasmith

larasmith

    Advanced Member

  • Members
  • PipPipPip
  • 184 posts
  • LocationPhilippines

Posted 16 January 2019 - 05:44 AM

Hi @NadimD,

 

Your work here is quite interesting.

I haven't tried using callbackColumn in any of my projects so I can't share anything regarding this yet.

 

:)



#3 NadimD

NadimD

    Member

  • Members
  • PipPip
  • 13 posts

Posted 18 January 2019 - 11:51 PM

Thank you @larasmith .

 

I've finished my patch and will soon release a post to add :

- Search with multiple words on 1_to_N relations

- Multiple field names when using set_relation and a custom display

 

I just need to optimize a little bit the code before releasing it, you'll be notified in this post aswell.

 

Stay tuned !



#4 spiritbreaker69

spiritbreaker69

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 23 January 2019 - 03:54 AM

im facing this issue with setmodel.. filter is not working on relation.. its giving a blank or not working..



#5 NadimD

NadimD

    Member

  • Members
  • PipPip
  • 13 posts

Posted 23 January 2019 - 12:20 PM

What version are you using ? I will provide you my fixes according asap



#6 spiritbreaker69

spiritbreaker69

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 24 January 2019 - 03:12 AM

im currently using 2.7 but same as other version



#7 NadimD

NadimD

    Member

  • Members
  • PipPip
  • 13 posts

Posted 27 January 2019 - 01:58 AM

All right, I'm currently far from home and I don't have my computer with me, I will be back next week and will notify you here when the patch is released, sorry for the delay but I cannot do better than that atm!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users