<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- We need a doctype to allow us to use special characters like
We use a "strict" DTD to make IE follow the alignment rules. -->
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd">
<body class="container">
<h3>Multiple Method Matches</h3>
It's possible for multiple event handler methods to match a single event, but it's rarely a facility that you would use. <br/>
The rules are described in the
<em>Multiple Method Matches</em> and <em>Event Context</em> sections of
<a href="http://tapestry.apache.org/component-events.html">Component Events</a>.<br/><br/>
Here are some examples:
<div class="eg">
<t:eventlink event="doSomething" t:id="link1">Link 1</t:eventlink><br/>
<t:eventlink event="doSomething" t:id="link2" context="literal:Hello">Link 2</t:eventlink><br/>
<t:if t:test="message">
<br/>
<div class="alert alert-info">
${message}
</div>
</t:if>
</div>
References:
<a href="http://tapestry.apache.org/component-events.html#ComponentEvents-MultipleMethodMatches">Multiple Method Matches</a>,
<a href="http://tapestry.apache.org/component-events.html#ComponentEvents-EventContext">Event Context</a>,
<a href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/corelib/components/If.html">If</a>,
<a href="http://tapestry.apache.org/persistent-page-data.html">Persistent Page Data</a>.<br/><br/>
<t:pagelink page="Index">Home</t:pagelink><br/><br/>
<t:tabgroup>
<t:sourcecodetab src="/web/src/main/java/jumpstart/web/pages/examples/navigation/MultipleMethodMatches.tml"/>
<t:sourcecodetab src="/web/src/main/java/jumpstart/web/pages/examples/navigation/MultipleMethodMatches.java"/>
<t:sourcecodetab src="/web/src/main/resources/META-INF/assets/css/examples/plain.css"/>
</t:tabgroup>
</body>
</html>