Wicket vs. ZK

2007-08-15 Thread juliez

I searched the threads on this forum but didn't find any discussion on
comparing Wicket with ZK (www.zkoss.org/), the #1 Ajax project on
sourceforge.net now. I read a lot on both frameworks and they both seem nice
from the feedback of the users. Since I am about to choose one web
framework, I want to get some ideas of these questions here. 

1. Design concern (Wicket vs. ZK)
Both frameworks are thin-client and generate AJAX, the biggest difference is
Wicket uses Java and HTML while ZK uses XUL or other scripting language.
What's the advantage and disadvantage in both cases?

2. AJAX components (Wicket vs. ZK)
>From the demo websites, it seems ZK provided more AJAX components than
Wicket. (As I haven't worked deeply with Wicket, it could be Wicket either
provided more components or easy to write those components.) But I am
wondering is it easy to use Wicket to implement features like drag and drop,
date picker... 

3. Target application (Wicket)
There is a trend to move from multi-page application to single-page
application (or a few pages which much lesser than traditional page-based
web application) using AJAX. As far as I know, Wicket is a component-based
framework and very OO, which means the components could be well reused and
maintained, but is it easy to build such single-page application? Would one
or a few more page classes be very large? 

4. Integration (Wicket)
How about using Wicket together with existing JSF application? 

Any suggestion on comparing the two freamworks is welcome!

Thanks!
Julie
-- 
View this message in context: 
http://www.nabble.com/Wicket-vs.-ZK-tf4276516.html#a12172596
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket vs. ZK

2007-08-15 Thread juliez

First, thanks for the reply!

>> 2. AJAX components (Wicket vs. ZK)
>you do not implement features like drag and drop or datepicker in wicket,
>instead you wrap javascript libraries that implement those features with
>wicket components.

I am actually confused at how many ways Wicket supports AJAX. The classes in
wicket.ajax packages are used for AJAX behaviors. I supposed these classes
are for common AJAX behaviors. It seems they are different from wrapping
JavaScript - correct me if I am wrong. Then my questions are 
1) what is the standard way to add AJAX with Wicket: first looking for
existing components (including the components in WicketStuff), then if not
found, wrap JavaScript?  
2) I read the attached file and googled more for the instruction on how to
wrap JavaScript. Found one here
(http://cwiki.apache.org/WICKET/adding-dynamic-field-prompts-or-hints.html).
I am wondering if there are instructions on how to do it in a general way.

>>3. Target application (Wicket)
> like you say, wicket is component oriented. it doesnt really care how you
> build your app: many pages or a single page. at my day time job we have an
> app that is mostly a single page with a lot of component replacement.
> works
> just fine.

Still not sure, if a page includes many replacement, how to keep the
method/class short yet support those changes?

>>4. Integration (Wicket)
> how about it? i dont see why you would want to integrate a ui framework
> with
> another ui framework.


>in the end what you should do is write a small app using both frameworks to
>get a feel for them.
Absolutely! I started with a simple Wicket page already and will try to add
some AJAX stuff tomorrow as well as a page with some replacement. Need to
try ZK too. Sounds a lot of fun.

-- 
View this message in context: 
http://www.nabble.com/Wicket-vs.-ZK-tf4276516.html#a12175176
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket vs. ZK

2007-08-16 Thread juliez

Hi Eelco,

When will the book be published? What version of Wicket it talks about?

I am actually would like to view a picture of the achitecture like ZK has in
its design documentation. I haven't found it yet. I bet I will learn more
along the way I am using it. But it's always nice to have it in mind. I
noticed the second chapter of the book is about architecture. Is this the
only place for this information? 

>Btw, it's also a topic that we write a whole chapter about in Wicket
>In Action - though that chapter won't be available for a month or so
>as we're revising it - so if you sign up for MEAP (nope, it's not
>free) you can help use make that chapter perfect by giving us feedback
>when it is available :)

Thanks,
Julie
-- 
View this message in context: 
http://www.nabble.com/Wicket-vs.-ZK-tf4276516.html#a12188293
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Does anyone develop Wicket app using IRAD and Websphere

