m ((username removed) (log details removed): Moving to Documentation namespace) |
No edit summary |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<message>Write the content here to display this box</message> | |||
Combobox, picklist, or dropdown list – there are many names for the same thing. | Combobox, picklist, or dropdown list – there are many names for the same thing. | ||
How to define one in a view: [[Comboboxes in MVC from model driven ViewModel|Comboboxes in MVC from model-driven ViewModel]] | How to define one in a view: [[Documentation:Comboboxes in MVC from model driven ViewModel|Comboboxes in MVC from model-driven ViewModel]] | ||
===== Problem-solving ===== | ===== Problem-solving ===== | ||
Line 8: | Line 9: | ||
And, if you think you have the current value or that it is already in the collection, check that the collection you are using is not "stable" over time. That is, the collection might '''look''' the same, but it's actually reconstructed and therefore new objects. Comboboxes work with objects, not values. If the list is known and stable over time, have one created for the ecospace and reuse it as long as possible. It might even be best to store it in the DB. | And, if you think you have the current value or that it is already in the collection, check that the collection you are using is not "stable" over time. That is, the collection might '''look''' the same, but it's actually reconstructed and therefore new objects. Comboboxes work with objects, not values. If the list is known and stable over time, have one created for the ecospace and reuse it as long as possible. It might even be best to store it in the DB. | ||
Also see: [[Comboboxes with strings]] | Also see: [[Documentation:Comboboxes with strings|Comboboxes with strings]] | ||
==== Multi-select Items in Combobox ==== | ==== Multi-select Items in Combobox ==== | ||
If you have the need for a Combobox-like functionality but have to pick many - or have complex values in the picker list - consider creating one of the multiple widgets in [[PlacingContainer|PlacingContainers]]. | If you have the need for a Combobox-like functionality but have to pick many - or have complex values in the picker list - consider creating one of the multiple widgets in [[Documentation:PlacingContainer|PlacingContainers]]. | ||
[[File:2022-11-20 19h11 45.gif|none|thumb|287x287px]] | [[File:2022-11-20 19h11 45.gif|none|thumb|287x287px]] | ||
[[File:2022-11-20 19h14 09.png|none|thumb|488x488px]] | [[File:2022-11-20 19h14 09.png|none|thumb|488x488px]] | ||
[[Category:View Model]] | [[Category:View Model]] | ||
{{Edited|July|12|2025}} |
Latest revision as of 05:25, 17 February 2025
Combobox, picklist, or dropdown list – there are many names for the same thing.
How to define one in a view: Comboboxes in MVC from model-driven ViewModel
Problem-solving
If you have a combobox that loses its set value after a short while or that is set incorrectly when you open the page, this is usually because you don't have the already selected value in the collection. Remember to always add the current value of the attribute to the selected collection.
And, if you think you have the current value or that it is already in the collection, check that the collection you are using is not "stable" over time. That is, the collection might look the same, but it's actually reconstructed and therefore new objects. Comboboxes work with objects, not values. If the list is known and stable over time, have one created for the ecospace and reuse it as long as possible. It might even be best to store it in the DB.
Also see: Comboboxes with strings
Multi-select Items in Combobox
If you have the need for a Combobox-like functionality but have to pick many - or have complex values in the picker list - consider creating one of the multiple widgets in PlacingContainers.