HashMap.Entry not serializable?

2009-07-18 Thread Martin Makundi
Hi! I am a bit onfused.. I have new ListView(id, new LinkedList(hashMap.entrySet())) and Wicket gives: org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: Unable to serialize class: java.util.HashMap$Entry This does not make sense, I would expect hashmap entries to be

Re: How to show/hide, enable/disable items in menu based on YUI menu2

2009-07-18 Thread Joshua Lim
updated menubar with menuitems check/disable/selected options it should work on FF at least. josh 2009/7/17 Petr Fejfar petr.fej...@gmail.com On Thu, Jul 16, 2009 at 11:43 PM, Petr Fejfarpetr.fej...@gmail.com wrote: tries to be compatible with. Please find out attached table - maybe it

Re: PropertyModel doesnt update bean

2009-07-18 Thread granola
the main reason why it doesnt work is pretty much simple. there is no point in your code where the textfield input is send to the server to put that into the beans variable. u declared an ajax save button, but how should the ajax request send to the server through this button know what to to. the

error(validatable)

2009-07-18 Thread Kenneth NA
Let's rephrase my problem. I connect a validator to a TextField in a DataView (inside populateItem() and connect a ComponentFeedbackPanel to it. final TextField tf = new TextField(data, new PropertyModel(row, data)); final ComponentFeedbackPanel

RE: error(validatable)

2009-07-18 Thread Russell Simpkins
Kenneth, I over rode onError when I used the ComponentFeedbackPanel - when learning Wicket, I discovered that I had no idea my form errored out unless I did the following for my form. In this instance, I'm using the AjaxButton. I think the key is to add your feedback component to the target.

RE: HashMap.Entry not serializable?

2009-07-18 Thread Russell Simpkins
hashMap.entrySet returns a SetMap.Entry If you look at the javadocs, Set does not extend Serializable: public interface Setextends Collection All Superinterfaces:Collection, Iterable Date: Sat, 18 Jul 2009 13:06:32 +0300 Subject: HashMap.Entry not

RE: error(validatable)

2009-07-18 Thread Kenneth NA
Thanks for the information. But if I don't have an Ajax button but a normal Button which submits the form? There is no target variable in the onValidate() method. I attached a quickstart earlier, where I showed that if I use Ajax onblur/onchange and use onError/onUpdate there i nor

RE: What already redirecting error?

2009-07-18 Thread Russell Simpkins
Martin, You could try setting step debugging on your IDE and step through your code. However, this type of error is not specific to wicket. Just the other day I was securing my site with Acegi and caused this to happen when I secured all pages, including my login.htm page - so, when Acegi

Re: HashMap.Entry not serializable?

2009-07-18 Thread Johan Compagner
nope you cant serialize entries. hashmap do there own custom serialization (just key/value) and they dont serialize the internal structure to that data (the entries) Thats why Entry is not serializeable johan On Sat, Jul 18, 2009 at 12:06, Martin Makundi martin.maku...@koodaripalvelut.com

Re: HashMap.Entry not serializable?

2009-07-18 Thread vineet semwal
keys,values are serializable but entry itself isn't . quick solution is to use LDM. regards, Vineet Semwal On Sat, Jul 18, 2009 at 3:36 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I am a bit onfused.. I have new ListView(id, new LinkedList(hashMap.entrySet())) and

Re: HashMap.Entry not serializable?

2009-07-18 Thread vineet semwal
Russell, Set,List,Map do not implement Serializable but their implementations do. In the case of Entry ,it's implemented in Map implementations like hashmap . the class which implements Entry there isn't Serializable. regards, Vineet Semwal On Sat, Jul 18, 2009 at 5:22 PM, Russell Simpkins

RE: HashMap.Entry not serializable?

2009-07-18 Thread Russell Simpkins
True, but if he does not cast his reference to the underlying implementation, the jvm has no way to know that the underlying implementation is serializable does it, hence the error. All the calling method knows is that you passed a Set and Set does not extend Serializable.

Re: HashMap.Entry not serializable?

2009-07-18 Thread Martin Makundi
Veery strange... what is LDM? ** Martin 2009/7/18 vineet semwal vineetsemwal1...@gmail.com: keys,values are serializable but entry itself isn't . quick solution is to use LDM. regards, Vineet Semwal On Sat, Jul 18, 2009 at 3:36 PM, Martin Makundi martin.maku...@koodaripalvelut.com

Re: What already redirecting error?

2009-07-18 Thread Martin Makundi
Hi! You could try setting step debugging on your IDE and step through your code. Production code again... hindsight. However, this type of error is not specific to wicket. Just the other day I was securing my site with Acegi and caused this to happen when I secured all pages, including