2007-08-21 Thread juliez

It's fairly easy to work with Wicket (1.3 beta2) using Jetty as the web
server. However, when I tried to do the same thing using IRAD and Websphere,
I always got file not found or Error 404. Then I tried to deploy the
wicket-examples-1.3.0-beta2.war to Websphere (6.1.0.2 Build Number:
cf20633.22), the example can't work correctly too - got "Error 404: Error
reported: 404". 

Is there anything special need to be set for IBM's stuff? Any suggestion?

Thanks,
Julie
-- 
View this message in context: 
http://www.nabble.com/Does-anyone-develop-Wicket-app-using-IRAD-and-Websphere-tf4307950.html#a12263560
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Does anyone develop Wicket app using IRAD and Websphere

2007-08-22 Thread juliez

Hi Martijn,

Thanks for the clue! I tried to use WicketServlet instead of WicketFilter in
web.xml and it does fix the problem. I don't really know the issue of the
WicketFilter or if it's related to the old bug in Websphere 6.0.x as
mentioned in other answers (I am using 6.1.0.2).

BTW, I just got the question that what's the advantage of using WicketFilter
over WicketServlet or if there is any difference behind? Or what pushes
Wicket 1.3 to use WicketFilter?

Thanks again,
Julie


Martijn Dashorst wrote:
> 
> Or use WicketServlet implementation instead of the WicketFilter.
> 
> Martijn
> 
> On 8/22/07, Sean Sullivan <[EMAIL PROTECTED]> wrote:
>> I had some problems running Wicket 1.3 in Websphere 6.0
>>
>> Websphere 6.x had some servlet filter bugs that affected Wicket.  You
>> should
>> try upgrading to a newer version of Websphere 6.1.x
>>
>> Sean
>>
>> On 8/21/07, juliez <[EMAIL PROTECTED]> wrote:
>> >
>> >
>> > It's fairly easy to work with Wicket (1.3 beta2) using Jetty as the web
>> > server. However, when I tried to do the same thing using IRAD and
>> > Websphere,
>> > I always got file not found or Error 404. Then I tried to deploy the
>> > wicket-examples-1.3.0-beta2.war to Websphere (6.1.0.2 Build Number:
>> > cf20633.22), the example can't work correctly too - got "Error 404:
>> Error
>> > reported: 404".
>> >
>> > Is there anything special need to be set for IBM's stuff? Any
>> suggestion?
>> >
>> >
>> >
>>
> 
> 
> -- 
> Wicket joins the Apache Software Foundation as Apache Wicket
> Apache Wicket 1.3.0-beta2 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Does-anyone-develop-Wicket-app-using-IRAD-and-Websphere-tf4307950.html#a12277482
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Update a ListView

2007-08-30 Thread juliez

I have a simple page to that contains an input box, a drop down list with a
submit button and a table below it. When a user inputs something, chooses
the item in the drop down list and hit the submit button, the table should
be refreshed. It seems a lot like the GuestBook in the example.

I first implemented the table with AjaxFallbackDefaultDataTable with a list
of AbstractColumn and it works well. But then I changed to use
PagableListView and couldn't get the table content refreshed.

The code is like this (1, 2 and 3 are in one method, 4 is in another method)
0. In the constructor: initiate the instance variable of messages.
messages = personService.doGetMessages(currentUser);

1. The text area
The model is an Object of Message class.
final IModel messageModel = new CompoundPropertyModel(new
Message());
form.add(new TextArea("message", new PropertyModel(messageModel,  
"message")).setRequired(true));

2. The drop down list
The model is an Object of Person class which I retrieved from database.
form.add(new DropDownChoice("receiver", 
new PropertyModel(messageModel, "person"),
new LoadableDetachableModel() {
protected Object load() {
return personService.doFindUsers();
}
},
new ChoiceRenderer("formattedName")).setRequired(true));

3. The button
form.add(new Button("sendButton") {
public void onSubmit() {
Message message = (Message) messageModel.getObject();
personService.doSendPersonMessage(message);
message.setMessage("");
messages = personService.doGetMessages(currentUser); 
//REFRESH THE LIST
}
});

