can you try add(new AjaxEditableLabel<String>("codProduct", new PropertyModel<String?>(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. > > public class ProductDetails extends Panel { > > public ProductDetails(String id, final Product product) { > super(id); > setOutputMarkupId(true); > this.setCurrentProduct(product); > add(new Label("id")); > add(new Label("codProduct")); > add(new AjaxLink<String>("save") { > �...@override > public void onClick(AjaxRequestTarget target) { > System.out.println("saving product .... "); > } > }); > } > public void setCurrentProduct(Product product) { > setDefaultModel(new CompoundPropertyModel<Product>(product)); > } > } > > > when ever I click a link to update the product panel using ajax link, > I get the correct info displayed. However, I need to be able to edit > the labels in the panel. So I used : > > add(new AjaxEditableLabel<String>("codProduct")); > > I get this: > > WicketMessage: No get method defined for class: class > rentals.entities.Product expression: label > > In a previous thread, I was advised to use CompoundPropertyModel, and > I think it's easier, but why I am getting this ? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org