Oct 06, 2011, 8:13 PM
[CLOSED] combo in compositefield in menu closing menu on selection
I'm trying to build a menu that lets the user select some date ranges from a variety of different methods. ComponentMenuItem seems to be intended for preventing form fields from impacting the menu, but it does not seem to help in the case where it contains a CompositeField (or a Panel) that contains controls that pop things up. In this case, the menu closes as soon as a selection is made on the combo. (I also have a variation with DateFields where the menu disappears when the datepicker is launched, but I'm guessing that the treatment will be the same.)
The code below lays out the item in question. Any pointers on what I should be doing? I haven't worked much with the floating stuff so I don't know how it keeps track of what owns what.
The code below lays out the item in question. Any pointers on what I should be doing? I haven't worked much with the floating stuff so I don't know how it keeps track of what owns what.
<ext:Menu runat="server" ID="TestMenu" ShowSeparator="false" Cls="menu-noicon">
<Items>
<ext:MenuItem runat="server" Text="Year starting at">
<Menu>
<ext:Menu runat="server" ShowSeparator="false">
<Items>
<ext:ComponentMenuItem runat="server" Shift="false">
<Component>
<ext:CompositeField runat="server" Width="150">
<Items>
<ext:SpinnerField ID="SpinnerField1" runat="server" Text="2011" Flex="1" />
<ext:ComboBox runat="server" ID="ComboBox2"
Width="40"
Editable="false"
Text="Q1"
Margins="0 0 0 5px">
<Items>
<ext:ListItem Text="Q1" Value="0" />
<ext:ListItem Text="Q2" Value="3" />
<ext:ListItem Text="Q3" Value="6" />
<ext:ListItem Text="Q4" Value="9" />
</Items>
</ext:ComboBox>
<ext:Button runat="server" Text="OK" Margins="0 0 0 5px" />
</Items>
</ext:CompositeField>
</Component>
</ext:ComponentMenuItem>
</Items>
</ext:Menu>
</Menu>
</ext:MenuItem>
</Items>
</ext:Menu>
Additionally, I also noted that listeners can't be configured on the ComponentMenuItem through the markup. I was looking to stick stuff in there on afterrender while I was testing this.
Last edited by geoffrey.mcgill; Jan 18, 2015 at 10:32 PM.