Hi,
Annotation binding isn't enabled by default (in upcoming 2.2.0 it will be though). So what I think
is missing in your click.xml is setting autobinding to "annotation" mode:
<pages package="xxx.yyy.zzz" autobinding="annotation"/>
http://click.apache.org/docs/user-guide/html/ch04s02.html#application-autobinding-annotation
kind regards
bob
On 7/04/2010 8:24 AM, vxc vxc wrote:
I have:
---------------------------test.html ---------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; </head>
<body>
$title
</body>
</html>
---------------------------
---------------------------TestPage.java version 1
---------------------------
import org.apache.click.util.Bindable;
import org.apache.click.Page;
public class TestPage extends Page
{
//@Bindable protected String title = "My Title";
public TestPage()
{
addModel("title", "My Title");
}
}
---------------------------
--------------------------- TestPage.java version 2
---------------------------
import org.apache.click.util.Bindable;
import org.apache.click.Page;
public class TestPage extends Page
{
@Bindable protected String title = "My Title";
/* public TestPage()
{
addModel("title", "My Title");
}
*/
}
---------------------------
The first version of TestPage.java renders test.html correctly as: My Title
The second version of TestPage.java renders test.html incorrectly as: $title
Your helps is appreciated.
Thank you!