Re: 3.5 Hibernate 1.1 tutorial wicketized/eclipseized
On Sun, 2010-07-04 at 21:05 -0500, David Brown wrote: Hello, I put the hib-tut.zip file in my gmail uploaded files in a directory called uploads. I don't know what u need to do to get to my uploaded files on gmail. :-David. All we need is your password ;-) Thanks for sharing ! On Sat, 2010-07-03 at 10:29 -0700, rmh1981 wrote: David Brown wrote: i have a wicketized/eclipseized hibernate 1.1 tutorial that should work out-of-the-box albeit for mysql only. Where to upload the project? Or, I can put it on my blog for download? I have been looking for a tutorial with hibernate and wicket so that would be great - if you could post the link that would be appreciated. - 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
java.lang.IllegalArgumentException: Parameter modelObject cannot be null
Hello, I am creating a form, my form has an instance variable: private Organization organisation; Also, organisation is initialized in constructor with new Organisation(). Now I am creating a TextField, that uses the propertyModel: IModelOrganization m1 = new PropertyModelOrganization(organisation, entity.name); TextFieldOrganization organisationName = new TextFieldOrganization(organisationName, m1); organisationName.setRequired(true); add(organisationName); But when I load the page, I get: java.lang.IllegalArgumentException: Parameter modelObject cannot be null I have read the docs and manuals about models etc, but this thing here is really weird..
Re: java.lang.IllegalArgumentException: Parameter modelObject cannot be null
Also entity is initalized for that organisation object. On Mon, Jul 5, 2010 at 10:36 AM, Sigmar Muuga meedi...@gmail.com wrote: Hello, I am creating a form, my form has an instance variable: private Organization organisation; Also, organisation is initialized in constructor with new Organisation(). Now I am creating a TextField, that uses the propertyModel: IModelOrganization m1 = new PropertyModelOrganization(organisation, entity.name); TextFieldOrganization organisationName = new TextFieldOrganization(organisationName, m1); organisationName.setRequired(true); add(organisationName); But when I load the page, I get: java.lang.IllegalArgumentException: Parameter modelObject cannot be null I have read the docs and manuals about models etc, but this thing here is really weird..
Re: java.lang.IllegalArgumentException: Parameter modelObject cannot be null
Is in entity the field name also initialized? Try to set it to the empty String in the initialization of entity. Am 05.07.2010 09:37, schrieb Sigmar Muuga: Also entity is initalized for that organisation object. On Mon, Jul 5, 2010 at 10:36 AM, Sigmar Muuga meedi...@gmail.com wrote: Hello, I am creating a form, my form has an instance variable: private Organization organisation; Also, organisation is initialized in constructor with new Organisation(). Now I am creating a TextField, that uses the propertyModel: IModelOrganization m1 = new PropertyModelOrganization(organisation, entity.name); TextFieldOrganization organisationName = new TextFieldOrganization(organisationName, m1); organisationName.setRequired(true); add(organisationName); But when I load the page, I get: java.lang.IllegalArgumentException: Parameter modelObject cannot be null I have read the docs and manuals about models etc, but this thing here is really weird.. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SV: java.lang.IllegalArgumentException: Parameter modelObject cannot be null
Also, organisation is initialized in constructor with new Organisation(). Does this initialization happen before or after you create the model? java.lang.IllegalArgumentException: Parameter modelObject cannot be null This error message indicates it happens after. - Tor Iver
Re: Animating the opening of a modal window
You'll have to create your own javascript to do so (or use/integrate it with jquery/mootools/dojo/etc ) Martijn On Fri, Jul 2, 2010 at 5:18 PM, Chris Colman chr...@stepaheadsoftware.com wrote: Is it possible to animate the opening of a modal window using wicket? I know it can be done in javascript but I'm wondering how I go about it with wicket. Do I need to install a javascript framework and somehow invoke its features from Wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Animating the opening of a modal window
Yes, I was trying to keep it a pure Java app and so avoid writing the javascript myself (my days of writing browser aware javascript are hopefully over =]) so I was wondering what's the best option. From my short research jQuery seems to be really gaining some good momentum. It also appears as though there are two Wicket integration options for it: wiQuery and jWicket I think I will go down the jQuery road. Now I just have to decide which Wicket integration to use. -Original Message- From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] Sent: Monday, 5 July 2010 6:48 PM To: users@wicket.apache.org Subject: Re: Animating the opening of a modal window You'll have to create your own javascript to do so (or use/integrate it with jquery/mootools/dojo/etc ) Martijn On Fri, Jul 2, 2010 at 5:18 PM, Chris Colman chr...@stepaheadsoftware.com wrote: Is it possible to animate the opening of a modal window using wicket? I know it can be done in javascript but I'm wondering how I go about it with wicket. Do I need to install a javascript framework and somehow invoke its features from Wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8 - 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
RE: Ajax channel busy
Ok, this is fun. It was due to an error in my script. I've been doing Java for so many years that I forgot how to use a dynamic language. I guess I'm too used to having the compiler tell me how much of an idiot I am so I have less pain at runtime. ;-) Humans aren't perfect - that's why humans invented typesafe languages! :) BTW, for you experts in js, is there any kind of compiler or validator or something that you use to help locate errors? Or do you just play around with things at runtime? Or are you just smarter than me and don't make so many typos? Not wanting to start a flame war with the dynamic language advocates... Given the complexity of software development I find it amazing that the 'non typesafe language' advocates are so willing to give up one of the best 'error avoidance mechanims' known to the programming world over the last 3 decades. Much better I find a bug at compile time than have it slip through testing and then have customers find it at run time ... But that's my personal opinion and others are free to have theirs' Cheers, =David On Jul 5, 2010, at 3:19 AM, nino martinez wael wrote: Yeah it does seems as a problem.. what if you try putting in dummy functions with alerts in them? 2010/7/3 David Leangen wic...@leangen.net Ok, thanks, So, if it should be ok, I wonder why after the first execution, I only get INFO: Channel busy - postponing... So I can't use my component more than once... On Jul 3, 2010, at 10:36 PM, nino martinez wael wrote: Should be ok I guess, heres the definition of it, ..: function wicketAjaxGet(url, successHandler, failureHandler, precondition) 2010/7/3 David Leangen wic...@leangen.net I should add that in my onCloseHandler, I have this in my js: $('#popup #popup-close-link').click(function (e) { e.preventDefault(); $('#popup-mask, #popup-window').hide(); if( url != ) wicketAjaxGet(url, null, null, null); }); As far as I can tell, this seems to be the correct use of wicketAjaxGet... Cheers, =David On Jul 3, 2010, at 4:22 PM, David Leangen wrote: Hello, Wicketeers, I have a link that is supposed to call a JQuery component called popup. final AjaxLinkVoid popupLink = new AjaxLinkVoid( link.popup ) { @Override public void onClick( AjaxRequestTarget target ) { target.addComponent( popup ); final StringBuilder s = new StringBuilder(); s.append( $.fn.popup({ ) .append( url: \ ).append( onCloseBehavior.getCallbackUrl() ).append( \ ) .append( }); ); target.appendJavascript( s.toString() ); } }; Works just fine the first time, but each subsequent call, I can see the following message in the Ajax Debug Window: INFO: Channel busy - postponing... Other than the link above, nothing else is going on! Do I need to somehow close the channel, or something? Thanks! =David - 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 - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: 3.5 Hibernate 1.1 tutorial wicketized/eclipseized
Hi, you can upload it at http://megaupload.com/ or everywhere else... 2010/6/30 da...@davidwbrown.name Hello, mostly of interest to wicket noobs: i have a wicketized/eclipseized hibernate 1.1 tutorial that should work out-of-the-box albeit for mysql only. Where to upload the project? Or, I can put it on my blog for download? :-David. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax channel busy
Hi, Chris, I tend to agree with you, that's why I prefer Java over Javascript. However, I need to write a few components, so I'm wondering what others do to help them avoid these types of errors that would normally be caught at compile time. Cheers, =David On Jul 5, 2010, at 6:41 PM, Chris Colman wrote: Ok, this is fun. It was due to an error in my script. I've been doing Java for so many years that I forgot how to use a dynamic language. I guess I'm too used to having the compiler tell me how much of an idiot I am so I have less pain at runtime. ;-) Humans aren't perfect - that's why humans invented typesafe languages! :) BTW, for you experts in js, is there any kind of compiler or validator or something that you use to help locate errors? Or do you just play around with things at runtime? Or are you just smarter than me and don't make so many typos? Not wanting to start a flame war with the dynamic language advocates... Given the complexity of software development I find it amazing that the 'non typesafe language' advocates are so willing to give up one of the best 'error avoidance mechanims' known to the programming world over the last 3 decades. Much better I find a bug at compile time than have it slip through testing and then have customers find it at run time ... But that's my personal opinion and others are free to have theirs' Cheers, =David On Jul 5, 2010, at 3:19 AM, nino martinez wael wrote: Yeah it does seems as a problem.. what if you try putting in dummy functions with alerts in them? 2010/7/3 David Leangen wic...@leangen.net Ok, thanks, So, if it should be ok, I wonder why after the first execution, I only get INFO: Channel busy - postponing... So I can't use my component more than once... On Jul 3, 2010, at 10:36 PM, nino martinez wael wrote: Should be ok I guess, heres the definition of it, ..: function wicketAjaxGet(url, successHandler, failureHandler, precondition) 2010/7/3 David Leangen wic...@leangen.net I should add that in my onCloseHandler, I have this in my js: $('#popup #popup-close-link').click(function (e) { e.preventDefault(); $('#popup-mask, #popup-window').hide(); if( url != ) wicketAjaxGet(url, null, null, null); }); As far as I can tell, this seems to be the correct use of wicketAjaxGet... Cheers, =David On Jul 3, 2010, at 4:22 PM, David Leangen wrote: Hello, Wicketeers, I have a link that is supposed to call a JQuery component called popup. final AjaxLinkVoid popupLink = new AjaxLinkVoid( link.popup ) { @Override public void onClick( AjaxRequestTarget target ) { target.addComponent( popup ); final StringBuilder s = new StringBuilder(); s.append( $.fn.popup({ ) .append( url: \ ).append( onCloseBehavior.getCallbackUrl() ).append( \ ) .append( }); ); target.appendJavascript( s.toString() ); } }; Works just fine the first time, but each subsequent call, I can see the following message in the Ajax Debug Window: INFO: Channel busy - postponing... Other than the link above, nothing else is going on! Do I need to somehow close the channel, or something? Thanks! =David - 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 - 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 - 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
Re: Ajax channel busy
:) You could try to write some unit test, with rhino, it should be fairly simple.. Just wriite a junit test that executes a rhino test which in turn parses your js.. :) As someone mentioned to me once, In java you can always add a new layer of abstraction :) 2010/7/5 David Leangen wic...@leangen.net Ok, this is fun. It was due to an error in my script. I've been doing Java for so many years that I forgot how to use a dynamic language. I guess I'm too used to having the compiler tell me how much of an idiot I am so I have less pain at runtime. ;-) BTW, for you experts in js, is there any kind of compiler or validator or something that you use to help locate errors? Or do you just play around with things at runtime? Or are you just smarter than me and don't make so many typos? Cheers, =David On Jul 5, 2010, at 3:19 AM, nino martinez wael wrote: Yeah it does seems as a problem.. what if you try putting in dummy functions with alerts in them? 2010/7/3 David Leangen wic...@leangen.net Ok, thanks, So, if it should be ok, I wonder why after the first execution, I only get INFO: Channel busy - postponing... So I can't use my component more than once... On Jul 3, 2010, at 10:36 PM, nino martinez wael wrote: Should be ok I guess, heres the definition of it, ..: function wicketAjaxGet(url, successHandler, failureHandler, precondition) 2010/7/3 David Leangen wic...@leangen.net I should add that in my onCloseHandler, I have this in my js: $('#popup #popup-close-link').click(function (e) { e.preventDefault(); $('#popup-mask, #popup-window').hide(); if( url != ) wicketAjaxGet(url, null, null, null); }); As far as I can tell, this seems to be the correct use of wicketAjaxGet... Cheers, =David On Jul 3, 2010, at 4:22 PM, David Leangen wrote: Hello, Wicketeers, I have a link that is supposed to call a JQuery component called popup. final AjaxLinkVoid popupLink = new AjaxLinkVoid( link.popup ) { @Override public void onClick( AjaxRequestTarget target ) { target.addComponent( popup ); final StringBuilder s = new StringBuilder(); s.append( $.fn.popup({ ) .append( url: \ ).append( onCloseBehavior.getCallbackUrl() ).append( \ ) .append( }); ); target.appendJavascript( s.toString() ); } }; Works just fine the first time, but each subsequent call, I can see the following message in the Ajax Debug Window: INFO: Channel busy - postponing... Other than the link above, nothing else is going on! Do I need to somehow close the channel, or something? Thanks! =David - 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 - 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
Rating Component question (Starts example)
Hello guys, I´m trying to integrate the Rating Component in my application, but I´m having some minnor problems, let me see if you can help me.. I´m trying to get the pictures (I mean the starts for the component), I have entered here... http://www.wicket-library.com/wicket-examples/ajax/ratings.3.1?wicket:bookmarkablePage=sources:org.apache.wicket.examples.source.SourcesPageSourcesPage_class=org.apache.wicket.examples.ajax.builtin.RatingsPagesource=WicketStar0.png but the only thing I can see are strange characters, I could not find out the way to download the picture. Thank you very much guys, maybe it is a stupid questions but I just do not know CHeers!!! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Rating-Component-question-Starts-example-tp2278549p2278549.html Sent from the Wicket - User 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: Rating Component question (Starts example)
The star is already included in the wicket/extensions jars. ** Martin 2010/7/5 Victor_Trapiello vic...@trapiello.net: Hello guys, I´m trying to integrate the Rating Component in my application, but I´m having some minnor problems, let me see if you can help me.. I´m trying to get the pictures (I mean the starts for the component), I have entered here... http://www.wicket-library.com/wicket-examples/ajax/ratings.3.1?wicket:bookmarkablePage=sources:org.apache.wicket.examples.source.SourcesPageSourcesPage_class=org.apache.wicket.examples.ajax.builtin.RatingsPagesource=WicketStar0.png but the only thing I can see are strange characters, I could not find out the way to download the picture. Thank you very much guys, maybe it is a stupid questions but I just do not know CHeers!!! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Rating-Component-question-Starts-example-tp2278549p2278549.html Sent from the Wicket - User 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Rating Component question (Starts example)
but... the error that comes up is: org.apache.wicket.markup.MarkupNotFoundException: Base markup of inherited markup not found. Component class: com.mycompany.RatingsPage Enable debug messages for org.apache.wicket.util.resource.Resource to get a list of all filenames tried. at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.checkForMarkupInheritance(InheritedMarkupMarkupLoader.java:98) I thought it was because of the pictures... any clue¿? Thanks again -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Rating-Component-question-Starts-example-tp2278549p2278610.html Sent from the Wicket - User 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: Rating Component question (Starts example)
Can't say much without the code and markup. ** Martin 2010/7/5 Victor_Trapiello vic...@trapiello.net: but... the error that comes up is: org.apache.wicket.markup.MarkupNotFoundException: Base markup of inherited markup not found. Component class: com.mycompany.RatingsPage Enable debug messages for org.apache.wicket.util.resource.Resource to get a list of all filenames tried. at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.checkForMarkupInheritance(InheritedMarkupMarkupLoader.java:98) I thought it was because of the pictures... any clue¿? Thanks again -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Rating-Component-question-Starts-example-tp2278549p2278610.html Sent from the Wicket - User 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page maps problem
you should set all the popups to use the same pagemap, i think that should help. -igor On Sun, Jul 4, 2010 at 12:19 PM, Branislav Kalas bka...@gmail.com wrote: Hi, sorry for my terrible english.I am trying to achieve this: I have webapp where i want to allow users open some links in new window. I want to create new page maps for those windows (cause i think , it's correct (page expired problem)). In some pages i use pickers that opens modal windows (and this modal windows runs also in new page maps). I have default setting of maximum page maps (which is 6) Wicket version is 1.4.1 (maybe i can upgrade if it solves the problem) My problem is that when i open link in new window and open modal window in old page for 5 times, new window returns to login page (which is IMHO caused by its removed page map from session). I tried to delete page map of modal window when it is closed but without success. I got this in init method of application class: getPageSettings().setAutomaticMultiWindowSupport(true); I got this in modal window close events : modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { target.addComponent(ProductPicker.this); Session.get().removePageMap(modal.getPage().getPageMap()); } }); modal.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() { public boolean onCloseButtonClicked(AjaxRequestTarget target) { target.addComponent(ProductPicker.this); Session.get().removePageMap(modal.getPage().getPageMap()); return true; } }); This is how i am creating modal window: modal.setCookieName(modal); modal.setHeightUnit(px); modal.setWidthUnit(px); modal.setInitialWidth(900); modal.setInitialHeight(800); modal.setTitle(new StringResourceModel(productPickerModal.label, this, null)); modal.setVersioned(false); And this are links that opens in new pages (tabs) : //java part Link newWindowMenuItemLink = new Link(newWindowMenuItemLink) { �...@override public void onClick() { setResponsePage(lItem.getPageClass().newInstance()); } //html part a class=swap wicket:id=newWindowMenuItemLink href=# target=_blankspan class=altClick;/span/a Can you pls give me any hint what could be possibly wrong,or how can i delete modal window page map when it is closed? Ideally i would like also remove page maps when user closes browser window. Thanks. - 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
Model for simple UI state? (Apart from 'regular' Model)
Hi, I'm having trouble on how to best implement something simple: I'm frequently finding the need to have 2 Models for a component: One Model is the bound data object (persisted), The other is lightweight UI state, such as whether a section is expanded, etc. The UI state is not needed outside of the component itself. It does not make sense to combine it with the bound data Model. When I first ran into this need, I tried storing the UI state as properties in the component, without using a model for it. This led to issues with the state resetting on refresh, etc. What I think I need is a Model that: * Is instantiated by the component * Keeps state across a page refresh * Ajax component refresh. * Leaving the page and loading the page later should reset the UI state. * UI state is not persisted in a DB, etc. What might be the best way to do the above? Thanks - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: java.lang.IllegalArgumentException: Parameter modelObject cannot be null
Ok, sorry, my bad. I did the initialization afterwards :( Sometimes such mistakes just happen... On Mon, Jul 5, 2010 at 10:45 AM, Wilhelmsen Tor Iver toriv...@arrive.nowrote: Also, organisation is initialized in constructor with new Organisation(). Does this initialization happen before or after you create the model? java.lang.IllegalArgumentException: Parameter modelObject cannot be null This error message indicates it happens after. - Tor Iver
Re: Model for simple UI state? (Apart from 'regular' Model)
Wicket stores the state (its fields) of a component (and thus pages) between requests. So, your idea should work. Did you see any serialization errors/warnings on your output log? Perhaps the component's state can't be serialized? On Mon, Jul 5, 2010 at 3:10 PM, Anh 7za...@gmail.com wrote: Hi, I'm having trouble on how to best implement something simple: I'm frequently finding the need to have 2 Models for a component: One Model is the bound data object (persisted), The other is lightweight UI state, such as whether a section is expanded, etc. The UI state is not needed outside of the component itself. It does not make sense to combine it with the bound data Model. When I first ran into this need, I tried storing the UI state as properties in the component, without using a model for it. This led to issues with the state resetting on refresh, etc. What I think I need is a Model that: * Is instantiated by the component * Keeps state across a page refresh * Ajax component refresh. * Leaving the page and loading the page later should reset the UI state. * UI state is not persisted in a DB, etc. What might be the best way to do the above? Thanks - 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
Re: Model for simple UI state? (Apart from 'regular' Model)
UI state as properties in the component should be to fine, see if using session relative urls the problem remains On Mon, Jul 5, 2010 at 4:10 PM, Anh 7za...@gmail.com wrote: Hi, I'm having trouble on how to best implement something simple: I'm frequently finding the need to have 2 Models for a component: One Model is the bound data object (persisted), The other is lightweight UI state, such as whether a section is expanded, etc. The UI state is not needed outside of the component itself. It does not make sense to combine it with the bound data Model. When I first ran into this need, I tried storing the UI state as properties in the component, without using a model for it. This led to issues with the state resetting on refresh, etc. What I think I need is a Model that: * Is instantiated by the component * Keeps state across a page refresh * Ajax component refresh. * Leaving the page and loading the page later should reset the UI state. * UI state is not persisted in a DB, etc. What might be the best way to do the above? Thanks - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
Re: Animating the opening of a modal window
Hi Chris, if you simple want to add an javascript effect to an browser component, there is no need to use an wicket integration with an javascript frameworks. About the browser compatibility, use only the component api provided by the javascript framework, there is no reason to have browser aware javascript. On Mon, Jul 5, 2010 at 6:36 AM, Chris Colman chr...@stepaheadsoftware.comwrote: Yes, I was trying to keep it a pure Java app and so avoid writing the javascript myself (my days of writing browser aware javascript are hopefully over =]) so I was wondering what's the best option. From my short research jQuery seems to be really gaining some good momentum. It also appears as though there are two Wicket integration options for it: wiQuery and jWicket I think I will go down the jQuery road. Now I just have to decide which Wicket integration to use. -Original Message- From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] Sent: Monday, 5 July 2010 6:48 PM To: users@wicket.apache.org Subject: Re: Animating the opening of a modal window You'll have to create your own javascript to do so (or use/integrate it with jquery/mootools/dojo/etc ) Martijn On Fri, Jul 2, 2010 at 5:18 PM, Chris Colman chr...@stepaheadsoftware.com wrote: Is it possible to animate the opening of a modal window using wicket? I know it can be done in javascript but I'm wondering how I go about it with wicket. Do I need to install a javascript framework and somehow invoke its features from Wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8 - 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 -- Pedro Henrique Oliveira dos Santos
Re: Model for simple UI state? (Apart from 'regular' Model)
Thank you, this works fine. Of course, now I can't remember the example that made me think this approach wouldn't work! Thanks again On Mon, Jul 5, 2010 at 12:33 PM, Pedro Santos pedros...@gmail.com wrote: UI state as properties in the component should be to fine, see if using session relative urls the problem remains On Mon, Jul 5, 2010 at 4:10 PM, Anh 7za...@gmail.com wrote: Hi, I'm having trouble on how to best implement something simple: I'm frequently finding the need to have 2 Models for a component: One Model is the bound data object (persisted), The other is lightweight UI state, such as whether a section is expanded, etc. The UI state is not needed outside of the component itself. It does not make sense to combine it with the bound data Model. When I first ran into this need, I tried storing the UI state as properties in the component, without using a model for it. This led to issues with the state resetting on refresh, etc. What I think I need is a Model that: * Is instantiated by the component * Keeps state across a page refresh * Ajax component refresh. * Leaving the page and loading the page later should reset the UI state. * UI state is not persisted in a DB, etc. What might be the best way to do the above? Thanks - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Animating the opening of a modal window
Hi Pedro, Do you or anyone else have an example of this? I have the same need as Chris, and would like to avoid a Wicket integration project in order to use jQuery animations. I would like to be able to use simple jQuery animations when adding/remove components, or a modal lightbox. I'm a little unclear what hooks to use though. Thanks On Mon, Jul 5, 2010 at 1:02 PM, Pedro Santos pedros...@gmail.com wrote: Hi Chris, if you simple want to add an javascript effect to an browser component, there is no need to use an wicket integration with an javascript frameworks. About the browser compatibility, use only the component api provided by the javascript framework, there is no reason to have browser aware javascript. On Mon, Jul 5, 2010 at 6:36 AM, Chris Colman chr...@stepaheadsoftware.comwrote: Yes, I was trying to keep it a pure Java app and so avoid writing the javascript myself (my days of writing browser aware javascript are hopefully over =]) so I was wondering what's the best option. From my short research jQuery seems to be really gaining some good momentum. It also appears as though there are two Wicket integration options for it: wiQuery and jWicket I think I will go down the jQuery road. Now I just have to decide which Wicket integration to use. -Original Message- From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] Sent: Monday, 5 July 2010 6:48 PM To: users@wicket.apache.org Subject: Re: Animating the opening of a modal window You'll have to create your own javascript to do so (or use/integrate it with jquery/mootools/dojo/etc ) Martijn On Fri, Jul 2, 2010 at 5:18 PM, Chris Colman chr...@stepaheadsoftware.com wrote: Is it possible to animate the opening of a modal window using wicket? I know it can be done in javascript but I'm wondering how I go about it with wicket. Do I need to install a javascript framework and somehow invoke its features from Wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8 - 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 -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Displaying labels instead of field keynames in error messages
Hello, when I validate my form, wicket gives me errors like this: 'someFieldCode is mandatory' etc. But how to use it like 'Some field is mandatory'? Is it only the default behaviour of replacing placeholders in wicket-messages and can be customized? Or I have to rename all my forms fields to the same values as their labels are? Sigmar
Configure Wicket to detect some special HTML characters?
If someone enters scriptalert(1)/script in a wicket form's text field, can Wicket be configured to detect special characters such as angle brackets and translate them into HTML entities before sending user input to database? If yes, any pointers? Best, David - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Configure Wicket to detect some special HTML characters?
Why would you want to do that? ** Martin 2010/7/6 David Chang david_q_zh...@yahoo.com: If someone enters scriptalert(1)/script in a wicket form's text field, can Wicket be configured to detect special characters such as angle brackets and translate them into HTML entities before sending user input to database? If yes, any pointers? Best, David - 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
Re: Displaying labels instead of field keynames in error messages
Or I have to rename all my forms fields to the same values as their labels are? Yes, rename. ** Martin 2010/7/6 Sigmar Muuga meedi...@gmail.com: Hello, when I validate my form, wicket gives me errors like this: 'someFieldCode is mandatory' etc. But how to use it like 'Some field is mandatory'? Is it only the default behaviour of replacing placeholders in wicket-messages and can be customized? Or I have to rename all my forms fields to the same values as their labels are? Sigmar - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Configure Wicket to detect some special HTML characters?
I dont want to save these characters into the database. --- On Tue, 7/6/10, Martin Makundi martin.maku...@koodaripalvelut.com wrote: From: Martin Makundi martin.maku...@koodaripalvelut.com Subject: Re: Configure Wicket to detect some special HTML characters? To: users@wicket.apache.org Date: Tuesday, July 6, 2010, 1:09 AM Why would you want to do that? ** Martin 2010/7/6 David Chang david_q_zh...@yahoo.com: If someone enters scriptalert(1)/script in a wicket form's text field, can Wicket be configured to detect special characters such as angle brackets and translate them into HTML entities before sending user input to database? If yes, any pointers? Best, David - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Configure Wicket to detect some special HTML characters?
Create a custom converter. Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jul 6, 2010 12:16 AM, David Chang david_q_zh...@yahoo.com wrote: I dont want to save these characters into the database. --- On Tue, 7/6/10, Martin Makundi martin.maku...@koodaripalvelut.com wrote: From: Martin Makundi martin.maku...@koodaripalvelut.com Subject: Re: Configure Wicket to detect some special HTML characters? To: users@wicket.apache.org Date: Tuesday, July 6, 2010, 1:09 AM Why would you want to do that? ** Martin 2010/7/6 David Chang david_q_zh...@yahoo.com...
Re: Displaying labels instead of field keynames in error messages
No, don't rename. Call setLabel on the component. Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jul 6, 2010 12:11 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Or I have to rename all my forms fields to the same values as their labels are? Yes, rename. ** Martin 2010/7/6 Sigmar Muuga meedi...@gmail.com: Hello, when I validate my form, wicket gives me errors like this: 'someFieldCode is mandator... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Configure Wicket to detect some special HTML characters?
I dont want to save these characters into the database. Why not? Why are you inputting data that you don't want to put into database? ** Martin --- On Tue, 7/6/10, Martin Makundi martin.maku...@koodaripalvelut.com wrote: From: Martin Makundi martin.maku...@koodaripalvelut.com Subject: Re: Configure Wicket to detect some special HTML characters? To: users@wicket.apache.org Date: Tuesday, July 6, 2010, 1:09 AM Why would you want to do that? ** Martin 2010/7/6 David Chang david_q_zh...@yahoo.com: If someone enters scriptalert(1)/script in a wicket form's text field, can Wicket be configured to detect special characters such as angle brackets and translate them into HTML entities before sending user input to database? If yes, any pointers? Best, David - 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 - 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
Re: Single inheritence in parts
Search the list for this and you'll find some quite long discussions. Basically, it's not going to happen. This would be multiple inheritance, not single. You can easily use panels to accomplish what you're looking for. Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jul 5, 2010 12:41 AM, Arjun Dhar dhar...@yahoo.com wrote: Hi, all the examples etc suggest that Single inheritence is possible but I cant break it up. The break up is essential when you want to merge common parts of your MARKUP with multiple specific parts of the Child page. Example: HTML HEADtitleBASE TEMPLATE / PARENT PAGE/title/HEAD BODY wicket:child / br / h2Some other Html common/h2 wicket:child / /BODY /HTML --- HTML HEADtitleCHILD PAGE 1/title/HEAD BODY wicket:extend Part 1 specific to Child Page /wicket:extend Any HTML here can be ignored as conceptually anyway what appears in extend is what should be rendered from a child page. wicket:extend Part 2 Specific to Child Page (will appear after common HTML in parent page) /wicket:extend /BODY /HTML I tried this, only the first part renders. I'm wondering if we can add such capability. Conceptually I don't see why not. If already possible do let me know or consider as a feature request?! -Thanks Arjun -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Single-inheritence-in-parts-tp2278064p2278064.html Sent from the Wicket - User 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: Animating the opening of a modal window
Please disregard my last question - I looked at WiQuery and looks perfect for my needs. I had wrongly assumed it was a fork of Wicket that used jQuery as its ajax implementation. Thanks On Mon, Jul 5, 2010 at 5:21 PM, Anh 7za...@gmail.com wrote: Hi Pedro, Do you or anyone else have an example of this? I have the same need as Chris, and would like to avoid a Wicket integration project in order to use jQuery animations. I would like to be able to use simple jQuery animations when adding/remove components, or a modal lightbox. I'm a little unclear what hooks to use though. Thanks On Mon, Jul 5, 2010 at 1:02 PM, Pedro Santos pedros...@gmail.com wrote: Hi Chris, if you simple want to add an javascript effect to an browser component, there is no need to use an wicket integration with an javascript frameworks. About the browser compatibility, use only the component api provided by the javascript framework, there is no reason to have browser aware javascript. On Mon, Jul 5, 2010 at 6:36 AM, Chris Colman chr...@stepaheadsoftware.comwrote: Yes, I was trying to keep it a pure Java app and so avoid writing the javascript myself (my days of writing browser aware javascript are hopefully over =]) so I was wondering what's the best option. From my short research jQuery seems to be really gaining some good momentum. It also appears as though there are two Wicket integration options for it: wiQuery and jWicket I think I will go down the jQuery road. Now I just have to decide which Wicket integration to use. -Original Message- From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] Sent: Monday, 5 July 2010 6:48 PM To: users@wicket.apache.org Subject: Re: Animating the opening of a modal window You'll have to create your own javascript to do so (or use/integrate it with jquery/mootools/dojo/etc ) Martijn On Fri, Jul 2, 2010 at 5:18 PM, Chris Colman chr...@stepaheadsoftware.com wrote: Is it possible to animate the opening of a modal window using wicket? I know it can be done in javascript but I'm wondering how I go about it with wicket. Do I need to install a javascript framework and somehow invoke its features from Wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8 - 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 -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Single inheritence in parts
Hi Jeremy, Wasn't this on the which list for 1.5? [1] and [2]? Cheers, Ernesto 1-https://cwiki.apache.org/WICKET/wicket-15-wish-list.html#Wicket1.5WishList-multiplychild%252Fextendinheritance 2-https://issues.apache.org/jira/browse/WICKET-1134 On Tue, Jul 6, 2010 at 7:37 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Search the list for this and you'll find some quite long discussions. Basically, it's not going to happen. This would be multiple inheritance, not single. You can easily use panels to accomplish what you're looking for. Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jul 5, 2010 12:41 AM, Arjun Dhar dhar...@yahoo.com wrote: Hi, all the examples etc suggest that Single inheritence is possible but I cant break it up. The break up is essential when you want to merge common parts of your MARKUP with multiple specific parts of the Child page. Example: HTML HEADtitleBASE TEMPLATE / PARENT PAGE/title/HEAD BODY wicket:child / br / h2Some other Html common/h2 wicket:child / /BODY /HTML --- HTML HEADtitleCHILD PAGE 1/title/HEAD BODY wicket:extend Part 1 specific to Child Page /wicket:extend Any HTML here can be ignored as conceptually anyway what appears in extend is what should be rendered from a child page. wicket:extend Part 2 Specific to Child Page (will appear after common HTML in parent page) /wicket:extend /BODY /HTML I tried this, only the first part renders. I'm wondering if we can add such capability. Conceptually I don't see why not. If already possible do let me know or consider as a feature request?! -Thanks Arjun -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Single-inheritence-in-parts-tp2278064p2278064.html Sent from the Wicket - User 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Using authorization to stop RENDER action doesn't work with as expected with repeater components
I'm building a Wicket-based project that uses Wasp/Swarm for authorization. I've connected it to Spring Security to use it as an authentication backend, and I've also used Spring Security to perform authentication and authorization on my middle tier Spring beans. I have a secured web page with three panels in them (ListPanelA, ListPanelB, ListPanelC), but I only want some of them to display for different roles. Each panel inherits from SecurePanel and the page inherits from SecureWebPage. The panels have repeater components in them (DataView, which has inheritance hierarchy Component-WebMarkupContainer-AbstractRepeater ... -AbstractPageableView-DataViewBase-DataView). i.e. OverviewPage --ListPanelA DataView --ListPanelB DataView --ListPanelC DataView The problem I am having is with setting component permissions on panels. For the basic ROLE_STAFF there is no permissions on these panels, but I have added a RENDER permission for certain users. When the page renders, each panel still calls onBeforeRender() on each component in its hierarchy even though the panel has no Component.RENDER authorization. This is a problem because onBeforeRender() in AbstractRepeater still calls AbstractRepeater.onPopulate(), which causes the pre-rendering value loading to take place, even though later on the component is not even rendered. In my case, I'm relying on onPopulate() not being called so that it doesn't try to call the (secured) middle tier methods. The relevant parts of my Swarm configuration is as follows: grant principal org.forge.smartdata.server.ui.security.SpringSecurityPrincipal ROLE_STAFF { permission ${ComponentPermission} org.forge.smartdata.server.ui.management.OverviewPage, render; permission ${ComponentPermission} org.forge.smartdata.server.ui.management.OverviewPage, enable; ... }; grant principal org.forge.smartdata.server.ui.security.SpringSecurityPrincipal ROLE_RESEARCHER { ... permission ${ComponentPermission} org.forge.smartdata.server.ui.management.ListPanelA, enable; permission ${ComponentPermission} org.forge.smartdata.server.ui.management.ListPanelB, enable; }; grant principal org.forge.smartdata.server.ui.security.SpringSecurityPrincipal ROLE_REGISTRAR { ... permission ${ComponentPermission} org.forge.smartdata.server.ui.management.ListPanelB, enable; }; grant principal org.forge.smartdata.server.ui.security.SpringSecurityPrincipal ROLE_DEPLOYER { ... permission ${ComponentPermission} org.forge.smartdata.server.ui.management.ListPanelC, enable; }; In the case above, ROLE_DEPLOYER, ROLE_RESEARCHER and ROLE_REGISTRAR all imply permission ROLE_STAFF. If I were, for example, to login as ROLE_RESEARCHER, it should render ListPanelA and ListPanelB but not ListPanelC. However, I am still getting the onPopulate() actions for the ListPanelC solution. I dug around and found out that Component.prepareRender() doesn't check if rendering is authorized until after the beforeRender() process has finished. However, this still seems to cause repeater components to try and prepare themselves for rendering by populating their internal hierarchies. Is there a way to circumvent this cleanly without having to put security checking code into my page or create a different page for each user? Thanks Chris -- Christopher Armstrong carmstrong ^^AT^ fastmail dOT com /Dot/ au - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org