in your domain model.
..So where am I missing the point? :)
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Models-and-panel-updates-tp2290043p2291094.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
Hi,
>I think you mean that I need to use the PanelDetails class as a model,
and create all the properties in it.
it's not necessary to copy all properties to the panel. A
CompoundPropertyModel doesn't care where it gets its properties from. As
I have written, the following should work:
Sven, thank you.
I had a look at the Ajax example. I think you mean that I need to use
the PanelDetails class as a model, and create all the properties in
it. This is very verbose as the Product class contains many fields
that I need to edit, and adding getters/setters to the PanelDetails
class wil
Hi,
please see EditableLabelPage.java in wicket-examples for AjaxEditableLabels
working with a CompoundPropertyModel.
Why would the reference be outdated, since ProperyModel is considered dynamic
module ?
PropertyModel is dynamic in the property it provides, but it is hard-wired on
the obj
Sven,
thank you, but it worked when using this ?
add(new Label("codProduct"));
Is there an easy way to update the default model And the
AjaxEditableLabel in the similar fasion? Nice to have an example.
Why would the reference be outdated, since ProperyModel is considered
dynamic module ?
Thank
Hi,
it's the "outdated reference" problem (as often when something goes
wrong with models):
new PropertyModel(getDefaultModel(), "codProduct"))
Note that you're putting the current default model into another model.
Later on you change the default model:
setDefaultModel(new CompoundProper
Hello Martrin, and Ernesto,
it's still not working. I have this ProductPanel to be updated and
(possibly edited). It shows the product info when an item is clicked.
Here's the code for the Product Panel:
public class ProductDetails extends Panel {
@EJB
private ProductServicesLocal
you need to add the updated panel into target:
target.addComponent(panelToBeUpdated);
2010/7/15 Mansour Al Akeel :
> I just tried it. It doesn't update the panel. Here's the full code:
>
> public class ProductDetails extends Panel {
>
> �...@ejb
> private ProductServicesLocal produ
Do you mean update the whole panel when you edit the "codProduct"?
Ernesto
On Thu, Jul 15, 2010 at 2:41 PM, Mansour Al Akeel
wrote:
> I just tried it. It doesn't update the panel. Here's the full code:
>
> public class ProductDetails extends Panel {
>
> �...@ejb
> private ProductSer
I just tried it. It doesn't update the panel. Here's the full code:
public class ProductDetails extends Panel {
@EJB
private ProductServicesLocal productServices;
public ProductDetails(String id, final Product product) {
super(id);
setOutpu
If you look at the source code for AjaxEditableLabel you could've seen
that it is not suited for CompoundPropertyModel usage. Because the
editor requires two components: a label and an input box, which are
both created with "label" ,resp. "editor" component identifiers, which
both bind to the defau
can you try
add(new AjaxEditableLabel("codProduct", new
PropertyModel(product, "codProduct"));
Ernesto
On Thu, Jul 15, 2010 at 2:08 PM, Mansour Al Akeel
wrote:
> Hello all, I have been trying to resolve this issue. I have a panel
> that shows a product info.
>
> public class ProductDetails ext
so what should I use in this case?
can you give me an example, to update the panel and have ajax fields ?
On Thu, Jul 15, 2010 at 3:17 PM, Martin Makundi
wrote:
> Hi!
>
> I would dis-advice you using compoundpropertymodel. Dropping it will
> make everything more explicit and clear all your probl
Hi!
I would dis-advice you using compoundpropertymodel. Dropping it will
make everything more explicit and clear all your problems. Using
compoundpropertymodel you will get all kinds of surprises.. sometimes,
and spend lot of extra time resolving.
**
Martin
2010/7/15 Mansour Al Akeel :
> Hello a
Hello all, I have been trying to resolve this issue. I have a panel
that shows a product info.
public class ProductDetails extends Panel {
public ProductDetails(String id, final Product product) {
super(id);
setOutputMarkupId(true);
this.set
15 matches
Mail list logo