click-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vxc vxc <vxc...@gmail.com>
Subject @Bindable annotation - binding dosn't work.
Date Tue, 06 Apr 2010 22:24:45 GMT
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; charset=UTF-8">
  </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!

Mime
View raw message