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 to wicket and not sure how to implement.

The textfields are a compound property model which is hitting a hibernate POJO.


private static class AddressPanel extends Panel
          {
        
            public AddressPanel(String id, Form f,final AssociateDB a)
            {
              super(id);
final TextField myAddress1 = new TextField("Address1"); // First Address
              add(myAddress1);
final TextField myAddress2 = new TextField("Address2"); // First Address
                 myAddress2.setOutputMarkupId(true);
                add(myAddress2);

        
            Link link = new Link("copyAddress"){
            @Override
//TODO ADD JAVASCRIPT COPY, FAILS TO SAVE BEFORE COPY OF DATA
            public void onClick() {

            }

            };



        add(link);
            }
        
          };

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to