Flex Combobox and DateField Weird Bug - apache-flex

Using Flex 4.1 Build 16076
I have an mxml file, containing a textinput, a button, a datefield and a combobox.
The data provider for the combobox is an arraycollection.
When the flex application is started, the combobox's dropdownlist shows up fine. The calendar also displays when clicking on the calendar icon on the datefield.
Now when I click on the button which displays a popup window, and get the data from there and put it back on the textinput, combobox (select the item) and datefield, the combobox and the datefield does not show the dropdownlist and the calendar respectively.
I am not changing the data on datasource on the combobox. Merely selecting the item based on what was retrieved from popup window.
This one is really stumping me. Seems that the datefield and combobox does not respond to mouseevent. When the focus is on the combobox, I could still use the keyboard to change the values displayed, but the dropdownlist still does not show.
Has anyone encountered this behavior?

The resolution to this issue was to update the FlashPlayer to the latest version in Chrome.

Related

list window does not disapper of Obout ComboBox control

I am developing a web application. I used ajax Update panel & under update panel I used gridview for displaying data. In gridviews edit template I used three Obout ComboBox Control(third party) and bind the data from database.for moving one control to another controls I am using tab key.I used tab key from one combobox its move on second combobox when its move then it is displaying list window of combobox it wont disappear after I go to next control and also when I save the data it well display list of comboxBox.
For example of marked comboBox I attached two images
1)”” when I move one comboBox to another comboBox it is displaying list
2)”” when I save the data it is displaying list window of comboBox.
But when I remove the update panel it won't display such list after focus is moved.
Note:When I use mouse to move one comboBox to another comboBox, list window of ComboBox wont come on screen.
VS:2010
Code-Behind:VB.net
Obout Suite Version:3.5
using obout comboBox property openOnfoucs="false" , solved the problem. It does not display list window when focus moved to another control.

Flex: ItemEditor losing focus!

Here's an image of what my problem is:
I am using a combo-box as a Datagrid ItemEditor (Not just Renderer, my Renderer is a Label, double clicking on a cell makes the combo-box visible, as is the case with all item editors)
Now, selecting one of the entries in the combo-box is no problem. But my problem is only when i select the "Fruit" , which in turn pops open another layer called "Select Fruit" dialog
Questions:
How do i keep item editor, while the focus is on the layer; right now as soon as i click on the fruit , my handler popsup the "Select Fruit" dialog and the focus is on the layer. Once the focus goes out of the editor, the ItemEditor goes away and ItemRenderer label comes back.
I want to keep the ItemEditor alive! where do I hook up interms of events like begin/end ItemEdit etc?
You can keep your itemEditor alive by listening for DataGridEvent.ITEM_EDIT_END. Then you have a lot more control to do what you want. Some FYI from my blog:
DataGridEvent.ITEM_EDIT_END
- Dispatched when focus is removed from the cell
- List-based control’s default event listener will
1) use the .editorDataFrield property to deterine the property of the item editor to store the edited data; In a default TextInput control’s item editor, the “text” property would contain the new data.
2) Invoke destoryItemEditor() depending on the reason of the event
You can interrupt the default List-based control’s default event listener by using event.preventDefault() to
a) Modify the data returned from the item editor
b) Examine/Validate the data entered into the item editor; If the data is incorrect, you can halt Flex passing the data back from the item editor into the list-based control
http://knowledge.lapasa.net/?p=153
Try losing focus of your ItemEditor. Goto Combo Box Change Listener
protected function comboBox_changeHandler(event:ListEvent):void
{
// set focus out event on datagrid. Its like clicking outside the datagrid
event.target.parent.parent.parent.dispatchEvent(new FocusEvent(FocusEvent.FOCUS_OUT);
}

Setting a custom itemRenderer in a Flex3 ComboBox on specific list items after combobox creation

I'm trying to set a specific list item in a mx combobox to have a custom item renderer, the problem is that I cannot do this via mxml, it needs to be done via actionscript at a later stage, eg: combobox gets created, combobox gets populated, user does other tasks, combobox needs to set one or more items in the combobox to have icons (via item renderer)..
I can do this via the onChange event, but it only applies the icon when the combobox is opened and there is a slight delay so you can see the icon being added.
Thanks in advance for any help
J
The normal answer for this is to not do this in the onChange, but to change something in the ComboBox's dataProvider and let the itemRenderer handle it instead.
i.e. in the itemRenderer
<mx:Image id="icon" source={data.icon} visible={data.icon} includeInLayout={data.icon} />
Setting the icon property in whichever item you want to show the icon for. If icon is null, nothing gets shown.

Adobe Flex Combobox as itemrenderer

I have a flex combobox as a datagrid itemEditor.
However, after selecting an item in the combobox, its necessary to click out of the combo (i.e. into another cell or elsewhere in the app) for the value to be committed to the combo. Prior to this, the combo sits 'proud' of the datagrid and the value hasnt actually been committed.
Is there a way to force the value to be immediately committed after an item has been selected and for the combo to 'lose focus'?
Ahh, so easy.
this.parentDocument.setFocus();

Flex Combobox: Cancel Select

I've made an itemrenderer for the combobox control that shows a button next to the label.
If a user clicks this button, the item gets removed from the dataprovider. Works so far.
When he selects an item, the combobox closes, that's ok. But I don't want it to close when he removes an item.
So is there a way to cancel the change event?
I have tried several things, but to no avail.
I have to use the combobox for layout reasons, don't have enough space to use listboxes...
Thanks for your help.
In your custom itemrenderer , on mouse down handler stop Immediate Propogation
event.stopImmediatePropogation();
In your custom item renderer, try canceling the event in your button's click handler.
event.stopImmediatePropogation()

Resources