In my application I have 2 objects. An Item object and SubItem object.
What I would like to do is make a single drop down list that has all of
the Items in it, then if the item has a SubItem attached to it, then it
will be displayed directly underneath that Item with some sort of
indentation or marking to indicate that it is a SubItem. I don’t even
know where to begin looking for this type of problem. Any ideas?
~Jeremy
please let me know the table structure and relationship of Item and
SubItems,so that i will digg out let you know the solution.
Jeremy W. wrote:
In my application I have 2 objects. An Item object and SubItem object.
What I would like to do is make a single drop down list that has all of
the Items in it, then if the item has a SubItem attached to it, then it
will be displayed directly underneath that Item with some sort of
indentation or marking to indicate that it is a SubItem. I don’t even
know where to begin looking for this type of problem. Any ideas?
~Jeremy
Jeremy W. said the following on 18/12/07 06:58 PM:
In my application I have 2 objects. An Item object and SubItem object.
What I would like to do is make a single drop down list that has all of
the Items in it, then if the item has a SubItem attached to it, then it
will be displayed directly underneath that Item with some sort of
indentation or marking to indicate that it is a SubItem. I don’t even
know where to begin looking for this type of problem. Any ideas?
See http://www.htmldog.com/articles/suckerfish/dropdowns/
It would be great if Tabnav (q.v.) could be adapted to use this!
Failing that, something that reads in a .yaml file that specifies the
menu
The nice part about being a pessimist is that you are constantly
being either proven right or pleasantly surprised. – George F. Will
Anton A. wrote:
Jeremy W. said the following on 18/12/07 06:58 PM:
In my application I have 2 objects. An Item object and SubItem object.
What I would like to do is make a single drop down list that has all of
the Items in it, then if the item has a SubItem attached to it, then it
will be displayed directly underneath that Item with some sort of
indentation or marking to indicate that it is a SubItem. I don’t even
know where to begin looking for this type of problem. Any ideas?
See http://www.htmldog.com/articles/suckerfish/dropdowns/
It would be great if Tabnav (q.v.) could be adapted to use this!
Failing that, something that reads in a .yaml file that specifies the
menu
The nice part about being a pessimist is that you are constantly
being either proven right or pleasantly surprised. – George F. Will
Cool thanks. I didn’t think to do something like that. I was going more
of the standard <%= f.select(:item, Item.find(:all)) %> style drop down,
but this way could work too.