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.369 seconds

I've evaluated lots of other Joomla Component Dev tools such as Shell Manager (J)enesis Danny's Joomla! 1.5 MVC Component Code Generator Marco's Component Maker and I must admit that I love what I see on your site! Lots of potential... Otherwise Great Job and keep up the good work!!!
Clifton (forum)

Get Started