Hi, If i remove override setObject/getObject doesn´t work, this works when i remove setDefaultFormProcessing Em 10-04-2012 08:30, Martin Grigorov escreveu: Hi, On Mon, Apr 9, 2012 at 6:50 PM, Frederico Rodrigues <frederico_rodrig...@ano.pt> wrote:HelloI have implement wicket wizard, but i have a small problem, i have an ajaxbutton and i want update the model, but only have success with this when i call processInput() inside the onclick event, there is another solution for this? i don´t want to call processInput() for all components inside the form. my code: public ClientStep(IDynamicWizardStep step,String label) { super(step); .... IModel<Client> model= new Model<Client>(client); setSummaryModel(new StringResourceModel("client.summary", this, model)); . final TextField<String> field= new TextField<String>("client.field",new PropertyModel<String>(client, "field"){ @Override public String getObject() { return client.getField(); } @Override public void setObject(String object) { client.setField(object); }No need to override setObject/getObject. PropertyModel does this for you.}); clientContainer.add(nif); AjaxButton fieldSearch=new AjaxButton("fieldSearch"){ @Override protected void onSubmit(AjaxRequestTarget art, Form<?> form) { // field.processInput(); Client=... art.add(clientContainer); } @Override protected void onError(AjaxRequestTarget art, Form<?> form) { } }; fieldSearch.setDefaultFormProcessing(false);The problem is in the above line. It says "just call button's #onSubmit() without actually doing the submit.clientContainer.add(fieldSearch); ................................................................. public NewContract(String id) { super(id); setDefaultModel(new CompoundPropertyModel<NewContract>(this)); DynamicWizardModel model = new DynamicWizardModel(new ClientStep(null,"client")); // initialize the wizard with the wizard model we just built init(model); } ************************************************ thanks Frederico Rodrigues --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --
Com os
melhores cumprimentos,
Frederico Rodrigues | Programador ano
- Sistemas de Informática e Serviços, Lda
Travessa Alferes Malheiro, 105 4000-060 PORTO, Portugal
Tel.: (+351) 222 061 580 e-mail:frederico_rodrig...@ano.pt sites: www.ano.pt | www.anogov.com |
- dynamic wizard - update model Frederico Rodrigues
- Re: dynamic wizard - update model Martin Grigorov
- Re: dynamic wizard - update model Frederico Rodrigues