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/06/26 17:17:40 UTC
S2: autocompletion trouble in 2.0.8
Using the following code:
<s:url id="autosportsteam" action="LookupSportsTeam"/>
<s:autocompleter name="sportsTeam"
id="sportsTeam"
keyName="sportsTeamKey"
theme="ajax"
formId="sportsForm"
href="%{#autosportsteam}"
cssStyle="width: 340px;"
dropdownHeight="180"
loadMinimumCount="2"
loadOnTextChange="true"
autoComplete="false"
showDownArrow="false"
delay="100"
searchType="substring"
forceValidOption="true"/>
I am getting what looks like a Dojo error: Object
error at line 4871.
Here is what Fiddler says is the JSON I return:
[
["ALABAMA STATE UNIV HORNETS"],
["ALBANY ST UNIV GOLDEN RAMS"],
["BALDWIN-WALLCE CLG YELLW JCKTS"],
["BALL ST UNIV CARDINALS"],
["BAYLOR UNIV BEARS"],
["CATAWBA COLLEGE"],
]
Any ideas? Strangely, this works on a WIN2K machine
with IE6, but fails on a WINXP machine with IE6, both
with the latest patches.
Thanks,
Scott
____________________________________________________________________________________
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: autocompletion trouble in 2.0.8
Posted by Scott Nesbitt <sc...@yahoo.com>.
Excellent, works great.
Thanks yet again, Musachy.
Scott
--- Musachy Barroso <mu...@gmail.com> wrote:
> I posted the solution here the other day, off the
> top of my head (quite
> unreliable):
>
> [
> <#list options as o>
> ["${o.description}","${o.code}"]
> <#if o_has_next>,</#if>
> </#list>
> ]
>
> musachy
>
> On 6/26/07, Scott Nesbitt <sc...@yahoo.com>
> wrote:
> >
> >
> > Hmm, I guess I could do that, though I would have
> to
> > learn a bit more about Freemarker above my simple
> > template:
> >
> > [
> > <#list options as o>
> > ["${o.description}","${o.code}"],
> > </#list>
> > ]
> >
> > However, when I went back to Struts 2.0.6 and my
> > problem went away. Should I change my template or
> > will 2.1 behave like 2.0.6?
> >
> > Relatedly, I am trying to use the handy
> > initComboxWithDefaultValue() function posted here,
> but
> > though it seems to work initially when focus
> leaves
> > the
> > field the forceValidOption="true" causes it to
> blank.
> > Debugging shows that key and value are valid.
> >
> > Any suggestions?
> >
> > Thanks,
> >
> > Scott
> >
> > --- Musachy Barroso <mu...@gmail.com> wrote:
> >
> > > That trailing comma on IE is the mother of all
> > > annoyances :)
> > >
> > > musachy
> > >
> > > On 6/26/07, Toni Lyytikäinen <to...@gmail.com>
> > > wrote:
> > > >
> > > > Try removing the last comma from the list like
> > > this:
> > > >
> > > > [
> > > > ["ALABAMA STATE UNIV HORNETS"],
> > > > ["ALBANY ST UNIV GOLDEN RAMS"],
> > > > ["BALDWIN-WALLCE CLG YELLW JCKTS"],
> > > > ["BALL ST UNIV CARDINALS"],
> > > > ["BAYLOR UNIV BEARS"],
> > > > ["CATAWBA COLLEGE"]
> <--
> > > removed comma
> > > > ]
> > > >
> > > > On 6/26/07, Scott Nesbitt
> <sc...@yahoo.com>
> > > wrote:
> > > > >
> > > > >
> > > > > Using the following code:
> > > > >
> > > > > <s:url id="autosportsteam"
> > > action="LookupSportsTeam"/>
> > > > >
> > > > > <s:autocompleter name="sportsTeam"
> > > > > id="sportsTeam"
> > > > >
> > > keyName="sportsTeamKey"
> > > > > theme="ajax"
> > > > >
> formId="sportsForm"
> > > > >
> > > href="%{#autosportsteam}"
> > > > > cssStyle="width:
> > > 340px;"
> > > > >
> dropdownHeight="180"
> > > > >
> loadMinimumCount="2"
> > > > >
> > > loadOnTextChange="true"
> > > > >
> autoComplete="false"
> > > > >
> showDownArrow="false"
> > > > > delay="100"
> > > > >
> searchType="substring"
> > > > >
> > > forceValidOption="true"/>
> > > > >
> > > > > I am getting what looks like a Dojo error:
> > > Object
> > > > > error at line 4871.
> > > > >
> > > > > Here is what Fiddler says is the JSON I
> return:
> > > > >
> > > > > [
> > > > > ["ALABAMA STATE UNIV HORNETS"],
> > > > > ["ALBANY ST UNIV GOLDEN RAMS"],
> > > > > ["BALDWIN-WALLCE CLG YELLW JCKTS"],
> > > > > ["BALL ST UNIV CARDINALS"],
> > > > > ["BAYLOR UNIV BEARS"],
> > > > > ["CATAWBA COLLEGE"],
> > > > > ]
> > > > >
> > > > > Any ideas? Strangely, this works on a WIN2K
> > > machine
> > > > > with IE6, but fails on a WINXP machine with
> IE6,
> > > both
> > > > > with the latest patches.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Scott
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> >
>
____________________________________________________________________________________
> > > > > 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
> > >
> >
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Got a little couch potato?
> > Check out fun summer activities for kids.
> >
> >
>
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
> >
> >
>
---------------------------------------------------------------------
> > 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
>
___________________________________________________________________________________
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: S2: autocompletion trouble in 2.0.8
Posted by Musachy Barroso <mu...@gmail.com>.
I posted the solution here the other day, off the top of my head (quite
unreliable):
[
<#list options as o>
["${o.description}","${o.code}"]
<#if o_has_next>,</#if>
</#list>
]
musachy
On 6/26/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> Hmm, I guess I could do that, though I would have to
> learn a bit more about Freemarker above my simple
> template:
>
> [
> <#list options as o>
> ["${o.description}","${o.code}"],
> </#list>
> ]
>
> However, when I went back to Struts 2.0.6 and my
> problem went away. Should I change my template or
> will 2.1 behave like 2.0.6?
>
> Relatedly, I am trying to use the handy
> initComboxWithDefaultValue() function posted here, but
> though it seems to work initially when focus leaves
> the
> field the forceValidOption="true" causes it to blank.
> Debugging shows that key and value are valid.
>
> Any suggestions?
>
> Thanks,
>
> Scott
>
> --- Musachy Barroso <mu...@gmail.com> wrote:
>
> > That trailing comma on IE is the mother of all
> > annoyances :)
> >
> > musachy
> >
> > On 6/26/07, Toni Lyytikäinen <to...@gmail.com>
> > wrote:
> > >
> > > Try removing the last comma from the list like
> > this:
> > >
> > > [
> > > ["ALABAMA STATE UNIV HORNETS"],
> > > ["ALBANY ST UNIV GOLDEN RAMS"],
> > > ["BALDWIN-WALLCE CLG YELLW JCKTS"],
> > > ["BALL ST UNIV CARDINALS"],
> > > ["BAYLOR UNIV BEARS"],
> > > ["CATAWBA COLLEGE"] <--
> > removed comma
> > > ]
> > >
> > > On 6/26/07, Scott Nesbitt <sc...@yahoo.com>
> > wrote:
> > > >
> > > >
> > > > Using the following code:
> > > >
> > > > <s:url id="autosportsteam"
> > action="LookupSportsTeam"/>
> > > >
> > > > <s:autocompleter name="sportsTeam"
> > > > id="sportsTeam"
> > > >
> > keyName="sportsTeamKey"
> > > > theme="ajax"
> > > > formId="sportsForm"
> > > >
> > href="%{#autosportsteam}"
> > > > cssStyle="width:
> > 340px;"
> > > > dropdownHeight="180"
> > > > loadMinimumCount="2"
> > > >
> > loadOnTextChange="true"
> > > > autoComplete="false"
> > > > showDownArrow="false"
> > > > delay="100"
> > > > searchType="substring"
> > > >
> > forceValidOption="true"/>
> > > >
> > > > I am getting what looks like a Dojo error:
> > Object
> > > > error at line 4871.
> > > >
> > > > Here is what Fiddler says is the JSON I return:
> > > >
> > > > [
> > > > ["ALABAMA STATE UNIV HORNETS"],
> > > > ["ALBANY ST UNIV GOLDEN RAMS"],
> > > > ["BALDWIN-WALLCE CLG YELLW JCKTS"],
> > > > ["BALL ST UNIV CARDINALS"],
> > > > ["BAYLOR UNIV BEARS"],
> > > > ["CATAWBA COLLEGE"],
> > > > ]
> > > >
> > > > Any ideas? Strangely, this works on a WIN2K
> > machine
> > > > with IE6, but fails on a WINXP machine with IE6,
> > both
> > > > with the latest patches.
> > > >
> > > > Thanks,
> > > >
> > > > Scott
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
> ____________________________________________________________________________________
> > > > 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
> >
>
>
>
>
>
> ____________________________________________________________________________________
> Got a little couch potato?
> Check out fun summer activities for kids.
>
> http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
>
> ---------------------------------------------------------------------
> 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: autocompletion trouble in 2.0.8
Posted by Dave Newton <ne...@yahoo.com>.
+1; that one cost me about 30 minutes on day a couple
of weeks ago.
--- Musachy Barroso <mu...@gmail.com> wrote:
> That trailing comma on IE is the mother of all
> annoyances :)
>
> musachy
>
> On 6/26/07, Toni Lyytikäinen <to...@gmail.com>
> wrote:
> >
> > Try removing the last comma from the list like
> this:
> >
> > [
> > ["ALABAMA STATE UNIV HORNETS"],
> > ["ALBANY ST UNIV GOLDEN RAMS"],
> > ["BALDWIN-WALLCE CLG YELLW JCKTS"],
> > ["BALL ST UNIV CARDINALS"],
> > ["BAYLOR UNIV BEARS"],
> > ["CATAWBA COLLEGE"] <--
> removed comma
> > ]
> >
> > On 6/26/07, Scott Nesbitt <sc...@yahoo.com>
> wrote:
> > >
> > >
> > > Using the following code:
> > >
> > > <s:url id="autosportsteam"
> action="LookupSportsTeam"/>
> > >
> > > <s:autocompleter name="sportsTeam"
> > > id="sportsTeam"
> > >
> keyName="sportsTeamKey"
> > > theme="ajax"
> > > formId="sportsForm"
> > >
> href="%{#autosportsteam}"
> > > cssStyle="width:
> 340px;"
> > > dropdownHeight="180"
> > > loadMinimumCount="2"
> > >
> loadOnTextChange="true"
> > > autoComplete="false"
> > > showDownArrow="false"
> > > delay="100"
> > > searchType="substring"
> > >
> forceValidOption="true"/>
> > >
> > > I am getting what looks like a Dojo error:
> Object
> > > error at line 4871.
> > >
> > > Here is what Fiddler says is the JSON I return:
> > >
> > > [
> > > ["ALABAMA STATE UNIV HORNETS"],
> > > ["ALBANY ST UNIV GOLDEN RAMS"],
> > > ["BALDWIN-WALLCE CLG YELLW JCKTS"],
> > > ["BALL ST UNIV CARDINALS"],
> > > ["BAYLOR UNIV BEARS"],
> > > ["CATAWBA COLLEGE"],
> > > ]
> > >
> > > Any ideas? Strangely, this works on a WIN2K
> machine
> > > with IE6, but fails on a WINXP machine with IE6,
> both
> > > with the latest patches.
> > >
> > > Thanks,
> > >
> > > Scott
> > >
> > >
> > >
> > >
> > >
> >
>
____________________________________________________________________________________
> > > 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
>
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: S2: autocompletion trouble in 2.0.8
Posted by Scott Nesbitt <sc...@yahoo.com>.
Hmm, I guess I could do that, though I would have to
learn a bit more about Freemarker above my simple
template:
[
<#list options as o>
["${o.description}","${o.code}"],
</#list>
]
However, when I went back to Struts 2.0.6 and my
problem went away. Should I change my template or
will 2.1 behave like 2.0.6?
Relatedly, I am trying to use the handy
initComboxWithDefaultValue() function posted here, but
though it seems to work initially when focus leaves
the
field the forceValidOption="true" causes it to blank.
Debugging shows that key and value are valid.
Any suggestions?
Thanks,
Scott
--- Musachy Barroso <mu...@gmail.com> wrote:
> That trailing comma on IE is the mother of all
> annoyances :)
>
> musachy
>
> On 6/26/07, Toni Lyytikäinen <to...@gmail.com>
> wrote:
> >
> > Try removing the last comma from the list like
> this:
> >
> > [
> > ["ALABAMA STATE UNIV HORNETS"],
> > ["ALBANY ST UNIV GOLDEN RAMS"],
> > ["BALDWIN-WALLCE CLG YELLW JCKTS"],
> > ["BALL ST UNIV CARDINALS"],
> > ["BAYLOR UNIV BEARS"],
> > ["CATAWBA COLLEGE"] <--
> removed comma
> > ]
> >
> > On 6/26/07, Scott Nesbitt <sc...@yahoo.com>
> wrote:
> > >
> > >
> > > Using the following code:
> > >
> > > <s:url id="autosportsteam"
> action="LookupSportsTeam"/>
> > >
> > > <s:autocompleter name="sportsTeam"
> > > id="sportsTeam"
> > >
> keyName="sportsTeamKey"
> > > theme="ajax"
> > > formId="sportsForm"
> > >
> href="%{#autosportsteam}"
> > > cssStyle="width:
> 340px;"
> > > dropdownHeight="180"
> > > loadMinimumCount="2"
> > >
> loadOnTextChange="true"
> > > autoComplete="false"
> > > showDownArrow="false"
> > > delay="100"
> > > searchType="substring"
> > >
> forceValidOption="true"/>
> > >
> > > I am getting what looks like a Dojo error:
> Object
> > > error at line 4871.
> > >
> > > Here is what Fiddler says is the JSON I return:
> > >
> > > [
> > > ["ALABAMA STATE UNIV HORNETS"],
> > > ["ALBANY ST UNIV GOLDEN RAMS"],
> > > ["BALDWIN-WALLCE CLG YELLW JCKTS"],
> > > ["BALL ST UNIV CARDINALS"],
> > > ["BAYLOR UNIV BEARS"],
> > > ["CATAWBA COLLEGE"],
> > > ]
> > >
> > > Any ideas? Strangely, this works on a WIN2K
> machine
> > > with IE6, but fails on a WINXP machine with IE6,
> both
> > > with the latest patches.
> > >
> > > Thanks,
> > >
> > > Scott
> > >
> > >
> > >
> > >
> > >
> >
>
____________________________________________________________________________________
> > > 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
>
____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: S2: autocompletion trouble in 2.0.8
Posted by Musachy Barroso <mu...@gmail.com>.
That trailing comma on IE is the mother of all annoyances :)
musachy
On 6/26/07, Toni Lyytikäinen <to...@gmail.com> wrote:
>
> Try removing the last comma from the list like this:
>
> [
> ["ALABAMA STATE UNIV HORNETS"],
> ["ALBANY ST UNIV GOLDEN RAMS"],
> ["BALDWIN-WALLCE CLG YELLW JCKTS"],
> ["BALL ST UNIV CARDINALS"],
> ["BAYLOR UNIV BEARS"],
> ["CATAWBA COLLEGE"] <-- removed comma
> ]
>
> On 6/26/07, Scott Nesbitt <sc...@yahoo.com> wrote:
> >
> >
> > Using the following code:
> >
> > <s:url id="autosportsteam" action="LookupSportsTeam"/>
> >
> > <s:autocompleter name="sportsTeam"
> > id="sportsTeam"
> > keyName="sportsTeamKey"
> > theme="ajax"
> > formId="sportsForm"
> > href="%{#autosportsteam}"
> > cssStyle="width: 340px;"
> > dropdownHeight="180"
> > loadMinimumCount="2"
> > loadOnTextChange="true"
> > autoComplete="false"
> > showDownArrow="false"
> > delay="100"
> > searchType="substring"
> > forceValidOption="true"/>
> >
> > I am getting what looks like a Dojo error: Object
> > error at line 4871.
> >
> > Here is what Fiddler says is the JSON I return:
> >
> > [
> > ["ALABAMA STATE UNIV HORNETS"],
> > ["ALBANY ST UNIV GOLDEN RAMS"],
> > ["BALDWIN-WALLCE CLG YELLW JCKTS"],
> > ["BALL ST UNIV CARDINALS"],
> > ["BAYLOR UNIV BEARS"],
> > ["CATAWBA COLLEGE"],
> > ]
> >
> > Any ideas? Strangely, this works on a WIN2K machine
> > with IE6, but fails on a WINXP machine with IE6, both
> > with the latest patches.
> >
> > Thanks,
> >
> > Scott
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > 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: autocompletion trouble in 2.0.8
Posted by Toni Lyytikäinen <to...@gmail.com>.
Try removing the last comma from the list like this:
[
["ALABAMA STATE UNIV HORNETS"],
["ALBANY ST UNIV GOLDEN RAMS"],
["BALDWIN-WALLCE CLG YELLW JCKTS"],
["BALL ST UNIV CARDINALS"],
["BAYLOR UNIV BEARS"],
["CATAWBA COLLEGE"] <-- removed comma
]
On 6/26/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> Using the following code:
>
> <s:url id="autosportsteam" action="LookupSportsTeam"/>
>
> <s:autocompleter name="sportsTeam"
> id="sportsTeam"
> keyName="sportsTeamKey"
> theme="ajax"
> formId="sportsForm"
> href="%{#autosportsteam}"
> cssStyle="width: 340px;"
> dropdownHeight="180"
> loadMinimumCount="2"
> loadOnTextChange="true"
> autoComplete="false"
> showDownArrow="false"
> delay="100"
> searchType="substring"
> forceValidOption="true"/>
>
> I am getting what looks like a Dojo error: Object
> error at line 4871.
>
> Here is what Fiddler says is the JSON I return:
>
> [
> ["ALABAMA STATE UNIV HORNETS"],
> ["ALBANY ST UNIV GOLDEN RAMS"],
> ["BALDWIN-WALLCE CLG YELLW JCKTS"],
> ["BALL ST UNIV CARDINALS"],
> ["BAYLOR UNIV BEARS"],
> ["CATAWBA COLLEGE"],
> ]
>
> Any ideas? Strangely, this works on a WIN2K machine
> with IE6, but fails on a WINXP machine with IE6, both
> with the latest patches.
>
> Thanks,
>
> Scott
>
>
>
>
> ____________________________________________________________________________________
> 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
>
>