You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Scott Nesbitt <sc...@yahoo.com> on 2007/04/10 16:44:02 UTC

S2: Autocompleter strange behavior

I am using the autocompleter tag like this:

   <s:url id="autoorgs"   action="LookupOrgs"/>

         <s:autocompleter name="org"
                          id="org"
                          keyName="orgKey"
                          theme="ajax" 
                          href="%{#autoorgs}"
                          cssStyle="width: 450px;" 
                          dropdownHeight="170";
                          loadMinimumCount="2"
                          loadOnTextChange="true"
                          autoComplete="false"
                          showDownArrow="false"
                          searchType="substring"
                          forceValidOption="true"/>

When I type a two-char string in the text box it works
fine: six items in the dropdown.  However, when I add
another char there is nothing in the dropdown.  When I
add a fourth char I get six items again.  When I
backspace to three chars, I see six items in the
dropdown.

Using fiddler I verified the same JSON is getting sent
for both ways to get a three char string.

Is this a known bug in the autocompleter?  I am using
struts-2.0.6.

Thanks,

Scott


       
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: S2: Autocompleter strange behavior

Posted by Musachy Barroso <mu...@gmail.com>.
No, the comma should not be a problem. I can't debug it right now, I will
late you know later. In the meantime creating a Jira ticket would ensure I
don't forget it :)

musachy

On 4/10/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> Yes, the JSON looks good.  For the 3, 4, backspace 3
> it returns the identical data:
>
> [
>         ["NCAA BKBL ATLANTIC 10 CONF-EAST"],
>         ["NCAA BKBL ATLANTIC COAST CONF"],
>         ["NCAA BKBL BIG 10 CONF"],
>         ["NCAA BKBL BIG 12 CONF"],
>         ["NCAA BKBL BIG EAST CONF"],
>         ["NCAA BKBL BIG SKY CONF"],
> ]
>
> That trailing comma is not a problem, is it? (It is
> there in the working and nonworking lookups.)
>
> Thanks,
>
> Scott
>
> --- Musachy Barroso <mu...@gmail.com> wrote:
>
> > Looks right, and is it returning data for all of
> > them?
> >
> > musachy
> >
> > On 4/10/07, Scott Nesbitt <sc...@yahoo.com>
> > wrote:
> > >
> > >
> > > Well, because loadMinimumCount is set to 2 it does
> > not
> > > fire with one char.  Here are the requests for
> > strings
> > > of length 2, 3, 4, then backspace to 3 from
> > fiddler.
> > >
> > > GET /enames2/html/LookupOrgs.action?org=nc
> > HTTP/1.1
> > > GET /enames2/html/LookupOrgs.action?org=nca
> > HTTP/1.1
> > > GET /enames2/html/LookupOrgs.action?org=ncaa
> > HTTP/1.1
> > > GET /enames2/html/LookupOrgs.action?org=nca
> > HTTP/1.1
> > >
> > > Thanks,
> > >
> > > Scott
> > >
> > > --- Musachy Barroso <mu...@gmail.com> wrote:
> > >
> > > > Can you post the url that its using for 1,2,3,4
> > > > characters? You can use
> > > > FireBug for that, they should be something like
> > > >
> > > > http://....../LookupOrgs.action?org=ab
> > > > http://....../LookupOrgs.action?org=abc
> > > >
> > > > ...
> > > >
> > > > regards
> > > > musachy
> > > >
> > > > On 4/10/07, Scott Nesbitt
> > <sc...@yahoo.com>
> > > > wrote:
> > > > >
> > > > >
> > > > > I am using the autocompleter tag like this:
> > > > >
> > > > >    <s:url id="autoorgs"
> > action="LookupOrgs"/>
> > > > >
> > > > >          <s:autocompleter name="org"
> > > > >                           id="org"
> > > > >                           keyName="orgKey"
> > > > >                           theme="ajax"
> > > > >                           href="%{#autoorgs}"
> > > > >                           cssStyle="width:
> > 450px;"
> > > > >
> > dropdownHeight="170";
> > > > >                           loadMinimumCount="2"
> > > > >
> > loadOnTextChange="true"
> > > > >                           autoComplete="false"
> > > > >
> > showDownArrow="false"
> > > > >
> > searchType="substring"
> > > > >
> > > > forceValidOption="true"/>
> > > > >
> > > > > When I type a two-char string in the text box
> > it
> > > > works
> > > > > fine: six items in the dropdown.  However,
> > when I
> > > > add
> > > > > another char there is nothing in the dropdown.
> > > > When I
> > > > > add a fourth char I get six items again.  When
> > I
> > > > > backspace to three chars, I see six items in
> > the
> > > > > dropdown.
> > > > >
> > > > > Using fiddler I verified the same JSON is
> > getting
> > > > sent
> > > > > for both ways to get a three char string.
> > > > >
> > > > > Is this a known bug in the autocompleter?  I
> > am
> > > > using
> > > > > struts-2.0.6.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Scott
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
> ____________________________________________________________________________________
> > > > > Expecting? Get great news right away with
> > email
> > > > Auto-Check.
> > > > > Try the Yahoo! Mail Beta.
> > > > >
> > > >
> > >
> >
> http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
> > > > >
> > > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > > 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
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
> ____________________________________________________________________________________
> > > Don't get soaked.  Take a quick peak at the
> > forecast
> > > with the Yahoo! Search weather shortcut.
> > >
> > http://tools.search.yahoo.com/shortcuts/#loc_weather
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > 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
> >
>
>
>
>
>
> ____________________________________________________________________________________
> Sucker-punch spam with award-winning protection.
> Try the free Yahoo! Mail Beta.
> http://advision.webevents.yahoo.com/mailbeta/features_spam.html
>
> ---------------------------------------------------------------------
> 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

