HTML and Binding generator for Wicket
Hi there, I have a framework to announce that was built on top of Wicket and Wicket-Bootstrap. It applies the Naked Objects pattern to generate HTML files and the corresponding Wicket Binding for you based on your models. All the while allowing you to fully stay in control and be able to do what you are used to with Wicket and the components provided by Wicket-Bootstrap. More info at the documentation website: http://invesdwin.de/nowicket/ And on GitHub: https://github.com/subes/invesdwin-nowicket So just wanted to express my thanks to the Wicket developers and contributors who made this possible. :) And yes, I am aware of Apache Isis and especially talk about the difference between NoWicket and Apache Isis in the Introduction of the documentation. Mainly the difference is that NoWicket does not aim at going as deep as the persistence layer for the models and does not want to be a full CRUD framework. Also explaining what disadvantages that would have for wanting to stay in control. With NoWicket you actually still have your HTML files to edit and the Wicket Page and Panel implementations you can customize. NoWicket just automates the boring coding for most needs and reduces the amount of SLOC to write by a magnitude.
Re: Panel.this always giving previous version of the object but not the modified one.
Hi, If you use ModalWindow based on a Page then you have to keep a reference to that page by using openerPage.getPageReference(). Later when you need to update the opener page you have to use "pageRef.getPage()". You can see https://github.com/apache/wicket/blob/686058119dd795b3de7f2016e3e64fb8f025f813/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java for example. The problem in your case is that the opener's instance of MyTextFieldPanel is serialized when the modal window's page is opened. Later when you close the modal it works on the old version, not the latest one that is deserialized with the opener page. If you use ModalWindow with a Panel then there is no such issue. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Apr 11, 2016 at 10:42 PM, durairaj twrote: > Hi, > > > > I'm using "*new* ModalWindow.WindowClosedCallback(){}" to update the > modified value in a text field box by invoking the * target.add(* > *MyTextFieldPanel.this**)*, but it is always giving the old values. > > > I'm seeing only old values in *MyTextFieldPanel.this. * > > > Code snippet for a clear picture. > > > public class AimShuttleTextFieldPanel extends Panel > > > modalShuttleWindow.setWindowClosedCallback(new > ModalWindow.WindowClosedCallback() { > > public void onClose(AjaxRequestTarget target) { > > target.add(*MyTextFieldPanel.this*); > > onWindowClose(target); > > } > > }); > > > Any help? > > > > Thanks, >
Re: Trouble updating ListEditor with a detachable model
Do you use session.save(object) ? Should be session.saveOrUpdate(object) or session.update(object) François Le 11 avr. 2016 à 23:34, ChambreNoirea écrit : > Hi, > > I'm trying to use the ListEditor component from the Wicket in Action blog > (). I'm giving it a PropertyModel that points to "parent.children" where > parent is a LDM that loads a 'parent' from the database. It displays > properly however when I update the TextFields added to the ListItems and try > to save the parent, I get the following persistence exception > "org.hibernate.NonUniqueObjectException: a different object with the same > identifier value was already associated with the session". > > I get the feeling that this is due to the way the ListEditor handles the > model update. What would be required to adapt it to my usage? > > Many Thanks, > > CN > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Trouble-updating-ListEditor-with-a-detachable-model-tp4674272.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 >