You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chris Chiappone <ch...@gmail.com> on 2007/05/14 18:46:29 UTC

EventListener example documentation

I believe the eventlistener documentation contains some bugs.  I
copied the following code:


The relevant html:

....

<form jwcid="myform@Form" clientValidationEnabled="true">
        <fieldset>
           Select a project:
           <span jwcid="projectSelect" />
        </fieldset>
</form>

....

The java page class snippet:

....
@Component(bindings = { "model=projectModel", "value=selectedProject",
        "displayName=message:choose.project", "filterOnChange=true",
        "validators=validators:required"})
public abstract Autocompleter getProjectSelection();

@EventListener(targets = "projectChoose", events = "selectOption")
public void projectSelected()
{
        // do something
}
....



And get a TemplateParseException: unknown component id 'projectSelected'
This componentid in the html page should be projectSelection correct?

-- 
~chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EventListener example documentation

Posted by Jesse Kuhnert <jk...@gmail.com>.
Yes I guess that page does need to be updated - the correct function to
listen for is now "onValueChanged".

http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/java/org/apache/tapestry/timetracker/page/TaskEntryPage.java?view=markup

On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
>
> Well this is the code i have, unfortuntately the eventlister does not
> seem to get triggered:
>
> HTML page:
>
> <td class="tableinfo">
>        <span jwcid="projectSelection" style="width: 200px; height:
> 18px;"/>
> </td>
>
> Java Class:
>
>         @Component(id="projectSelection", bindings = {"model=clientModel",
> "value=clientName",
>                 "displayName=message:choose.project",
> "filterOnChange=true",
>                 "validators=validators:required"})
>         public abstract Autocompleter getProjectSelection();
>
>         @EventListener(targets = "projectSelection", events =
> "selectOption")
>         public void projectSelected()
>         {
>                 log.info("Selected Option triggered event");
>         }
>
> When an option has been selected I am not seeing any events in my log
> file.  Does something look wrong with this code?
>
> Thanks
>
> On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> > Here is another example you can use:
> >
> >
> http://www.phy6.net/wiki/tiki-index.php?page=Tapestry+4.1.1+Simple+Selection+Model+Update+using+AJAX
> >
> > I also remember having trouble using that example.
> > The html should have:
> >
> > <span jwcid="projectSelection" />
> >
> >
> > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > I'm also having trouble getting the eventlistener triggered when
> > > somthing is selected.
> > >
> > >
> > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > I believe the eventlistener documentation contains some bugs.  I
> > > > copied the following code:
> > > >
> > > >
> > > > The relevant html:
> > > >
> > > > ....
> > > >
> > > > <form jwcid="myform@Form" clientValidationEnabled="true">
> > > >         <fieldset>
> > > >            Select a project:
> > > >            <span jwcid="projectSelect" />
> > > >         </fieldset>
> > > > </form>
> > > >
> > > > ....
> > > >
> > > > The java page class snippet:
> > > >
> > > > ....
> > > > @Component(bindings = { "model=projectModel",
> "value=selectedProject",
> > > >         "displayName=message:choose.project", "filterOnChange=true",
> > > >         "validators=validators:required"})
> > > > public abstract Autocompleter getProjectSelection();
> > > >
> > > > @EventListener(targets = "projectChoose", events = "selectOption")
> > > > public void projectSelected()
> > > > {
> > > >         // do something
> > > > }
> > > > ....
> > > >
> > > >
> > > >
> > > > And get a TemplateParseException: unknown component id
> 'projectSelected'
> > > > This componentid in the html page should be projectSelection
> correct?
> > > >
> > > > --
> > > > ~chris
> > > >
> > >
> > >
> > > --
> > > ~chris
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> ~chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

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

Re: EventListener example documentation

Posted by Chris Chiappone <ch...@gmail.com>.
Ah that explains it.  Thanks...

