[Wicket-user] beginner: question on model

2005-12-22 Thread karthik Guru
What is typically held as instance variable in the Page class? - the property that am actually interested in / component that updates the property. Say I have a page with a Form and a TextField as follows. public class Login extends WebPage { privateTextField userIdField;public Login() {Form

Re: [Wicket-user] Re: wicket bug

2005-12-22 Thread Juergen Donnerstag
I don't think we can check if the component already has a parent and then just throw an exception.. Because it could be reusing components/panels and he wants to move if from X to Y And if we do parent = null during remove() and replace()? If we can not throw an exception, than add() is

Re: [Wicket-user] Re: wicket bug

2005-12-22 Thread Johan Compagner
remove the parent reference? That already happens because we set an other parent ofcourse.But just do it as swing does this is swing/awt code: /* Reparent the component and tidy up the tree's state. */ if ( comp.parent != null) { comp.parent.remove(comp);So that is exactly what i did type. Then

Re: [Wicket-user] beginner: question on model

2005-12-22 Thread Johan Compagner
There could be a third approach and that is holding the model as a reference.Then versioning would go fine if you use it for formcomponents (switched of by default) so that is not a problem in the second approach you do what i think most people are doing.johanOn 12/22/05, karthik Guru [EMAIL

Re: [Wicket-user] Re: wicket bug

2005-12-22 Thread Juergen Donnerstag
You mentioned that throwing an exception won't work because if Components are moved around (for whatever reason), the markupContainer.parent could already be set. IMO Wicket should do markupContainer.parent = null whenever we remove a Component from the hierarchy and that happens in

Re: [Wicket-user] Re: wicket bug

2005-12-22 Thread Johan Compagner
for the component itself we already do that: // Component is removed component.setParent(null);But ofcourse this could not be the case that the component itself is not removed but a parent of it and he is reused instead of its parent. But this is pretty far fetched don't think this will happen a

Re: [Wicket-user] Re: wicket bug

2005-12-22 Thread Juergen Donnerstag
On 12/22/05, Johan Compagner [EMAIL PROTECTED] wrote: for the component itself we already do that: // Component is removed component.setParent(null); But ofcourse this could not be the case that the component itself is not removed but a parent of it and he is reused instead of

Re: [Wicket-user] beginner: question on model

2005-12-22 Thread Eelco Hillenius
I agree with Johan. Wicket does not restrict you, and it is generally easy to work with page instance variables etc. However, espectially for larger apps, it works better if you work with proper models (like a model that holds a user which you set on the page, and then the property model that

[Wicket-user] beginner: questions on 'path=xyz', development mode, versioning.

2005-12-22 Thread karthik Guru
I tried searching the mailing list archives and somehow am not able to find a satisfying answer to my questions. 1. What is path=some_number that i see in the URL. I see it incrementing. But I dont understand what that is. How does it relate to PageMap ? Igor replied that PageMap is where wicket

Re: [Wicket-user] beginner: questions on 'path=xyz', development mode, versioning.

2005-12-22 Thread Johan Compagner
1 the number is the page number of the page that is in a pagemap You can see it as the the first component id of the tree.2 no it checks for markup changes. if you change a class in developerment then that is the responsibitiy of youre IDE that you use (eclipse/netbeans) to hotswap the class

[Wicket-user] Re: Safari caching

2005-12-22 Thread Ralf Ebert
Hi, I tried to investigate this problem a bit further after a user complaining about a bug which seems to be related to this (I found exceptions in the log like No component found for 1:xxx:3:linkYyy). This is very strange, Safari caches all pages which only have a ?path=xxx page (when going back

[Wicket-user] After redirection doRender() still called

2005-12-22 Thread John Patterson
Hi Wicketeers, I have a page which can only be viewed if the user is logged in. If the user is not logged in then checkAccess() redirects to a sign in page and returns false. I moved my page building code to the onBeginRequest() method so that it is only called when it is really needed (ie

Re: [Wicket-user] After redirection doRender() still called

2005-12-22 Thread Juergen Donnerstag
Bookmarkable pages are the only one that come into my mind. Juergen On 12/22/05, John Patterson [EMAIL PROTECTED] wrote: Hi Wicketeers, I have a page which can only be viewed if the user is logged in. If the user is not logged in then checkAccess() redirects to a sign in page and returns

Re: [Wicket-user] After redirection doRender() still called

2005-12-22 Thread Johan Compagner
in 1.2 checkAccess() is not called in doRender any more but before it.But ofcourse the constructor is always called. If you don't want that then you need some kind of factory.What you could do is do the construction in the checkAccess() method but dont know if that is very nice way.. johanOn

Re: [Wicket-user] Special characters in form TextFields and TextAreas

2005-12-22 Thread Johan Compagner
for this i don't think it doesn't matter much where the files are encoded in on disc.Only if you need to store those chars also in the template file you can store them as utf on disc.I just tried the guestbook and youre char on our test site:

Re: [Wicket-user] Re: Safari caching

2005-12-22 Thread Johan Compagner
can you tweak header cache settings somehow?configureResponse of page and then using a WebResponse object.The problem is if you use redirect_to_buffer you don't have a webresponse object when rendering i think. So you can't really set the headers currentlyjohanOn 12/22/05, Ralf Ebert [EMAIL

[Wicket-user] Using POJO as Model - is this right?

2005-12-22 Thread Joshua Lim
Hi I have a question about using POJO as Models in wicket. BTW, love the framework ! I am using Hibernate 3 and Wicket 1.1 I've got 2 POJO : Contestant -1:n- Design. I have a page which lets a Contestant uploads a bunch of images and each of these images are stored as Blobs in a database. Each

Re: [Wicket-user] Special characters in form TextFields and TextAreas

2005-12-22 Thread Christian Essl
Thanks Johan, That's right it works on the test-site. Must be some setup problem on my computer, which is strange because I run the examples directly with StartExamples. Christian On Fri, 23 Dec 2005 00:18:12 +0100, Johan Compagner [EMAIL PROTECTED] wrote: for this i don't think it

Re: [Wicket-user] Using POJO as Model - is this right?

2005-12-22 Thread Maurice Marrink
You could always use a different model (containing just the fileupload object) for the fileupload and the compoundmodel for the rest of the form. then in the onsubmit you could get both models set the blob on your pojo and save it. this way you can keep your pojo clean. Maurice 2005/12/23,