Re: Copy Form Fields

2009-06-07 Thread hill180
This might not be the best solutions (new to wicket/java) but I posted if it might help: This way, I was able to copy the fields and save correctly to my Hibernate POJO. package com.myapp.wicket; import org.apache.wicket.behavior.AttributeAppender; import

Re: Copy Form Fields

2009-06-04 Thread Eyal Golan
hhhmm... I'm not a Hibernate expert, but what if your POJO will be detached? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Jun 3, 2009 at

Re: Copy Form Fields

2009-06-03 Thread hill180
apparently no. it may just be my understanding. Because the modal is from a compoundproperty that is a hibernate POJO, this will copy what is in the database over, not what is in the field over. I hope I am explaining myself. -jose On Jun 1, 2009, at 8:25 AM, Eyal Golan wrote: I

Re: Copy Form Fields

2009-06-01 Thread Eyal Golan
I'm not sure, but give it a try: In the onClick, set the property address2 to be the same as property address1. Add myAddress2 to the target. If you use compoundpropertymodel, it should work. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn:

Re: Copy Form Fields

2009-06-01 Thread hill180
AjaxLink link = new AjaxLink(copyAddress){ @Override public void onClick(AjaxRequestTarget target) { myAddress2.setModelObject(myAddress1.getValue()); target.addComponent(myAddress2); } };//end of

Re: Copy Form Fields

2009-06-01 Thread Eyal Golan
I though more something like this: AjaxLink link = new AjaxLink(copyAddress){ @Override public void onClick(AjaxRequestTarget target) { this.address2 = this.address1; target.addComponent(myAddress2); }

Copy Form Fields

2009-05-31 Thread hill180
I have looked through the archives and there were a couple references to this question but no examples and I was hoping for some help. I have a form with Address One and Address Two, I have a link that I just want to copy the data over. I am thinking it should use Javascript, but I am new