4. The List View
The model is a list of Message(s)
PageableListView messageListView = 
new PageableListView("messageTable", messages, 5) {
protected void populateItem(ListItem item) {
Message message = 
(Message)item.getModelObject();
item.add(new Label("messageContent", 
message.getMessage()));
}
};
form.add(messageListView);

Question:
a. The messages in the ListView hasn't been refreshed when it is refreshed
in the onSubmit() in the button code. Why? 

b. In the button code (#3 in the code list), if I reset the model of the
ListView in onSubmit() as follows to replace the refresh of messages, the
table is refreshed. But I don't think it's the right way to do it, right?
getParent().get("messageTable").setModelObject(personService.doGetMessages(currentUser));

c. What's the difference of using DataTable and ListView in Wicket? If it's
discussed before, please just tell me this.

Thanks!
Julie 
-- 
View this message in context: 
http://www.nabble.com/Update-a-ListView-tf4355194.html#a12410289
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Update a ListView (Solved)

2007-08-31 Thread juliez

Just need to remember only the model get updated for each request. So after I
changed to code as follows, it works!

After:
PageableListView messageListView = 
new PageableListView("messageTable", new PropertyModel(this,
"messages"), 5)
Before:
PageableListView messageListView = 
new PageableListView("messageTable", messages, 5)

Julie 


juliez wrote:
> 
> I have a simple page to that contains an input box, a drop down list with
> a submit button and a table below it. When a user inputs something,
> chooses the item in the drop down list and hit the submit button, the
> table should be refreshed. It seems a lot like the GuestBook in the
> example.
> 
> I first implemented the table with AjaxFallbackDefaultDataTable with a
> list of AbstractColumn and it works well. But then I changed to use
> PagableListView and couldn't get the table content refreshed.
> 
> The code is like this (1, 2 and 3 are in one method, 4 is in another
> method)
> 0. In the constructor: initiate the instance variable of messages.
> messages = personService.doGetMessages(currentUser);
> 
> 1. The text area
> The model is an Object of Message class.
> final IModel messageModel = new CompoundPropertyModel(new
> Message());
>   form.add(new TextArea("message", new PropertyModel(messageModel,  
> "message")).setRequired(true));
> 
> 2. The drop down list
> The model is an Object of Person class which I retrieved from database.
>   form.add(new DropDownChoice("receiver", 
> new PropertyModel(messageModel, "person"),
>   new LoadableDetachableModel() {
>   protected Object load() {
>   return personService.doFindUsers();
>   }
>   },
>   new ChoiceRenderer("formattedName")).setRequired(true));
> 
> 3. The button
>   form.add(new Button("sendButton") {
>   public void onSubmit() {
>   Message message = (Message) messageModel.getObject();
>   personService.doSendPersonMessage(message);
>   message.setMessage("");
>   messages = personService.doGetMessages(currentUser); 
> //REFRESH THE LIST
>   }
>   });
> 
> 4. The List View
> The model is a list of Message(s)
>   PageableListView messageListView = 
>   new PageableListView("messageTable", messages, 5) {
>   protected void populateItem(ListItem item) {
>   Message message = 
> (Message)item.getModelObject();
>   item.add(new Label("messageContent", 
> message.getMessage()));
>   }
>   };
>   form.add(messageListView);
> 
> Question:
> a. The messages in the ListView hasn't been refreshed when it is refreshed
> in the onSubmit() in the button code. Why? 
> 
> b. In the button code (#3 in the code list), if I reset the model of the
> ListView in onSubmit() as follows to replace the refresh of messages, the
> table is refreshed. But I don't think it's the right way to do it, right?
> getParent().get("messageTable").setModelObject(personService.doGetMessages(currentUser));
> 
> c. What's the difference of using DataTable and ListView in Wicket? If
> it's discussed before, please just tell me this.
> 
> Thanks!
> Julie 
> 

-- 
View this message in context: 
http://www.nabble.com/Update-a-ListView-tf4355194.html#a12428138
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]