://apache-wicket.1842946.n4.nabble.com/Models-and-panel-updates-tp2290043p2291094.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional
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);
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
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
martin.maku...@koodaripalvelut.com wrote:
Hi!
I would dis-advice you using compoundpropertymodel. Dropping it will
make everything more
can you try
add(new AjaxEditableLabelString(codProduct, new
PropertyModelString?(product, codProduct));
Ernesto
On Thu, Jul 15, 2010 at 2:08 PM, Mansour Al Akeel
mansour.alak...@gmail.com wrote:
Hello all, I have been trying to resolve this issue. I have a panel
that shows a product info.
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 default
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);
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
mansour.alak...@gmail.com wrote:
I just tried it. It doesn't update the panel. Here's the full code:
public class ProductDetails extends Panel {
�...@ejb
you need to add the updated panel into target:
target.addComponent(panelToBeUpdated);
2010/7/15 Mansour Al Akeel mansour.alak...@gmail.com:
I just tried it. It doesn't update the panel. Here's the full code:
public class ProductDetails extends Panel {
�...@ejb
private
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
Hi,
it's the outdated reference problem (as often when something goes
wrong with models):
new PropertyModelString(getDefaultModel(), codProduct))
Note that you're putting the current default model into another model.
Later on you change the default model:
setDefaultModel(new
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,
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
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
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:
15 matches
Mail list logo