struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: Problem passing form fields with autocompleter
Date Fri, 13 Apr 2007 17:49:14 GMT
When you click submit, are they getting submitted to the action (with
values)?

musachy

On 4/13/07, Scott Nesbitt <scottnesbitt@yahoo.com> wrote:
>
>
> Well, it is great that we are both right but it is
> still not working.
>
> I don't care about "foo", I was just trying to make my
> code simpler in the email.  The actual code has two
> autocompleters like this:
>
> <s:form id="mainForm" theme="simple" validate="false">
>    <s:url id="autosportsteam"
> action="LookupSportsTeam"/>
>    <s:url id="autosportsorg"
> action="LookupSportsOrg"/>
>    <div class="form-edit">
>          <s:autocompleter name="sportsTeam"
>                           id="sportsTeam"
>                           keyName="sportsTeamKey"
>                           theme="ajax"
>                           href="%{#autosportsteam}"
>                           cssStyle="width: 500px;"
>                           dropdownHeight="180";
>                           loadMinimumCount="2"
>                           loadOnTextChange="true"
>                           autoComplete="false"
>                           showDownArrow="false"
>                           delay="100"
>                           searchType="substring"
>                           forceValidOption="true"/>
>          <s:autocompleter name="sportsOrg"
>                           id="sportsOrg"
>                           keyName="sportsOrgKey"
>                           theme="ajax"
>                           href="%{#autosportsorg}"
>                           cssStyle="width: 450px;"
>                           dropdownHeight="170";
>                           loadMinimumCount="2"
>                           loadOnTextChange="true"
>                           autoComplete="false"
>                           showDownArrow="false"
>                           searchType="substring"
>                           forceValidOption="true"/>
>       </div>
>    </s:form>
>
> In LookupSportsTeamAction I need the value of what was
> looked up in the sportsOrg field, but I can't seem to
> get it.  My sportsOrg and sportsOrgKey variables are
> always null.
>
> Scott
>
> --- Dave Newton <newton.dave@yahoo.com> wrote:
>
> > --- Scott Nesbitt <scottnesbitt@yahoo.com> wrote:
> > > Not sure why it should be getBar().  The name of
> > the
> > > hidden field is foo, so shouldn't that be the
> > > variable that has the getter and setter?
> >
> > You guys are both right.
> >
> > The argument to the 'value' attribute is an object:
> >
> > > > >   <s:hidden name="foo" value="bar"/>
> >
> > *is* looking for a getBar(), and you also need a
> > get/setFoo() to get the value back to the action.
> >
> > If you wanted a hardcoded string value, for example,
> > you'd have to say value="%{'bar'}" (or something
> > like
> > that) etc.
> >
> > d.
> >
> >
> >
> >
> >
>
> ____________________________________________________________________________________
> > Looking for earth-friendly autos?
> > Browse Top Cars by "Green Rating" at Yahoo! Autos'
> > Green Center.
> > http://autos.yahoo.com/green_center/
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> > user-help@struts.apache.org
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> 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