Apache Wicket Web Framework Kurulumu(Netbeanse, Eclipse) ve Merhaba Wicket
Şubat 17, 2010 | Comments | Java Web Framework
<?xml version="1.0" encoding="UTF-8"?><html xmlns:wicket="http://wicket.apache.org"><link rel="stylesheet" type="text/css" href="style.css"/>Bu AnaSinif.java içindeki labeldir.değeri yanı merhaba wicketyazılacak.id de hangi component olduğunu bvelirtirAnaSinif.html
package www.ethemsulan.com;import org.apache.wicket.PageParameters;import org.apache.wicket.markup.html.WebPage;import org.apache.wicket.markup.html.basic.Label;//Eğer wicketi kurmuşsanız www.ethemsulan.com paketini sağ tıklayıp//new-->other-->web-->webPage yi seçince//verilen isimde bir tane bu şekilde yanı AnaSinif.java//bir tane de Anasinif.html oluşturulur.Kodlar bu sınıfta//Arayüz de .html sınıfnda olur.public final class AnaSinif extends WebPage {public AnaSinif() {super ();add(new Label("kimlik", "Merhaba Wicket"));}public AnaSinif(PageParameters params) { }}
AnaSinif.java
package www.ethemsulan.com;import org.apache.wicket.protocol.http.WebApplication;//Normal bir java classi oluşturup WebApplication//extends ediyoruz.public class AnaSinifiCagir extends WebApplication{public AnaSinifiCagir() { }//WebApplication getHomepage() metodunu yazmamız ve//işleri gerçekleştiren sınıf çağırmamız lazım.//Ilk önce bu sınıfı oluşturacaz sonra Anasinifipublic Class getHomePage(){return AnaSinif.class;}}
AnaSinifCagir.java
web.xml :http://www.ethemsulan.pastebin.com/f7fd1f863
Orj kod:http://www.ethemsulan.pastebin.com/f7dbcc665
/>
http://www.ethemsulan.pastebin.com/f2030288d
http://www.ethemsulan.pastebin.com/f4f42dad3
Netbeans’te proje oluşturmak için: http://www.ethemsulan.com/2010/01/netbeans-kurulumu-ve-merhaba-jsp.html
Paketin üstüne sağ tıklayıp new—>oder—>web—>web page
Web.xml de param value paketismi.getHomePage() metodunu içeren sınıf.Yani aracı sınıfı çağırıyoruz.O da asıl işleri gerçekleştiren sınıf çağırıyor.projeyi çalıştırmak için de sağ tıklayıp run u tıklayın.
Eğer ki wicket frameworkunu netbeanste kurmasını bilmiyorsanız:
http://www.ethemsulan.com/2010/02/netbeans-eklentiplugin-yuklemehow-to.html
Eclipse plugin kurmak için: http://www.ethemsulan.com/2009/12/eclipsede-jigloo-swtswing-gorsel.html
Eclipse yazılacak wicket plugin adresi: http://www.laughingpanda.org/svn/wicket-bench/trunk/wicket-bench-site/ yazin.Eclipse plugin kurmak için ikinci adres:http://www.ethemsulan.com/2009/12/eclipse-eklenti-eklemekinstall-eclipse.html install new softwareye wicket plugin adresini yazın yukardaki adres.
