Autocomplete text form fields? - Ext JS

社区成员讨论了 ExtJS 中实现自动完成文本输入框的需求和功能细节,包括使用数据存储加载选项、支持异步加载及键盘导航等功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Hi Jack and all the Ext Community,

Firstable, congratulations for your great work.

Now a question. Is there any plan for autocomplete text form fields?

Kind regards,

Fernando
Reply With Quote
  #2  
Old 02-23-2007, 09:56 AM
Default

This would be HOT!!
Reply With Quote
  #3  
Old 02-23-2007, 10:03 AM
Default

More specifically, I would like to add dinamically (by javascript) autocomplete behaviour to certain (selected by class) text fields of a form created by simple HTML markup in the server side (JSP).

Fernando
Reply With Quote
  #4  
Old 02-23-2007, 10:16 AM
DefaultRequest for docs

Jack,

We would also like to have a control like this. In fact you may recall you helped us to implement such a beast based on the YUI AutoComplete back in December.

Our requirements may be slightly different from Fernando's. Specifically, we want to:
  • * restrict the choice to a limited set of options
    * populate the set of options synchronously (inline) or asynchronously via JSON
    * require a configurable number of letters be typed before an asynchronous request is made
    * support keyboard navigation
    * operable by mouse also
I will attempt to implement this for my project myself next week. However, some documentation on how to create a custom editor and integrate it into a grid would be most welcome.

Thanks,

Gordon

p.s. I've got a read-only grid largely working with Ext 1.0. Now for the editable version!
Reply With Quote
  #5  
Old 02-23-2007, 04:10 PM
Default

That's fantastic Gordon. I'm glad to hear it.

I have question for you guys. How would you feel if the AC required a data store for loading? This way it supported all of the options (http, in memory, xml, json, array, etc) and added support for complex types (which I know you need Gordon). Obviously implementing a store is a little more long winded than implementing a simple json loader - but imagine how much power there could be.

If the store is ok, then it makes it easier for me. Let me know what you guys think.
Reply With Quote
  #6  
Old 02-23-2007, 04:40 PM
Default

Quote:
Originally Posted by jacksloc
That's fantastic Gordon. I'm glad to hear it.

I have question for you guys. How would you feel if the AC required a data store for loading? This way it supported all of the options (http, in memory, xml, json, array, etc) and added support for complex types (which I know you need Gordon). Obviously implementing a store is a little more long winded than implementing a simple json loader - but imagine how much power there could be.

If the store is ok, then it makes it easier for me. Let me know what you guys think.
Easier for you and more powerful... it seems is the way to do it!. In this case, what is the time frame are you considering?.

Another question, Will it be possible to provide AC behaviour to a text field previously created by HTML markup?

Thanks in advance Jack.

"Un admirador" of your work.

Fernando.
Reply With Quote
  #7  
Old 02-23-2007, 04:43 PM
Default

I definitely agree that a data store is the most desirable solution.
Reply With Quote
  #8  
Old 02-23-2007, 06:27 PM
Default

I'd like to add that I think it'd be nice if the autocomplete results were just a simple grid component so there was client-side sorting, column resizing (maybe), etc. It *might* be handy if it supported paging as well.
Reply With Quote
  #9  
Old 02-23-2007, 07:18 PM
Default

As someone who went through the pain of implementing an autocomplete based of yui a while ago (without ext), I'll vote for this- and for the datastore option. There are so many parts where having this in Ext makes sense since a lot of it is built already. My own implementation took a lot of time, which was part rendering bugs and positioning.

The options I would like to see:
1. the templating of the return html / the same fantastic themeing we see in other ext items.
2. configurable time delay after last keypress before sending the request.
3. configurable max number of displayable results
4. shim so it works over select
5. effects configuration, (how it renders and destroys)

sounds like a lot, but considering how much low-level stuff Ext has taken care of already, it should be not so bad at all.
Reply With Quote
  #10  
Old 02-23-2007, 10:43 PM
Default

Quote:
Originally Posted by jacksloc
That's fantastic Gordon. I'm glad to hear it.
If the store is ok, then it makes it easier for me. Let me know what you guys think.
i am all in favor of the store 8)
Reply With Quote
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值