PDA

View Full Version : "Query by example" and many questions...



violinista
29 Jun 2007, 4:26 AM
Hello 2 all,

I want to make database-standard "query by example" form (for reference try this (http://www.c2.com/cgi/wiki?QueryByExample) and this (http://en.wikipedia.org/wiki/Query_by_Example)).

My idea was to produce it in multiple toolbars, one below other, because nature of my problem implies that I have several special cases of filtering.

My first question is - If I have toolbar like this:



var tb = new Ext.Toolbar(tbContainer);
tb.addField(new Ext.form.TextField({name:"txtField"}));
...How can I access to txtField's value, in a simply way (since it's not attached on any form, nor have variable associated)?

My second question is - Does someone ever had similar idea, and what would you suggest for this approach? Is it correct, or I have to use other components to produce it (editorGrid, or multiple forms, for example?)?

thanks,
:D

violinista
29 Jun 2007, 6:19 AM
I have one more (simple) question. If I have this situation in DOM:



<div id="div1">
<div id="div2">
<!-- Some content here... -->
</div>
</div>


...if I call:



Ext.get("div1").remove();


...does it removes only "div1", or it removes him AND all nodes after (in this case, "div2" and "<!--some content here... ->" ?

Thanks

:D

tryanDLS
29 Jun 2007, 8:27 AM
You can always call getValue (or getRawValue) on a Field or look at the actual dom.value property of element - doesn't have to be in a form.

remove deletes the entire structure from the specified node down.