You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by veena pandit <v....@gmail.com> on 2008/07/18 22:12:55 UTC

[TRINIDAD] how to submit an inputtext field at the same time as clicking a button

I have a zip code field that when submitted populated the city and state.
The zip code field is an input text box.  How do I submit the zip code
field without tabbing but at the same time as when i click a button.
The button also has an action method associated with it.  Right now,
I have autosubmit= true on the zip code field has a valuechangelistener
associated with a listener method.

I tried adding a javascript  onchange="clickLink('hiddenLink')" based on
some solutions to a different problem by Andrew Robinson on this
mailing list archive.  But when I click the button that calls the
zipChangeaction associated with the hiddenLink, but does not execute
the action associated
with the button.

Thanks in advance for your help,

Veena

Re: [TRINIDAD] how to submit an inputtext field at the same time as clicking a button

Posted by veena pandit <v....@gmail.com>.
I have autosubmit set to false when I have the javascript code.  So when
I click the button, the action associated with the hiddenLink gets
executed but the action method associated with the button does not get
executed.  I want both
action methods to execute when I click the button without tabbing after
entering the zip in the input text box.

Thanks,

Veena

On 7/18/08, Andrew Robinson <an...@gmail.com> wrote:
> Not sure what you are referring to. The auto submit will cause the zip
> code to POST the form, so your button will never be clicked. If you
> want to only submit as a result of a button press, then set auto
> submit to false.
>
> On Fri, Jul 18, 2008 at 2:12 PM, veena pandit <v....@gmail.com> wrote:
> > I have a zip code field that when submitted populated the city and state.
> > The zip code field is an input text box.  How do I submit the zip code
> > field without tabbing but at the same time as when i click a button.
> > The button also has an action method associated with it.  Right now,
> > I have autosubmit= true on the zip code field has a valuechangelistener
> > associated with a listener method.
> >
> > I tried adding a javascript  onchange="clickLink('hiddenLink')" based on
> > some solutions to a different problem by Andrew Robinson on this
> > mailing list archive.  But when I click the button that calls the
> > zipChangeaction associated with the hiddenLink, but does not execute
> > the action associated
> > with the button.
> >
> > Thanks in advance for your help,
> >
> > Veena
> >
>

Re: [TRINIDAD] how to submit an inputtext field at the same time as clicking a button

Posted by veena pandit <v....@gmail.com>.
I have a zip code field which is an input text box;  Currently I have
a listener method associated
with this zip field to auto populate the city and state input text
fields.  I also have autosubmit="true"
on this zip field.  I want to be able to autopopulate the city and
state when the user changes
the zip field on either of two occasions.  The first occasion is
when the user enters the zip code and tabs out and the second occasion
is if the user
enters the zip code but instead of tabbing out, clicks a button.  The
purpose of the  button is
to validate all of the address fields and  apply the change in
address( that is if the user
entered a new address on the form.)   Currently when the user does not
tab out after changing the zip
but clicks the button instead, the city and state are not auto
populated. i.e the listener method
never gets called.

I hope this is clear.  Let me know if it is not.

On Fri, Jul 18, 2008 at 5:38 PM, Andrew Robinson
<an...@gmail.com> wrote:
> Tab over?, do you mean tab out? If you always post on tab out, then
> there is no reason to click the button. Actions are only fired from
> command* components. Auto submit on an input text only generates a
> value change, not an action.
>
> Perhaps you should re-describe what exactly you want to do (don't
> include implementation details, just what the users sees and how it
> should behave)?
>
> -A
>
> On Fri, Jul 18, 2008 at 3:01 PM, veena pandit <v....@gmail.com> wrote:
>> In other words,  I want to be able to execute a method in two cases,
>> when I tab over after entering the zip code or even when i do not
>> tab over but I click the button.
>>
>> Thanks,
>>
>> Veena
>>
>> On 7/18/08, Andrew Robinson <an...@gmail.com> wrote:
>>> Not sure what you are referring to. The auto submit will cause the zip
>>> code to POST the form, so your button will never be clicked. If you
>>> want to only submit as a result of a button press, then set auto
>>> submit to false.
>>>
>>> On Fri, Jul 18, 2008 at 2:12 PM, veena pandit <v....@gmail.com> wrote:
>>> > I have a zip code field that when submitted populated the city and state.
>>> > The zip code field is an input text box.  How do I submit the zip code
>>> > field without tabbing but at the same time as when i click a button.
>>> > The button also has an action method associated with it.  Right now,
>>> > I have autosubmit= true on the zip code field has a valuechangelistener
>>> > associated with a listener method.
>>> >
>>> > I tried adding a javascript  onchange="clickLink('hiddenLink')" based on
>>> > some solutions to a different problem by Andrew Robinson on this
>>> > mailing list archive.  But when I click the button that calls the
>>> > zipChangeaction associated with the hiddenLink, but does not execute
>>> > the action associated
>>> > with the button.
>>> >
>>> > Thanks in advance for your help,
>>> >
>>> > Veena
>>> >
>>>
>>
>

