Hi,
In the Wicket technology generally saying you have logic business included in Java class and presentation layer in corresponding html file (markup).
The main advantage of this technology is that presentational and business layers are completely separated.
In my opinion Wicket is much nicer than JSP/Servlets.
BR
Rafal
Dnia 2-03-2010 o godz. 16:47 femi steven napisał(a):
Plz what is wicket framework about?
From: Rafał Laczek <rafal_lac...@wp.pl>
To: Java EE (J2EE) Programming with Passion! <java-ee-j2ee-programming-with-passion@googlegroups.com>
Sent: Sun, February 28, 2010 1:07:18 AM
Subject: [java ee programming] Wicket technology - sample code
Hey,
In last time I'm working in big project where I also use Wicket
framework. I think that now I'm quite good specialist in this
technology. For persons interested in this technology I send as the
sample the java class with its markup. Wicket is a little bit tricky
technology and I think that this sample is very good to present it.
Regards from beautiful Norway where I live for a few months :)
Rafal Laczek
JAVA class
public DriftsmeldingerListView(String id){
super(id)
Content objectcontent = new Content();
add(new Label("TITLE",objectcontent.getTitle())); //Driftsmeldinger
RepeatingView rv = new RepeatingView("rv");
add(rv);
WebMarkupContainer wmc = new
WebMarkupContainer(rv.newChildId());
rv.add(wmc);
//Code for UNPLANNED
wmc.add(new
Label("titleUnplanned",objectcontent.getUNPLANNED()));
wmc.add(new
ListView<Message>("listUnplanned",objectcontent.getUnplanned()){
protected void populateItem(ListItem item) {
Message m = (Message)item.getModelObject();
//item.add(new Label("message1", m.getFormattedTime()));
item.add(new Label("message2un", m.getAffects()));
item.add(new Label("message3un", m.getDetails()));
item.add(new Label("message4un", m.getEvent()));
//item.add(new Label("message5",
m.getFormattedMessageTitle()));
item.add(new Label("message6un", m.getTime()));
}
});
//Code for PLANNED
wmc.add(new Label("titlePlanned",objectcontent.getPLANNED()));
wmc.add(new
ListView<Message>("listPlanned",objectcontent.getPlanned()){
protected void populateItem(ListItem item) {
Message m = (Message)item.getModelObject();
//item.add(new Label("message1", m.getFormattedTime()));
item.add(new Label("message2", m.getAffects()));
item.add(new Label("message3", m.getDetails()));
item.add(new Label("message4", m.getEvent()));
//item.add(new Label("message5",
m.getFormattedMessageTitle()));
item.add(new Label("message6", m.getTime()));
}
});
//Code for GENERAL
wmc.add(new Label("titleGeneral",objectcontent.getGENERAL()));
wmc.add(new
ListView<Message>("listGeneral",objectcontent.getGeneral()){
protected void populateItem(ListItem item) {
Message m = (Message)item.getModelObject();
//item.add(new Label("message1", m.getFormattedTime()));
item.add(new Label("message2g", m.getAffects()));
item.add(new Label("message3g", m.getDetails()));
item.add(new Label("message4g", m.getEvent()));
//item.add(new Label("message5",
m.getFormattedMessageTitle()));
item.add(new Label("message6g", m.getTime()));
}
});
}
}
HTML MARKUP (file)
<body>
<wicket:panel>
<div wicket:id="TITLE" style="font-size:15px;"></div>
<div wicket:id="rv">
<h2 wicket:id="titleUnplanned"></h2>
<div wicket:id="listUnplanned">
<!-- <span wicket:id="message1"></span> -->
<span wicket:id="message2un"></span>
<span wicket:id="message3un"></span>
<span wicket:id="message4un"></span>
<!-- <span wicket:id="message5"></span>-->
<span wicket:id="message6un"></span>
<span wicket:id="message7un"></span>
</div>
<h2 wicket:id="titlePlanned"></h2>
<div wicket:id="listPlanned">
<!-- <span wicket:id="message1"></span> -->
<span wicket:id="message2"></span>
<span wicket:id="message3"></span>
<span wicket:id="message4"></span>
<!-- <span wicket:id="message5"></span>-->
<span wicket:id="message6"></span>
<span wicket:id="message7"></span>
</div>
<h2 wicket:id="titleGeneral"></h2>
<div wicket:id="listGeneral">
<!-- <span wicket:id="message1"></span>-->
<span wicket:id="message2g"></span>
<span wicket:id="message3g"></span>
<span wicket:id="message4g"></span>
<!-- <span wicket:id="message5"></span>-->
<span wicket:id="message6g"></span>
<span wicket:id="message7g"></span>
</div>
</div>
</wicket:panel>
--
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
--
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en