Okay but in-line editing doesn't necessary mean you need to edit a single field at a time.
You could have the user hit an Edit button and toggle a bunch of components from labels to form fields and even toggle the Cancel button's visibility. As for your code snippet, don't you have to add to the Ajax target the parent of the panel that was switched out? target.addComponent(editPanel.getParent()); ~ Thank you, Paul Bors -----Original Message----- From: Chris Whitcomb [mailto:cwhitc...@osc.state.ny.us] Sent: Friday, July 12, 2013 7:30 AM To: users@wicket.apache.org Subject: RE: Problem with swapping panels using Ajax links I like the inline editing - that's pretty nice. However, I'm not sure my users would. I swap the panels usng replaceWith: Page page = getPage(); EditPanel editPanel = new EditPanel(ReadPanel.this.getId(), selectedDocumentModel); ReadPanel.this.replaceWith(editPanel); if(target != null){ target.addComponent(editPanel); } else { setResponsePage(page); } There are also 2 level of edit access. Depending on what group (active directory) they are in, they may be able to edit all fields or only some. I have created 2 edit panels and depending on their group membership, determine which edit panel to display. Thanks, Chris Paul Bors wrote > What do you mean by swapping panels? > > Are you using Component.replace()? > And why would you when you could do all this in-line (the same way as > the new version of Jira does it)? > > Try this live example: > 1) Log on to http://Wicket.Apache.org > 2) From under the "Learn" left navigation menu select the "Examples" > link > 3) Then the "live action" link on the page that come up > You will be redirected to http://www.wicket-library.com/ > 4) Now select the "ajax" link for examples using wicket's built-in > AJAX > 5) Select the "Editable Label Example" link that shows a label that > can be edited inline via ajax > 6) Click the "Source code" from the upper right-corner and enjoy the > simple example > > Remember that you can always use the AjaxFallback*** counterpart > components if you would like to support browsers that don't have JS > turned on (isn't this the de-facto now-a-day anyhow?). > > Have fun! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-swapping-panels-usin g-Ajax-links-tp4660211p4660229.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org