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/12 21:31:46 UTC

Problem passing form fields with autocompleter

I have a form with an autocompleter like this:

<s:form id="mainForm" theme="simple" validate="false">
  <s:url id="autosportsteam"
action="LookupSportsTeam"/>
  <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"/>
  </div>
  <s:hidden name="foo" value="bar"/>
</s:form>

I expected that my LookupSportsTeamAction class (which
extends ActionSupport and has a getter and setter on
foo) would be able to use the foo member variable. 
But it is always null, though the sportsTeam variable
is being set correctly.

Any ideas on this?  This works in other pages that do
not have the autocompleter tag.

Thanks,

Scott


       
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

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


Re: Problem passing form fields with autocompleter

Posted by Harring Figueiredo <ha...@gmail.com>.
Scott:

I had a similar problem, and I got around it by getting the parameter
myself...
(I know.. a little pain, but got it done)
Let me know if you get the _correct_ way working.

hf.

On 4/12/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> I have a form with an autocompleter like this:
>
> <s:form id="mainForm" theme="simple" validate="false">
>   <s:url id="autosportsteam"
> action="LookupSportsTeam"/>
>   <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"/>
>   </div>
>   <s:hidden name="foo" value="bar"/>
> </s:form>
>
> I expected that my LookupSportsTeamAction class (which
> extends ActionSupport and has a getter and setter on
> foo) would be able to use the foo member variable.
> But it is always null, though the sportsTeam variable
> is being set correctly.
>
> Any ideas on this?  This works in other pages that do
> not have the autocompleter tag.
>
> Thanks,
>
> Scott
>
>
>
>
> ____________________________________________________________________________________
> Now that's room service!  Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel to find your fit.
> http://farechase.yahoo.com/promo-generic-14795097
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: harringf@gmail.com
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."

Re: Problem passing form fields with autocompleter

Posted by Musachy Barroso <mu...@gmail.com>.
the value for the field comes from the "value" attribute, which is evaluated
against the Value Stack.

musachy

On 4/12/07, Harring Figueiredo <ha...@gmail.com> wrote:
>
> I am sure it should NOT be getBar() either. It should be getFoo().
>
> Perhaps there is a bug with the framework on not processing/doing
> reflection
> on hidden fields?
>
> hf.
>
> On 4/12/07, Scott Nesbitt <sc...@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?
> >
> > Regarding passing the field as a parameter, I am not
> > too proud for that.  Could you post a little example
> > code?  I tried to do something like this:
> >
> > <s:url id="autosportsteam" action="LookupSportsTeam">
> >    <s:param name="foo" value="23"/>
> > </s:url>
> >
> > And that worked, but I want the value of the foo
> > field, not a hard-coded value.  How do I specify
> > another field in the param tag?
> >
> > Thanks again,
> >
> > Scott
> >
> > --- Musachy Barroso <mu...@gmail.com> wrote:
> >
> > > You should have a "getBar()" defined on your action,
> > > not a "getFoo()"
> > >
> > > regards
> > > musachy
> > >
> > > On 4/12/07, Scott Nesbitt <sc...@yahoo.com>
> > > wrote:
> > > >
> > > >
> > > > I have a form with an autocompleter like this:
> > > >
> > > > <s:form id="mainForm" theme="simple"
> > > validate="false">
> > > >   <s:url id="autosportsteam"
> > > > action="LookupSportsTeam"/>
> > > >   <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"/>
> > > >   </div>
> > > >   <s:hidden name="foo" value="bar"/>
> > > > </s:form>
> > > >
> > > > I expected that my LookupSportsTeamAction class
> > > (which
> > > > extends ActionSupport and has a getter and setter
> > > on
> > > > foo) would be able to use the foo member variable.
> > > > But it is always null, though the sportsTeam
> > > variable
> > > > is being set correctly.
> > > >
> > > > Any ideas on this?  This works in other pages that
> > > do
> > > > not have the autocompleter tag.
> > > >
> > > > Thanks,
> > > >
> > > > Scott
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> ____________________________________________________________________________________
> > > > Now that's room service!  Choose from over 150,000
> > > hotels
> > > > in 45,000 destinations on Yahoo! Travel to find
> > > your fit.
> > > > http://farechase.yahoo.com/promo-generic-14795097
> > > >
> > > >
> > >
> > ---------------------------------------------------------------------
> > > > 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
> > >
> >
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Be a PS3 game guru.
> > Get your game face on with the latest PS3 news and previews at Yahoo!
> > Games.
> > http://videogames.yahoo.com/platform?platform=120121
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> Sincerely,
>
> Harring Figueiredo
> Sr. Software Engineer
> Email: harringf@gmail.com
> Telephone: 941-256-0600
>
> "We never become truly spiritual by sitting down and wishing to become so.
> You must undertake something so great that you cannot accomplish it
> unaided."
>



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

