[Wicket-user] beginner: InspectorBug question

2006-01-23 Thread karthik Guru
I ran into this cool InspectBug panel. I had a very basic question though.

I have a IDataProvider that returns a LoadableDetachableModel from its

public IModel model(final Object object){
  return new LoadableDetachableModel(){
protected Object load(){
  return object;
   }
 };

I have a model object com.learnwicket.shop.model.Book that is actually
being returned from model( ). The DataProvider supplies data to the
DataView.

The InspectBug page displays an entry :

size - 8.7k
type - wicket.extensions.markup.html.repeater.refreshing.Item
Model Object - [EMAIL PROTECTED]

I understand that while a request is being served,
wicket.extensions.markup.html.repeater.refreshing.Item 's model is the
Book object. Since am returning LoadableDetachableModel , I guess at
the end of each request, the actual Model obj reference -  Book, is
reset to null.

Does 8.7k include my Book object size as well? and the size is likely
to reduce at the end of the request cycle but is not reflected in the
InspectorBug page?

hope this is not a stupid question :)


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] RowSets

2006-01-23 Thread Frank Silbermann








In my browser Ive tried irc.freenode.net
and www.irc.freenode.net and http://irc.freenode.net and all I get are 404 PAGE NOT FOUND
messages. What exactly do you mean by
irc.freenode.net?



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg 
To: wicket-user@lists.sourceforge.net


btw if you have a lot of small questions we might be able to better help you at
irc.freenode.net ##wicket 












Re: [Wicket-user] RowSets

2006-01-23 Thread Justin Lee
Using an IRC client to connect to irc.freenode.net and then /join ##wicket.

Frank Silbermann wrote:
 In my browser I’ve tried “irc.freenode.net” and www.irc.freenode.net
 http://www.ifr.freenode.net/ and http://irc.freenode.net
 http://irc.freenode.net/  and all I get are 404 PAGE NOT FOUND
 messages.  What exactly do you mean by irc.freenode.net?
 
  
 
 -Original Message-
 *From:* [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] *On Behalf Of *Igor
 Vaynberg
 *To**:* wicket-user@lists.sourceforge.net
 
 btw if you have a lot of small questions we might be able to better help
 you at irc.freenode.net http://irc.freenode.net ##wicket
 
  
 


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket Library down?

2006-01-23 Thread Frank Silbermann

What's happened to the Wicket Library?  (http://www.wicket-library.com/)
It seems to be down.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket Library down?

2006-01-23 Thread Juergen Donnerstag
Thanks for the info. It is up again

Juergen

On 1/23/06, Frank Silbermann [EMAIL PROTECTED] wrote:

 What's happened to the Wicket Library?  (http://www.wicket-library.com/)
 It seems to be down.


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] RowSets

2006-01-23 Thread Eelco Hillenius
You need an IRC client for that, like ChatZilla:
http://www.hacksrus.com/~ginda/chatzilla/ or Mirc:
http://www.mirc.com/. See http://freenode.net/ for the web site.

Eelco


On 1/23/06, Frank Silbermann [EMAIL PROTECTED] wrote:



 In my browser I've tried irc.freenode.net and www.irc.freenode.net and
 http://irc.freenode.net  and all I get are 404 PAGE NOT FOUND messages.
 What exactly do you mean by irc.freenode.net?



 -Original Message-
  From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Igor Vaynberg
  To: wicket-user@lists.sourceforge.net

  btw if you have a lot of small questions we might be able to better help
 you at irc.freenode.net ##wicket






---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] auto generating page files

2006-01-23 Thread Mark Derricutt
On 1/17/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
this is not really feasible. the markup does not contain enough information about the component.span wicket:id=name/spandoesnt tell me what component i want to put in. is it a label? is it a panel? something else? does it have a default constructor? which constructor to use? which model?
This does give me an interesting idea for IDEA thou - a set of intentions/inspections and maybe a custom auto-completion (not sure how you do that yet thou) that, in the .java file looks up wicket:id's to autocomplete component id params with, and in the .html file, auto complete wicket:id's with unused labels from added components.
A set of inspection/intentions could check hirerachy as well.H - I really should get my JIRA plugin building again but this sounds like an interesting project in itself :)


Re: [Wicket-user] beginner: InspectorBug question

