You need to implement a handler in your component "Refine" for the event.

public void onAddNoTerm() {
}

for instance.


On Tue, Jul 31, 2012 at 6:04 PM, George Ludwig <georgelud...@gmail.com>wrote:

> Actually, this doesn't work either. I get this exception:
>
> org.apache.tapestry5.ioc.internal.util.TapestryException: Request event
> 'addnoterm' (on component discoveryassistant/Refine) was not handled; you
> must provide a matching event handler method in the component or in one of
> its containers.
>
> at
>
> org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(
> ComponentEventRequestHandlerImpl.java:85)
>
> at
>
> org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(
> ImmediateActionRenderResponseFilter.java:42)
>
> at $ComponentEventRequestHandler_12a61376ef8749b9.handle(Unknown Source)
>
> at org.apache.tapestry5.internal.services.AjaxFilter.handle(
> AjaxFilter.java:42)
>
> at $ComponentEventRequestHandler_12a61376ef8749b9.handle(Unknown Source)
>
> at org.apache.tapestry5.services.TapestryModule$40.handle(
> TapestryModule.java:2458)...
>
> On Tue, Jul 31, 2012 at 5:59 PM, George Ludwig <georgelud...@gmail.com
> >wrote:
>
> > Nevermind I guess... I discovered I could just render like this:
> >
> > <table>
> > <tr><td>#business</td><td><a href="
> > /discoveryassistant/refine:addyesterm/#business<
> http://localhost:8082/discoveryassistant/refine:addyesterm/#business>
> > ">yes</a></td><td><a
> href="/discoveryassistant/refine:addnoterm/#business<
> http://localhost:8082/discoveryassistant/refine:addnoterm/#business>
> > ">no</a></td></tr>
> > </table>
> >
> > On Tue, Jul 31, 2012 at 5:43 PM, George Ludwig <georgelud...@gmail.com
> >wrote:
> >
> >> I'm trying to use outputraw to render eventlinks, however when I do this
> >> tapestry does not appear to bind the event on the client to the event on
> >> the server. Is there a way to make this work?
> >>
> >> I use outputraw because it would be unwieldy to use Tapestry's <t:if>
> >> construct to control the rendering. Here's a simplified example with a
> >> single row:
> >>
> >> <table>
> >> <tr><td>#business</td><td><a t:type="eventlink" t:event="addYesTerm"
> >> t:context="literal:#business" href="#">yes</a></td><td><a
> >> t:type="eventlink" t:event="addNoTerm" t:context="literal:#business"
> >> href="#">no</a></td></tr>
> >> </table>
> >>
> >> If I click on the "yes" eventlink, the table should re-render like this:
> >>
> >> <table>
> >> <tr><td>#business</td><td>yes!</td><td><a t:type="eventlink"
> >> t:event="addNoTerm" t:context="literal:#business"
> href="#">no</a></td></tr>
> >> </table>
> >>
> >> If I then clicked on the "no" eventlink, the table should re-render like
> >> this:
> >>
> >> <table>
> >> <tr><td>#business</td><td><a t:type="eventlink" t:event="addYesTerm"
> >> t:context="literal:#business" href="#">yes</a></td><td>no!</td></tr>
> >> </table>
> >>
> >> As I said, I think I can make this work with the <t:if> construct, but
> it
> >> would take a lot of extra coding!
> >>
> >
> >
>

Reply via email to