Re: S2: Autocompleter strange behavior

Posted by Scott Nesbitt <sc...@yahoo.com>.
Yes, the JSON looks good.  For the 3, 4, backspace 3
it returns the identical data:

[
	["NCAA BKBL ATLANTIC 10 CONF-EAST"],
	["NCAA BKBL ATLANTIC COAST CONF"],
	["NCAA BKBL BIG 10 CONF"],
	["NCAA BKBL BIG 12 CONF"],
	["NCAA BKBL BIG EAST CONF"],
	["NCAA BKBL BIG SKY CONF"],
]

That trailing comma is not a problem, is it? (It is
there in the working and nonworking lookups.)

Thanks,

Scott

--- Musachy Barroso <mu...@gmail.com> wrote:

> Looks right, and is it returning data for all of
> them?
> 
> musachy
> 
> On 4/10/07, Scott Nesbitt <sc...@yahoo.com>
> wrote:
> >
> >
> > Well, because loadMinimumCount is set to 2 it does
> not
> > fire with one char.  Here are the requests for
> strings
> > of length 2, 3, 4, then backspace to 3 from
> fiddler.
> >
> > GET /enames2/html/LookupOrgs.action?org=nc
> HTTP/1.1
> > GET /enames2/html/LookupOrgs.action?org=nca
> HTTP/1.1
> > GET /enames2/html/LookupOrgs.action?org=ncaa
> HTTP/1.1
> > GET /enames2/html/LookupOrgs.action?org=nca
> HTTP/1.1
> >
> > Thanks,
> >
> > Scott
> >
> > --- Musachy Barroso <mu...@gmail.com> wrote:
> >
> > > Can you post the url that its using for 1,2,3,4
> > > characters? You can use
> > > FireBug for that, they should be something like
> > >
> > > http://....../LookupOrgs.action?org=ab
> > > http://....../LookupOrgs.action?org=abc
> > >
> > > ...
> > >
> > > regards
> > > musachy
> > >
> > > On 4/10/07, Scott Nesbitt
> <sc...@yahoo.com>
> > > wrote:
> > > >
> > > >
> > > > I am using the autocompleter tag like this:
> > > >
> > > >    <s:url id="autoorgs"  
> action="LookupOrgs"/>
> > > >
> > > >          <s:autocompleter name="org"
> > > >                           id="org"
> > > >                           keyName="orgKey"
> > > >                           theme="ajax"
> > > >                           href="%{#autoorgs}"
> > > >                           cssStyle="width:
> 450px;"
> > > >                          
> dropdownHeight="170";
> > > >                           loadMinimumCount="2"
> > > >                          
> loadOnTextChange="true"
> > > >                           autoComplete="false"
> > > >                          
> showDownArrow="false"
> > > >                          
> searchType="substring"
> > > >
> > > forceValidOption="true"/>
> > > >
> > > > When I type a two-char string in the text box
> it
> > > works
> > > > fine: six items in the dropdown.  However,
> when I
> > > add
> > > > another char there is nothing in the dropdown.
> > > When I
> > > > add a fourth char I get six items again.  When
> I
> > > > backspace to three chars, I see six items in
> the
> > > > dropdown.
> > > >
> > > > Using fiddler I verified the same JSON is
> getting
> > > sent
> > > > for both ways to get a three char string.
> > > >
> > > > Is this a known bug in the autocompleter?  I
> am
> > > using
> > > > struts-2.0.6.
> > > >
> > > > Thanks,
> > > >
> > > > Scott
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
>
____________________________________________________________________________________
> > > > Expecting? Get great news right away with
> email
> > > Auto-Check.
> > > > Try the Yahoo! Mail Beta.
> > > >
> > >
> >
>
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > 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
> > >
> >
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Don't get soaked.  Take a quick peak at the
> forecast
> > with the Yahoo! Search weather shortcut.
> >
> http://tools.search.yahoo.com/shortcuts/#loc_weather
> >
> >
>
---------------------------------------------------------------------
> > 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
> 



       
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: S2: Autocompleter strange behavior

