Hmm...I have a bad feeling this is my fault - obviously it should work fine
as-is. I'll take a look...

On 5/3/07, Tony Nelson <[EMAIL PROTECTED]> wrote:

A little additional info.. when I change the value on any of the inputs
beyond the first one, it is causing the form to be submitted, it just
doesn't call my EventListener method.  Also, I am using the latest
(today's) Tapestry build.

Thanks again
Tony

Tony Nelson wrote:
> Is it possible to use an EventListener in a component that is
> displayed multiple times on a page?
>
> Specifically, I would like a component that has 2 inputs, and when the
> 1st one is updated an onchange event causes the 2nd component to
> update it's value.  From my testing, it appears that only the first
> component responds to a change event (meaning causes my java method to
> be called), and when it's called, I don't seem to have access to the
> updated values.
>
> My component in progress looks like:
>
> <input jwcid="[EMAIL PROTECTED]" value="ognl:jobExportValues.id" />
> <input jwcid="[EMAIL PROTECTED]"
> value="ognl:jobExportValues.externalJobBoard" />
> <input jwcid="jobIdField" value="ognl:jobExportValues.jobId" size="5" />
>
> And I register the EventListener in the component as follows:
>
>    @EventListener(events={"onchange"}, targets="jobIdField")
>    public void testEvent()
>    {
>        logger.debug("LOOKHERE... " + getJobExportValues().getJobId() +
> " " + getJobExportValues().getId());
>    }
>
>
> When the listener is actually called, I always get NULL for both
> values.  And again, the listener only fires for the first component on
> the page.
>
> Looking at the page source, it appears that dojo code for all of my
> inputs is being generated which I won't include here due to it's length.
>
> Any help would be greatly appreciated.  Am I just missing the whole
> concept on the new dojo stuff?
>
> Tony
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Reply via email to