Postingan

Menampilkan postingan dari Juni, 2018

Play Framework cara save data ke file text (how to save data on file text play framework)

save data dengan menambahkan garis baru : Writer output = new BufferedWriter( new FileWriter( "e-katalog-5/public/chat/chat-XbGjF6QV.txt" , true )) ; output.append(txtnama+ " : " +txtpesan+ " ; \n \r " ) ; output.close() ; save data ke file dengan replace data, tanpa garis baru : PrintWriter writer = new PrintWriter( "e-katalog-5/public/chat/chat-XbGjF6QV.txt" , "UTF-8" ) ; writer.println(txtnama+ " : " +txtpesan+ " \n " ) ; writer.close() ;

Play Framework Membuat pop up sederhana (create simple pop up)

<script>     window.alert(5 + 6); </script>

Play Framework Cara membuat CRUD Dasar (How to create basic CRUD)

route : # Latih GET / cms / latih cms.Latih.index GET / cms / create cms.Latih.create GET / cms / latih / edit cms.Latih.edit GET / cms / latih / delete / {id} cms.Latih.delete controller : package controllers.cms ; import controllers.BaseController ; import controllers.security. AllowAccess ; import models.cms.LatihMdl ; import models.secman.Acl ; import play.i18n.Messages ; public class Latih extends BaseController { @AllowAccess ({Acl. COM_BERITA }) public static void index () { render () ; } @AllowAccess ({Acl. COM_BERITA_ADD }) public static void create (){ render ( "cms/Latih/create.html" ) ; } public static void createSubmit (String form_nama_lengkap , String form_alamat) { LatihMdl latih = new LatihMdl() ; latih. nama_lengkap = form_nama_l...