2006-01-23 Thread Igor Vaynberg
inspector shows the size of the page as it is /in session/. i think the problem is how you declared the model:return new LoadableDetachableModel(){protected Object load(){   return object;
  }since the model is anonymous and object is final, the object will /always/ hold on to the object. its internal object variable will be cleared, but the anonymous class will still hang on to object reference.
-IgorOn 1/23/06, karthik Guru [EMAIL PROTECTED] wrote:
I ran into this cool InspectBug panel. I had a very basic question though.I have a IDataProvider that returns a LoadableDetachableModel from itspublic IModel model(final Object object){return new LoadableDetachableModel(){
protected Object load(){return object; } };I have a model object com.learnwicket.shop.model.Book that is actuallybeing returned from model( ). The DataProvider supplies data to the
DataView.The InspectBug page displays an entry :size - 8.7ktype - wicket.extensions.markup.html.repeater.refreshing.ItemModel Object - [EMAIL PROTECTED]I understand that while a request is being served,
wicket.extensions.markup.html.repeater.refreshing.Item 's model is theBook object. Since am returning LoadableDetachableModel , I guess atthe end of each request, the actual Model obj reference -Book, is
reset to null.Does 8.7k include my Book object size as well? and the size is likelyto reduce at the end of the request cycle but is not reflected in theInspectorBug page?hope this is not a stupid question :)
---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] ListView tutorial?

2006-01-23 Thread Frank Silbermann
Has anyone written about the way ListView works in Wicket -- i.e. the
roles played by ListView, ListItem and the models belonging to these
components?
I've looked at the JavaDoc in the hope of gaining some intuition as to
what is going on, but I'm having a difficult time seeing the forest
because of all the trees.

For example, I'm looking at the Component Reference examples,
specifically the RadioGroupPage.  The RadioGroup object is constructed
with new Model() -- which leads me to ask myself What kind of a silly
model is that?

Looking at the API documentation for RadioGroup, is says that the
group's model is set to the model of the selected Radio component.  So
I'm guessing that new Model() is just a filler to tell the RadioGroup
NOT to search for a ComponentModel further up the hierarchy -- this
time, the model comes from down lower in the hierarch.  (If that's true,
perhaps this usage of a trivial model ought to be described somewhere in
the RadioGroup JavaDoc.  Or is it a more general pattern followed by a
variety of selection components?  Does the JavaDoc for the most general
abstract selection component explain this usage?)

So I look further down for the Radio objects themselves, and see that
they are created within the populateItem() method of an anonymous
subclass of ListView.  Perhaps the relationship between RadioGroup and
Radio would be more easily understood via a simpler (though less
practical) example in which the set of Radio components were hardcoded
-- my vague understanding of working with Listview is getting in the
way.

As it stands, we give each Radio component the same model as one of the
ListItem components of the ListView.  I presume the ListItem is built
from one of the items of the java.util.List from which the ListView was
contructed -- but how???

I suppose my next step is to look at the Wicket implementation of
ListView and ListItem to figure out what is going on.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ListView tutorial?

2006-01-23 Thread Igor Vaynberg
radiogroup asidelets take a simple example, we want to show a table of users:table tr wicket:id=listview tdspan wicket:id=firstname//tdtdspan wicket:id=lastname//td
 /tr/tablewhat we want is everything within tr.../tr to repeat once for every user. so we attach listview to the tr tag.what listview does is make its immediate children believe that their markup is that of the listview itself. so each immediate child believes that it is attached to the tr wicket:id=listview tag.
we need to represent these immediate listview children with a container component, because each of these children may contain multiple children of its own, in our case the firstname/lastname labels. this is what the listitem is, its a simple WebMarkupContainer created for you so you dont have to do it everytime youself.
so we will have a listitem container created for every list item in the list that feeds the lisview. but this is not enough. each of these listitems must contain the components that represent data within it (the firstname, lastname labels that we want to add).
this is where populateitem comes in, it is called once for every listitem created and allows you to add components to it.so the listview render process looks like this:before each render: clear all children
 for every list item in the list:  create a ListItem webmarkupcontainer add created ListItem as a child call populateItem with the created ListItem container to allow users to populate itrender:
 render all immediate children with own markupdoes this help or confuse you more?-IgorOn 1/23/06, Frank Silbermann 
[EMAIL PROTECTED] wrote:Has anyone written about the way ListView works in Wicket -- 
i.e. theroles played by ListView, ListItem and the models belonging to thesecomponents?I've looked at the JavaDoc in the hope of gaining some intuition as towhat is going on, but I'm having a difficult time seeing the forest
because of all the trees.For example, I'm looking at the Component Reference examples,specifically the RadioGroupPage.The RadioGroup object is constructedwith new Model() -- which leads me to ask myself What kind of a silly
model is that?Looking at the API documentation for RadioGroup, is says that thegroup's model is set to the model of the selected Radio component.SoI'm guessing that new Model() is just a filler to tell the RadioGroup
NOT to search for a ComponentModel further up the hierarchy -- thistime, the model comes from down lower in the hierarch.(If that's true,perhaps this usage of a trivial model ought to be described somewhere in
the RadioGroup JavaDoc.Or is it a more general pattern followed by avariety of selection components?Does the JavaDoc for the most generalabstract selection component explain this usage?)So I look further down for the Radio objects themselves, and see that
they are created within the populateItem() method of an anonymoussubclass of ListView.Perhaps the relationship between RadioGroup andRadio would be more easily understood via a simpler (though lesspractical) example in which the set of Radio components were hardcoded
-- my vague understanding of working with Listview is getting in theway.As it stands, we give each Radio component the same model as one of theListItem components of the ListView.I presume the ListItem is built
from one of the items of the java.util.List from which the ListView wascontructed -- but how???I suppose my next step is to look at the Wicket implementation ofListView and ListItem to figure out what is going on.
---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ListView tutorial?