On 5/14/07, Jesse Kuhnert <jk...@gmail.com> wrote:
> Oh, that's probably not a very good idea with asynchronous requests.  I
> added some extremely limited support for this mostly just to let people see
> that something is happening but overall it's not something that is really
> supported by the protocol and I'd generally suggest not trying it.
>
> You can of course disable the async part by giving it the
> @EventListener(async = false) parameter.
>
> http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html#EventListener
>
> On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> >
> > I guess is the question I have is, is it not possible to have an
> > eventlistener submit a form that returns an IPage ?
> >
> > ~chris
> >
> > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > Okay so I'm still having a issue trying to use the Eventlistener.  The
> > > form is getting submitted correctly but I end up getting 404 Error
> > > page saying that the requested resource is not available.  I had this
> > > submitting with a normal submit and it works fine so I know this page
> > > is available.  Any thoughts?
> > >
> > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > Jesse - thanks for the fix!
> > > >
> > > > On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> > > > > Are you sure the event name is correct?  I use "onchange".  I've
> > never
> > > > > used "selectOption" before.
> > > > >
> > > > > Daniel
> > > > >
> > > > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > > > Well this is the code i have, unfortuntately the eventlister does
> > not
> > > > > > seem to get triggered:
> > > > > >
> > > > > > HTML page:
> > > > > >
> > > > > > <td class="tableinfo">
> > > > > >        <span jwcid="projectSelection" style="width: 200px; height:
> > 18px;"/>
> > > > > > </td>
> > > > > >
> > > > > > Java Class:
> > > > > >
> > > > > >         @Component(id="projectSelection", bindings =
> > {"model=clientModel",
> > > > > > "value=clientName",
> > > > > >                 "displayName=message:choose.project",
> > "filterOnChange=true",
> > > > > >                 "validators=validators:required"})
> > > > > >         public abstract Autocompleter getProjectSelection();
> > > > > >
> > > > > >         @EventListener(targets = "projectSelection", events =
> > "selectOption")
> > > > > >         public void projectSelected()
> > > > > >         {
> > > > > >                 log.info("Selected Option triggered event");
> > > > > >         }
> > > > > >
> > > > > > When an option has been selected I am not seeing any events in my
> > log
> > > > > > file.  Does something look wrong with this code?
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> > > > > > > Here is another example you can use:
> > > > > > >
> > > > > > >
> > http://www.phy6.net/wiki/tiki-index.php?page=Tapestry+4.1.1+Simple+Selection+Model+Update+using+AJAX
> > > > > > >
> > > > > > > I also remember having trouble using that example.
> > > > > > > The html should have:
> > > > > > >
> > > > > > > <span jwcid="projectSelection" />
> > > > > > >
> > > > > > >
> > > > > > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > > > > > I'm also having trouble getting the eventlistener triggered
> > when
> > > > > > > > somthing is selected.
> > > > > > > >
> > > > > > > >
> > > > > > > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > > > > > > I believe the eventlistener documentation contains some
> > bugs.  I
> > > > > > > > > copied the following code:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > The relevant html:
> > > > > > > > >
> > > > > > > > > ....
> > > > > > > > >
> > > > > > > > > <form jwcid="myform@Form" clientValidationEnabled="true">
> > > > > > > > >         <fieldset>
> > > > > > > > >            Select a project:
> > > > > > > > >            <span jwcid="projectSelect" />
> > > > > > > > >         </fieldset>
> > > > > > > > > </form>
> > > > > > > > >
> > > > > > > > > ....
> > > > > > > > >
> > > > > > > > > The java page class snippet:
> > > > > > > > >
> > > > > > > > > ....
> > > > > > > > > @Component(bindings = { "model=projectModel",
> > "value=selectedProject",
> > > > > > > > >         "displayName=message:choose.project",
> > "filterOnChange=true",
> > > > > > > > >         "validators=validators:required"})
> > > > > > > > > public abstract Autocompleter getProjectSelection();
> > > > > > > > >
> > > > > > > > > @EventListener(targets = "projectChoose", events =
> > "selectOption")
> > > > > > > > > public void projectSelected()
> > > > > > > > > {
> > > > > > > > >         // do something
> > > > > > > > > }
> > > > > > > > > ....
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > And get a TemplateParseException: unknown component id
> > 'projectSelected'
> > > > > > > > > This componentid in the html page should be projectSelection
> > correct?
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > ~chris
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > ~chris
> > > > > > > >
> > > > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > > For additional commands, e-mail:
> > users-help@tapestry.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > ~chris
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > ~chris
> > > >
> > >
> > >
> > > --
> > > ~chris
> > >
> >
> >
> > --
> > ~chris
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>


-- 
~chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EventListener example documentation

Posted by Jesse Kuhnert <jk...@gmail.com>.
Oh, that's probably not a very good idea with asynchronous requests.  I
added some extremely limited support for this mostly just to let people see
that something is happening but overall it's not something that is really
supported by the protocol and I'd generally suggest not trying it.