Re: Problem passing form fields with autocompleter

Posted by Harring Figueiredo <ha...@gmail.com>.
I am sure it should NOT be getBar() either. It should be getFoo().

Perhaps there is a bug with the framework on not processing/doing reflection
on hidden fields?

hf.

On 4/12/07, Scott Nesbitt <sc...@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?
>
> Regarding passing the field as a parameter, I am not
> too proud for that.  Could you post a little example
> code?  I tried to do something like this:
>
> <s:url id="autosportsteam" action="LookupSportsTeam">
>    <s:param name="foo" value="23"/>
> </s:url>
>
> And that worked, but I want the value of the foo
> field, not a hard-coded value.  How do I specify
> another field in the param tag?
>
> Thanks again,
>
> Scott
>
> --- Musachy Barroso <mu...@gmail.com> wrote:
>
> > You should have a "getBar()" defined on your action,
> > not a "getFoo()"
> >
> > regards
> > musachy
> >
> > On 4/12/07, Scott Nesbitt <sc...@yahoo.com>
> > wrote:
> > >
> > >
> > > I have a form with an autocompleter like this:
> > >
> > > <s:form id="mainForm" theme="simple"
> > validate="false">
> > >   <s:url id="autosportsteam"
> > > action="LookupSportsTeam"/>
> > >   <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"/>
> > >   </div>
> > >   <s:hidden name="foo" value="bar"/>
> > > </s:form>
> > >
> > > I expected that my LookupSportsTeamAction class
> > (which
> > > extends ActionSupport and has a getter and setter
> > on
> > > foo) would be able to use the foo member variable.
> > > But it is always null, though the sportsTeam
> > variable
> > > is being set correctly.
> > >
> > > Any ideas on this?  This works in other pages that
> > do
> > > not have the autocompleter tag.
> > >
> > > Thanks,
> > >
> > > Scott
> > >
> > >
> > >
> > >
> > >
> >
>
> ____________________________________________________________________________________
> > > Now that's room service!  Choose from over 150,000
> > hotels
> > > in 45,000 destinations on Yahoo! Travel to find
> > your fit.
> > > http://farechase.yahoo.com/promo-generic-14795097
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > 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
> >
>
>
>
>
>
> ____________________________________________________________________________________
> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and previews at Yahoo!
> Games.
> http://videogames.yahoo.com/platform?platform=120121
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: harringf@gmail.com
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."

Re: Problem passing form fields with autocompleter

Posted by Musachy Barroso <mu...@gmail.com>.
Actually now that you mention it, yeah, it should use the outer form by
default, I will fix it for 2.1

regards
musachy

On 4/13/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> That did it!
>
> Thank you, thank you.  Not sure why I have to specify
> a form I am already in, but I don't care.  It works!
>
> Thanks again,
>
> Scott
>
> --- Musachy Barroso <mu...@gmail.com> wrote:
>
> > Ooops sorry, now I got it, you need to put sportsOrg
> > inside a form, and
> > point to it from the other autocopleter, using
> > "formId"
> >
> > musachy
> >
> > On 4/13/07, Scott Nesbitt <sc...@yahoo.com>
> > wrote:
> > >
> > >
> > > Well, there is not submit per se, the action is
> > > getting called when the user types the second char
> > in
> > > the lookup editor.
> > >
> > > Here is the log when the user types zz:
> > >
> > > DEBUG interceptor.FileUploadInterceptor  -
> > Bypassing
> > > /html/ LookupSportsTeam
> > > DEBUG interceptor.StaticParametersInterceptor  -
> > > Setting static parameters {}
> > > DEBUG interceptor.ParametersInterceptor  - Setting
> > > params sportsTeam => [ zz ]
> > > DEBUG util.XWorkConverter  - Property: sportsTeam
> > > DEBUG util.XWorkConverter  - Class:
> > >
> >
> com.nielsenmedia.lrs.enames2.view.lineup.LookupSportsTeamAction
> > > DEBUG util.XWorkConverter  - field-level type
> > > converter for property [sportsTeam] = none found
> > > DEBUG util.XWorkConverter  - global-level type
> > > converter for property [sportsTeam] = none found
> > >     DEBUG util.XWorkConverter  - falling back to
> > > default type converter
> > >
> >
> [com.opensymphony.xwork2.util.XWorkBasicConverter@17e4c97]
> > > DEBUG validation.AnnotationValidationInterceptor
> > -
> > > Validating /html/LookupSportsTeam with method
> > execute.
> > >
> > > No mention of sportsOrg.
> > >
> > > Scott
> > >
> > > --- Musachy Barroso <mu...@gmail.com> wrote:
> > >
> > > > When you click submit, are they getting
> > submitted to
> > > > the action (with
> > > > values)?
> > > >
> > > > musachy
> > > >
> > > > On 4/13/07, Scott Nesbitt
> > <sc...@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 <ne...@yahoo.com> wrote:
> > > > >
> > > > > > --- Scott Nesbitt <sc...@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
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > __________________________________________________
> >
> === message truncated ===
>
>
> __________________________________________________
> 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