2006-01-23 Thread Igor Vaynberg
here is an unrolled listview example using the ordered repeating view from extensions. ORV is like a listview in respect that it lets its immediate children use its markup.OrderedRepeatingView repeater=new OrderedRepeatingView(repeater);
for (int i=0;iusers.size();i++) { final User user=users.get(i); WebMarkupContainer item=new WebMarkupContainer(String.valueOf(i)); //1 repeater.add(item); //2 item.add(new Label(firstname, 
user.getFirstName())); //3 item.add(new Label(lastname, user.getLastName())); //3}so in a listviewstep 1: is the ListItem container created for you. notice that we use i counter as the unique child id because we cannot have id collissions. this is also taken care for you by the ListView.
step 2 is also take care for you by the listviewstep 3 happens in your implementation of populateItem-IgorOn 1/23/06, Igor Vaynberg
 [EMAIL PROTECTED] wrote:
radiogroup asidelets take a simple example, we want to show a table of users:table tr wicket:id=listview tdspan wicket:id=firstname//tdtdspan wicket:id=lastname//td
 /tr/tablewhat we want is everything within tr.../tr to repeat once for every user. so we attach listview to the tr tag.what listview does is make its immediate children believe that their markup is that of the listview itself. so each immediate child believes that it is attached to the tr wicket:id=listview tag.
we need to represent these immediate listview children with a container component, because each of these children may contain multiple children of its own, in our case the firstname/lastname labels. this is what the listitem is, its a simple WebMarkupContainer created for you so you dont have to do it everytime youself.
so we will have a listitem container created for every list item in the list that feeds the lisview. but this is not enough. each of these listitems must contain the components that represent data within it (the firstname, lastname labels that we want to add).
this is where populateitem comes in, it is called once for every listitem created and allows you to add components to it.so the listview render process looks like this:before each render: clear all children
 for every list item in the list:  create a ListItem webmarkupcontainer add created ListItem as a child call populateItem with the created ListItem container to allow users to populate itrender:
 render all immediate children with own markupdoes this help or confuse you more?-Igor
On 1/23/06, Frank Silbermann 
[EMAIL PROTECTED] wrote:Has anyone written about the way ListView works in Wicket -- 
i.e. theroles played by ListView, ListItem and the models belonging to thesecomponents?I've looked at the JavaDoc in the hope of gaining some intuition as towhat is going on, but I'm having a difficult time seeing the forest
because of all the trees.For example, I'm looking at the Component Reference examples,specifically the RadioGroupPage.The RadioGroup object is constructedwith new Model() -- which leads me to ask myself What kind of a silly
model is that?Looking at the API documentation for RadioGroup, is says that thegroup's model is set to the model of the selected Radio component.SoI'm guessing that new Model() is just a filler to tell the RadioGroup
NOT to search for a ComponentModel further up the hierarchy -- thistime, the model comes from down lower in the hierarch.(If that's true,perhaps this usage of a trivial model ought to be described somewhere in
the RadioGroup JavaDoc.Or is it a more general pattern followed by avariety of selection components?Does the JavaDoc for the most generalabstract selection component explain this usage?)So I look further down for the Radio objects themselves, and see that
they are created within the populateItem() method of an anonymoussubclass of ListView.Perhaps the relationship between RadioGroup andRadio would be more easily understood via a simpler (though lesspractical) example in which the set of Radio components were hardcoded
-- my vague understanding of working with Listview is getting in theway.As it stands, we give each Radio component the same model as one of theListItem components of the ListView.I presume the ListItem is built
from one of the items of the java.util.List from which the ListView wascontructed -- but how???I suppose my next step is to look at the Wicket implementation ofListView and ListItem to figure out what is going on.
---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes

searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user




Re: [Wicket-user] Javaranch Wicket Forum?