You can of course disable the async part by giving it the
@EventListener(async = false) parameter.

http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html#EventListener

On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
>
> I guess is the question I have is, is it not possible to have an
> eventlistener submit a form that returns an IPage ?
>
> ~chris
>
> On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > Okay so I'm still having a issue trying to use the Eventlistener.  The
> > form is getting submitted correctly but I end up getting 404 Error
> > page saying that the requested resource is not available.  I had this
> > submitting with a normal submit and it works fine so I know this page
> > is available.  Any thoughts?
> >
> > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > Jesse - thanks for the fix!
> > >
> > > On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> > > > Are you sure the event name is correct?  I use "onchange".  I've
> never
> > > > used "selectOption" before.
> > > >
> > > > Daniel
> > > >
> > > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > > Well this is the code i have, unfortuntately the eventlister does
> not
> > > > > seem to get triggered:
> > > > >
> > > > > HTML page:
> > > > >
> > > > > <td class="tableinfo">
> > > > >        <span jwcid="projectSelection" style="width: 200px; height:
> 18px;"/>
> > > > > </td>
> > > > >
> > > > > Java Class:
> > > > >
> > > > >         @Component(id="projectSelection", bindings =
> {"model=clientModel",
> > > > > "value=clientName",
> > > > >                 "displayName=message:choose.project",
> "filterOnChange=true",
> > > > >                 "validators=validators:required"})
> > > > >         public abstract Autocompleter getProjectSelection();
> > > > >
> > > > >         @EventListener(targets = "projectSelection", events =
> "selectOption")
> > > > >         public void projectSelected()
> > > > >         {
> > > > >                 log.info("Selected Option triggered event");
> > > > >         }
> > > > >
> > > > > When an option has been selected I am not seeing any events in my
> log
> > > > > file.  Does something look wrong with this code?
> > > > >
> > > > > Thanks
> > > > >
> > > > > On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> > > > > > Here is another example you can use:
> > > > > >
> > > > > >
> http://www.phy6.net/wiki/tiki-index.php?page=Tapestry+4.1.1+Simple+Selection+Model+Update+using+AJAX
> > > > > >
> > > > > > I also remember having trouble using that example.
> > > > > > The html should have:
> > > > > >
> > > > > > <span jwcid="projectSelection" />
> > > > > >
> > > > > >
> > > > > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > > > > I'm also having trouble getting the eventlistener triggered
> when
> > > > > > > somthing is selected.
> > > > > > >
> > > > > > >
> > > > > > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > > > > > I believe the eventlistener documentation contains some
> bugs.  I
> > > > > > > > copied the following code:
> > > > > > > >
> > > > > > > >
> > > > > > > > The relevant html:
> > > > > > > >
> > > > > > > > ....
> > > > > > > >
> > > > > > > > <form jwcid="myform@Form" clientValidationEnabled="true">
> > > > > > > >         <fieldset>
> > > > > > > >            Select a project:
> > > > > > > >            <span jwcid="projectSelect" />
> > > > > > > >         </fieldset>
> > > > > > > > </form>
> > > > > > > >
> > > > > > > > ....
> > > > > > > >
> > > > > > > > The java page class snippet:
> > > > > > > >
> > > > > > > > ....
> > > > > > > > @Component(bindings = { "model=projectModel",
> "value=selectedProject",
> > > > > > > >         "displayName=message:choose.project",
> "filterOnChange=true",
> > > > > > > >         "validators=validators:required"})
> > > > > > > > public abstract Autocompleter getProjectSelection();
> > > > > > > >
> > > > > > > > @EventListener(targets = "projectChoose", events =
> "selectOption")
> > > > > > > > public void projectSelected()
> > > > > > > > {
> > > > > > > >         // do something
> > > > > > > > }
> > > > > > > > ....
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > And get a TemplateParseException: unknown component id
> 'projectSelected'
> > > > > > > > This componentid in the html page should be projectSelection
> correct?
> > > > > > > >
> > > > > > > > --
> > > > > > > > ~chris
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > ~chris
> > > > > > >
> > > > > > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > ~chris
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > ~chris
> > >
> >
> >
> > --
> > ~chris
> >
>
>
> --
> ~chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

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

Re: EventListener example documentation

Posted by Chris Chiappone <ch...@gmail.com>.
I guess is the question I have is, is it not possible to have an
eventlistener submit a form that returns an IPage ?

~chris

