Re: Forms ajax doesn't update components models
It was a Wicket 1.5-M1 bug! I made a quickstart accidentally in wicket 1.5-M2.1 and it worked. The problem is that wicket 1.5-M2 don't have HeaderContributor anymore haha. Well thanks for every body, I wanted to warn. Bye Tito 2010/10/7 Tito > I made a quickstart and it works. > > Now I'm looking for the bug in my application. > > Thanks > > Tito > > 2010/10/6 Tito > > Well thank you!! >> >> I'm going to see this. If I see another details or if I can solve I will >> tell you. >> >> Thank you very much for helping! >> >> Bye >> >> >> 2010/10/6 vov >> >> >>> Sorry, but I'm not see the problems. >>> Try to debug your isVisible method after submitting the form and find the >>> place in which this code return false. I think that >>> isVisibleInHierarchy() >>> for your RequiredTextField("patente") will have a problem >>> -- >>> View this message in context: >>> http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2964459.html >>> Sent from the Users forum mailing list archive at Nabble.com. >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >
Re: Forms ajax doesn't update components models
I made a quickstart and it works. Now I'm looking for the bug in my application. Thanks Tito 2010/10/6 Tito > Well thank you!! > > I'm going to see this. If I see another details or if I can solve I will > tell you. > > Thank you very much for helping! > > Bye > > > 2010/10/6 vov > > >> Sorry, but I'm not see the problems. >> Try to debug your isVisible method after submitting the form and find the >> place in which this code return false. I think that isVisibleInHierarchy() >> for your RequiredTextField("patente") will have a problem >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2964459.html >> Sent from the Users forum mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >
Re: Forms ajax doesn't update components models
Well thank you!! I'm going to see this. If I see another details or if I can solve I will tell you. Thank you very much for helping! Bye 2010/10/6 vov > > Sorry, but I'm not see the problems. > Try to debug your isVisible method after submitting the form and find the > place in which this code return false. I think that isVisibleInHierarchy() > for your RequiredTextField("patente") will have a problem > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2964459.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Forms ajax doesn't update components models
Sorry, but I'm not see the problems. Try to debug your isVisible method after submitting the form and find the place in which this code return false. I think that isVisibleInHierarchy() for your RequiredTextField("patente") will have a problem -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2964459.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forms ajax doesn't update components models
Sorry feedback panel error was part of my coding prune to post. I can see submit method is called but data never appear. However other data of form that is not in auto_info_panel appears in model. In your tests data of map was setting to model?? The curious case is that when I change isVisible method of Auto_Info_Panel to contenedorInfo.add(new AutoInfoPanel("auto_info_panel", model) { @Override public boolean isVisible() { return model.getObject().getTipo().equals(TipoDispositivo.AUTO) || true; } }); Form start to work. Model is full filled. Could be a wicket 1.5 problem?? did you test in wicket 1.4? Thank you! Norberto 2010/10/5 vov > > Funny:) Your code is correct and in my tests all data was setting to > model:) > In your sample code you forgot to include feedback panel, but it was added > to html. > May be in your tests you forget to input some required data - in this case > your model never updates but you also never been in your onSubmit method. > > Problem can be in any validation problem or in visibility of component or > your component can be disabled > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2955537.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Forms ajax doesn't update components models
Funny:) Your code is correct and in my tests all data was setting to model:) In your sample code you forgot to include feedback panel, but it was added to html. May be in your tests you forget to input some required data - in this case your model never updates but you also never been in your onSubmit method. Problem can be in any validation problem or in visibility of component or your component can be disabled -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2955537.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forms ajax doesn't update components models
mmm... you think is my model? Could be, but debugging wicket I found never was called setObject method of my model. I'm using wicket 1.5 I know this doesn't matter but I never mentioned. Here is my AutoInfoPanel. The idea is to update a Map that contains data. There are three maps in my auto_info_panel but I reduced this for simplicity. Three are the same. Java: public class AutoInfoPanel extends Panel { public AutoInfoPanel(String id, final IModel model) { super(id, model); add(new RequiredTextField("patente", new IModel() { @Override public void detach() { } @Override public String getObject() { return model.getObject().getInfo().get("patente"); } @Override public void setObject(String object) { model.getObject().getInfo().put("patente", object); } })); } } And HTML: Información del Automóvil: Patente:* Thanks for following this thread!! Tito 2010/10/4 vov > > Your code looks correct. > You said 'when you click "Registrar" button, data from "auto_info_panel" > don't appear in DispositivoDTO model'. > > I tried to create AutoInfoPanel like this: > > public AutoInfoPanel(String id, IModel model) > { >super(id); >add(new TextField("lastName", new PropertyModel(model, > "lastName"))); > } > ..and HTML: > >LastName > > > ..and in your onSubmit(IModel model) method i take the last > name from bean model wich I input in the form. > > Can your share your AutoInfoPanel code for better understanding the > problem? > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2953949.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Forms ajax doesn't update components models
Your code looks correct. You said 'when you click "Registrar" button, data from "auto_info_panel" don't appear in DispositivoDTO model'. I tried to create AutoInfoPanel like this: public AutoInfoPanel(String id, IModel model) { super(id); add(new TextField("lastName", new PropertyModel(model, "lastName"))); } ..and HTML: LastName ..and in your onSubmit(IModel model) method i take the last name from bean model wich I input in the form. Can your share your AutoInfoPanel code for better understanding the problem? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2953949.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forms ajax doesn't update components models
I have to submit only info of selected combo option. But i can't show entire form when combo changes because part of form is fixed. If i select auto, only info of auto_info_panel matters. The same way to persona. I don't know if you were asking that. I hope i answered correctly. Thanks! --Mensaje original-- De: vov Para: users@wicket.apache.org Responder a: users@wicket.apache.org Asunto: Re: Forms ajax doesn't update components models Enviado: 1 oct, 2010 04:19 How it currently must work? Example: Your open the page -> change your Combo to 'AUTO' -> input data to AutoInfoPanel and press 'Registrar' OR Your open the page -> change your Combo to 'AUTO' -> input data to AutoInfoPanel -> change your Combo to 'PERSONA' -> input data to PersonaInfoPanel and press 'Registrar'. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2854298.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Tito
Re: Forms ajax doesn't update components models
How it currently must work? Example: Your open the page -> change your Combo to 'AUTO' -> input data to AutoInfoPanel and press 'Registrar' OR Your open the page -> change your Combo to 'AUTO' -> input data to AutoInfoPanel -> change your Combo to 'PERSONA' -> input data to PersonaInfoPanel and press 'Registrar'. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2854298.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forms ajax doesn't update components models
Can you please share some code. Otherwise there could be tons of problem causes. Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Forms ajax doesn't update components models
Hello, I'm doing a form that adds textfields when I choose an option in a ComboBox. When Combo changes one panel become visible and other invisible. The problem is when that panel appears and I click submit button the model of it does't update. I have seen that browser submit the info, but wicket doesn't process it. I don't know if i'm doing anything wrong or is a known problem. Thank you. Excuse me for my bad English. I'm from Argentina. Norberto