2006-01-23 Thread Mark Derricutt
On 1/23/06, Martijn Dashorst [EMAIL PROTECTED] wrote:
The biggest barrier I see that we have to pay for the use of jive. :-(Doesn't jive offer free OSS licences similar to Atlassian Jira?


[Wicket-user] Wicket in Action

2006-01-23 Thread Serge Boulay
I saw a couple of posts for wicket in Action .. was wondering if perhaps this will be available as part of the manning early access program ?
Anyway, I am newbie to wicket (coming from struts,spring mvc,jsf tapestry background)and love the approach that the framework is taking. Without a doubt .. we will be using wicket on our next project.

Keep up the good work!



Re: [Wicket-user] Wicket in Action

2006-01-23 Thread Martijn Dashorst
As one of the authors, we would gladly put our book into the early
access program, but the book has to be pretty far into production
before it becomes available through EAP.

Nice to hear we already have one reader ;-)

Martijn

On 1/23/06, Serge Boulay [EMAIL PROTECTED] wrote:
 I saw a couple of posts for wicket in Action .. was wondering if perhaps
 this will be available as part of the manning early access program ?
 Anyway, I am newbie to wicket (coming from struts,spring mvc,jsf tapestry
 background)  and love the approach that the framework is taking. Without a
 doubt .. we will be using wicket on our next project.

 Keep up the good work!



--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] ListView tutorial?

2006-01-23 Thread Frank Silbermann








Igors description of the ListView operation is very helpful.



What also confused me about the RadioGroupPage (of the component reference examples in the
Wicket Library) was the use of models with each of the parts, the details of which
are hidden from us in the examples by the use of text-saving alternate
constructors. Im guessing
that it works something like as follows (confirmation or correction would be
most welcome!):



When we create the ListView,
we give it a java.util.List as a convenience via an
alternate constructor, but this alternate constructor wraps the java.util.List in a wicket List that implements IModel.
However, this IModel object is only used
internally.



When the ListView
creates the ListItem container component for each java.util.List element, the ListItem
is built with its own IModel wrapping the individual java.util.List element.



The populateItem() method over-rides the ListViews
abstract method in its concrete subclass, and is called to fill each ListItem with subcomponents, providing (among other things)
an IModel for each element added to the ListItem. Typically,
the subcomponents model is based on a piece of the ListItems
model. For a simple label, for example, we can
call getModelObject() on the ListItem to reach past
the IModel wrapping, and then drill down to the
relevant java.lang.String contained within. We can then allow the Labels
convenience constructor to wrap the java.lang.String
within an IModel. Alternately, we can construct a PropertyModel for the Label using the ListItems
IModel and an OGNL string.



Within a RadioGroup,
the model for each Radio button can be anything that is distinguishable from
the other Radio buttons models.
Rather than recording TRUE or FALSE for each Radio button as we would
for Checkboxs, the framework simply sets the model of the overall RadioGroup to the selected Radio buttons model. (If the RadioGroup
is initialized to have no Radio button selected, we create it with an empty default
Model, as this will differ from every Radio buttons model.)



If we create a set of Radio buttons
dynamically based via a ListView, the models for each
ListItem will be distinguishable from one another --
with a 1-to-1 correspondence between ListItems
and Radio buttons. Therefore, the
easiest thing to do is to re-use each ListItems
IModel as the IModel for its
Radio button, as is done in the RadioGroupPage
example.



Is this the intuition?






-Original Message-
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Igor Vaynberg
Sent: Monday, January 23, 2006
12:45 PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
ListView tutorial?



radiogroup aside

lets take a simple example, we want to show a table of users:

table
 tr wicket:id=listview
 tdspan
wicket:id=firstname//tdtdspan
wicket:id=lastname//td 
 /tr
/table

what we want is everything within tr.../tr to repeat once for
every user. so we attach listview to the tr tag.

what listview does is make its immediate children believe that their markup is
that of the listview itself. so each immediate child believes that it is
attached to the tr wicket:id=listview tag. 

we need to represent these immediate listview children with a container
component, because each of these children may contain multiple children of its
own, in our case the firstname/lastname labels. this is what the listitem is,
its a simple WebMarkupContainer created for you so you dont have to do it
everytime youself. 

so we will have a listitem container created for every list item in the list
that feeds the lisview. but this is not enough. each of these listitems must
contain the components that represent data within it (the firstname, lastname
labels that we want to add). 

this is where populateitem comes in, it is called once for every listitem
created and allows you to add components to it.

so the listview render process looks like this:

before each render:
 clear all children 
 for every list item in the list:
  create a ListItem webmarkupcontainer
 add created ListItem as a child
 call populateItem with the created ListItem container
to allow users to populate it
render: 
 render all immediate children with own markup

does this help or confuse you more?

-Igor





