With Efw,it is easily to start web programming if you know Javascript & JQuery.
Create a file with the next codes, and name it as "helloworld.jsp" in your web application folder "efw".<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="efw" uri="efw" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Hello World</title> <efw:Client/> </head> <body> <input type=text id="txtMessage"> <input type=button value="Send" onclick="Efw('helloWorld_sendMessage')"> <fieldset><legend>Messages</legend></fieldset> </body>
You will see the next image, if you call it from a web browser by the url http://localhost:8080/efw/helloworld.jsp .
you will see an error, if you click the "Send" button before you complete the next step.
var helloWorld_sendMessage={}; helloWorld_sendMessage.paramsFormat={ "#txtMessage":"required:true;display-name:the input message" }; helloWorld_sendMessage.fire=function(params){ return (new Result()) .runat("body") .withdata({"#txtMessage":""}) .runat("fieldset") .append("<span>{message}<br></span>") .withdata([{"message":params["#txtMessage"]}]); };The entering in the input messsage will be moved into the messsages, after you click the "Send" button.
You will see an alert and a hightlight, if you click the "Send" button without entering.