struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: S2: Want to set autocompleter value
Date Fri, 25 May 2007 18:42:44 GMT
By the way the property "dataProvider.data" in the widget is a hash of the
key and the values, so you could find the right value, and then set it in
the 2 inputs for the comobox (the visible and the hidden ones). I logged a
ticket for it:

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

musachy



On 5/25/07, Musachy Barroso <musachy@gmail.com> wrote:
>
> 2.1 is going to ship with 0.4.2 or 0.4.3, as for 0.9 we don't have any
> estimated time.
>
> musachy
>
> On 5/25/07, Scott Nesbitt < scottnesbitt@yahoo.com> wrote:
> >
> >
> > That does not seem to do anything for me.
> >
> > After reading this:
> >
> > http://trac.dojotoolkit.org/ticket/1451
> >
> > It looks like setSelectedValue() is going away.  I
> > tried this:
> >
> >    var t = dojo.widget.byId ('states');
> >    t.setValue('AZ');
> >
> > And it sets the state to AZ instead of Arizona,
> > perhaps because the reverse lookup alluded to in the
> > link above is not there yet.
> >
> > Not sure what to do at this point.  Are we in limbo
> > waiting  on Godot, er, Dojo 0.9?
> >
> > Scott
> >
> > --- Musachy Barroso <musachy@gmail.com> wrote:
> >
> > > try:
> > >
> > >
> > dojo.widget.byId("autocompleter_id").setSelectedValue("value");
> > >
> > > I can't try it myself now, but that's the only
> > > method that seems to set a
> > > value in the autocompleter widget.
> > >
> > > musachy
> > >
> > > On 5/25/07, Scott Nesbitt < scottnesbitt@yahoo.com>
> > > wrote:
> > > >
> > > >
> > > > I have an autocompleter like this:
> > > >
> > > > <s:autocompleter name="states"
> > > >                  id="states"
> > > >                  theme="simple"
> > > >                  autoComplete="false"
> > > >                  showDownArrow="false"
> > > >                  searchType="startstring"
> > > >                  forceValidOption="true"
> > > >         list="#{'AL':'ALABAMA', 'AZ':'ARIZONA',
> > > >                 'AR':'ARKANSAS',
> > > 'CA':'CALIFORNIA'}"/>
> > > >
> > > > In some JavaScript I would like to set the state
> > > to,
> > > > say, Arizona.  This is not working:
> > > >
> > > > var t = dojo.widget.byId('states');
> > > > t.value = 'AZ';
> > > >
> > > > Any ideas?  I also tried statesKey, no luck.
> > > >
> > > > Thanks,
> > > >
> > > > Scott
> > > >
> > > >
> > > >
> > > >
> > >
> >
> > ____________________________________________________________________________________Be
> > > > a better Heartthrob. Get better relationship
> > > answers from someone who knows.
> > > > Yahoo! Answers - Check it out.
> > > >
> > >
> > http://answers.yahoo.com/dir/?link=list&sid=396545433
> > > >
> > > >
> > >
> > ---------------------------------------------------------------------
> > > > 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
> > >
> >
> >
> >
> >
> > ____________________________________________________________________________________Luggage?
> > GPS? Comic books?
> > Check out fitting gifts for grads at Yahoo! Search
> > http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&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
>



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

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