Re: [TRINIDAD] how to submit an inputtext field at the same time as clicking a button

Posted by Andrew Robinson <an...@gmail.com>.
Tab over?, do you mean tab out? If you always post on tab out, then
there is no reason to click the button. Actions are only fired from
command* components. Auto submit on an input text only generates a
value change, not an action.

Perhaps you should re-describe what exactly you want to do (don't
include implementation details, just what the users sees and how it
should behave)?

-A

On Fri, Jul 18, 2008 at 3:01 PM, veena pandit <v....@gmail.com> wrote:
> In other words,  I want to be able to execute a method in two cases,
> when I tab over after entering the zip code or even when i do not
> tab over but I click the button.
>
> Thanks,
>
> Veena
>
> On 7/18/08, Andrew Robinson <an...@gmail.com> wrote:
>> Not sure what you are referring to. The auto submit will cause the zip
>> code to POST the form, so your button will never be clicked. If you
>> want to only submit as a result of a button press, then set auto
>> submit to false.
>>
>> On Fri, Jul 18, 2008 at 2:12 PM, veena pandit <v....@gmail.com> wrote:
>> > I have a zip code field that when submitted populated the city and state.
>> > The zip code field is an input text box.  How do I submit the zip code
>> > field without tabbing but at the same time as when i click a button.
>> > The button also has an action method associated with it.  Right now,
>> > I have autosubmit= true on the zip code field has a valuechangelistener
>> > associated with a listener method.
>> >
>> > I tried adding a javascript  onchange="clickLink('hiddenLink')" based on
>> > some solutions to a different problem by Andrew Robinson on this
>> > mailing list archive.  But when I click the button that calls the
>> > zipChangeaction associated with the hiddenLink, but does not execute
>> > the action associated
>> > with the button.
>> >
>> > Thanks in advance for your help,
>> >
>> > Veena
>> >
>>
>

Re: [TRINIDAD] how to submit an inputtext field at the same time as clicking a button

Posted by veena pandit <v....@gmail.com>.
In other words,  I want to be able to execute a method in two cases,
when I tab over after entering the zip code or even when i do not
tab over but I click the button.

Thanks,

Veena

On 7/18/08, Andrew Robinson <an...@gmail.com> wrote:
> Not sure what you are referring to. The auto submit will cause the zip
> code to POST the form, so your button will never be clicked. If you
> want to only submit as a result of a button press, then set auto
> submit to false.
>
> On Fri, Jul 18, 2008 at 2:12 PM, veena pandit <v....@gmail.com> wrote:
> > I have a zip code field that when submitted populated the city and state.
> > The zip code field is an input text box.  How do I submit the zip code
> > field without tabbing but at the same time as when i click a button.
> > The button also has an action method associated with it.  Right now,
> > I have autosubmit= true on the zip code field has a valuechangelistener
> > associated with a listener method.
> >
> > I tried adding a javascript  onchange="clickLink('hiddenLink')" based on
> > some solutions to a different problem by Andrew Robinson on this
> > mailing list archive.  But when I click the button that calls the
> > zipChangeaction associated with the hiddenLink, but does not execute
> > the action associated
> > with the button.
> >
> > Thanks in advance for your help,
> >
> > Veena
> >
>

Re: [TRINIDAD] how to submit an inputtext field at the same time as clicking a button

Posted by Andrew Robinson <an...@gmail.com>.
Not sure what you are referring to. The auto submit will cause the zip
code to POST the form, so your button will never be clicked. If you
want to only submit as a result of a button press, then set auto
submit to false.

On Fri, Jul 18, 2008 at 2:12 PM, veena pandit <v....@gmail.com> wrote:
> I have a zip code field that when submitted populated the city and state.
> The zip code field is an input text box.  How do I submit the zip code
> field without tabbing but at the same time as when i click a button.
> The button also has an action method associated with it.  Right now,
> I have autosubmit= true on the zip code field has a valuechangelistener
> associated with a listener method.
>
> I tried adding a javascript  onchange="clickLink('hiddenLink')" based on
> some solutions to a different problem by Andrew Robinson on this
> mailing list archive.  But when I click the button that calls the
> zipChangeaction associated with the hiddenLink, but does not execute
> the action associated
> with the button.
>
> Thanks in advance for your help,
>
> Veena
>