On 1/23/06, Frank Silbermann  [EMAIL PROTECTED]
wrote:

Has anyone written about the way ListView works in
Wicket -- i.e. the
roles played by ListView, ListItem and the models belonging to these
components?
I've looked at the JavaDoc in the hope of gaining some intuition as to
what is going on, but I'm having a difficult time seeing the forest 
because of all the trees.

For example, I'm looking at the Component Reference examples,
specifically the RadioGroupPage.The RadioGroup object is
constructed
with new Model() -- which leads me to ask myself What kind of
a silly 
model is that?

Looking at the API documentation for RadioGroup, is says that the
group's model is set to the model of the selected Radio

[Wicket-user] Concerning non-session scoped Lists for paging

2006-01-23 Thread Rick Reumann
I was looking at the Library example and I noticed it uses a
PageableListView added to a PagingNavigator to display the List of
books. In this case all the books are being populated from a single
List.

How do you handle the cases where you need pagation, but each request
for a new page should go out o the server and get the new list. I
don't like the idea of having to store potentially thousands and
thousands of rows of data into a List just to create a sortable list.
(I understand one initial query is needed just to get the overall size
of the result set to create the page numbers, but that's a big
difference in overhead vs having to populate all the potential objects
from that query). To handle this in Wicket, would someone need to
write a new component to satisfy this business need or can it be done
using some standard iterating tag (similar to JSTL's forEach) and
straight HTML?

I'm new to using Wicket and still new to JSF as well, but I find the
whole component type of architecture a mixed blessing. For simple
stuff it's nice to have some out-of-the-box display features coded for
you, but when you end up having to customize, I often find a pain. I
know HTML and JSTL so coding my front end with simple JSTL and HTML is
easy. It's a shame that it seems like these component based frameworks
require you to work within the components to achieve what you want.

For example, in JSF I was wanting to display a bunch of stuff in divs
as I iterated over a collection. With standard JSTL and HMTL this is a
piece of cake, but in JSF I couldn't even find a component to let me
do this. Everyone said use the DataTable, but it didn't provide the
functionality I needed.

Thanks for any feedback.


--
Rick


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Concerning non-session scoped Lists for paging

2006-01-23 Thread Martijn Dashorst
Rick,

The components provided by the core wicket project are pretty basic in
what they can accomplish out of the box. For your particular problem
there are several options.

One of them, which is very elegant if I may say so, are the repeaters
in the Wicket extensions project. You can see them in action in the
repeaters example. They use an IDataProvider that has two methods: one
for getting the count, and one for getting a paginated iterator
retrieving the results for the actual page rendered.

The extensions project provides the DataView, which is an extension on
the ListView that knows how to deal with the IDataProvider directly.
There are more powerful options, such as sorting and other neat
things.

In our own application we only use DataViews now.

The other option is to bake a solution yourself or try the
wicket-contrib-data and wicket-contrib-data-hibernate3 jar files.
However I think they have been superseeded with the repeater package
in wicket-extensions.

Martijn


On 1/23/06, Rick Reumann [EMAIL PROTECTED] wrote:
 I was looking at the Library example and I noticed it uses a
 PageableListView added to a PagingNavigator to display the List of
 books. In this case all the books are being populated from a single
 List.

 How do you handle the cases where you need pagation, but each request
 for a new page should go out o the server and get the new list. I
 don't like the idea of having to store potentially thousands and
 thousands of rows of data into a List just to create a sortable list.
 (I understand one initial query is needed just to get the overall size
 of the result set to create the page numbers, but that's a big
 difference in overhead vs having to populate all the potential objects
 from that query). To handle this in Wicket, would someone need to
 write a new component to satisfy this business need or can it be done
 using some standard iterating tag (similar to JSTL's forEach) and
 straight HTML?

 I'm new to using Wicket and still new to JSF as well, but I find the
 whole component type of architecture a mixed blessing. For simple
 stuff it's nice to have some out-of-the-box display features coded for
 you, but when you end up having to customize, I often find a pain. I
 know HTML and JSTL so coding my front end with simple JSTL and HTML is
 easy. It's a shame that it seems like these component based frameworks
 require you to work within the components to achieve what you want.

 For example, in JSF I was wanting to display a bunch of stuff in divs
 as I iterated over a collection. With standard JSTL and HMTL this is a
 piece of cake, but in JSF I couldn't even find a component to let me
 do this. Everyone said use the DataTable, but it didn't provide the
 functionality I needed.

 Thanks for any feedback.


 --
 Rick


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Concerning non-session scoped Lists for paging

2006-01-23 Thread Johan Compagner
In wicket extentions (the 1.2 stream) we have special Listviews/Repeaters for that in conjection with models that supports just query things what is needed.See the wicket.extensions.markup.html.repeater.* package for Components/Models.
In the wicket-examples/repeater we have examples for that.for example:public class ContactDataProvider implements IDataProvider{ protected ContactsDatabase getContactsDB() {  return 
DatabaseLocator.getDatabase(); } /** * retrieves contacts from database starting with index codefirst/code * and ending with codefirst+count/code * 
 * @see wicket.extensions.markup.html.repeater.data.IDataProvider#iterator(int, * int) */ public Iterator iterator(int first, int count) {  return getContactsDB().find(first, count, firstName, true).iterator(); 
 } /** * returns total number of contacts in the database *  * @see wicket.extensions.markup.html.repeater.data.IDataProvider#size() */ public int size() {
  return getContactsDB().getCount(); } /** * wraps retrieved contact pojo with a wicket model *  * @see wicket.extensions.markup.html.repeater.data.IDataProvider#model(java.lang.Object
) */ public IModel model(Object object) {  return new DetachableContactModel((Contact)object); }}On 1/23/06, 
Rick Reumann [EMAIL PROTECTED] wrote:
I was looking at the Library example and I noticed it uses aPageableListView added to a PagingNavigator to display the List ofbooks. In this case all the books are being populated from a singleList.How do you handle the cases where you need pagation, but each request
for a new page should go out o the server and get the new list. Idon't like the idea of having to store potentially thousands andthousands of rows of data into a List just to create a sortable list.(I understand one initial query is needed just to get the overall size
of the result set to create the page numbers, but that's a bigdifference in overhead vs having to populate all the potential objectsfrom that query). To handle this in Wicket, would someone need towrite a new component to satisfy this business need or can it be done
using some standard iterating tag (similar to JSTL's forEach) andstraight HTML?I'm new to using Wicket and still new to JSF as well, but I find thewhole component type of architecture a mixed blessing. For simple
stuff it's nice to have some out-of-the-box display features coded foryou, but when you end up having to customize, I often find a pain. Iknow HTML and JSTL so coding my front end with simple JSTL and HTML is
easy. It's a shame that it seems like these component based frameworksrequire you to work within the components to achieve what you want.For example, in JSF I was wanting to display a bunch of stuff in divs
as I iterated over a collection. With standard JSTL and HMTL this is apiece of cake, but in JSF I couldn't even find a component to let medo this. Everyone said use the DataTable, but it didn't provide thefunctionality I needed.
Thanks for any feedback.--Rick---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ListView tutorial?

2006-01-23 Thread Igor Vaynberg
this is pretty close yes.when you construct a listview with a list in the constructor instead of imodel, the listview creates a simple Model implementation and sticks the list into it. this is really nothing more then a convinience constructor. the same code would look like this w/out it:
List list=getList();new ListView(id, list);ornew ListView(id, new Model((Serializable)list));so now that we have the listview how can listitems retrieve the item of the list they are created to represent? for this listview assigns each created listitem with a model that wraps the item in the list the listitem container represents.
this is done in ListView.getListItemModel method which you can override to provide your own IModel implementation that should wrap the item sin the list.so what this allows you to do ispupulateItem(ListItem item) {
 User=(User)item.getModelObject();retrieve the item of the list this listitem represents w/out accessing the list directly. if you wrap listitem's model with a compound property model then its children can also access it easily.
now about the RadioGroup.this component was born because RadioChoice was too inflexible since it took over the generation of markup. so you caouldnt use it in a listview or any other repeater.the way RadioGroup/Radio work is that
the RadioGroup's model represents the store where you want the selected item to be put, while Radio's model represents the value itself you want to retrieve. When the form is submitted the RadioGroup's model/object/ is set to selected Radio's model/object/
so something like this:class FormBean { String color; //setters, getters }FormBean bean=new FormBean();form.add(new RadioGroup(gorup, new PropertyModel(bean, color)));
...form.add(new Radio(radio1, new Model(green));form.add(new Radio(radio2, new Model(yellow));form.add(new Radio(radio3, new Model(red));
so if you select radio2 then on form submit this code is going to runRadioGroup.setModelObject(radio2.getModelObject());so FormBean's color property will be set to string yellowdoes this clear things up a bit?
-IgorOn 1/23/06, Frank Silbermann [EMAIL PROTECTED] wrote:

















Igor's description of the ListView operation is very helpful.



What also confused me about the RadioGroupPage (of the component reference examples in the
Wicket Library) was the use of models with each of the parts, the details of which
are hidden from us in the examples by the use of text-saving alternate
constructors. I'm guessing
that it works something like as follows (confirmation or correction would be
most welcome!):



When we create the ListView,
we give it a java.util.List as a convenience via an
alternate constructor, but this alternate constructor wraps the java.util.List in a wicket List that implements IModel.
However, this IModel object is only used
internally.



When the ListView
creates the ListItem container component for each java.util.List element, the ListItem
is built with its own IModel wrapping the individual java.util.List element.



The populateItem() method over-rides the ListView's
abstract method in its concrete subclass, and is called to fill each ListItem with subcomponents, providing (among other things)
an IModel for each element added to the ListItem. Typically,
the subcomponent's model is based on a piece of the ListItem's
model. For a simple label, for example, we can
call getModelObject() on the ListItem to reach past
the IModel wrapping, and then drill down to the
relevant java.lang.String contained within. We can then allow the Label's
convenience constructor to wrap the java.lang.String
within an IModel. Alternately, we can construct a PropertyModel for the Label using the ListItem's
IModel and an OGNL string.



Within a RadioGroup,
the model for each Radio button can be anything that is distinguishable from
the other Radio buttons' models.
Rather than recording TRUE or FALSE for each Radio button as we would
for Checkbox's, the framework simply sets the model of the overall RadioGroup to the selected Radio button's model. (If the RadioGroup
is initialized to have no Radio button selected, we create it with an empty "default"
Model, as this will differ from every Radio button's model.)



If we create a set of Radio buttons
dynamically based via a ListView, the models for each
ListItem will be distinguishable from one another --
with a 1-to-1 correspondence between ListItem's
and Radio buttons. Therefore, the
easiest thing to do is to re-use each ListItem's
IModel as the IModel for its
Radio button, as is done in the RadioGroupPage
example.



Is this the intuition?






-Original Message-
From:
[EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]]
On Behalf Of Igor Vaynberg
Sent: Monday, January 23, 2006
12:45 PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
ListView tutorial?



radiogroup aside

lets take a simple example, we want to show a table of users:

table
 tr wicket:id=listview
 tdspan
wicket:id=firstname//tdtdspan

[Wicket-user] No version manager available exception instead of Page Expired on second click to versioned page

2006-01-23 Thread Robert McClay
In Wicket 1.1 if the session expires and you click on a versioned page, 
the first time it will take you to the Page Expired page. If you then 
hit back and click the link again, it'll throw an exception. Is that a 
bug?


java.lang.IllegalStateException: No version manager available to 
retrieve requested versionNumber 2
at 
wicket.Page.getVersion(Page.java:387)
at 
wicket.Session.getPage(Session.java:271)
at 
wicket.protocol.http.WebRequestCycle.callComponentListener(WebRequestCycle.java:425)
 
  at 
wicket.protocol.http.WebRequestCycle.parseRequest(WebRequestCycle.java:140)
 
  at wicket.RequestCycle.request(RequestCycle.java:418)
at 
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:197)
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at 
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
 
  at 
com.bci.car.servlets.gzip.GzipFilter.doFilter(GzipFilter.java:127)

at 
com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
 
  at com.caucho.server.http.Invocation.service(Invocation.java:315)
   
at 
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
 
  at 
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:253)
 
  at 
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:170)
 
  at com.caucho.server.TcpConnection.run(TcpConnection.java:139)

at java.lang.Thread.run(Thread.java:613)





---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] No version manager available exception instead of Page Expired on second click to versioned page

2006-01-23 Thread Johan Compagner
You have then already a session again.With somehow that page already again. but it hasn't have that version yet.What do you expect to get?johanOn 1/23/06, 
Robert McClay [EMAIL PROTECTED] wrote:
In Wicket 1.1 if the session expires and you click on a versioned page,the first time it will take you to the Page Expired page. If you thenhit back and click the link again, it'll throw an exception. Is that a
bug?java.lang.IllegalStateException: No version manager available toretrieve requested versionNumber 2
atwicket.Page.getVersion(Page.java:387)
atwicket.Session.getPage(Session.java:271)
at
wicket.protocol.http.WebRequestCycle.callComponentListener(WebRequestCycle.java:425)
 atwicket.protocol.http.WebRequestCycle.parseRequest(WebRequestCycle.java:140)
 at wicket.RequestCycle.request(RequestCycle.java
:418)
atwicket.protocol.http.WicketServlet.doGet(WicketServlet.java:197)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:126)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
 atcom.bci.car.servlets.gzip.GzipFilter.doFilter(GzipFilter.java:127)
atcom.caucho.server.http.FilterChainFilter.doFilter
(FilterChainFilter.java:88)
 at com.caucho.server.http.Invocation.service(Invocation.java:315)
 atcom.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
 atcom.caucho.server.http.HttpRequest.handleRequest
(HttpRequest.java:253)
 atcom.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:170)
 at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:613)
---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] No version manager available exception instead of Page Expired on second click to versioned page

