Hello everybody!
Hope someone can help me. I don't really understand, what I should add as
ajax target :(
So, I have an abstract class Index where I add all my panels (3) and it is
my masterlayout. I add the panels in the index class like this:
add(new ShoppingCartPanel(id, anotherMehod);
The
Hi there,
If you want to refresh the panel, call setOutputMarkupId(true) on the panel
, then add the panel to the target.
If the Ajax Link is on the same panel, you can call
this.setOutputMarkupId(true) , and you can also add MyPanel.this to the
target.
The point is , what ever you want to
Thanks for reply,
If you want to refresh the panel, call setOutputMarkupId(true) on the panel
, then add the panel to the target.
Does it mean I should call setOutputMarkUpId(true) in the constructor of the
panel? If I do so, the layout of the panel is destroyed.
If the Ajax Link is on
Hi, if you update the panel within the form, you need to update it's submit
link component outside this panel also.
onsubmit(target){
target.addComponent(formPanel);
target.addComponent(submitLinkNotNestedInsideTheFormPanel);
}
On Tue, Mar 1, 2011 at 9:51 AM, Dmitriy Neretin
No, the panel is outside! What I just want, is that the panel shows me the
result of the submit.
But I did it :)
Hier is my solution:
1. Call in the constructor of the panel setOutputMarkUpId(true);
2. Instantiate the panel Class in the abstract Class (masterlayout) as field
and return it back
Hi!
2011/3/1 Dmitriy Neretin dmitriy.nere...@googlemail.com:
Thanks for reply,
If you want to refresh the panel, call setOutputMarkupId(true) on the panel
, then add the panel to the target.
Does it mean I should call setOutputMarkUpId(true) in the constructor of the
panel? If I do so,
Hi,
always when working with PropertyModel make sure that the properties exists.
In your case it should probably be:
new PropertyModelString(this, model.object.id))
Note that using the CompoundPropertyModel as suggested earlier is much
easier.
Regards
Sven
On 07/13/2010 05:16 AM,
Sven, thank you.
But what about the ajax part.
On Tue, Jul 13, 2010 at 7:28 PM, Sven Meier s...@meiers.net wrote:
Hi,
always when working with PropertyModel make sure that the properties exists.
In your case it should probably be:
new PropertyModelString(this, model.object.id))
This one
Thank you. It worked. But I am missing something. see the comments please.
On Sun, Jul 11, 2010 at 6:35 PM, Sven Meier s...@meiers.net wrote:
Hi,
a usual error when working with models:
new PropertyModelString(model, id)
Note you're passing around a reference to the initial model.
Hi,
When I use this, the component class should provide the properties.
This part I don't understand.
PropertyModel doesn't care which object holds the property. In your code
the ProductDetails panel has a property model, that's all.
Sven
Am 12.07.2010 14:16, schrieb Mansour Al Akeel:
Thank you. I didn't know that wicket will pick the properties without
getters. I thought I have to create a getter for each property before
it's seen. Now the remaining issues:
When I use soemthing like :
add(new Label(id, new PropertyModelString(this,
model.id)));
I get an
())
make sure you detach the model that is tied to the ProductDetails. I try to
pass models across components instead of objects and let Wicket handle the
detaching.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Panel-update-with-Ajax-tp2284929p2285251.html
Sent from
Hi,
a usual error when working with models:
new PropertyModelString(model, id)
Note you're passing around a reference to the initial model. Later
updates of this member will not change any other
reference held anywhere else. You'd have to do it this way instead:
add(new
I have a panel that displays a product info :
public class ProductDetails extends Panel {
private IModelProduct model;
public ProductDetails(String id, Product product) {
super(id);
setOutputMarkupId(true);
14 matches
Mail list logo