On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> Okay so I'm still having a issue trying to use the Eventlistener.  The
> form is getting submitted correctly but I end up getting 404 Error
> page saying that the requested resource is not available.  I had this
> submitting with a normal submit and it works fine so I know this page
> is available.  Any thoughts?
>
> On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > Jesse - thanks for the fix!
> >
> > On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> > > Are you sure the event name is correct?  I use "onchange".  I've never
> > > used "selectOption" before.
> > >
> > > Daniel
> > >
> > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > Well this is the code i have, unfortuntately the eventlister does not
> > > > seem to get triggered:
> > > >
> > > > HTML page:
> > > >
> > > > <td class="tableinfo">
> > > >        <span jwcid="projectSelection" style="width: 200px; height: 18px;"/>
> > > > </td>
> > > >
> > > > Java Class:
> > > >
> > > >         @Component(id="projectSelection", bindings = {"model=clientModel",
> > > > "value=clientName",
> > > >                 "displayName=message:choose.project", "filterOnChange=true",
> > > >                 "validators=validators:required"})
> > > >         public abstract Autocompleter getProjectSelection();
> > > >
> > > >         @EventListener(targets = "projectSelection", events = "selectOption")
> > > >         public void projectSelected()
> > > >         {
> > > >                 log.info("Selected Option triggered event");
> > > >         }
> > > >
> > > > When an option has been selected I am not seeing any events in my log
> > > > file.  Does something look wrong with this code?
> > > >
> > > > Thanks
> > > >
> > > > On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> > > > > Here is another example you can use:
> > > > >
> > > > > http://www.phy6.net/wiki/tiki-index.php?page=Tapestry+4.1.1+Simple+Selection+Model+Update+using+AJAX
> > > > >
> > > > > I also remember having trouble using that example.
> > > > > The html should have:
> > > > >
> > > > > <span jwcid="projectSelection" />
> > > > >
> > > > >
> > > > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > > > I'm also having trouble getting the eventlistener triggered when
> > > > > > somthing is selected.
> > > > > >
> > > > > >
> > > > > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > > > > I believe the eventlistener documentation contains some bugs.  I
> > > > > > > copied the following code:
> > > > > > >
> > > > > > >
> > > > > > > The relevant html:
> > > > > > >
> > > > > > > ....
> > > > > > >
> > > > > > > <form jwcid="myform@Form" clientValidationEnabled="true">
> > > > > > >         <fieldset>
> > > > > > >            Select a project:
> > > > > > >            <span jwcid="projectSelect" />
> > > > > > >         </fieldset>
> > > > > > > </form>
> > > > > > >
> > > > > > > ....
> > > > > > >
> > > > > > > The java page class snippet:
> > > > > > >
> > > > > > > ....
> > > > > > > @Component(bindings = { "model=projectModel", "value=selectedProject",
> > > > > > >         "displayName=message:choose.project", "filterOnChange=true",
> > > > > > >         "validators=validators:required"})
> > > > > > > public abstract Autocompleter getProjectSelection();
> > > > > > >
> > > > > > > @EventListener(targets = "projectChoose", events = "selectOption")
> > > > > > > public void projectSelected()
> > > > > > > {
> > > > > > >         // do something
> > > > > > > }
> > > > > > > ....
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > And get a TemplateParseException: unknown component id 'projectSelected'
> > > > > > > This componentid in the html page should be projectSelection correct?
> > > > > > >
> > > > > > > --
> > > > > > > ~chris
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > ~chris
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > ~chris
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > ~chris
> >
>
>
> --
> ~chris
>


-- 
~chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EventListener example documentation

Posted by Chris Chiappone <ch...@gmail.com>.
Okay so I'm still having a issue trying to use the Eventlistener.  The
form is getting submitted correctly but I end up getting 404 Error
page saying that the requested resource is not available.  I had this
submitting with a normal submit and it works fine so I know this page
is available.  Any thoughts?