2006-01-23 Thread Igor Vaynberg
why not the same page expired page? i think not having a version can only happen because of that?-IgorOn 1/23/06, Johan Compagner 
[EMAIL PROTECTED] wrote:You have then already a session again.With somehow that page already again. 
but it hasn't have that version yet.What do you expect to get?johanOn 1/23/06, 
Robert McClay [EMAIL PROTECTED] wrote:

In Wicket 1.1 if the session expires and you click on a versioned page,the first time it will take you to the Page Expired page. If you thenhit back and click the link again, it'll throw an exception. Is that a

bug?java.lang.IllegalStateException: No version manager available toretrieve requested versionNumber 2
atwicket.Page.getVersion(Page.java:387)
atwicket.Session.getPage(Session.java:271)
at

wicket.protocol.http.WebRequestCycle.callComponentListener(WebRequestCycle.java:425)
 atwicket.protocol.http.WebRequestCycle.parseRequest(WebRequestCycle.java:140)
 at wicket.RequestCycle.request(RequestCycle.java

:418)
atwicket.protocol.http.WicketServlet.doGet(WicketServlet.java:197)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:126)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
 atcom.bci.car.servlets.gzip.GzipFilter.doFilter(GzipFilter.java:127)
atcom.caucho.server.http.FilterChainFilter.doFilter

