Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 555 Bytes

javaScriptModuleSystem.md

File metadata and controls

32 lines (27 loc) · 555 Bytes

Html: index.html

<html>
  <head>
  <meta charset="UTF-8">
    <title>jRender</title>
  </head>
  <body></body>
</html>

Java: IndexController.java

@Page(name="index", path="index.html", jsModule="package.index")
public class IndexController extends Window {
    public void init(JRenderContext context) {}
    
    public void teste() {
    	alert("Alert on Java Controller");	
    }
}

JavaScript: src/package/index.js

alert("Alert on Module");

teste(function() {
	alert("Alert after Complete Request");	
});