On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> Jesse - thanks for the fix!
>
> On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> > Are you sure the event name is correct?  I use "onchange".  I've never
> > used "selectOption" before.
> >
> > Daniel
> >
> > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > Well this is the code i have, unfortuntately the eventlister does not
> > > seem to get triggered:
> > >
> > > HTML page:
> > >
> > > <td class="tableinfo">
> > >        <span jwcid="projectSelection" style="width: 200px; height: 18px;"/>
> > > </td>
> > >
> > > Java Class:
> > >
> > >         @Component(id="projectSelection", bindings = {"model=clientModel",
> > > "value=clientName",
> > >                 "displayName=message:choose.project", "filterOnChange=true",
> > >                 "validators=validators:required"})
> > >         public abstract Autocompleter getProjectSelection();
> > >
> > >         @EventListener(targets = "projectSelection", events = "selectOption")
> > >         public void projectSelected()
> > >         {
> > >                 log.info("Selected Option triggered event");
> > >         }
> > >
> > > When an option has been selected I am not seeing any events in my log
> > > file.  Does something look wrong with this code?
> > >
> > > Thanks
> > >
> > > On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> > > > Here is another example you can use:
> > > >
> > > > http://www.phy6.net/wiki/tiki-index.php?page=Tapestry+4.1.1+Simple+Selection+Model+Update+using+AJAX
> > > >
> > > > I also remember having trouble using that example.
> > > > The html should have:
> > > >
> > > > <span jwcid="projectSelection" />
> > > >
> > > >
> > > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > > I'm also having trouble getting the eventlistener triggered when
> > > > > somthing is selected.
> > > > >
> > > > >
> > > > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > > > I believe the eventlistener documentation contains some bugs.  I
> > > > > > copied the following code:
> > > > > >
> > > > > >
> > > > > > The relevant html:
> > > > > >
> > > > > > ....
> > > > > >
> > > > > > <form jwcid="myform@Form" clientValidationEnabled="true">
> > > > > >         <fieldset>
> > > > > >            Select a project:
> > > > > >            <span jwcid="projectSelect" />
> > > > > >         </fieldset>
> > > > > > </form>
> > > > > >
> > > > > > ....
> > > > > >
> > > > > > The java page class snippet:
> > > > > >
> > > > > > ....
> > > > > > @Component(bindings = { "model=projectModel", "value=selectedProject",
> > > > > >         "displayName=message:choose.project", "filterOnChange=true",
> > > > > >         "validators=validators:required"})
> > > > > > public abstract Autocompleter getProjectSelection();
> > > > > >
> > > > > > @EventListener(targets = "projectChoose", events = "selectOption")
> > > > > > public void projectSelected()
> > > > > > {
> > > > > >         // do something
> > > > > > }
> > > > > > ....
> > > > > >
> > > > > >
> > > > > >
> > > > > > And get a TemplateParseException: unknown component id 'projectSelected'
> > > > > > This componentid in the html page should be projectSelection correct?
> > > > > >
> > > > > > --
> > > > > > ~chris
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > ~chris
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > ~chris
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> ~chris
>


-- 
~chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EventListener example documentation

Posted by Chris Chiappone <ch...@gmail.com>.
Jesse - thanks for the fix!

On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> Are you sure the event name is correct?  I use "onchange".  I've never
> used "selectOption" before.
>
> Daniel
>
> On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > Well this is the code i have, unfortuntately the eventlister does not
> > seem to get triggered:
> >
> > HTML page:
> >
> > <td class="tableinfo">
> >        <span jwcid="projectSelection" style="width: 200px; height: 18px;"/>
> > </td>
> >
> > Java Class:
> >
> >         @Component(id="projectSelection", bindings = {"model=clientModel",
> > "value=clientName",
> >                 "displayName=message:choose.project", "filterOnChange=true",
> >                 "validators=validators:required"})
> >         public abstract Autocompleter getProjectSelection();
> >
> >         @EventListener(targets = "projectSelection", events = "selectOption")
> >         public void projectSelected()
> >         {
> >                 log.info("Selected Option triggered event");
> >         }
> >
> > When an option has been selected I am not seeing any events in my log
> > file.  Does something look wrong with this code?
> >
> > Thanks
> >
> > On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> > > Here is another example you can use:
> > >
> > > http://www.phy6.net/wiki/tiki-index.php?page=Tapestry+4.1.1+Simple+Selection+Model+Update+using+AJAX
> > >
> > > I also remember having trouble using that example.
> > > The html should have:
> > >
> > > <span jwcid="projectSelection" />
> > >
> > >
> > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > I'm also having trouble getting the eventlistener triggered when
> > > > somthing is selected.
> > > >
> > > >
> > > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > > I believe the eventlistener documentation contains some bugs.  I
> > > > > copied the following code:
> > > > >
> > > > >
> > > > > The relevant html:
> > > > >
> > > > > ....
> > > > >
> > > > > <form jwcid="myform@Form" clientValidationEnabled="true">
> > > > >         <fieldset>
> > > > >            Select a project:
> > > > >            <span jwcid="projectSelect" />
> > > > >         </fieldset>
> > > > > </form>
> > > > >
> > > > > ....
> > > > >
> > > > > The java page class snippet:
> > > > >
> > > > > ....
> > > > > @Component(bindings = { "model=projectModel", "value=selectedProject",
> > > > >         "displayName=message:choose.project", "filterOnChange=true",
> > > > >         "validators=validators:required"})
> > > > > public abstract Autocompleter getProjectSelection();
> > > > >
> > > > > @EventListener(targets = "projectChoose", events = "selectOption")
> > > > > public void projectSelected()
> > > > > {
> > > > >         // do something
> > > > > }
> > > > > ....
> > > > >
> > > > >
> > > > >
> > > > > And get a TemplateParseException: unknown component id 'projectSelected'
> > > > > This componentid in the html page should be projectSelection correct?
> > > > >
> > > > > --
> > > > > ~chris
> > > > >
> > > >
> > > >
> > > > --
> > > > ~chris
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > ~chris
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
~chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EventListener example documentation