Posted by Musachy Barroso <mu...@gmail.com>.
Looks right, and is it returning data for all of them?

musachy

On 4/10/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> Well, because loadMinimumCount is set to 2 it does not
> fire with one char.  Here are the requests for strings
> of length 2, 3, 4, then backspace to 3 from fiddler.
>
> GET /enames2/html/LookupOrgs.action?org=nc HTTP/1.1
> GET /enames2/html/LookupOrgs.action?org=nca HTTP/1.1
> GET /enames2/html/LookupOrgs.action?org=ncaa HTTP/1.1
> GET /enames2/html/LookupOrgs.action?org=nca HTTP/1.1
>
> Thanks,
>
> Scott
>
> --- Musachy Barroso <mu...@gmail.com> wrote:
>
> > Can you post the url that its using for 1,2,3,4
> > characters? You can use
> > FireBug for that, they should be something like
> >
> > http://....../LookupOrgs.action?org=ab
> > http://....../LookupOrgs.action?org=abc
> >
> > ...
> >
> > regards
> > musachy
> >
> > On 4/10/07, Scott Nesbitt <sc...@yahoo.com>
> > wrote:
> > >
> > >
> > > I am using the autocompleter tag like this:
> > >
> > >    <s:url id="autoorgs"   action="LookupOrgs"/>
> > >
> > >          <s:autocompleter name="org"
> > >                           id="org"
> > >                           keyName="orgKey"
> > >                           theme="ajax"
> > >                           href="%{#autoorgs}"
> > >                           cssStyle="width: 450px;"
> > >                           dropdownHeight="170";
> > >                           loadMinimumCount="2"
> > >                           loadOnTextChange="true"
> > >                           autoComplete="false"
> > >                           showDownArrow="false"
> > >                           searchType="substring"
> > >
> > forceValidOption="true"/>
> > >
> > > When I type a two-char string in the text box it
> > works
> > > fine: six items in the dropdown.  However, when I
> > add
> > > another char there is nothing in the dropdown.
> > When I
> > > add a fourth char I get six items again.  When I
> > > backspace to three chars, I see six items in the
> > > dropdown.
> > >
> > > Using fiddler I verified the same JSON is getting
> > sent
> > > for both ways to get a three char string.
> > >
> > > Is this a known bug in the autocompleter?  I am
> > using
> > > struts-2.0.6.
> > >
> > > Thanks,
> > >
> > > Scott
> > >
> > >
> > >
> > >
> > >
> >
>
> ____________________________________________________________________________________
> > > Expecting? Get great news right away with email
> > Auto-Check.
> > > Try the Yahoo! Mail Beta.
> > >
> >
> http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > 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
> >
>
>
>
>
>
> ____________________________________________________________________________________
> Don't get soaked.  Take a quick peak at the forecast
> with the Yahoo! Search weather shortcut.
> http://tools.search.yahoo.com/shortcuts/#loc_weather
>
> ---------------------------------------------------------------------
> 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

