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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> wrote:
> That trailing comma on IE is the mother of all
> annoyances :)
>
> musachy
>
> On 6/26/07, Toni Lyytikäinen <[EMAIL PROTECTED]>
> 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 <[EMAIL PROTECTED]>
> 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:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> > >
> >
>
>
>
> --
> "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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
"Hey you! Would you help me to carry the stone?" Pink Floyd