Get jspx at SourceForge.net. Fast, secure and Free Open Source software downloads home | download | demo project | contact us
jspx

Rate this article:

email
comment
Average Rate= 0.0

Hello Jspx (Data Binding)

This is the same as the second example however this time there is no Label, and the message will be obtained directly from the java controller through EL Expression. Let's have a look on the changes applied since the previous example.

Html file
  1. The Label tag has been removed
  2. An EL expression is used instead ${this.msg }
java file
  1. The controller class will contain a getter for the property msg .

Demo

Hello Jspx from Java controller (Property Data Binding)!
Source Code:

			<page contoller="org.bay.jspx.demo.live.HelloJspxController" >
				<html>
					<body>
						${this.msg }
					</body>
				</html>
			</page>
			

package org.bay.jspx.demo.live;

import eg.java.net.web.jspx.engine.annotation.JspxWebControl;
import eg.java.net.web.jspx.ui.controls.html.elements.Label;
import eg.java.net.web.jspx.ui.pages.Page;

public class HelloJspxDataBinding extends Page
{
	public String getMsg()
	{
		return "Hello Jspx from Java controller (Property Data Binding)!";
	}
}