I have a Border component that has a menu composed of direct links. For some reason, tapestry is looking for the listeners of these links in the .java file of the page that the border is contained in, and not the Border object its self. Here is a very simple example of what I am saying.

Border.jwc
<component-specification allow-informal-parameters="no">
 <parameter name="id"/>
 <parameter name="title"/>
 <parameter name="level"/>
 <component id="editClient" type="DirectLink">
   <binding name="listener" value="listener:editClient"/>
</component> </component-specification>

Border.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="./css/be.css" type="text/css" rel="stylesheet" />
<title><span jwcid="@Insert" value="ognl:title">title</span></title>
</head>
<body jwcid="@Body">
<div id="content">
<span jwcid="@RenderBody">Page Content</span>
</div>
<div id="menu">
 <span jwcid="@If" condition="level == 'client'">
   <ul>
     <li><a jwcid="editClient">Edit Client</a></li>
   </ul>
 </span><
</div>
</body>
</html>

Border.java
public abstract class Border extends BaseComponent
{
  @InjectPage("ClientForm")
   public abstract ClientForm getClientForm();

  public IPage editClient()
   {
       ClientForm clientForm = getClientForm();
clientForm.setClientId((Integer) PropertyUtils.read(getPage(),"clientId"));

       return clientForm;
   }
}

Now, say for a example I include the Border component on a page ClientHome. I get an error saying that ClientHome does not implement a listener editClient, when I really want the editClient listener of the Border component to be called. I looked at the virtual library example because the same thing is being done with the Border component there, however, I can not see what I've done wrong. Why isn't the listener editClient of the Border component being called? Thanks in advance for any help.

- Matt Wear

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

Reply via email to