Assuming you are using a listview or dataview to display all the customers you can simply add a link to the items, attach a label displaying the name and you have your clickable name. You could rig the link to open the popup. To get the customer data from the popup to the page i would choose to simply store the customer in the db using a form submit before closing the popup, from there you can use ajax or a simple setResponsePage to the parentpage to update its content. Alternatively if you do not yet want to store your customer you need to add it to the model of the listview. Note do not replace the listviews model but do something like ((List)model.getObject()).add(myCustomer); then you could use either ajax or setresponsepage to trigger a refresh on the parentpage.
If you are using ModalWindow as your popup you might need to add a WindowClosedCallbackHandler to redraw the listview. Maurice On Wed, Mar 5, 2008 at 9:52 PM, taygolf <[EMAIL PROTECTED]> wrote: > > I have a problem and I have thought of 2 ways to get it done but I can not > make either work nor am I sure which one is the best. > > I want the user to be able to add as many customers as they want. > > So I have thought of 2 ways to do this. > > 1) I have a link that when clicked creates a popup with all the necessary > form fields that need to be filled out to create a customer. When the the > page is submitted I want the information to be stored on the parent page in > a table. I also want the customer name to be a link so they can edit the > customer if need be. > > I have the popup working and collecting all the data but the only way I see > to get it to put the data on the parent page is with javascript and I can > not seem to get the customer name to be a wicket link. so I guess the > problem with this method is how can I get javascript to create a new wicket > link on the fly or how can I populate the parent page from the onSubmit of > the form on the popup page. > > 2) I have a link and when that link is clicked it opens a panel with all the > necessary fields that need to be filled out. For some reason I can not get > the link to add the panel to the parent page so I am stuck there. > > I would prefer option one because I think it looks cleaner. How can I fix > these issues? am I thinking in the right direction for what I want to do? If > not what do I need to be looking at? > > Thanks > > T > -- > View this message in context: > http://www.nabble.com/link-onClick-add-panel-tp15860001p15860001.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
