开发者

Force combobox to create a dropdown

everyone! I'm working on a sort of AutoComplete component and faced one problem. When you create a new instance of a component, fill it with data - everything seems to be ok. When user types a letter in the inputField (and filter accepts one or few records) - everything goes alright, BUT if the first time user types a wrong letter (filter returned 0 records) - I'm getting a null-pointer exception.

This component is based on ComboBox. I have some thoughts about that: I suppose that the dropdown is not being created at time, any ideas on how to force my autoComplete to create it? I know 1 way - copy/paste some inc开发者_开发知识库apsulated code from ComboBox class .. but it would be too many of it .. I'm looking for a better solution. Or, maybe someone faced similar problem and has the other way to go?

Thanks in advance :)


I can selfishly suggest that you try the Flextras AutoComplete Component. We have a Spark version available for free and an MX version which is a commercial component with an more expansive API.

Let me assure you personally that extending the MX ComboBox from scratch is a nightmare; and there are plenty of "oddities" that crop up with the drop down in certain situations.

We've been on the market for about two years, have dozens of customers, and have spent hundreds of hours on this component. I'm willing to guarantee that our component will be more solid than anything you can create in a week, and cost a small fraction of your time.

Check out the manual, samples, and other documentation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