Re: Problem passing form fields with autocompleter

Posted by Scott Nesbitt <sc...@yahoo.com>.
That did it!

Thank you, thank you.  Not sure why I have to specify
a form I am already in, but I don't care.  It works!

Thanks again,

Scott

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

> Ooops sorry, now I got it, you need to put sportsOrg
> inside a form, and
> point to it from the other autocopleter, using
> "formId"
> 
> musachy
> 
> On 4/13/07, Scott Nesbitt <sc...@yahoo.com>
> wrote:
> >
> >
> > Well, there is not submit per se, the action is
> > getting called when the user types the second char
> in
> > the lookup editor.
> >
> > Here is the log when the user types zz:
> >
> > DEBUG interceptor.FileUploadInterceptor  -
> Bypassing
> > /html/ LookupSportsTeam
> > DEBUG interceptor.StaticParametersInterceptor  -
> > Setting static parameters {}
> > DEBUG interceptor.ParametersInterceptor  - Setting
> > params sportsTeam => [ zz ]
> > DEBUG util.XWorkConverter  - Property: sportsTeam
> > DEBUG util.XWorkConverter  - Class:
> >
>
com.nielsenmedia.lrs.enames2.view.lineup.LookupSportsTeamAction
> > DEBUG util.XWorkConverter  - field-level type
> > converter for property [sportsTeam] = none found
> > DEBUG util.XWorkConverter  - global-level type
> > converter for property [sportsTeam] = none found
> >     DEBUG util.XWorkConverter  - falling back to
> > default type converter
> >
>
[com.opensymphony.xwork2.util.XWorkBasicConverter@17e4c97]
> > DEBUG validation.AnnotationValidationInterceptor 
> -
> > Validating /html/LookupSportsTeam with method
> execute.
> >
> > No mention of sportsOrg.
> >
> > Scott
> >
> > --- Musachy Barroso <mu...@gmail.com> wrote:
> >
> > > When you click submit, are they getting
> submitted to
> > > the action (with
> > > values)?
> > >
> > > musachy
> > >
> > > On 4/13/07, Scott Nesbitt
> <sc...@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 <ne...@yahoo.com> wrote:
> > > >
> > > > > --- Scott Nesbitt <sc...@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
> > > > >
> > > > >
> > > >
> > > >
> > > >
> __________________________________________________
> 
=== message truncated ===


__________________________________________________
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


Re: Problem passing form fields with autocompleter

Posted by Musachy Barroso <mu...@gmail.com>.
Ooops sorry, now I got it, you need to put sportsOrg inside a form, and
point to it from the other autocopleter, using "formId"

musachy

On 4/13/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> Well, there is not submit per se, the action is
> getting called when the user types the second char in
> the lookup editor.
>
> Here is the log when the user types zz:
>
> DEBUG interceptor.FileUploadInterceptor  - Bypassing
> /html/ LookupSportsTeam
> DEBUG interceptor.StaticParametersInterceptor  -
> Setting static parameters {}
> DEBUG interceptor.ParametersInterceptor  - Setting
> params sportsTeam => [ zz ]
> DEBUG util.XWorkConverter  - Property: sportsTeam
> DEBUG util.XWorkConverter  - Class:
> com.nielsenmedia.lrs.enames2.view.lineup.LookupSportsTeamAction
> DEBUG util.XWorkConverter  - field-level type
> converter for property [sportsTeam] = none found
> DEBUG util.XWorkConverter  - global-level type
> converter for property [sportsTeam] = none found
>     DEBUG util.XWorkConverter  - falling back to
> default type converter
> [com.opensymphony.xwork2.util.XWorkBasicConverter@17e4c97]
> DEBUG validation.AnnotationValidationInterceptor  -
> Validating /html/LookupSportsTeam with method execute.
>
> No mention of sportsOrg.
>
> Scott
>
> --- Musachy Barroso <mu...@gmail.com> wrote:
>
> > When you click submit, are they getting submitted to
> > the action (with
> > values)?
> >
> > musachy
> >
> > On 4/13/07, Scott Nesbitt <sc...@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 <ne...@yahoo.com> wrote:
> > >
> > > > --- Scott Nesbitt <sc...@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
> >
>
>
> __________________________________________________
> 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

Re: Problem passing form fields with autocompleter

Posted by Scott Nesbitt <sc...@yahoo.com>.
Well, there is not submit per se, the action is
getting called when the user types the second char in
the lookup editor.

