Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread V. Jenks
Yes, this works perfect now. Thank you. On Sat, 2006-02-11 at 01:43 +0100, Johan Compagner wrote: > sorry a LoadableDetachableModel is not a Model so: > > Model model = (Model)super.getObject(component); > > that can't be cast it to a IModel > > IModel model = (IModel)super.getObject(componen

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread V. Jenks
This works...how "expensive" is it, really? I've noticed in my own testing that copying the contents of one ArrayList into another can be fairly resource intensive...is that what is happening in the constructor? Couldn't I avoid this by making my domain classes implement Serializable? I believe

[Wicket-user] API break IAuthorizationStrategy

2006-02-10 Thread Eelco Hillenius
Hi, IAuthorizationStrategy wasn't very official yet, but for those of you that were already using it, there has been an API break. The new interface reflects better that authorization is queried, not applied: public interface IAuthorizationStrategy { boolean isInstantiationAuthorized(Class

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread Jens Schmidt
Your exception most likely stems from this issue:The list view constructor that throws the exception looks like this:public ListView(final String id, final List list) { this(id, new Model((Serializable)list)); }Since empList (java.util.RandomAccessSubList) does not implement Serializable you get t

[Wicket-user] Ajax problems - sample page...

2006-02-10 Thread Mark Derricutt
Ok, I've just whipped up a simple page that demonstrates the problem I was having with ajax updates in a ListView not working.Theres two ajax timers at the root of the page, and 10 in a loop.  Also note that the use of MarkupIdSetter.INSTANCE crashes.I see the models for each ListItem update once

[Wicket-user] Economize 70%em contas telefonicas.

