PDA

View Full Version : HistoryClearableCombobox



galdaka
29 Aug 2007, 12:35 PM
I want to share this widget, is a union of historycombobox.js and clearablecombobox.js in a ux format.

example:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>HistoryClearableCombobox</title>

<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script> <!-- ENDLIBS -->
<script type="text/javascript" src="../../ext-all.js"></script>
<script type="text/javascript" src="../../ux/form/HistoryClearableComboBox.js"></script>

<!-- Common Styles for the examples -->
<link rel="stylesheet" type="text/css" href="../examples.css" />
<style type="text/css">
p { width:650px; }
</style>

<script>
Ext.onReady(function(){
var combo = new Ext.ux.form.HistoryClearableComboBox({
emptyText:'Type your search...',
selectOnFocus:true,
resizable:true
});
combo.applyTo('historyCombo');
});
</script>

</head>
<body>
<p>Remember on enter</p>
<div>
<input type="text" id="historyCombo" size="20"/>
</div>

</body>
</html>

steffenk
29 Aug 2007, 2:30 PM
Hi Galdaka,

many thanks for the class - i just need it.

I use it in a grid, and i miss the Clearbutton, this is my code:



var filter = tb.addDom({
tag: 'input',
id: 'sfilter',
type: 'text',
size: 30,
value: '',
style: 'background: #F0F0F9;'
});
var combo = new Ext.ux.form.HistoryClearableComboBox({
emptyText:'suchen...',
selectOnFocus:true,
resizable:true,
hideClearButton: false,
hideTrigger: false,
typeAhead: true,
triggerAction: 'all'
});
combo.applyTo('sfilter');

what is missing?

And another question: Is there a possibility to save/load history in cookie?

galdaka
30 Aug 2007, 3:01 AM
Your configuration works fine for me.

steffenk
30 Aug 2007, 8:01 AM
i see, standalone is no problem, but that doesn't help me.
I have no errors, so i wonder why in "my context" bound to the grid the clearbox is missing - i don't know how i can search for.

The other question about saving history, any ideas? I still use the cookiehandler:
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
Maybe i can connect it ?

galdaka
30 Aug 2007, 1:04 PM
i see, standalone is no problem, but that doesn't help me.
I have no errors, so i wonder why in "my context" bound to the grid the clearbox is missing - i don't know how i can search for.

The other question about saving history, any ideas? I still use the cookiehandler:
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
Maybe i can connect it ?

Sorry for my English.

I have no idea about your problem. This extensi

steffenk
30 Aug 2007, 1:57 PM
i made another example with your Combo and a grid, and there all is fine, so there is something strange in the project.

I will publish this example when finished.

steffenk
3 Sep 2007, 12:39 PM
i found the problem with the clearbutton:
If i use ext-base it work's fine, if i use YIU-adapter it's not visible.

escalade
16 Nov 2007, 12:28 PM
I can't get it work on Ext 2.0. Please advise.
Thanks.

poemsbestintop
23 Sep 2009, 8:31 PM
thank! It's working for me

capn
15 Feb 2010, 7:24 AM
The code example doesn't run in Ext2.2. This looks like an outdated post - is there a new WORKING version on another thread?

by the way: to give specifics: the example does load, but only one trigger is displayed and that trigger does nothing (in firefox,and ie7).