Re: S2: Autocompleter strange behavior

Posted by Scott Nesbitt <sc...@yahoo.com>.
Well, because loadMinimumCount is set to 2 it does not
fire with one char.  Here are the requests for strings
of length 2, 3, 4, then backspace to 3 from fiddler.

GET /enames2/html/LookupOrgs.action?org=nc HTTP/1.1
GET /enames2/html/LookupOrgs.action?org=nca HTTP/1.1
GET /enames2/html/LookupOrgs.action?org=ncaa HTTP/1.1
GET /enames2/html/LookupOrgs.action?org=nca HTTP/1.1

Thanks,

Scott

--- Musachy Barroso <mu...@gmail.com> wrote:

> Can you post the url that its using for 1,2,3,4
> characters? You can use
> FireBug for that, they should be something like
> 
> http://....../LookupOrgs.action?org=ab
> http://....../LookupOrgs.action?org=abc
> 
> ...
> 
> regards
> musachy
> 
> On 4/10/07, Scott Nesbitt <sc...@yahoo.com>
> wrote:
> >
> >
> > I am using the autocompleter tag like this:
> >
> >    <s:url id="autoorgs"   action="LookupOrgs"/>
> >
> >          <s:autocompleter name="org"
> >                           id="org"
> >                           keyName="orgKey"
> >                           theme="ajax"
> >                           href="%{#autoorgs}"
> >                           cssStyle="width: 450px;"
> >                           dropdownHeight="170";
> >                           loadMinimumCount="2"
> >                           loadOnTextChange="true"
> >                           autoComplete="false"
> >                           showDownArrow="false"
> >                           searchType="substring"
> >                          
> forceValidOption="true"/>
> >
> > When I type a two-char string in the text box it
> works
> > fine: six items in the dropdown.  However, when I
> add
> > another char there is nothing in the dropdown. 
> When I
> > add a fourth char I get six items again.  When I
> > backspace to three chars, I see six items in the
> > dropdown.
> >
> > Using fiddler I verified the same JSON is getting
> sent
> > for both ways to get a three char string.
> >
> > Is this a known bug in the autocompleter?  I am
> using
> > struts-2.0.6.
> >
> > Thanks,
> >
> > Scott
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Expecting? Get great news right away with email
> Auto-Check.
> > Try the Yahoo! Mail Beta.
> >
>
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
> >
> >
>
---------------------------------------------------------------------
> > 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
> 



       
____________________________________________________________________________________
Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: S2: Autocompleter strange behavior

Posted by Musachy Barroso <mu...@gmail.com>.
Can you post the url that its using for 1,2,3,4 characters? You can use
FireBug for that, they should be something like

http://....../LookupOrgs.action?org=ab
http://....../LookupOrgs.action?org=abc

...

regards
musachy

On 4/10/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> I am using the autocompleter tag like this:
>
>    <s:url id="autoorgs"   action="LookupOrgs"/>
>
>          <s:autocompleter name="org"
>                           id="org"
>                           keyName="orgKey"
>                           theme="ajax"
>                           href="%{#autoorgs}"
>                           cssStyle="width: 450px;"
>                           dropdownHeight="170";
>                           loadMinimumCount="2"
>                           loadOnTextChange="true"
>                           autoComplete="false"
>                           showDownArrow="false"
>                           searchType="substring"
>                           forceValidOption="true"/>
>
> When I type a two-char string in the text box it works
> fine: six items in the dropdown.  However, when I add
> another char there is nothing in the dropdown.  When I
> add a fourth char I get six items again.  When I
> backspace to three chars, I see six items in the
> dropdown.
>
> Using fiddler I verified the same JSON is getting sent
> for both ways to get a three char string.
>
> Is this a known bug in the autocompleter?  I am using
> struts-2.0.6.
>
> Thanks,
>
> Scott
>
>
>
>
> ____________________________________________________________________________________
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
> http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
>
> ---------------------------------------------------------------------
> 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