struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: autocompleter tag
Date Sat, 03 Mar 2007 15:18:24 GMT
The problem with the label rendering is tracked here:

https://issues.apache.org/struts/browse/WW-1602

and will be fixed for 2.0.7. If all you want to do is pass the text entered
on the autocompleter to the action to filter the results, you don't need to
use a form, that's supported by the autocompleter:

<s:autocompleter name="state" theme="ajax" href="%{jsonList}"
autoComplete="false" loadOnTextChange="true" loadMinimumCount="3" />

every time 3 characters are typed on that autocompleter, a request will be
made to the action, something like:

http://localhost:8080/struts2-showcase/JSONList.action?state=ala

The idea is to set loadOnTextChange="true" and a minimum count,
loadMinimumCount="3"  (3 by default anyway)

musachy

On 3/3/07, Guillaume Carré <guillaume.carre@gmail.com> wrote:
>
> A few questions about the autocompleter tag:
>
> - If the action called from the autocompleter tag (href attribute)
> loads thousands of items from the database, I want to be able to
> restrict the returned results to what the user types in.
> So I set the formId attribute of the tag to the form id of the form
> the autocompleter is in.
> But if the user types "test" the parameter has the following value in
> the action: "test, test"
> Why?
>
> - I want to put the autocompleter tag inside a xhtml type form, but
> when I do that, the produced HTML code is not ok:
>
> <form namespace="" id="addProduct" action="addProduct.action">
> <table class="wwFormTable">
> <input dojoType="struts:ComboBox" dataUrl="ajaxSearchProduct.action"
> name="reference" keyName="referenceKey" visibleDownArrow="true">
> <!-- javascript that is needed for tooltips -->
> <script language="JavaScript"
> type="text/javascript">dojo.require("dojo.widget.html.Tooltip
> ");dojo.require("dojo.fx.html");</script>
> </table>
> </form>
>
> Is it a bug?
> --
> Guillaume Carré
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message