(FilterChainFilter.java:88)
 at com.caucho.server.http.Invocation.service(Invocation.java:315)
 atcom.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
 atcom.caucho.server.http.HttpRequest.handleRequest

(HttpRequest.java:253)
 atcom.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:170)
 at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:613)
---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] No version manager available exception instead of Page Expired on second click to versioned page

2006-01-23 Thread Johan Compagner
fixed it so that we always show a page expired page when a page or version can't be found.On 1/24/06, Igor Vaynberg 
[EMAIL PROTECTED] wrote:why not the same page expired page? i think not having a version can only happen because of that?
-IgorOn 1/23/06, Johan Compagner 

[EMAIL PROTECTED] wrote:You have then already a session again.With somehow that page already again. 
but it hasn't have that version yet.What do you expect to get?johanOn 1/23/06, 
Robert McClay [EMAIL PROTECTED] wrote:


In Wicket 1.1 if the session expires and you click on a versioned page,the first time it will take you to the Page Expired page. If you thenhit back and click the link again, it'll throw an exception. Is that a


bug?java.lang.IllegalStateException: No version manager available toretrieve requested versionNumber 2
atwicket.Page.getVersion(Page.java:387)
atwicket.Session.getPage(Session.java:271)
at

wicket.protocol.http.WebRequestCycle.callComponentListener(WebRequestCycle.java:425)
 atwicket.protocol.http.WebRequestCycle.parseRequest(WebRequestCycle.java:140)
 at wicket.RequestCycle.request(RequestCycle.java


:418)
atwicket.protocol.http.WicketServlet.doGet(WicketServlet.java:197)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:126)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
 atcom.bci.car.servlets.gzip.GzipFilter.doFilter(GzipFilter.java:127)
