This isnt going to work for me. At least I do not think it will. Lets start
with the first issue and then move from there.

The link calls the popup which has a form. when the link is submitted I want
to add the customer info to the parent page.

You suggest storing the info in a database but that will not work for me
because they will be adding and deleting these customers a lot and i do not
want to have to call the database every time they do this. I would like to
pass the info with a model but I can not refresh the parent page because I
do not want to lose any information in any other textfield on that page.

So is there a way I can pass the model to the popup page, add the customer
info to the model, and then get that model data to show up on the parent
page without a refresh? I have this part of my code in a panel. Can I just
refresh the panel without refreshing the whole page?

After we get this done I would like to make the name of the customer a link
but i think I can handle that with no problem in the repeater.

Thanks

T


Mr Mean wrote:
> 
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/link-onClick-add-panel-tp15860001p15877182.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]

Reply via email to