Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Ajax Combobox - nested lists 20 Oct 2014 14:11 #12710

  • krasy
  • krasy's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 90
  • Thank you received: 8
hi,
i have a table of places that looks like this:
-place
-parent place

i want to modify ajax combox to have a possibility to
select
>in the beginning from places without parent
>go to the bottom in nested records,
>choose the last nested record

could you provide me some guidelines? ;)

Please Log in or Create an account to join the conversation.

Ajax Combobox - nested lists 20 Oct 2014 19:01 #12712

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Is it a 'nest' table design ?

I mean, will your program treat 'places' table as a hierarchical table ? (Not possible yet in cook, but coming)
Because if you plan then to have such structure, then the code must be coded in a recursive way.

MODEL
prepareQuery():
Invent a new state name for this query wich will sort the rooted places first

VIEW
The combo boxes are filled in the view file.
Open the view file corresponding to the layout you want and complete / modify the code there.
All you have to do is
model->setState('myNewInventedState', true);

HTML
If you want to group datas in the combo, then you can do it easily with JDom ('groupby' property)
You can eventualy do this before in the builder (Group By : [FK] parent place > title )

Hope it helps.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Last edit: by admin. Reason: code fix
  • Page:
  • 1
Time to create page: 0.085 seconds

  Joomla Developpers won't be able to live without J-Cook's Component Creator! Check it out - it'll save you a heap of time coding so you can concentrate on the creative part of developing!
Mind-Your-Biz-Online

Get Started