atcom.caucho.server.http.FilterChainFilter.doFilter


(FilterChainFilter.java:88)
 at com.caucho.server.http.Invocation.service(Invocation.java:315)
 atcom.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
 atcom.caucho.server.http.HttpRequest.handleRequest


(HttpRequest.java:253)
 atcom.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:170)
 at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:613)
---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!

http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user




Re: [Wicket-user] Wicket in Action

2006-01-23 Thread Ali Zaid
I hope too that it will be wicket 1.2 and byound (and contain special
part for Ajax), I can't wait to put my hand on it, yesterday my
company decided to use wicket as the main tool for web application,
and I was asked to make a small team to port what we have/need into
wicket :), YPY!!!

On 1/23/06, Martijn Dashorst [EMAIL PROTECTED] wrote:
 As one of the authors, we would gladly put our book into the early
 access program, but the book has to be pretty far into production
 before it becomes available through EAP.

 Nice to hear we already have one reader ;-)

 Martijn

 On 1/23/06, Serge Boulay [EMAIL PROTECTED] wrote:
  I saw a couple of posts for wicket in Action .. was wondering if perhaps
  this will be available as part of the manning early access program ?
  Anyway, I am newbie to wicket (coming from struts,spring mvc,jsf tapestry
  background)  and love the approach that the framework is taking. Without a
  doubt .. we will be using wicket on our next project.
 
  Keep up the good work!
 


 --
 Living a wicket life...

 Martijn Dashorst - http://www.jroller.com/page/dashorst

 Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
Regards, Ali


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user