I copied everything from the user guide.
Here is the ControlListenerType1.htm
<html>
<head>
<link type="text/css" rel="stylesheet" href="style.css"></link>
</head>
<body>
Click myLink control <a href="$myLink.href">here</a>.
#if ($msg)
<div id="msgDiv"> $msg </div>
#end
</body>
</html>
----------------
Here is click.xml
<?xml version="1.0" encoding="UTF-8"?>
<click-app>
<pages package="quickstart.page"/>
<mode value="debug"/>
</click-app>
--------------------------------
Here is the ControlListenerType1Page.java under
WEB-INF/classes/quickstart/page
package quickstart.page;
import org.apache.click.control.ActionLink;
import org.apache.click.Page;
import org.apache.click.util.Bindable;
public class ControlListenerType1Page extends Page {
/* Set the listener to this object's "onLinkClick" method. */
@Bindable protected ActionLink myLink = new ActionLink(this,
"onLinkClick");
@Bindable protected String msg;
// ------------------------------------------------- Event Handlers
/**
* Handle the ActionLink control click event.
*/
public boolean onLinkClick() {
msg = "ControlListenerPage#" + hashCode()
+ " object method <tt>onLinkClick()</tt> invoked.";
return true;
}
}
On Thu, 2010-03-25 at 14:35 -0300, Gilberto C. Andrade wrote:
> Can you show us the control-listener-type1.htm and click.xml files?
> So, control-listener-type1.htm file will be mapped to
> ControlListenerType1Page.java.
>
> Regards,
>
> Gilberto
>
> On Thu, Mar 25, 2010 at 12:58 PM, Jiujing Gu <[email protected]> wrote:
> Hello,
>
> I'm following the user guide. When I tried the control
> listener type 1
> example in Chapter 1.2, I got an error message. Please let me
> know
> what did I do wrong.
>
> Thanks,
> Jiujing
> ------------------------
>
> HTTP Status 404 - /TestClick/$myLink.href
>
>
> ________________________________________________________________________
>
> type Status report
>
> message /TestClick/$myLink.href
>
> description The requested resource (/TestClick/$myLink.href)
> is not
> available.
>
>
>
> ________________________________________________________________________
> Apache Tomcat/5.5.26
>
>