Re: HashMap.Entry not serializable?

2009-07-18 Thread vineet semwal
SetIntegerset=new HashSetInteger(); set.add(new Integer(1)); try serializing above set ,you won't see any problem. you serialize a object and not interface. set in above case is a reference to HashSet instance so jvm knows it. again,Entry is not serializable ,don't confuse the problem with

Re: HashMap.Entry not serializable?

2009-07-18 Thread vineet semwal
loadable detachable model On Sat, Jul 18, 2009 at 7:24 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Veery strange... what is LDM? ** Martin 2009/7/18 vineet semwal vineetsemwal1...@gmail.com: keys,values are serializable but entry itself isn't . quick solution is to

Dynamic fields in form

2009-07-18 Thread Agus Purnomo
Hello. I'm currently learning Wicket by converting my previous JSP site to Wicket. In my previous site, I have a product detail forms for the user to enter the detail of a specific product. This kind of detail differs for each category of products (e.g. a CPU has different detail with a

Re: error(validatable)

2009-07-18 Thread Igor Vaynberg
you have to set an itemreusestrategy to reuse dataview items, otherwise they are replaced by new ones every request and you lose your feedback panel instance. -igor On Sat, Jul 18, 2009 at 3:32 AM, Kenneth NArinoc...@live.se wrote: Let's rephrase my problem. I connect a validator to a

Re: Dynamic fields in form

2009-07-18 Thread Igor Vaynberg
create two different panels or fragments that contain form components for cpu or motherboard, then simply add the correct one to the form. -igor On Sat, Jul 18, 2009 at 9:03 AM, Agus Purnomofurunom...@gmail.com wrote: Hello. I'm currently learning Wicket by converting my previous JSP site to

Re: Dynamic fields in form

2009-07-18 Thread Agus Purnomo
Well, the problem is, the category itself is dynamic, here's (a simplified version) my database structure : --- Table : Products --- id / bigint / PK name / varchar --- Table : Categories --- id / bigint / PK name / varchar --- Table : Fields --- id / bigint / PK name / varchar category_id /

Re: Dynamic fields in form

2009-07-18 Thread Agus Purnomo
oh I forgot to write this field in the products table : category_id / bigint / FK from Categories.id

Re: Dynamic fields in form

2009-07-18 Thread Igor Vaynberg
then you can create a panel per field type and add all the right fields using a repeater. so have a textpanel, selectpanel, etc. add them into RepeatingView. -igor On Sat, Jul 18, 2009 at 9:26 AM, Agus Purnomofurunom...@gmail.com wrote: oh I forgot to write this field in the products table :

Re: Dynamic fields in form

2009-07-18 Thread Agus Purnomo
Ow yeah... Looks like I can get away with this : === ProductEdit.html === form wicket:id=productEditForm table width=100% cellpadding=0 cellspacing=5 tr valign=top wicket:id=productDetailList tdspan wicket:id=fieldNameFIELD_NAME/span/td tdinput type=text

Re: Dynamic fields in form

2009-07-18 Thread Daniel Toffetti
Agus Purnomo furunomail at gmail.com writes: ... etc etc etc ... Is this good enough? Well, at least this works and simple enough to me... Anyone has better solutions? I don't know if it's a better solution, perhaps just an alternative, have you taken a look at Wicket Web Beans ?

Re: Dynamic fields in form

2009-07-18 Thread Igor Vaynberg
i would use repeatingview rather then the listview, or at least call listview.setreuseitems(true) -igor On Sat, Jul 18, 2009 at 10:31 AM, Agus Purnomofurunom...@gmail.com wrote: Ow yeah... Looks like I can get away with this : === ProductEdit.html === form wicket:id=productEditForm    

Application Destroy

2009-07-18 Thread Joshua Martin
Is there a method I can override for when the Wicket Web Application is undeployed? -- _ Joshua S. Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands,

Re: Application Destroy

2009-07-18 Thread Adrian Merrall
Joshua, Do you mean destroyed or undeployed? You can override onDestroy() in your Wicket Application class and this will be triggered when your wicket application is stopped as part of being undeployed. But if it were stopped then undeployed I'm not sure how you could be notified of the undeploy

Re: Application Destroy

2009-07-18 Thread Joshua Martin
This is exactly what I needed! I needed to prevent a memory leak related to JXTA and this is the perfect place to perform at manager.stopNetwork(); On Sat, Jul 18, 2009 at 8:19 PM, Adrian Merrallpigeonra...@gmail.com wrote: Joshua, Do you mean destroyed or undeployed? You can override