2006-02-10 Thread Marcos
Telextreme - Telefonia VOIP Olá , você vai conhecer agora a telefonia do futuro. Estamos trazendo para o Brasil uma empresa de qualidade que atua a 10 anos no mercado, com mais 6 empresas no grupo é líder no mercado. Você gostaria de ter um telefone 100% livre para lig

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread Igor Vaynberg
of course dont forget to detach the delegate model in the LeftHalfModel.-IgorOn 2/10/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:class EmployeeListModel extends LoadableDetachableModel {            protected Object load()            {                //get default directory                Directory

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread Igor Vaynberg
class EmployeeListModel extends LoadableDetachableModel {           protected Object load()            {                //get default directory                Directory ed = DirectoryProxy.getDefaultWithEmployees ();                //get employees from directory                List employees = ed.g

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread Johan Compagner
sorry a LoadableDetachableModel is not a Model so: Model model = (Model)super.getObject(component);that can't be cast it to a IModelIModel model = (IModel)super.getObject(component); instead. johanOn 2/11/06, VGJ <[EMAIL PROTECTED]> wrote: OK, got it all setup and now it's complaining about the Lis

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread Igor Vaynberg
the split behavior can be encapsulated into a subclass of LoadableDetachableModel you can create. then your anonymous classes can extend from that if they have to at all.this is what OO is all about.-Igor On 2/10/06, VGJ <[EMAIL PROTECTED]> wrote: This might put me in a bind then.What I showed you

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread Eelco Hillenius
Take a look at the examples projects too. The phonebook example should be very usefull to give you an idea how to use typical database driven applications. Eelco On 2/10/06, VGJ <[EMAIL PROTECTED]> wrote: > I'll try it...not being a Swing programmer and never really having to think > about how t

Re: [Wicket-user] Wicket for this project?...

2006-02-10 Thread VGJ
Actually, it would be mixed, not entirely SSL.  The user would browse products and would enter an SSL-enabled page at the point he would be entering personal/payment information.On 2/10/06, Johan Compagner <[EMAIL PROTECTED]> wrote: isn't that ssl problem a problem when you mix stuff?So non ssl pa

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread VGJ
OK, got it all setup and now it's complaining about the ListView objects...here's the code: public class CheckIn extends WebPage { /** * default ctor */ public CheckIn() { IModel loadingModel = new LoadableDetachableModel() { protected Object load(

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread VGJ
I'll try it...not being a Swing programmer and never really having to think about how this type of event model works...I had no idea I could do it that way.Thanks very much for the info!  I'll see what happens once I get it working. On 2/10/06, Johan Compagner <[EMAIL PROTECTED]> wrote: that looks

Re: [Wicket-user] Wicket for this project?...

2006-02-10 Thread Johan Compagner
i think for that in 1.2 you could use the IRequestCodingStrategy (see WebRequestCodingStrategy) for that to make for specific pages a full url with https.Or you could use a ExternalLink component i guess where you have a bookmarkable page (the personal/payment section) to your own site.. Then you j

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread Johan Compagner
that looks like very wrong codeDon't know where these pieces of code are in:    //get default directory        Directory ed = DirectoryProxy.getDefaultWithEmployees();        //get employees from directory         List employees = ed.getEmployees();but if that is in a webpage constructor or som

Re: [Wicket-user] Wicket for this project?...

2006-02-10 Thread Johan Compagner
isn't that ssl problem a problem when you mix stuff?So non ssl pages and a ssl pages? And you want to generate a (page)link that goes to a ssl one or the other way around?The default wicket doesn't generate the "http" "server" "port" part of the url only the "/" path. So that is or was a proble

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread VGJ
This might put me in a bind then.What I showed you before was really a simplified, edited version of the code I'm really using.What I've got is similar only I have to split that single List into two other lists...doing something like this:         //get default directory        Directory ed = Direc

Re: [Wicket-user] Persistent data in the browser (cookies)

2006-02-10 Thread Eelco Hillenius
The authentication strategy shouldn't have anything to do with it. The cookie handling like we did before should work unaltered. Btw, the strategy is used for all components, not just pages. If you really want, you can use the request to get the request or session to read the cookies there. WebReq

Re: [Wicket-user] Checkbox in nested ListView

2006-02-10 Thread Mats Norén
Thanks! On 2/10/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > It's mentioned here: > http://wicket-wiki.org.uk/wiki/index.php/Listviews_in_a_form > > Eelco > > > On 2/10/06, Mats Norén <[EMAIL PROTECTED]> wrote: > > On 2/10/06, karthik Guru <[EMAIL PROTECTED]> wrote: > > > // Just create a new

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread Martijn Dashorst
On 2/10/06, VGJ <[EMAIL PROTECTED]> wrote: >.and it may be > what is causing my problems since I've spotted a comment here and there that > Wicket doesn't support Java 5? Wicket doesn't provide Java 5 specific features, but is fully compliant with Java 1.4 and up, as long as Java is compliant betw

Re: [Wicket-user] Persistent data in the browser (cookies)

2006-02-10 Thread Juergen Donnerstag
But actually that wasnt the intend. Before the authentication strategy the cookie value was assigned to the form component automatically at the beginning of the request (and I think it still is) and hence the information was exactly where you would expect it. I dont know much about the authenticati

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread Igor Vaynberg
if you think that is ugly, maybe wicket is not for you :)in wicket you use anonymous classes often. an alternative would be to make that anonymous class into a private static class, or if it is reusable make it a public static class. unlike many other web frameworks out there wicket requires you to

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread VGJ
Phew, that could get ugly.  Could I fix this by making my domain classes serializable?  Bare with me, I'm still pretty new to Java as well as Wicket :)On 2/10/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: and if it is, looks like whatever list is returned is not serializable so wicket cannot wrap i

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread VGJ
Yep, everything before that is Hibernate (3.1.x) doing it's thingThe three preceeding lines to what I posted were 3 sql queries being generated by Hibernateand there is nothing higher up showing any problems w/ hibernate. Also, the same calls work fine in a Servlet/JSP MVC setupI just p

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread Igor Vaynberg
and if it is, looks like whatever list is returned is not serializable so wicket cannot wrap it with a model for you.here is how to fix that and make the model detacahable, which is good anyways:IModel listModel=new LoadableDetachableModel() {     Object load() {    //get default directory 

Re: [Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread Igor Vaynberg
is that the root cause of the exception?-IgorOn 2/10/06, VGJ <[EMAIL PROTECTED]> wrote: I'm trying to convert a single page of an existing application using Wicket...just to see how it works.  The entire app was built on JDK 5.0.  It uses hibernate and retrieves lists of data with generics...and i

[Wicket-user] Exception when displaying List from hibernate

2006-02-10 Thread VGJ
I'm trying to convert a single page of an existing application using Wicket...just to see how it works.  The entire app was built on JDK 5.0.  It uses hibernate and retrieves lists of data with generics...and it may be what is causing my problems since I've spotted a comment here and there that Wic

Re: [Wicket-user] Wicket for this project?...

2006-02-10 Thread Martijn Dashorst
On 2/10/06, VGJ <[EMAIL PROTECTED]> wrote: > Is Wicket entirely stable when it comes to using Hibernate 3.1.x? Are there > any "gotchas" or serious bugs when interacting w/ Hibernate? There are no gotchas or bugs that come to mind. Perhaps you want to use spring in conjunction, and then I would l

Re: [Wicket-user] Event when row is created/data-bound?

2006-02-10 Thread VGJ
Yeah, I noticed this after I found some examples on the JavaLobby articles.  Sorry, I hadn't spent enough time looking for this before posting.Has there been any talk of putting some (or all) of the R. J. Lorimer articles into the Wiki?  I noticed a lot of the things his articles cover are missing

Re: [Wicket-user] Event when row is created/data-bound?

2006-02-10 Thread Eelco Hillenius
If you use a ListView, you have method populateItem that is called when each item is created. Argument item holds the current index, and item is where you attach your components, like icons, to. Eelco On 2/10/06, VGJ <[EMAIL PROTECTED]> wrote: > I've built several applications w/ ASP.NET in the

Re: [Wicket-user] Wicket for this project?...

2006-02-10 Thread Eelco Hillenius
On 2/10/06, VGJ <[EMAIL PROTECTED]> wrote: > I'm trying to decide if I should use Wicket for an e-commerce project here > at work. We're basically going to build a shopping cart which integrates > into existing financial and payment-processing systems that already exist > in-house. > > So, the fir

[Wicket-user] Event when row is created/data-bound?

2006-02-10 Thread VGJ
I've built several applications w/ ASP.NET in the past and got very comfortable w/ the built-in events that fire for some of the web UI controls that come bundled w/ the framework.I was curious if there was an event (or something similar in concept) that happens when each row is created in a table

[Wicket-user] Wicket for this project?...

2006-02-10 Thread VGJ
I'm trying to decide if I should use Wicket for an e-commerce project here at work.  We're basically going to build a shopping cart which integrates into existing financial and payment-processing systems that already exist in-house. So, the first things that come to mind are;Is Wicket entirely stab

Re: [Wicket-user] Re: To SSL And Back

2006-02-10 Thread Nick Heudecker
I need to finish this for 1.2. I've had some hard drive problems which have taken priority. On 2/8/06, John Patterson <[EMAIL PROTECTED]> wrote: > Nick Heudecker gmail.com> writes: > > > > > I'm working on adding the functionality to Wicket. Should be a few more > > days. > > How did this work

[Wicket-user] ListMultipleChoice

2006-02-10 Thread Jonathan Cone
Description: I'm using a ListMultipleChoice component to populate a List model object. When the user selects multiple items in the list, I want the list model object to be populated with those items. Problem: The ListMultipleChoice renders correctly with all the proper 'choices' and corresponding

Re: [Wicket-user] Panel parameters

2006-02-10 Thread Eelco Hillenius
The closing of the session is not so much of a problem. The problem is that those objects themselve hold references to the session when they have lazy collections (which is the default in Hibernate 3+). And that session is stale after the request (as you close the session). I'm not sure whether th

Re: [Wicket-user] Panel parameters

2006-02-10 Thread VGJ
I am keeping references of the objects though...as I am passing the objects around, not just references to some of the properties of the object(s).As I understand it, however, closing the Session in a Filter will ensure that the session gets closed at the proper time and I should not have a problem

Re: [Wicket-user] Wicket 1.2 ?

2006-02-10 Thread Piotr Bzdyl
Hello, Thanks for your offer, but that is really something for the publisher to decide. When the time comes, we might propose such a thing on this list. But at this time, we are just not far enough with the book. I am one more interested in the book proofreading :) Best regards, Piotr

Re: [Wicket-user] Panel parameters

2006-02-10 Thread Eelco Hillenius
Yeah, even though there are this disadvantages, it is a really good idea to use detachable models when you work with Hibernate. Or unproxy your objects before you keep them as state. In fact, the example that you gave would be fine, as you are not holding the actual hibernate object, but just get

Re: [Wicket-user] Panel parameters

2006-02-10 Thread Eelco Hillenius
What we want is a generic model. IModel> etc. Eelco On 2/10/06, VGJ <[EMAIL PROTECTED]> wrote: > You'll have to forgive my ignorance as I've only been using Java for about a > year, but - why can't generics be used? Wouldn't you still be able to use a > List without supplying a type (i.e. new A

Re: [Wicket-user] Checkbox in nested ListView

2006-02-10 Thread Eelco Hillenius
It's mentioned here: http://wicket-wiki.org.uk/wiki/index.php/Listviews_in_a_form Eelco On 2/10/06, Mats Norén <[EMAIL PROTECTED]> wrote: > On 2/10/06, karthik Guru <[EMAIL PROTECTED]> wrote: > > // Just create a new table, which will be put into the > > current cell > >l

Re: [Wicket-user] Panel parameters

2006-02-10 Thread VGJ
Ugh...not sure I like that solution...you described exactly why too.I'm using Hibernate and I'm opening my sessions in my DAO layer and closing them w/ a Filter...will this still affect me (i.e. stale sessions)??  I just started using Wicket yesterday so I'm a poppin-fresh newbie. On 2/10/06, Eelco

Re: [Wicket-user] Panel parameters

2006-02-10 Thread VGJ
You'll have to forgive my ignorance as I've only been using Java for about a year, but - why can't generics be used?  Wouldn't you still be able to use a List without supplying a type (i.e. new ArrayList() vs. new ArrayList()) - thus making it backward-compatible?  I've only really gotten serious a

Re: [Wicket-user] Panel parameters

2006-02-10 Thread Eelco Hillenius
There are, but it is undecided yet. It won't happen for 1.x, because we want to support all the people that are using Wicket now with JDK 1.4. For 2.0 that might be another question, which still has to be decided upon - but which at least has a few proponents, including yours truely. Eelco On 2/

Re: [Wicket-user] Wicket 1.2 ?

2006-02-10 Thread Alexandru Popescu
#: Eelco Hillenius changed the world a bit at a time by saying (astral date: 2/10/2006 6:31 PM) :# That's exactly what we did. And we made a simple - but for many cases useful - reference implementation in project wicket-auth-roles/ wicket-auth-roles-examples. Not completely done but, but far en

Re: [Wicket-user] Panel parameters

2006-02-10 Thread Mats Norén
Are there any thoughts about using generics? On 2/10/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Yep, that's it. Instead of passing your domain object directly, you > might consider putting it behind a IModel instance: > > public class HeaderPanel extends Panel > { >public HeaderPanel

Re: [Wicket-user] Checkbox in nested ListView

2006-02-10 Thread Mats Norén
On 2/10/06, karthik Guru <[EMAIL PROTECTED]> wrote: > // Just create a new table, which will be put into the > current cell >listItem.add(new CheckBox("selected", new > PropertyModel(listItem.getModelObject(), "selected"))); >} >}); > > Is

Re: [Wicket-user] Checkbox in nested ListView

2006-02-10 Thread Mats Norén
On 2/10/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > And remember to set optimizeItemRemoval to true when you work with > ListViews in Forms. Where? > > Eelco > > > On 2/10/06, karthik Guru <[EMAIL PROTECTED]> wrote: > > // Just create a new table, which will be put into the > > current cell

Re: [Wicket-user] Panel parameters

2006-02-10 Thread Eelco Hillenius
Yep, that's it. Instead of passing your domain object directly, you might consider putting it behind a IModel instance: public class HeaderPanel extends Panel { public HeaderPanel(String id, IModel blog) { super(id); add(new Label("name", new PropertyMo

Re: [Wicket-user] Wicket ajax modal dialog

2006-02-10 Thread Eelco Hillenius
Ah, that explains it :) I've opened up an issue for working with page maps: http://sourceforge.net/tracker/index.php?func=detail&aid=1428624&group_id=119783&atid=684978 The first fix is in, but we might do some more refactoring to get things a bit more secure and strong typed before we are done.

Re: [Wicket-user] Checkbox in nested ListView

2006-02-10 Thread Eelco Hillenius
And remember to set optimizeItemRemoval to true when you work with ListViews in Forms. Eelco On 2/10/06, karthik Guru <[EMAIL PROTECTED]> wrote: > // Just create a new table, which will be put into the > current cell >listItem.add(new CheckBox("selected", new > PropertyMo

Re: [Wicket-user] Persistent data in the browser (cookies)

2006-02-10 Thread Igor Vaynberg
you can access the request cycleRequestCycle.get()and from there access the request and the cookies.-IgorOn 2/10/06, Mark Derricutt <[EMAIL PROTECTED]> wrote:On 2/11/06, Juergen Donnerstag < [EMAIL PROTECTED]> wrote:> But you don't persist the form. What you did is almost what> setPersistent() as

Re: [Wicket-user] Panel parameters

2006-02-10 Thread Igor Vaynberg
yes, you are on the right track. in wicket the simplest solution is usually the right one.-IgorOn 2/10/06, V. Jenks < [EMAIL PROTECTED]> wrote:I'm having a little trouble understanding how to use Panels correctly. I'm trying to convert a JSP that has many JSP 2.0 tagfile "includes" ofwhich I pass o

Re: [Wicket-user] Wicket 1.2 ?

2006-02-10 Thread Eelco Hillenius
That's exactly what we did. And we made a simple - but for many cases useful - reference implementation in project wicket-auth-roles/ wicket-auth-roles-examples. Not completely done but, but far enough to get people started and to provde that the basic mechanism of IAuthorizationStrategy works.. E

Re: [Wicket-user] Persistent data in the browser (cookies)

2006-02-10 Thread Mark Derricutt
On 2/11/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote: > But you don't persist the form. What you did is almost what > setPersistent() as well. As I mentioned, only the values of the > formcomponent, not the form is stored in the cookies. Ok, got that. But I still don't see a means to read th

[Wicket-user] Re: Pethate - long urls

2006-02-10 Thread Gili
You're right. In the case where account name is encoded into the URL and Google manages to index it somehow (i.e. there is no password required) then we'll definitely see problems. Maybe we should just add BookmarkablePageRequestTargetUrlCodingStrategy.excludeArgument(String queryParamete

[Wicket-user] Panel parameters

2006-02-10 Thread V. Jenks
I'm having a little trouble understanding how to use Panels correctly. I'm trying to convert a JSP that has many JSP 2.0 tagfile "includes" of which I pass objects into so they can display some of the data that the "master" JSP tag displays. In Wicket, I've re-created the tagfiles as Panels and I

Re: [Wicket-user] Re: Pethate - long urls

2006-02-10 Thread John Patterson
On Friday 10 Feb 2006 01:04, Gili wrote: > For example, if you have a multi-page image gallery, specifying page=0 > would be optional, since it is the default page that gets viewed unless > you specify otherwise. > Again, generally all parameters passed to a page are passed for a reason - t

Re: [Wicket-user] Wicket 1.2 ?

2006-02-10 Thread Alexandru Popescu
#: Eelco Hillenius changed the world a bit at a time by saying (astral date: 2/9/2006 8:10 AM) :# On second thought, please do volunteer. I was informed that we actually need a couple of proof readers pretty soon. I'll contact you about this later. Thanks! Eelco Hope I am still on your list

Re: [Wicket-user] Wicket 1.2 ?

2006-02-10 Thread Alexandru Popescu
#: Igor Vaynberg changed the world a bit at a time by saying (astral date: 2/9/2006 6:46 PM) :# the problem with writing integration for acegi is that its such a beast. there is a 1000 ways to integrate with it, so how can we write a single authentication implementation that can handle all 1000

Re: [Wicket-user] Persistent data in the browser (cookies)

2006-02-10 Thread Juergen Donnerstag
On 2/10/06, Mark Derricutt <[EMAIL PROTECTED]> wrote: > On 2/10/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote: > > > I'd have to look a little deeper into it, but as far as I remember we > > already allow to encrypt/decrypt the password. And BTW only the > > The problem there is that I don't rea

Re: [Wicket-user] Checkbox in nested ListView

2006-02-10 Thread karthik Guru
// Just create a new table, which will be put into the current cell listItem.add(new CheckBox("selected", new PropertyModel(listItem.getModelObject(), "selected"))); } }); Is this the problem? (you had getModel( ) in your code) I remember ha

Re: [Wicket-user] Persistent data in the browser (cookies)

2006-02-10 Thread Mark Derricutt
On 2/10/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote: > I'd have to look a little deeper into it, but as far as I remember we > already allow to encrypt/decrypt the password. And BTW only the The problem there is that I don't really want to persist the form. As (I guess) the only way to get

[Wicket-user] Re: Persistent data in the browser (cookies)

2006-02-10 Thread Mark Derricutt
On 2/10/06, Mark Derricutt <[EMAIL PROTECTED]> wrote: > So basically I'm wanting an arbitrary way of getting/setting cookies > from any Page, or other part of wicket. Ok so I'm now storing a cookie with: Cookie cookie = new Cookie("username", username); cookie.setMaxAge((int) Duration.ONE_WEEK.g

Re: [Wicket-user] AJAX unable to determine markup question.

2006-02-10 Thread Juergen Donnerstag
There has been a ListItem/AjaxHandler issue which I haven't fixed yet. As Bryns Page seems not to contain any ListViews etc. it should work. I'd need a junit test case to take a closer look at it. Bryn: might you sending me one? Juergen On 2/10/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > you

Re: [Wicket-user] Persistent data in the browser (cookies)

2006-02-10 Thread Juergen Donnerstag
I'd have to look a little deeper into it, but as far as I remember we already allow to encrypt/decrypt the password. And BTW only the content of the formcomponent is stored in the cookies, nothing else. What probably is not covered is that you mix/match/modify the formcomponents to be persisted. J

[Wicket-user] Persistent data in the browser (cookies)

2006-02-10 Thread Mark Derricutt
Hey all, got a question about persistent data/cookies. I see you can call setPersistent() on a FormComponent object, but in my current way of thinking this wouldn't really help as I don't have arbitrary access to the form. What I'm wanting to do is set a cookie in the brower with a username+passw

Re: [Wicket-user] Wicket ajax modal dialog

2006-02-10 Thread Matej Knopp
Why do you think so? It is intentional. It allows you to show another modal (nested) dialog. Only thing that is a problem is that doing this several times can result in page expiration error, when returning back. Therefore I'd like to put the page in modal dialog in separate pagemap and after th