Hmmm... you have a point here...

in tacos.js we create script.aculo.us autocompleters using:
new Ajax.Autocompleter(inpId, updId, updUrl, updParams);
and
new Autocompleter.Local(inpId, updId, values, updParams);
and so, we don't store anywhere those references...

And looking at their source, it's not possible to get such a reference
from the 'enhanced' html element.

So, you would like to store those references somewhere, so that users
can get them and use them somehow, correct?

something like dojo does with dojo.widget.manager and dojo.widget.byId perhaps...
I don't know if it's safe to put them there.

Another solution would be to simply do:
var instance = new Ajax.Autocompleter(inpId, updId, updUrl, updParams);
document.getElementById(inpId).tacosAutocompleter = instance;

What do you think?



Pedro Viegas wrote:
Thanks Andy.

I had thought of that workarround, but being the TacosAutocompleter based on a script.acul.uous Ajax.AutoCompleter widget how can I change the URL parameter of the widget? If it were a dojo widget I would now how to get it, but like this after creating the widget how can I in a JS event get a reference to it so I can change it? Maybe I'm being a little newbie in this but honnestly I'm in a bit of a stall! Anybody who nows a bit more about this script.acul.uous Ajax.AutoCompleter widget can help me? Andy, how about that, can you give me a opinter on this specific issue.

Reagrds,


On 5/26/06, [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    the AutoCompleter in svn trunk supports a 'parameters'
    parameter - just like the one found in DirectLink
    see
    
http://svn.sourceforge.net/viewcvs.cgi/tacos/trunk/src/java/net/sf/tacos/ajax/components/Autocompleter.jwc?view=markup
    
<http://svn.sourceforge.net/viewcvs.cgi/tacos/trunk/src/java/net/sf/tacos/ajax/components/Autocompleter.jwc?view=markup>

    Of course all those additional parameters will be 'static' -
    DirectLink has the same
    'issue'.

    My usual hack for this is to define a dummy placeholder parameter,
    i.e. XXX
    and use javascript to replace and rewrite the URL...

    I've done something similar in tacos:DebugConsole, but please
    don't tell anyone :)

    If anyone knows a better solution, i'm all ears!

    From Pedro Viegas <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:

    > Hi all,
    >
    > Been trying for sometime to get something like linked comboboxes of
    > dependant result sets.
    > Something like having a combo with Directories and another Combo
    with the
    > current directory's files.
    > I have been trying to add this funcionallity to the
    Tacos:Autocompleter but
    > it's getting very close to impossible.
    > My goal is to have a simple to use enhanced Autocompleter with
    by setting
    > attributes can link to another AutoCompleter ou other components.
    >
    > What would be perfect was to be able to pass a second parameter
    to the
    > listener method instead of just the typed text.
    > I have been unable to to this till now.
    > I have been able to pass a new static parameter only by
    overriding the
    > Trigger method of the Tacos Autocompleter.java (witch forces
    only the first
    > parameter).
    > Even like this I only could get a static parameter since the
    submit is
    > handled by the script.acul.uous Ajax.AutoCompleter widget and it
    only
    > receives a URL to start with.
    > I found no event I could attach or change so I could add my URL
    dynamic
    > changes or some other solution.
    >
    > Been trying to get this working for more than a week. Could
    really get some
    > help by now! :-S
    >
    > Can anybody shed some light into this?
    > Am I complicating things? If there is a better way to do this
    please let me
    > know.
    >
    > As I said all I want to do is to create a couple of components.
    One a
    > Autocompleter like component. The other a normal PropertySelection.
    > But both of them with a linked component property for passing
    the filter to
    > build the selection values from.
    >
    > One last thing... all of this the AJAX way of course. Something the
    > Tacos:Autocompleter does, and that is easy enought to build
    > PropertySelection version of it.
    >
    > Thanks,
    >
    > --
    > Pedro Viegas
    >


    --




    -------------------------------------------------------
    All the advantages of Linux Managed Hosting--Without the Cost and
    Risk!
    Fully trained technicians. The highest number of Red Hat
    certifications in
    the hosting industry. Fanatical Support. Click to learn more
    http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
    <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642>
    _______________________________________________
    Tacos-devel mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/tacos-devel




--
Pedro Viegas


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to