Posted by Daniel Jue <te...@gmail.com>.
Are you sure the event name is correct?  I use "onchange".  I've never
used "selectOption" before.

Daniel

On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> Well this is the code i have, unfortuntately the eventlister does not
> seem to get triggered:
>
> HTML page:
>
> <td class="tableinfo">
>        <span jwcid="projectSelection" style="width: 200px; height: 18px;"/>
> </td>
>
> Java Class:
>
>         @Component(id="projectSelection", bindings = {"model=clientModel",
> "value=clientName",
>                 "displayName=message:choose.project", "filterOnChange=true",
>                 "validators=validators:required"})
>         public abstract Autocompleter getProjectSelection();
>
>         @EventListener(targets = "projectSelection", events = "selectOption")
>         public void projectSelected()
>         {
>                 log.info("Selected Option triggered event");
>         }
>
> When an option has been selected I am not seeing any events in my log
> file.  Does something look wrong with this code?
>
> Thanks
>
> On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> > Here is another example you can use:
> >
> > http://www.phy6.net/wiki/tiki-index.php?page=Tapestry+4.1.1+Simple+Selection+Model+Update+using+AJAX
> >
> > I also remember having trouble using that example.
> > The html should have:
> >
> > <span jwcid="projectSelection" />
> >
> >
> > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > I'm also having trouble getting the eventlistener triggered when
> > > somthing is selected.
> > >
> > >
> > > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > > I believe the eventlistener documentation contains some bugs.  I
> > > > copied the following code:
> > > >
> > > >
> > > > The relevant html:
> > > >
> > > > ....
> > > >
> > > > <form jwcid="myform@Form" clientValidationEnabled="true">
> > > >         <fieldset>
> > > >            Select a project:
> > > >            <span jwcid="projectSelect" />
> > > >         </fieldset>
> > > > </form>
> > > >
> > > > ....
> > > >
> > > > The java page class snippet:
> > > >
> > > > ....
> > > > @Component(bindings = { "model=projectModel", "value=selectedProject",
> > > >         "displayName=message:choose.project", "filterOnChange=true",
> > > >         "validators=validators:required"})
> > > > public abstract Autocompleter getProjectSelection();
> > > >
> > > > @EventListener(targets = "projectChoose", events = "selectOption")
> > > > public void projectSelected()
> > > > {
> > > >         // do something
> > > > }
> > > > ....
> > > >
> > > >
> > > >
> > > > And get a TemplateParseException: unknown component id 'projectSelected'
> > > > This componentid in the html page should be projectSelection correct?
> > > >
> > > > --
> > > > ~chris
> > > >
> > >
> > >
> > > --
> > > ~chris
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> ~chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EventListener example documentation

Posted by Chris Chiappone <ch...@gmail.com>.
Well this is the code i have, unfortuntately the eventlister does not
seem to get triggered:

HTML page:

<td class="tableinfo">
       <span jwcid="projectSelection" style="width: 200px; height: 18px;"/>
</td>

Java Class:

	@Component(id="projectSelection", bindings = {"model=clientModel",
"value=clientName",
	        "displayName=message:choose.project", "filterOnChange=true",
	        "validators=validators:required"})
	public abstract Autocompleter getProjectSelection();

	@EventListener(targets = "projectSelection", events = "selectOption")
	public void projectSelected()
	{
	        log.info("Selected Option triggered event");
	}