Here is the log when the user types zz:

DEBUG interceptor.FileUploadInterceptor  - Bypassing
/html/ LookupSportsTeam
DEBUG interceptor.StaticParametersInterceptor  -
Setting static parameters {}
DEBUG interceptor.ParametersInterceptor  - Setting
params sportsTeam => [ zz ]
DEBUG util.XWorkConverter  - Property: sportsTeam
DEBUG util.XWorkConverter  - Class:
com.nielsenmedia.lrs.enames2.view.lineup.LookupSportsTeamAction
DEBUG util.XWorkConverter  - field-level type
converter for property [sportsTeam] = none found
DEBUG util.XWorkConverter  - global-level type
converter for property [sportsTeam] = none found      
    DEBUG util.XWorkConverter  - falling back to
default type converter
[com.opensymphony.xwork2.util.XWorkBasicConverter@17e4c97]
DEBUG validation.AnnotationValidationInterceptor  -
Validating /html/LookupSportsTeam with method execute.

No mention of sportsOrg.

Scott

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

> When you click submit, are they getting submitted to
> the action (with
> values)?
> 
> musachy
> 
> On 4/13/07, Scott Nesbitt <sc...@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 <ne...@yahoo.com> wrote:
> >
> > > --- Scott Nesbitt <sc...@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
> 


__________________________________________________
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


Re: Problem passing form fields with autocompleter

Posted by Musachy Barroso <mu...@gmail.com>.
When you click submit, are they getting submitted to the action (with
values)?

musachy

On 4/13/07, Scott Nesbitt <sc...@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 <ne...@yahoo.com> wrote:
>
> > --- Scott Nesbitt <sc...@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

Re: Problem passing form fields with autocompleter

Posted by Scott Nesbitt <sc...@yahoo.com>.
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 <ne...@yahoo.com> wrote:

> --- Scott Nesbitt <sc...@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


Re: Problem passing form fields with autocompleter

Posted by Dave Newton <ne...@yahoo.com>.
--- Scott Nesbitt <sc...@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


Re: Problem passing form fields with autocompleter

Posted by Scott Nesbitt <sc...@yahoo.com>.
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?

Regarding passing the field as a parameter, I am not
too proud for that.  Could you post a little example
code?  I tried to do something like this:

<s:url id="autosportsteam" action="LookupSportsTeam">
   <s:param name="foo" value="23"/>
</s:url>

And that worked, but I want the value of the foo
field, not a hard-coded value.  How do I specify
another field in the param tag?

Thanks again,

Scott

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

> You should have a "getBar()" defined on your action,
> not a "getFoo()"
> 
> regards
> musachy
> 
> On 4/12/07, Scott Nesbitt <sc...@yahoo.com>
> wrote:
> >
> >
> > I have a form with an autocompleter like this:
> >
> > <s:form id="mainForm" theme="simple"
> validate="false">
> >   <s:url id="autosportsteam"
> > action="LookupSportsTeam"/>
> >   <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"/>
> >   </div>
> >   <s:hidden name="foo" value="bar"/>
> > </s:form>
> >
> > I expected that my LookupSportsTeamAction class
> (which
> > extends ActionSupport and has a getter and setter
> on
> > foo) would be able to use the foo member variable.
> > But it is always null, though the sportsTeam
> variable
> > is being set correctly.
> >
> > Any ideas on this?  This works in other pages that
> do
> > not have the autocompleter tag.
> >
> > Thanks,
> >
> > Scott
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Now that's room service!  Choose from over 150,000
> hotels
> > in 45,000 destinations on Yahoo! Travel to find
> your fit.
> > http://farechase.yahoo.com/promo-generic-14795097
> >
> >
>
---------------------------------------------------------------------
> > 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
> 



       
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

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


Re: Problem passing form fields with autocompleter

Posted by Musachy Barroso <mu...@gmail.com>.
You should have a "getBar()" defined on your action, not a "getFoo()"

regards
musachy

On 4/12/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> I have a form with an autocompleter like this:
>
> <s:form id="mainForm" theme="simple" validate="false">
>   <s:url id="autosportsteam"
> action="LookupSportsTeam"/>
>   <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"/>
>   </div>
>   <s:hidden name="foo" value="bar"/>
> </s:form>
>
> I expected that my LookupSportsTeamAction class (which
> extends ActionSupport and has a getter and setter on
> foo) would be able to use the foo member variable.
> But it is always null, though the sportsTeam variable
> is being set correctly.
>
> Any ideas on this?  This works in other pages that do
> not have the autocompleter tag.
>
> Thanks,
>
> Scott
>
>
>
>
> ____________________________________________________________________________________
> Now that's room service!  Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel to find your fit.
> http://farechase.yahoo.com/promo-generic-14795097
>
> ---------------------------------------------------------------------
> 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