When an option has been selected I am not seeing any events in my log
file.  Does something look wrong with this code?

Thanks

On 5/14/07, Daniel Jue <te...@gmail.com> wrote:
> Here is another example you can use:
>
> http://www.phy6.net/wiki/tiki-index.php?page=Tapestry+4.1.1+Simple+Selection+Model+Update+using+AJAX
>
> I also remember having trouble using that example.
> The html should have:
>
> <span jwcid="projectSelection" />
>
>
> On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > I'm also having trouble getting the eventlistener triggered when
> > somthing is selected.
> >
> >
> > On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > > I believe the eventlistener documentation contains some bugs.  I
> > > copied the following code:
> > >
> > >
> > > The relevant html:
> > >
> > > ....
> > >
> > > <form jwcid="myform@Form" clientValidationEnabled="true">
> > >         <fieldset>
> > >            Select a project:
> > >            <span jwcid="projectSelect" />
> > >         </fieldset>
> > > </form>
> > >
> > > ....
> > >
> > > The java page class snippet:
> > >
> > > ....
> > > @Component(bindings = { "model=projectModel", "value=selectedProject",
> > >         "displayName=message:choose.project", "filterOnChange=true",
> > >         "validators=validators:required"})
> > > public abstract Autocompleter getProjectSelection();
> > >
> > > @EventListener(targets = "projectChoose", events = "selectOption")
> > > public void projectSelected()
> > > {
> > >         // do something
> > > }
> > > ....
> > >
> > >
> > >
> > > And get a TemplateParseException: unknown component id 'projectSelected'
> > > This componentid in the html page should be projectSelection correct?
> > >
> > > --
> > > ~chris
> > >
> >
> >
> > --
> > ~chris
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
~chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EventListener example documentation

Posted by Daniel Jue <te...@gmail.com>.
Here is another example you can use:

http://www.phy6.net/wiki/tiki-index.php?page=Tapestry+4.1.1+Simple+Selection+Model+Update+using+AJAX

I also remember having trouble using that example.
The html should have:

<span jwcid="projectSelection" />


On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> I'm also having trouble getting the eventlistener triggered when
> somthing is selected.
>
>
> On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> > I believe the eventlistener documentation contains some bugs.  I
> > copied the following code:
> >
> >
> > The relevant html:
> >
> > ....
> >
> > <form jwcid="myform@Form" clientValidationEnabled="true">
> >         <fieldset>
> >            Select a project:
> >            <span jwcid="projectSelect" />
> >         </fieldset>
> > </form>
> >
> > ....
> >
> > The java page class snippet:
> >
> > ....
> > @Component(bindings = { "model=projectModel", "value=selectedProject",
> >         "displayName=message:choose.project", "filterOnChange=true",
> >         "validators=validators:required"})
> > public abstract Autocompleter getProjectSelection();
> >
> > @EventListener(targets = "projectChoose", events = "selectOption")
> > public void projectSelected()
> > {
> >         // do something
> > }
> > ....
> >
> >
> >
> > And get a TemplateParseException: unknown component id 'projectSelected'
> > This componentid in the html page should be projectSelection correct?
> >
> > --
> > ~chris
> >
>
>
> --
> ~chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EventListener example documentation

Posted by Chris Chiappone <ch...@gmail.com>.
I'm also having trouble getting the eventlistener triggered when
somthing is selected.


On 5/14/07, Chris Chiappone <ch...@gmail.com> wrote:
> I believe the eventlistener documentation contains some bugs.  I
> copied the following code:
>
>
> The relevant html:
>
> ....
>
> <form jwcid="myform@Form" clientValidationEnabled="true">
>         <fieldset>
>            Select a project:
>            <span jwcid="projectSelect" />
>         </fieldset>
> </form>
>
> ....
>
> The java page class snippet:
>
> ....
> @Component(bindings = { "model=projectModel", "value=selectedProject",
>         "displayName=message:choose.project", "filterOnChange=true",
>         "validators=validators:required"})
> public abstract Autocompleter getProjectSelection();
>
> @EventListener(targets = "projectChoose", events = "selectOption")
> public void projectSelected()
> {
>         // do something
> }
> ....
>
>
>
> And get a TemplateParseException: unknown component id 'projectSelected'
> This componentid in the html page should be projectSelection correct?
>
> --
> ~chris
>


-- 
~chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org