Re: Session lost when redeploying
For wicket you shouldnt have to do anything except making your stuff thats in your session/pages all serializable. The container should take care of the rest On 9/26/08, Adriano dos Santos Fernandes [EMAIL PROTECTED] wrote: Hi! On a non Wicket application running on OC4J, I had the problem of the HTTP session being lost when the application was redeployed. The usage of session data was minimum, for authentication purpose. I'd solved the problem with a custom encrypted cookie that reconstructs the server session. This problem seems critical for Wicket application. In this case, I'll probably use JBoss. Is there any good thing I can do to avoid (or minimize, i.e., only for changed classes) such type of problem? Thanks, Adriano - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @SpringBean and serialization
Yes, of course, but I'm in the same position as the one who posed the question: looking for the answer. I inferred from what was written that de-/serialization was handled by @SpringBean, but since I haven't had time to do a full code review, I don't know the details of how it all works, and therefore don't feel comfortable updating the wiki. BTW, we appreciate all your efforts. When my workload gets lighter, I definitely plan to contribute to Wicket. :-) Ari igor.vaynberg wrote: its a wiki, you can always update it... -igor On Thu, Sep 25, 2008 at 6:38 PM, Ari M [EMAIL PROTECTED] wrote: BTW, I did note that it said It's possible to have your annotated dependencies automatically injected on construction. By this I inferred that de-/serialization was handled, but it could be made more explicit, as it is for the other approaches. Ari Ari M wrote: I see nothing on the wiki page under Annotation-based Approach concerning serialization. The other approaches discuss serialization issues, but not this one. Am I missing something? If it said something like serialization/de-serialization handled automatically, that would be clear. Thanks, Ari lars vonk wrote: Hi Gerald, Don't forget Findbugs is a static code analysis tool, so it can't figure out everything. To get rid of these (false) warnings you could for instance disable these specific warnings in FindBugs for wicket classes that are injected by Spring using FindBugs filters. See http://findbugs.sourceforge.net/manual/filter.html on how to do that. BTW: The wicket docs about spring clearly explains the serialization problem: http://cwiki.apache.org/WICKET/spring.html -- Lars On Tue, Jul 29, 2008 at 5:10 PM, Gerald Reinhart [EMAIL PROTECTED] wrote: We use Findbugs on our build process, with this @SpringBean(name = mySpringBean) private MyPOJO config; Findbugs Warning : Class com...MyPage defines non-transient non-serializable instance field config Bug type SE_BAD_FIELD (click for details) In class com...MyPage Field com...MyPage.config In MyPage.java SE_BAD_FIELD: Non-transient non-serializable instance field in serializable class This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods. Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field. So we set the field transient @SpringBean(name = mySpringBean) transient MyPOJO config; So that Findbugs didn't complain... that the reason why we decided to develop this Helper to set SpringBean in the readObject() method. Perhaps we won't do all that is the documentation tell explicitly that we didn't have to take care of the deserialization of SpringBean (as SpringComponentInjector inject Serializable proxies) Regards, Gerald Reinhart -- View this message in context: http://www.nabble.com/%40SpringBean-and-serialization-tp15330505p18714397.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/%40SpringBean-and-serialization-tp15330505p19681208.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/%40SpringBean-and-serialization-tp15330505p19683608.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session lost when redeploying
and shut down your app server in a normal way :). Kill -9 doesn't give the server a chance to write things to disk (as does the little red button in eclipse) Martijn On Fri, Sep 26, 2008 at 8:42 AM, Johan Compagner [EMAIL PROTECTED] wrote: For wicket you shouldnt have to do anything except making your stuff thats in your session/pages all serializable. The container should take care of the rest On 9/26/08, Adriano dos Santos Fernandes [EMAIL PROTECTED] wrote: Hi! On a non Wicket application running on OC4J, I had the problem of the HTTP session being lost when the application was redeployed. The usage of session data was minimum, for authentication purpose. I'd solved the problem with a custom encrypted cookie that reconstructs the server session. This problem seems critical for Wicket application. In this case, I'll probably use JBoss. Is there any good thing I can do to avoid (or minimize, i.e., only for changed classes) such type of problem? Thanks, Adriano - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Announce] The Wicket Reflex Game:)
You can only get one point per box... And theres a small time slip from when the heartbeat is activated until the reponse comes back in that time it's possible to click the boxes and not get points.. I can see that this simple game really shows that you need to be carefull if you have more than one ajax trigger on your page, and one of them can remove the other. Then you can get into trouble.. Edward Zarecor wrote: Fun. There seems to be a condition that causes subsequent clicks to not be scored. In any event, not all successful clicks seem to get counted -- not sour grapes, I promise. Ed. On Thu, Sep 25, 2008 at 4:09 PM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Thanks:) One really need to be carefull with removing behaviors etc.. Maarten Bosteels wrote: When you click a cell just after the high score form appears, the whole page freezes up. Otherwise I had some fun :-) Maarten On Thu, Sep 25, 2008 at 8:58 PM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: I did not like the fact that you guys filled the highscore so quickly:). I've put up a new version, with one level more. And now you can potentially get 40 points over the 40 ticks. Highscore increased to 10 spaces. And I tried to see if putting a veil over the box could fix the behavior error you get if clicking like a maniac. So try again:) It should be a LOT harder to reach around the 40 points. There is a surprise for you :) http://wicketgames.ninosbox.thruhere.net/ Nino Saturnino Martinez Vazquez Wael wrote: Hi I've done a small game using Wicket and Ajax, consider it an ajax show case for wicket.. It's in a prototype state, I used a few hours yesterday on it.. The game it self lasts about 20 seconds depending on latency etc. And you can get 20 points by clicking small boxes. I want to see your name on the highscore:) http://wicketgames.ninosbox.thruhere.net/ Im hosting it on my own box as you see ( http://wicketgames.ninosbox.thruhere.net/ ) , so responses could be slow it's a p3 500 mhz running other stuff aswell.. -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session.setStyle and resources?
Hi What we do in our project is to add public AbstractShopWebPage() { super(); add(HeaderContributor.forCss(ResourceHelper.getBrandOverrideCss(site.getBrandName(; } in the abstract web page. So that it gets attached to all the pages. And have a static helper method private static final String CSS_LOCATION = resources/styles/; public static ResourceReference getBrandOverrideCss(final String brand) { return new CompressedResourceReference(MagContactWicketApplication.class, CSS_LOCATION + brand.css, null, brand); } which loads the brand specific style sheet. Nino.Martinez wrote: Hi Im trying todo some simple variation of my application, by just adding a different stylesheet. I thought I wanted to checkout what wicket could offer. But I am failing for it to work this is what I am doing: //setting the style: getSession().setStyle(newlook); I also have this resource added in headercontributor: public void renderHead(IHeaderResponse response) { response.renderCSSReference(new CompressedResourceReference( ZeuzPage.class, default.css)); } now I would expect for wicket to look for a resource called default_newlook.css , but it doesnt. Whats wrong? I've also read this http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://ntsrikanth.blogspot.com/ -- View this message in context: http://www.nabble.com/session.setStyle-and-resources--tp19667065p19685400.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Javascript in wicket:head via Ajax
That's not a bug in Wicket. If you place javascript in head you have to either enclose the content in cdata block or escale and with lt; and gt; Otherwise it's not valid xml. -Matej On Fri, Sep 26, 2008 at 2:40 AM, Dreamage [EMAIL PROTECTED] wrote: Hi, Is the content of wicket:head tags is parsed to ensure that SCRIPT are placed into a CDATA in ajax response ? Because if I write Javascript directly in a wicket:head tag and then create and render the component via ajax, the javascript of the wicket:head is not placed in a CDATA block, and the '' character present in my js cause the response XML to be invalid. Let me know if it's a known issue or if it's a bug. Thanks (Attached is my quickstart project with the problem) http://www.nabble.com/file/p19680773/myproject.zip myproject.zip -- View this message in context: http://www.nabble.com/Javascript-in-wicket%3Ahead-via-Ajax-tp19680773p19680773.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Nice urls in markup
First of all: Thanks a lot for trying to help me, Erik! The href-Element of my Ajax-Fallbacklinks show a pretty URLs now, but the fallback links don't work anymore, if JavaScript is disabled. ul lia href=home id=navMail__itema onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:0:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itema') != null;}.bind(this));return !wcall;spanProducts/span/a/li /ul ul lia href=home id=navMail__itemb onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:1:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itemb') != null;}.bind(this));return !wcall;spanTeam/span/a/li /ul The thing I'd like to do is to mount a different, meaningful URLs for each Ajax-Fallbacklink. This URL should be shown in markup and within the address line of the browser. And of course, the link should work afterwards: ul lia href=home/products id=navMail__itema onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:0:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itema') != null;}.bind(this));return !wcall;spanProducts/span/a/li /ul ul lia href=home/team id=navMail__itemb onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:1:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itemb') != null;}.bind(this));return !wcall;spanTeam/span/a/li /ul I've been wondering, if it is even possible to do that. Could anyone try to help, please? Thanks, Liz - Original Message - From: Erik van Oosten Sent: 25/09/08 02:39 pm To: users@wicket.apache.org Subject: Re: Nice urls in markup Use a HybridUrlCodingStrategy to mount your pages. This will make ajax request link to a similar URL as the page your are mounting (it adds a number). Regards, Erik. Liz Huber wrote: I'm trying to beautify all wicket urls of my application by mounting the pages to meaningful paths. Thereby the urls become pretty in the browser's address line. But within the rendered markup links and images still have non formated wicket urls. So I mounted the images as shared resources and successfully tricked by overwriting methode onComponentTag(): @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put(src, urlFor(getImageResourceReference()).toString()); } The same way I proceeded concerning links: I mounted the referenced page and overwrote methode onComponentTag(): @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if (clazz != null) { tag.put(href, urlFor(clazz, null)); //where clazz = Class.forName(getDefaultModelObjectAsString()); } else { tag.remove(href); } } This works pretty well and the urls in markup look like the mountpaths. But one problem is still remaining. I created a list containing ajax fallback links. In markup they contain a href attribute, which is probably used, when java script is deactivated. ...ul lia href=?wicket:interface=:0:panelMiddleNavigation:navMail:0:navMail_item::ILinkListener:: id=navMail__itema onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:0:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itema') != null;}.bind(this));return !wcall;spanAjaxLink 1/span/a/li /ul ul lia href=?wicket:interface=:0:panelMiddleNavigation:navMail:1:navMail_item::ILinkListener:: id=navMail__itemb onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:1:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itemb') != null;}.bind(this));return !wcall;spanAjaxLink 2/span/a/li /ul... I'd like to formate this url as well but I don't know how. I've already tried to mount Pages with parameters and to overwrite the href in the onComponentTag() methode. But it didn't help! Could you please give me a clue! Thanks, Liz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
London Wicket Event - @Google on Wednesday
We have 40-45 people registered so far for our next London Wicket Event, at 18:30 on October 1st, where we have more professional, instructive and often quite interactive presentations lined up for our guests, invariably comprising of an interesting collection of skills and friendly personalities, to enjoy. We have fixed quite a big room (Al says we could host 70 or so) so I'll probably be able to leave registration open until Wednesday lunchtime; if you can make it do register early (remembering to confirm/cancel via the link in the automated email). As always, full details, schedule, map and registration etc are all (on our built on Wicket site), http://jweekend.com/dev/LWUGReg/ here . Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk -- View this message in context: http://www.nabble.com/London-Wicket-Event---%40Google-on-Wednesday-tp19685724p19685724.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session.setStyle and resources?
Thanks for the suggestion. But I wanted it to be transparent for me in this case, so I did not have to change my Headercontributor... Problem are that I use markup inheritance and in my basepage I include a base css.. Writing this it's actually pretty simple to see the solution, it can just be done by ordinary java, i'll just make a method that returns the defaultstyle and then I can change the default to what ever I want. Hehe, as always why do it in a complicated way when it can be done simple.. -Wicket is just plain java:) Srikanth.NT wrote: Hi What we do in our project is to add public AbstractShopWebPage() { super(); add(HeaderContributor.forCss(ResourceHelper.getBrandOverrideCss(site.getBrandName(; } in the abstract web page. So that it gets attached to all the pages. And have a static helper method private static final String CSS_LOCATION = resources/styles/; public static ResourceReference getBrandOverrideCss(final String brand) { return new CompressedResourceReference(MagContactWicketApplication.class, CSS_LOCATION + brand.css, null, brand); } which loads the brand specific style sheet. Nino.Martinez wrote: Hi Im trying todo some simple variation of my application, by just adding a different stylesheet. I thought I wanted to checkout what wicket could offer. But I am failing for it to work this is what I am doing: //setting the style: getSession().setStyle(newlook); I also have this resource added in headercontributor: public void renderHead(IHeaderResponse response) { response.renderCSSReference(new CompressedResourceReference( ZeuzPage.class, default.css)); } now I would expect for wicket to look for a resource called default_newlook.css , but it doesnt. Whats wrong? I've also read this http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://ntsrikanth.blogspot.com/ -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Individual session timeout
The global session timeout for all sessions can be set in the web.xml file. Is it possible to set an individual session timeout for each session? E.g. depending on the user's role? Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Loadable-detachable collections?
I'm using LoadableDetachableModels to minimise the serialized session state of my app. However, there is one place where I am still seeing WicketNotSerializableException and that is where I use a hibernate collection as a components model. I have a SystemUser class which contains a List of Contact objects - both are hibernate entities. This collection of Contact objects form the model for a ListView but throws the WicketNotSerializableException as follows... [snip] private java.lang.Object org.hibernate.collection.AbstractPersistentCollection.owner [class=com.myapp.domain.SystemUser] - field that is not serializable So it seems that the underlying hibernate collection has a field 'owner' (in this case the SystemUser) which wicket is trying to serialize. I'm not sure of the best way to make this owner object (and the collection objects themselves, probably) LoadableDetachableObjects. Any ideas? Thanks - Neil. -- View this message in context: http://www.nabble.com/Loadable-detachable-collections--tp19685949p19685949.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Individual session timeout
session.settimeout() ? Stefan Lindner wrote: The global session timeout for all sessions can be set in the web.xml file. Is it possible to set an individual session timeout for each session? E.g. depending on the user's role? Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @SpringBean and serialization
Serialization/deserialization is handled for you automatically. On Thu, Sep 25, 2008 at 9:33 PM, Ari M [EMAIL PROTECTED] wrote: I see nothing on the wiki page under Annotation-based Approach concerning serialization. The other approaches discuss serialization issues, but not this one. Am I missing something? If it said something like serialization/de-serialization handled automatically, that would be clear. Thanks, Ari lars vonk wrote: Hi Gerald, Don't forget Findbugs is a static code analysis tool, so it can't figure out everything. To get rid of these (false) warnings you could for instance disable these specific warnings in FindBugs for wicket classes that are injected by Spring using FindBugs filters. See http://findbugs.sourceforge.net/manual/filter.html on how to do that. BTW: The wicket docs about spring clearly explains the serialization problem: http://cwiki.apache.org/WICKET/spring.html -- Lars On Tue, Jul 29, 2008 at 5:10 PM, Gerald Reinhart [EMAIL PROTECTED] wrote: We use Findbugs on our build process, with this @SpringBean(name = mySpringBean) private MyPOJO config; Findbugs Warning : Class com...MyPage defines non-transient non-serializable instance field config Bug type SE_BAD_FIELD (click for details) In class com...MyPage Field com...MyPage.config In MyPage.java SE_BAD_FIELD: Non-transient non-serializable instance field in serializable class This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods. Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field. So we set the field transient @SpringBean(name = mySpringBean) transient MyPOJO config; So that Findbugs didn't complain... that the reason why we decided to develop this Helper to set SpringBean in the readObject() method. Perhaps we won't do all that is the documentation tell explicitly that we didn't have to take care of the deserialization of SpringBean (as SpringComponentInjector inject Serializable proxies) Regards, Gerald Reinhart -- View this message in context: http://www.nabble.com/%40SpringBean-and-serialization-tp15330505p18714397.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/%40SpringBean-and-serialization-tp15330505p19681174.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Individual session timeout
I forgut to tell you that I use Wicket 1.4 M3. I can't see any settimeout-Method in Session. Stefan -Ursprüngliche Nachricht- Von: Nino Saturnino Martinez Vazquez Wael [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 26. September 2008 12:59 An: users@wicket.apache.org Betreff: Re: Individual session timeout session.settimeout() ? Stefan Lindner wrote: The global session timeout for all sessions can be set in the web.xml file. Is it possible to set an individual session timeout for each session? E.g. depending on the user's role? Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loadable-detachable collections?
I usually use a LDM for the main object (which has the collection property) and have the model for the collection based upon that (perhaps a PropertyModel?). On Fri, Sep 26, 2008 at 6:34 AM, Neil McT [EMAIL PROTECTED] wrote: I'm using LoadableDetachableModels to minimise the serialized session state of my app. However, there is one place where I am still seeing WicketNotSerializableException and that is where I use a hibernate collection as a components model. I have a SystemUser class which contains a List of Contact objects - both are hibernate entities. This collection of Contact objects form the model for a ListView but throws the WicketNotSerializableException as follows... [snip] private java.lang.Object org.hibernate.collection.AbstractPersistentCollection.owner [class=com.myapp.domain.SystemUser] - field that is not serializable So it seems that the underlying hibernate collection has a field 'owner' (in this case the SystemUser) which wicket is trying to serialize. I'm not sure of the best way to make this owner object (and the collection objects themselves, probably) LoadableDetachableObjects. Any ideas? Thanks - Neil. -- View this message in context: http://www.nabble.com/Loadable-detachable-collections--tp19685949p19685949.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Usage of Application class and why set to ThreadLocal
Hi all. I understand that there is one Application class instance per WicketFilter. So, I can use Application class like on memory database. (Wicket In Action too. ) I read source. I notice that Application class instance set ThreadLocal. I understand that value of threadLocal is Singleton per request in Servlet world. Can I use Application class like Singleton per WicketFilter? And why set to ThreadLocal? Best regard. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Individual session timeout
Hi, From the documentation, setMaxInactiveInterval() should do the trick. But i have not used it myself.. http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpSession.html#setMaxInactiveInterval(int) Bert On Fri, Sep 26, 2008 at 13:10, Stefan Lindner [EMAIL PROTECTED] wrote: I forgut to tell you that I use Wicket 1.4 M3. I can't see any settimeout-Method in Session. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Usage of Application class and why set to ThreadLocal
On Fri, Sep 26, 2008 at 7:28 AM, Takeshi Matsuba [EMAIL PROTECTED] wrote: Hi all. I understand that there is one Application class instance per WicketFilter. So, I can use Application class like on memory database. (Wicket In Action too. ) I read source. I notice that Application class instance set ThreadLocal. I understand that value of threadLocal is Singleton per request in Servlet world. Can I use Application class like Singleton per WicketFilter? And why set to ThreadLocal? You could conceivably have two different Wicket applications running within the same webapp. I suppose that's why the access is based on a ThreadLocal. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Individual session timeout
I mean the method on the ordinary java session http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.html You can get that from the wicket session... Or request cycle... I cant remember.. Stefan Lindner wrote: I forgut to tell you that I use Wicket 1.4 M3. I can't see any settimeout-Method in Session. Stefan -Ursprüngliche Nachricht- Von: Nino Saturnino Martinez Vazquez Wael [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 26. September 2008 12:59 An: users@wicket.apache.org Betreff: Re: Individual session timeout session.settimeout() ? Stefan Lindner wrote: The global session timeout for all sessions can be set in the web.xml file. Is it possible to set an individual session timeout for each session? E.g. depending on the user's role? Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Individual session timeout
Code example: private static void setSessionTimeout(int seconds) { HttpSession session = getHttpSession(); if (session != null) { session.setMaxInactiveInterval(seconds); } } private static HttpSession getHttpSession() { WebRequest request = (WebRequest) WebRequestCycle.get().getRequest(); return request.getHttpServletRequest().getSession(); } // Daniel jalbum.net On 2008-09-26, at 14:34, Nino Saturnino Martinez Vazquez Wael wrote: I mean the method on the ordinary java session http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.html You can get that from the wicket session... Or request cycle... I cant remember.. Stefan Lindner wrote: I forgut to tell you that I use Wicket 1.4 M3. I can't see any settimeout-Method in Session. Stefan -Ursprüngliche Nachricht- Von: Nino Saturnino Martinez Vazquez Wael [mailto:[EMAIL PROTECTED] ] Gesendet: Freitag, 26. September 2008 12:59 An: users@wicket.apache.org Betreff: Re: Individual session timeout session.settimeout() ? Stefan Lindner wrote: The global session timeout for all sessions can be set in the web.xml file. Is it possible to set an individual session timeout for each session? E.g. depending on the user's role? Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Individual session timeout
Thank you all! This is exactly what I'm looking for! -Ursprüngliche Nachricht- Von: Daniel Frisk [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 26. September 2008 14:50 An: users@wicket.apache.org Betreff: Re: Individual session timeout Code example: private static void setSessionTimeout(int seconds) { HttpSession session = getHttpSession(); if (session != null) { session.setMaxInactiveInterval(seconds); } } private static HttpSession getHttpSession() { WebRequest request = (WebRequest) WebRequestCycle.get().getRequest(); return request.getHttpServletRequest().getSession(); } // Daniel jalbum.net On 2008-09-26, at 14:34, Nino Saturnino Martinez Vazquez Wael wrote: I mean the method on the ordinary java session http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.html You can get that from the wicket session... Or request cycle... I cant remember.. Stefan Lindner wrote: I forgut to tell you that I use Wicket 1.4 M3. I can't see any settimeout-Method in Session. Stefan -Ursprüngliche Nachricht- Von: Nino Saturnino Martinez Vazquez Wael [mailto:[EMAIL PROTECTED] ] Gesendet: Freitag, 26. September 2008 12:59 An: users@wicket.apache.org Betreff: Re: Individual session timeout session.settimeout() ? Stefan Lindner wrote: The global session timeout for all sessions can be set in the web.xml file. Is it possible to set an individual session timeout for each session? E.g. depending on the user's role? Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nice urls in markup
Liz, The href-Element of my Ajax-Fallbacklinks show a pretty URLs now, but the fallback links don't work anymore, if JavaScript is disabled. That is the intention, the fallback links only work when havascript is enabled. I think you should mount your pages like this: mount(new HybridUrlCodingStrategy(home/project, ProjectPage.class)); mount(new HybridUrlCodingStrategy(home/team, TeamPage.class)); Regards, Erik. Liz Huber wrote: First of all: Thanks a lot for trying to help me, Erik! The href-Element of my Ajax-Fallbacklinks show a pretty URLs now, but the fallback links don't work anymore, if JavaScript is disabled. ul lia href=home id=navMail__itema onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:0:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itema') != null;}.bind(this));return !wcall;spanProducts/span/a/li /ul ul lia href=home id=navMail__itemb onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:1:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itemb') != null;}.bind(this));return !wcall;spanTeam/span/a/li /ul The thing I'd like to do is to mount a different, meaningful URLs for each Ajax-Fallbacklink. This URL should be shown in markup and within the address line of the browser. And of course, the link should work afterwards: ul lia href=home/products id=navMail__itema onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:0:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itema') != null;}.bind(this));return !wcall;spanProducts/span/a/li /ul ul lia href=home/team id=navMail__itemb onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:1:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itemb') != null;}.bind(this));return !wcall;spanTeam/span/a/li /ul I've been wondering, if it is even possible to do that. Could anyone try to help, please? Thanks, Liz - Original Message - From: Erik van Oosten Sent: 25/09/08 02:39 pm To: users@wicket.apache.org Subject: Re: Nice urls in markup Use a HybridUrlCodingStrategy to mount your pages. This will make ajax request link to a similar URL as the page your are mounting (it adds a number). Regards, Erik. Liz Huber wrote: I'm trying to beautify all wicket urls of my application by mounting the pages to meaningful paths. Thereby the urls become pretty in the browser's address line. But within the rendered markup links and images still have non formated wicket urls. So I mounted the images as shared resources and successfully tricked by overwriting methode onComponentTag(): @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put(src, urlFor(getImageResourceReference()).toString()); } The same way I proceeded concerning links: I mounted the referenced page and overwrote methode onComponentTag(): @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if (clazz != null) { tag.put(href, urlFor(clazz, null)); //where clazz = Class.forName(getDefaultModelObjectAsString()); } else { tag.remove(href); } } This works pretty well and the urls in markup look like the mountpaths. But one problem is still remaining. I created a list containing ajax fallback links. In markup they contain a href attribute, which is probably used, when java script is deactivated. ...ul lia href=?wicket:interface=:0:panelMiddleNavigation:navMail:0:navMail_item::ILinkListener:: id=navMail__itema onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:0:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itema') != null;}.bind(this));return !wcall;spanAjaxLink 1/span/a/li /ul ul lia href=?wicket:interface=:0:panelMiddleNavigation:navMail:1:navMail_item::ILinkListener:: id=navMail__itemb onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:panelMiddleNavigation:navMail:1:navMail_item::IBehaviorListener:0:',null,null, function() {return Wicket.$('navMail__itemb') != null;}.bind(this));return !wcall;spanAjaxLink 2/span/a/li /ul... I'd like to formate this url as well but I don't know how. I've already tried to mount Pages with parameters and to overwrite the href in the onComponentTag() methode. But it didn't help! Could you please give me a clue! Thanks, Liz
Re: Model object not geeting updated inside a RefreshingView
can any of you please respond. krisnv wrote: pI have RefreshingView similar to Contact Editor in Wicket Examples.BR I added a Panel and TextFields to this RefreshingView. BRI populate these TextFields from a list from Database and have assigned Model objects to each TextField component. The problem is when user modifies a value in any of the text fields, i still get old value from the original list. Model is not getting updated to reflect new value entered by the use. Here is the code:/p p RefreshingView refreshingView = new RefreshingView(simple) { BR protected Iterator getItemModels() {BR return new ModelIteratorAdapter(users)BR { BRprotected IModel model(Object object) {BR return new DetachableUserModel((User)object); BR}BR }; BR}BR protected void populateItem(final Item item) { BR// populate the row of the repeaterBR IModel user = item.getModel(); BRitem.add(new ActionPanel(actions, item.getModel()).setOutputMarkupId(true));BR item.add(new TextField(UserName, new AbstractReadOnlyModel() BR{ BRpublic Object getObject() BR{BR User ur = (User)item.getModelObject(); return ur.getUserName();BR }BR }BR));BR item.add(new TextField(FirstName, new AbstractReadOnlyModel()BR { BRpublic Object getObject()BR {BR User ur = (User)item.getModelObject(); BRreturn ur.getFirstName();BR } BR}BR));BR item.add(new TextField(LastName, new AbstractReadOnlyModel() { BRpublic Object getObject() {BR User ur = (User)item.getModelObject();BR return ur.getLastName(); } BR}BR));BR item.add(new TextField(ContactPhone, new AbstractReadOnlyModel() { BRpublic Object getObject() BR{ BRUser ur = (User)item.getModelObject();BR return ur.getPhone(); }BR }BR)); BRitem.add(new TextField(Email, new AbstractReadOnlyModel()BR {BR public Object getObject()BR {BRnbsp;nbsp; User ur = (User)item.getModelObject(); BRnbsp;nbsp;return ur.getEmail();BR } BR}BR)BR); BRitem.add(new PasswordTextField(Password, new AbstractReadOnlyModel() {BR public Object getObject() BR{ BR nbsp;nbsp;User ur = (User)item.getModelObject(); BR return ur.getPassword(); BR} BR}BR)); BR}BR protected Item newItem(String id, int index, IModel model) BR{BR // this item sets markup class attribute to either 'odd' orBR // 'even' for decoration return new OddEvenItem(id, index, model); BR}BR }; BRrefreshingView.setOutputMarkupId(true); BRrefreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); BRrefreshingView.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance()); BRform.add(refreshingView); }/p p Here is the code for the Panel. I am trying to print the value from the text field but still getting old value.BR private class ActionPanel extends Panel /pp{ BR public ActionPanel(String id, IModel model) BR{ BRsuper(id, model); BR add(new Link(edit) {BR public void onClick() {BR int resultCode=0; BRUser usr = (User)getParent().getModelObject(); BRSystem.out.println(firstname==+usr.getFirstName()); BR } BR}BR);BR } /ppAny help would be appreciated. Thanks, krishna/p -- View this message in context: http://www.nabble.com/Model-object-not-geeting-updated-inside-a-RefreshingView-tp19688544p19689965.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Images not displaying
Try surrounding your img tag with wicket:link tags. On Fri, Sep 26, 2008 at 11:04 AM, Yazeed Isaacs [EMAIL PROTECTED] wrote: Hi I am trying to display a logo but nothing is displayed. Eg: img src=logo.jpg/ Files are: Index.html Index.java logo.jpg To make matters worst, I tried this with the DateTextField DatePicker classes, eg: dateFromField = new DateTextField( dateFromField, new PropertyModel(this, date), new StyleDateConverter( S-, true)) { @Override public Locale getLocale() { return selectedLocale; } }; dateFromField.add(new DatePicker()); add(dateFromField); The date picker image (calendar icon) does not display. But when I install the wicket examples. All the dates example app works perfectly displaying the calendar icon. What am I doing wrong in my wicket web application? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Model object not geeting updated inside a RefreshingView
That's probably because refreshing view is creating new components on every request. Try using listView nad don't forget to call setReuseItems(true) on it. -Matej On Fri, Sep 26, 2008 at 4:49 PM, krisnv [EMAIL PROTECTED] wrote: can any of you please respond. krisnv wrote: pI have RefreshingView similar to Contact Editor in Wicket Examples.BR I added a Panel and TextFields to this RefreshingView. BRI populate these TextFields from a list from Database and have assigned Model objects to each TextField component. The problem is when user modifies a value in any of the text fields, i still get old value from the original list. Model is not getting updated to reflect new value entered by the use. Here is the code:/p p RefreshingView refreshingView = new RefreshingView(simple) { BR protected Iterator getItemModels() {BR return new ModelIteratorAdapter(users)BR { BRprotected IModel model(Object object) {BR return new DetachableUserModel((User)object); BR}BR }; BR}BR protected void populateItem(final Item item) { BR// populate the row of the repeaterBR IModel user = item.getModel(); BRitem.add(new ActionPanel(actions, item.getModel()).setOutputMarkupId(true));BR item.add(new TextField(UserName, new AbstractReadOnlyModel() BR{ BRpublic Object getObject() BR{BR User ur = (User)item.getModelObject(); return ur.getUserName();BR }BR }BR));BR item.add(new TextField(FirstName, new AbstractReadOnlyModel()BR { BRpublic Object getObject()BR {BR User ur = (User)item.getModelObject(); BRreturn ur.getFirstName();BR } BR}BR));BR item.add(new TextField(LastName, new AbstractReadOnlyModel() { BRpublic Object getObject() {BR User ur = (User)item.getModelObject();BR return ur.getLastName(); } BR}BR));BR item.add(new TextField(ContactPhone, new AbstractReadOnlyModel() { BRpublic Object getObject() BR{ BRUser ur = (User)item.getModelObject();BR return ur.getPhone(); }BR }BR)); BRitem.add(new TextField(Email, new AbstractReadOnlyModel()BR {BR public Object getObject()BR {BR User ur = (User)item.getModelObject(); BR return ur.getEmail();BR } BR}BR)BR); BRitem.add(new PasswordTextField(Password, new AbstractReadOnlyModel() {BR public Object getObject() BR{ BRUser ur = (User)item.getModelObject(); BR return ur.getPassword(); BR} BR}BR)); BR}BR protected Item newItem(String id, int index, IModel model) BR{BR // this item sets markup class attribute to either 'odd' orBR // 'even' for decoration return new OddEvenItem(id, index, model); BR}BR }; BRrefreshingView.setOutputMarkupId(true); BRrefreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); BRrefreshingView.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance()); BRform.add(refreshingView); }/p p Here is the code for the Panel. I am trying to print the value from the text field but still getting old value.BR private class ActionPanel extends Panel /pp{ BR public ActionPanel(String id, IModel model) BR{ BRsuper(id, model); BR add(new Link(edit) {BR public void onClick() {BR int resultCode=0; BRUser usr = (User)getParent().getModelObject(); BRSystem.out.println(firstname==+usr.getFirstName()); BR } BR}BR);BR } /ppAny help would be appreciated. Thanks, krishna/p -- View this message in context: http://www.nabble.com/Model-object-not-geeting-updated-inside-a-RefreshingView-tp19688544p19689965.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Model object not geeting updated inside a RefreshingView
pThanks for you reply and pointing to the right component to use. Just curious, is there any way to fix this to make it work using this approach?/p pkrishna/p Matej Knopp-2 wrote: That's probably because refreshing view is creating new components on every request. Try using listView nad don't forget to call setReuseItems(true) on it. -Matej On Fri, Sep 26, 2008 at 4:49 PM, krisnv [EMAIL PROTECTED] wrote: can any of you please respond. krisnv wrote: pI have RefreshingView similar to Contact Editor in Wicket Examples.BR I added a Panel and TextFields to this RefreshingView. BRI populate these TextFields from a list from Database and have assigned Model objects to each TextField component. The problem is when user modifies a value in any of the text fields, i still get old value from the original list. Model is not getting updated to reflect new value entered by the use. Here is the code:/p p RefreshingView refreshingView = new RefreshingView(simple) { BR protected Iterator getItemModels() {BR return new ModelIteratorAdapter(users)BR { BRprotected IModel model(Object object) {BR return new DetachableUserModel((User)object); BR}BR }; BR}BR protected void populateItem(final Item item) { BR// populate the row of the repeaterBR IModel user = item.getModel(); BRitem.add(new ActionPanel(actions, item.getModel()).setOutputMarkupId(true));BR item.add(new TextField(UserName, new AbstractReadOnlyModel() BR{ BRpublic Object getObject() BR{BR User ur = (User)item.getModelObject(); return ur.getUserName();BR }BR }BR));BR item.add(new TextField(FirstName, new AbstractReadOnlyModel()BR { BRpublic Object getObject()BR {BR User ur = (User)item.getModelObject(); BRreturn ur.getFirstName();BR } BR}BR));BR item.add(new TextField(LastName, new AbstractReadOnlyModel() { BRpublic Object getObject() {BR User ur = (User)item.getModelObject();BR return ur.getLastName(); } BR}BR));BR item.add(new TextField(ContactPhone, new AbstractReadOnlyModel() { BRpublic Object getObject() BR{ BRUser ur = (User)item.getModelObject();BR return ur.getPhone(); }BR }BR)); BRitem.add(new TextField(Email, new AbstractReadOnlyModel()BR {BR public Object getObject()BR {BR User ur = (User)item.getModelObject(); BR return ur.getEmail();BR } BR}BR)BR); BRitem.add(new PasswordTextField(Password, new AbstractReadOnlyModel() {BR public Object getObject() BR{ BRUser ur = (User)item.getModelObject(); BR return ur.getPassword(); BR} BR}BR)); BR}BR protected Item newItem(String id, int index, IModel model) BR{BR // this item sets markup class attribute to either 'odd' orBR // 'even' for decoration return new OddEvenItem(id, index, model); BR}BR }; BRrefreshingView.setOutputMarkupId(true); BRrefreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); BRrefreshingView.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance()); BRform.add(refreshingView); }/p p Here is the code for the Panel. I am trying to print the value from the text field but still getting old value.BR private class ActionPanel extends Panel /pp{ BR public ActionPanel(String id, IModel model) BR{ BRsuper(id, model); BR add(new Link(edit) {BR public void onClick() {BR int resultCode=0; BRUser usr = (User)getParent().getModelObject(); BRSystem.out.println(firstname==+usr.getFirstName()); BR } BR}BR);BR } /ppAny help would be appreciated. Thanks, krishna/p -- View this message in context: http://www.nabble.com/Model-object-not-geeting-updated-inside-a-RefreshingView-tp19688544p19689965.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Model-object-not-geeting-updated-inside-a-RefreshingView-tp19688544p19691024.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Model object not geeting updated inside a RefreshingView
see IItemReuseStrategy -igor On Fri, Sep 26, 2008 at 8:41 AM, krisnv [EMAIL PROTECTED] wrote: pThanks for you reply and pointing to the right component to use. Just curious, is there any way to fix this to make it work using this approach?/p pkrishna/p Matej Knopp-2 wrote: That's probably because refreshing view is creating new components on every request. Try using listView nad don't forget to call setReuseItems(true) on it. -Matej On Fri, Sep 26, 2008 at 4:49 PM, krisnv [EMAIL PROTECTED] wrote: can any of you please respond. krisnv wrote: pI have RefreshingView similar to Contact Editor in Wicket Examples.BR I added a Panel and TextFields to this RefreshingView. BRI populate these TextFields from a list from Database and have assigned Model objects to each TextField component. The problem is when user modifies a value in any of the text fields, i still get old value from the original list. Model is not getting updated to reflect new value entered by the use. Here is the code:/p p RefreshingView refreshingView = new RefreshingView(simple) { BR protected Iterator getItemModels() {BR return new ModelIteratorAdapter(users)BR { BRprotected IModel model(Object object) {BR return new DetachableUserModel((User)object); BR}BR }; BR}BR protected void populateItem(final Item item) { BR// populate the row of the repeaterBR IModel user = item.getModel(); BRitem.add(new ActionPanel(actions, item.getModel()).setOutputMarkupId(true));BR item.add(new TextField(UserName, new AbstractReadOnlyModel() BR{ BRpublic Object getObject() BR{BR User ur = (User)item.getModelObject(); return ur.getUserName();BR }BR }BR));BR item.add(new TextField(FirstName, new AbstractReadOnlyModel()BR { BRpublic Object getObject()BR {BR User ur = (User)item.getModelObject(); BRreturn ur.getFirstName();BR } BR}BR));BR item.add(new TextField(LastName, new AbstractReadOnlyModel() { BRpublic Object getObject() {BR User ur = (User)item.getModelObject();BR return ur.getLastName(); } BR}BR));BR item.add(new TextField(ContactPhone, new AbstractReadOnlyModel() { BRpublic Object getObject() BR{ BRUser ur = (User)item.getModelObject();BR return ur.getPhone(); }BR }BR)); BRitem.add(new TextField(Email, new AbstractReadOnlyModel()BR {BR public Object getObject()BR {BR User ur = (User)item.getModelObject(); BR return ur.getEmail();BR } BR}BR)BR); BRitem.add(new PasswordTextField(Password, new AbstractReadOnlyModel() {BR public Object getObject() BR{ BRUser ur = (User)item.getModelObject(); BR return ur.getPassword(); BR} BR}BR)); BR}BR protected Item newItem(String id, int index, IModel model) BR{BR // this item sets markup class attribute to either 'odd' orBR // 'even' for decoration return new OddEvenItem(id, index, model); BR}BR }; BRrefreshingView.setOutputMarkupId(true); BRrefreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); BRrefreshingView.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance()); BRform.add(refreshingView); }/p p Here is the code for the Panel. I am trying to print the value from the text field but still getting old value.BR private class ActionPanel extends Panel /pp{ BR public ActionPanel(String id, IModel model) BR{ BRsuper(id, model); BR add(new Link(edit) {BR public void onClick() {BR int resultCode=0; BRUser usr = (User)getParent().getModelObject(); BRSystem.out.println(firstname==+usr.getFirstName()); BR } BR}BR);BR } /ppAny help would be appreciated. Thanks, krishna/p -- View this message in context: http://www.nabble.com/Model-object-not-geeting-updated-inside-a-RefreshingView-tp19688544p19689965.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Model-object-not-geeting-updated-inside-a-RefreshingView-tp19688544p19691024.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Model object not geeting updated inside a RefreshingView
does your model properly implement equals and hashcode? and i mean your actual IModel you are using, not the object inside it... -igor On Fri, Sep 26, 2008 at 8:55 AM, krisnv [EMAIL PROTECTED] wrote: igor, I am already setting it . Do i have to provide any custom implementation? refreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); -krishna igor.vaynberg wrote: see IItemReuseStrategy -igor On Fri, Sep 26, 2008 at 8:41 AM, krisnv [EMAIL PROTECTED] wrote: pThanks for you reply and pointing to the right component to use. Just curious, is there any way to fix this to make it work using this approach?/p pkrishna/p Matej Knopp-2 wrote: That's probably because refreshing view is creating new components on every request. Try using listView nad don't forget to call setReuseItems(true) on it. -Matej On Fri, Sep 26, 2008 at 4:49 PM, krisnv [EMAIL PROTECTED] wrote: can any of you please respond. krisnv wrote: pI have RefreshingView similar to Contact Editor in Wicket Examples.BR I added a Panel and TextFields to this RefreshingView. BRI populate these TextFields from a list from Database and have assigned Model objects to each TextField component. The problem is when user modifies a value in any of the text fields, i still get old value from the original list. Model is not getting updated to reflect new value entered by the use. Here is the code:/p p RefreshingView refreshingView = new RefreshingView(simple) { BR protected Iterator getItemModels() {BR return new ModelIteratorAdapter(users)BR { BRprotected IModel model(Object object) {BR return new DetachableUserModel((User)object); BR}BR }; BR}BR protected void populateItem(final Item item) { BR// populate the row of the repeaterBR IModel user = item.getModel(); BRitem.add(new ActionPanel(actions, item.getModel()).setOutputMarkupId(true));BR item.add(new TextField(UserName, new AbstractReadOnlyModel() BR{ BRpublic Object getObject() BR{BR User ur = (User)item.getModelObject(); return ur.getUserName();BR }BR }BR));BR item.add(new TextField(FirstName, new AbstractReadOnlyModel()BR { BRpublic Object getObject()BR {BR User ur = (User)item.getModelObject(); BRreturn ur.getFirstName();BR } BR}BR));BR item.add(new TextField(LastName, new AbstractReadOnlyModel() { BRpublic Object getObject() {BR User ur = (User)item.getModelObject();BR return ur.getLastName(); } BR}BR));BR item.add(new TextField(ContactPhone, new AbstractReadOnlyModel() { BRpublic Object getObject() BR{ BRUser ur = (User)item.getModelObject();BR return ur.getPhone(); }BR }BR)); BRitem.add(new TextField(Email, new AbstractReadOnlyModel()BR {BR public Object getObject()BR {BR User ur = (User)item.getModelObject(); BR return ur.getEmail();BR } BR}BR)BR); BRitem.add(new PasswordTextField(Password, new AbstractReadOnlyModel() {BR public Object getObject() BR{ BRUser ur = (User)item.getModelObject(); BR return ur.getPassword(); BR} BR}BR)); BR}BR protected Item newItem(String id, int index, IModel model) BR{BR // this item sets markup class attribute to either 'odd' orBR // 'even' for decoration return new OddEvenItem(id, index, model); BR}BR }; BRrefreshingView.setOutputMarkupId(true); BRrefreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); BRrefreshingView.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance()); BRform.add(refreshingView); }/p p Here is the code for the Panel. I am trying to print the value from the text field but still getting old value.BR private class ActionPanel extends Panel /pp{ BR public ActionPanel(String id, IModel model) BR{ BRsuper(id, model); BR add(new Link(edit) {BR public void onClick() {BR int resultCode=0; BRUser usr = (User)getParent().getModelObject(); BRSystem.out.println(firstname==+usr.getFirstName()); BR } BR}BR);BR } /ppAny help would be appreciated. Thanks, krishna/p -- View this message in context: http://www.nabble.com/Model-object-not-geeting-updated-inside-a-RefreshingView-tp19688544p19689965.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Model-object-not-geeting-updated-inside-a-RefreshingView-tp19688544p19691024.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: Loadable-detachable collections?
Yeah, I originally had that - a LDM as the main model and the ListView model based on that. I've also tried a couple of variations of this but I still get the Serialization errors. I think maybe I'm not following you exactly. As far as I can see the ListView needs a collection as a model (the collection of Contacts) and, no matter how I configure this model, it will still point to non-serializable objects (either the 'owner' property of the AbstractPersistentCollection or perhaps the Contacts themselves). So does the collection itself need to be Loadable / Detachable? Thanks. jwcarman wrote: I usually use a LDM for the main object (which has the collection property) and have the model for the collection based upon that (perhaps a PropertyModel?). -- View this message in context: http://www.nabble.com/Loadable-detachable-collections--tp19685949p19691650.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Model object not geeting updated inside a RefreshingView
Yes I think so. Below is my code : public boolean equals(final Object obj) { if (obj == this) { return true; } else if (obj == null) { return false; } else if (obj instanceof DetachableUserModel) { DetachableUserModel other = (DetachableUserModel)obj; return other.userId == this.userId; } return false; } public int hashCode() { return super.hashCode(); } - krishna igor.vaynberg wrote: does your model properly implement equals and hashcode? and i mean your actual IModel you are using, not the object inside it... -igor On Fri, Sep 26, 2008 at 8:55 AM, krisnv [EMAIL PROTECTED] wrote: igor, I am already setting it . Do i have to provide any custom implementation? refreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); -krishna igor.vaynberg wrote: see IItemReuseStrategy -igor On Fri, Sep 26, 2008 at 8:41 AM, krisnv [EMAIL PROTECTED] wrote: pThanks for you reply and pointing to the right component to use. Just curious, is there any way to fix this to make it work using this approach?/p pkrishna/p Matej Knopp-2 wrote: That's probably because refreshing view is creating new components on every request. Try using listView nad don't forget to call setReuseItems(true) on it. -Matej On Fri, Sep 26, 2008 at 4:49 PM, krisnv [EMAIL PROTECTED] wrote: can any of you please respond. krisnv wrote: pI have RefreshingView similar to Contact Editor in Wicket Examples.BR I added a Panel and TextFields to this RefreshingView. BRI populate these TextFields from a list from Database and have assigned Model objects to each TextField component. The problem is when user modifies a value in any of the text fields, i still get old value from the original list. Model is not getting updated to reflect new value entered by the use. Here is the code:/p p RefreshingView refreshingView = new RefreshingView(simple) { BR protected Iterator getItemModels() {BR return new ModelIteratorAdapter(users)BR { BRprotected IModel model(Object object) {BR return new DetachableUserModel((User)object); BR}BR }; BR}BR protected void populateItem(final Item item) { BR// populate the row of the repeaterBR IModel user = item.getModel(); BRitem.add(new ActionPanel(actions, item.getModel()).setOutputMarkupId(true));BR item.add(new TextField(UserName, new AbstractReadOnlyModel() BR{ BRpublic Object getObject() BR{BR User ur = (User)item.getModelObject(); return ur.getUserName();BR }BR }BR));BR item.add(new TextField(FirstName, new AbstractReadOnlyModel()BR { BRpublic Object getObject()BR {BR User ur = (User)item.getModelObject(); BRreturn ur.getFirstName();BR } BR}BR));BR item.add(new TextField(LastName, new AbstractReadOnlyModel() { BRpublic Object getObject() {BR User ur = (User)item.getModelObject();BR return ur.getLastName(); } BR}BR));BR item.add(new TextField(ContactPhone, new AbstractReadOnlyModel() { BRpublic Object getObject() BR{ BRUser ur = (User)item.getModelObject();BR return ur.getPhone(); }BR }BR)); BRitem.add(new TextField(Email, new AbstractReadOnlyModel()BR {BR public Object getObject()BR {BR User ur = (User)item.getModelObject(); BR return ur.getEmail();BR } BR}BR)BR); BRitem.add(new PasswordTextField(Password, new AbstractReadOnlyModel() {BR public Object getObject() BR{ BRUser ur = (User)item.getModelObject(); BR return ur.getPassword(); BR} BR}BR)); BR}BR protected Item newItem(String id, int index, IModel model) BR{BR // this item sets markup class attribute to either 'odd' orBR // 'even' for decoration return new OddEvenItem(id, index, model); BR}BR }; BRrefreshingView.setOutputMarkupId(true); BRrefreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); BRrefreshingView.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance()); BRform.add(refreshingView); }/p p Here is the code for the Panel. I am trying to print the value from the text field but still getting old value.BR private class ActionPanel extends Panel /pp{ BR public ActionPanel(String id, IModel model) BR{ BRsuper(id, model); BR add(new Link(edit) {BR public void onClick() {BR int resultCode=0; BRUser usr = (User)getParent().getModelObject(); BRSystem.out.println(firstname==+usr.getFirstName()); BR } BR}BR);BR } /ppAny help would be appreciated. Thanks, krishna/p -- View this message in context: http://www.nabble.com/Model-object-not-geeting-updated-inside-a-RefreshingView-tp19688544p19689965.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,
Re: Model object not geeting updated inside a RefreshingView
equals seems ok, although your hashcode is broken you do realize you are adding read only models to your textfields...those models never update model objects. in fact you shouldve gotten a stack trace in your log indicating that you cannot call setobject on a readonlymodel. if you do not see this i am guessing your form never submits. the proper way to do this would be: add(new textfield(name, new propertymodel(item.getmodel(), name)); -igor On Fri, Sep 26, 2008 at 9:14 AM, krisnv [EMAIL PROTECTED] wrote: Yes I think so. Below is my code : public boolean equals(final Object obj) { if (obj == this) { return true; } else if (obj == null) { return false; } else if (obj instanceof DetachableUserModel) { DetachableUserModel other = (DetachableUserModel)obj; return other.userId == this.userId; } return false; } public int hashCode() { return super.hashCode(); } - krishna igor.vaynberg wrote: does your model properly implement equals and hashcode? and i mean your actual IModel you are using, not the object inside it... -igor On Fri, Sep 26, 2008 at 8:55 AM, krisnv [EMAIL PROTECTED] wrote: igor, I am already setting it . Do i have to provide any custom implementation? refreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); -krishna igor.vaynberg wrote: see IItemReuseStrategy -igor On Fri, Sep 26, 2008 at 8:41 AM, krisnv [EMAIL PROTECTED] wrote: pThanks for you reply and pointing to the right component to use. Just curious, is there any way to fix this to make it work using this approach?/p pkrishna/p Matej Knopp-2 wrote: That's probably because refreshing view is creating new components on every request. Try using listView nad don't forget to call setReuseItems(true) on it. -Matej On Fri, Sep 26, 2008 at 4:49 PM, krisnv [EMAIL PROTECTED] wrote: can any of you please respond. krisnv wrote: pI have RefreshingView similar to Contact Editor in Wicket Examples.BR I added a Panel and TextFields to this RefreshingView. BRI populate these TextFields from a list from Database and have assigned Model objects to each TextField component. The problem is when user modifies a value in any of the text fields, i still get old value from the original list. Model is not getting updated to reflect new value entered by the use. Here is the code:/p p RefreshingView refreshingView = new RefreshingView(simple) { BR protected Iterator getItemModels() {BR return new ModelIteratorAdapter(users)BR { BRprotected IModel model(Object object) {BR return new DetachableUserModel((User)object); BR}BR }; BR}BR protected void populateItem(final Item item) { BR// populate the row of the repeaterBR IModel user = item.getModel(); BRitem.add(new ActionPanel(actions, item.getModel()).setOutputMarkupId(true));BR item.add(new TextField(UserName, new AbstractReadOnlyModel() BR{ BRpublic Object getObject() BR{BR User ur = (User)item.getModelObject(); return ur.getUserName();BR }BR }BR));BR item.add(new TextField(FirstName, new AbstractReadOnlyModel()BR { BRpublic Object getObject()BR {BR User ur = (User)item.getModelObject(); BRreturn ur.getFirstName();BR } BR}BR));BR item.add(new TextField(LastName, new AbstractReadOnlyModel() { BRpublic Object getObject() {BR User ur = (User)item.getModelObject();BR return ur.getLastName(); } BR}BR));BR item.add(new TextField(ContactPhone, new AbstractReadOnlyModel() { BRpublic Object getObject() BR{ BRUser ur = (User)item.getModelObject();BR return ur.getPhone(); }BR }BR)); BRitem.add(new TextField(Email, new AbstractReadOnlyModel()BR {BR public Object getObject()BR {BR User ur = (User)item.getModelObject(); BR return ur.getEmail();BR } BR}BR)BR); BRitem.add(new PasswordTextField(Password, new AbstractReadOnlyModel() {BR public Object getObject() BR{ BRUser ur = (User)item.getModelObject(); BR return ur.getPassword(); BR} BR}BR)); BR}BR protected Item newItem(String id, int index, IModel model) BR{BR // this item sets markup class attribute to either 'odd' orBR // 'even' for decoration return new OddEvenItem(id, index, model); BR}BR }; BRrefreshingView.setOutputMarkupId(true); BRrefreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); BRrefreshingView.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance()); BRform.add(refreshingView); }/p p Here is the code for the Panel. I am trying to print the value from the text field but still getting old value.BR private class ActionPanel extends Panel /pp{ BR public ActionPanel(String id, IModel model) BR{ BRsuper(id, model); BR add(new Link(edit) {BR public void onClick() {BR int resultCode=0;
Re: Loadable-detachable collections?
James suggested 'model chaining', where you nest the LDM inside property models. In your case I'd suggest using a DataView instead, as it is easier to work with when using LDM's and data coming from databases. If you still want to use ListView, you'll have to override newListItemModel (iirc) and let that one return a LDM for the item in the list. Martijn On Fri, Sep 26, 2008 at 6:11 PM, Neil McT [EMAIL PROTECTED] wrote: Yeah, I originally had that - a LDM as the main model and the ListView model based on that. I've also tried a couple of variations of this but I still get the Serialization errors. I think maybe I'm not following you exactly. As far as I can see the ListView needs a collection as a model (the collection of Contacts) and, no matter how I configure this model, it will still point to non-serializable objects (either the 'owner' property of the AbstractPersistentCollection or perhaps the Contacts themselves). So does the collection itself need to be Loadable / Detachable? Thanks. jwcarman wrote: I usually use a LDM for the main object (which has the collection property) and have the model for the collection based upon that (perhaps a PropertyModel?). -- View this message in context: http://www.nabble.com/Loadable-detachable-collections--tp19685949p19691650.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loadable-detachable collections?
The main LDM shouldn't get you serialization errors, because you're not serializing the entity (just the key perhaps and a proxied reference to your dao/repository). On Fri, Sep 26, 2008 at 12:11 PM, Neil McT [EMAIL PROTECTED] wrote: Yeah, I originally had that - a LDM as the main model and the ListView model based on that. I've also tried a couple of variations of this but I still get the Serialization errors. I think maybe I'm not following you exactly. As far as I can see the ListView needs a collection as a model (the collection of Contacts) and, no matter how I configure this model, it will still point to non-serializable objects (either the 'owner' property of the AbstractPersistentCollection or perhaps the Contacts themselves). So does the collection itself need to be Loadable / Detachable? Thanks. jwcarman wrote: I usually use a LDM for the main object (which has the collection property) and have the model for the collection based upon that (perhaps a PropertyModel?). -- View this message in context: http://www.nabble.com/Loadable-detachable-collections--tp19685949p19691650.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Empty PageParametyers when using HybridUrlCodingStrategy
Thx for the quick response. I cahnged the url mount in my application to mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)) ... My problem is that still when i try to create iframe like: PageParameters params = new PageParameters(); params.add(url, url) or params.add(0, url) InlineFrame myFrame = new InlineFrame(MyFrame, this.getPageMap(),MyFrame.class, params); myFrame .add(new AttributeModifier(src, newModel((Serializable)/myapp/iframe/MyFrame))); The params get empty to the MyFrame constructor.The only situation the params are not empty is when I do: myFrame .add(new AttributeModifier(src, newModel((Serializable)/myapp/iframe/MyFrame/param_value))); But then the url is not found since I define in my app: mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)) ... The param is runtime value and I can not know it when creating my app. Erik van Oosten wrote: You should use one of the other HybridUrlCoding strategies. E.g. the IndexedHybridUrlCodingStrategy. If you need an MixedParamHybridUrlCodingStrategy, I can mail it to the list. Regards, Erik. itayh wrote: Hi, I am using HybridUrlCodingStrategy for my url's (I need that the mount point will preserved even after invoking listener interfaces). I am creating IFrames using InlineFrame class. In order that the url of the IFrame will be what I want I do: PageParameters params = new PageParameters(); params.add(url, url); InlineFrame myFrame = new InlineFrame(MyFrame, this.getPageMap(), MyFrame.class, params); myFrame .add(new AttributeModifier(src, new Model((Serializable)/myapp/iframe/MyFrame))); In my Application I have: mount(new HybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)); The thing is that in MyFrame class the PageParameters are empty. I am not sure how to use HybridUrlCodingStrategy.PAGE_PARAMETERS_META_DATA_KEY and where, or maybe I don't need to set src directly and there is another way to do it? Anyone? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Empty-PageParametyers-when-using-HybridUrlCodingStrategy-tp19666330p19691946.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wizard in Modalwindow getting alert message upon using the Wizard buttons
When we ask for a JIRA issue, we want you to create a bug report in our JIRA instance [1] and attach the quickstart (mvn clean before you zip) to that issue. We don't mean that you try the JIRA support forums [2], because though Atlassian has a track record of using and supporting Apache projects, they probably don't have a clue about ModalWindow. Martijn [1] http://issues.apache.org/jira/browse/WICKET [2] http://www.nabble.com/Wizard-in-Modalwindow-getting-alert-message-upon-using-the-Wizard-buttons-tp19653182p19653182.html On Fri, Sep 26, 2008 at 5:49 PM, Kuga [EMAIL PROTECTED] wrote: Hi Matez, Can you please help me with any information, could not find out the reason so far. Kind of stuck... Appreciate your help. thanks Kuga Kuga wrote: Hi, I have added a jira issue for this. Can you please let me know? thanks kuga Matej Knopp-2 wrote: Please create jira issue for this. Quickstart project to demonstrate the behavior would be welcome. -Matej On Wed, Sep 24, 2008 at 7:45 AM, Kuga [EMAIL PROTECTED] wrote: Can anyone please help me with any possible solution or hints? Greatly appreciate your comments, help. Thanks kuga Kuga wrote: Hi, I was browsing through the wicket forums, for one of the problems I am having using Wicket wizard in ModalWindow. I am iusing Wicket 1.3.4 Wondering if anyone could help me with any possible solutions. Greatly appreciate you time and response. I have changed the WizardButtons to use Ajax buttons. The following is the behavior: In the wizard Ajax button I added the following: protected void onSubmit(AjaxRequestTarget target, Form form) { onClick(target); target.addComponent((Wizard)wizard); } 1. I have added 3 IWizardStep to the model 2. Added the wizard to a panel, and then added this panel as setContent() to the ModalWindow. 3. Lauched the modalwindow, a. Observed the right behavior (button enabled state) of the buttons at launch b. Now Clicked on Next button – traverses to the next step. c. Now clicked on the Previous button – instead of going to Previous – I got the annoying alert message. d. added the javascript (Wicket.windo.unloadConfirmatoin = false; e. Adding the above scrip was just suppressing the alert message, and just closes the wizard window without going to the previous screen. Not really sure where I am going wrong. Have been trying to Debug, but since the previous button doesn't get the onClick() due to closing, could not even debug this issue. Can you please let me know about your experience in solving this issue, and also if you feel that I am doing any mistake, please let me know. Thanks Best Regards Kuga -- View this message in context: http://www.nabble.com/Wizard-in-Modalwindow-getting-alert-message-upon-using-the-Wizard-buttons-tp19631049p19642382.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Wizard-in-Modalwindow-getting-alert-message-upon-using-the-Wizard-buttons-tp19631049p19691196.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loadable-detachable collections?
Yes, perhaps I wasn't clear enough. But, Martijn is correct. A DataView (which uses a DataProvider) might be a better choice in your situation (unless you have to load the entity to display other parts of your page anyway). Are you always showing all members of the nested collection? On Fri, Sep 26, 2008 at 12:25 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: James suggested 'model chaining', where you nest the LDM inside property models. In your case I'd suggest using a DataView instead, as it is easier to work with when using LDM's and data coming from databases. If you still want to use ListView, you'll have to override newListItemModel (iirc) and let that one return a LDM for the item in the list. Martijn On Fri, Sep 26, 2008 at 6:11 PM, Neil McT [EMAIL PROTECTED] wrote: Yeah, I originally had that - a LDM as the main model and the ListView model based on that. I've also tried a couple of variations of this but I still get the Serialization errors. I think maybe I'm not following you exactly. As far as I can see the ListView needs a collection as a model (the collection of Contacts) and, no matter how I configure this model, it will still point to non-serializable objects (either the 'owner' property of the AbstractPersistentCollection or perhaps the Contacts themselves). So does the collection itself need to be Loadable / Detachable? Thanks. jwcarman wrote: I usually use a LDM for the main object (which has the collection property) and have the model for the collection based upon that (perhaps a PropertyModel?). -- View this message in context: http://www.nabble.com/Loadable-detachable-collections--tp19685949p19691650.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Model object not geeting updated inside a RefreshingView
that is because your form never submits, otherwise you woudlve gotten a stacktrace because you were using a readonlymodel previously -igor On Fri, Sep 26, 2008 at 9:43 AM, krisnv [EMAIL PROTECTED] wrote: I tried using the PropertyModel , add(new textfield(name, new propertymodel(item.getmodel(), name)); still not getting the new value. - krishna igor.vaynberg wrote: equals seems ok, although your hashcode is broken you do realize you are adding read only models to your textfields...those models never update model objects. in fact you shouldve gotten a stack trace in your log indicating that you cannot call setobject on a readonlymodel. if you do not see this i am guessing your form never submits. the proper way to do this would be: add(new textfield(name, new propertymodel(item.getmodel(), name)); -igor On Fri, Sep 26, 2008 at 9:14 AM, krisnv [EMAIL PROTECTED] wrote: Yes I think so. Below is my code : public boolean equals(final Object obj) { if (obj == this) { return true; } else if (obj == null) { return false; } else if (obj instanceof DetachableUserModel) { DetachableUserModel other = (DetachableUserModel)obj; return other.userId == this.userId; } return false; } public int hashCode() { return super.hashCode(); } - krishna igor.vaynberg wrote: does your model properly implement equals and hashcode? and i mean your actual IModel you are using, not the object inside it... -igor On Fri, Sep 26, 2008 at 8:55 AM, krisnv [EMAIL PROTECTED] wrote: igor, I am already setting it . Do i have to provide any custom implementation? refreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); -krishna igor.vaynberg wrote: see IItemReuseStrategy -igor On Fri, Sep 26, 2008 at 8:41 AM, krisnv [EMAIL PROTECTED] wrote: pThanks for you reply and pointing to the right component to use. Just curious, is there any way to fix this to make it work using this approach?/p pkrishna/p Matej Knopp-2 wrote: That's probably because refreshing view is creating new components on every request. Try using listView nad don't forget to call setReuseItems(true) on it. -Matej On Fri, Sep 26, 2008 at 4:49 PM, krisnv [EMAIL PROTECTED] wrote: can any of you please respond. krisnv wrote: pI have RefreshingView similar to Contact Editor in Wicket Examples.BR I added a Panel and TextFields to this RefreshingView. BRI populate these TextFields from a list from Database and have assigned Model objects to each TextField component. The problem is when user modifies a value in any of the text fields, i still get old value from the original list. Model is not getting updated to reflect new value entered by the use. Here is the code:/p p RefreshingView refreshingView = new RefreshingView(simple) { BR protected Iterator getItemModels() {BR return new ModelIteratorAdapter(users)BR { BRprotected IModel model(Object object) {BR return new DetachableUserModel((User)object); BR}BR }; BR}BR protected void populateItem(final Item item) { BR// populate the row of the repeaterBR IModel user = item.getModel(); BRitem.add(new ActionPanel(actions, item.getModel()).setOutputMarkupId(true));BR item.add(new TextField(UserName, new AbstractReadOnlyModel() BR{ BRpublic Object getObject() BR{BR User ur = (User)item.getModelObject(); return ur.getUserName();BR }BR }BR));BR item.add(new TextField(FirstName, new AbstractReadOnlyModel()BR { BRpublic Object getObject()BR {BR User ur = (User)item.getModelObject(); BRreturn ur.getFirstName();BR } BR}BR));BR item.add(new TextField(LastName, new AbstractReadOnlyModel() { BRpublic Object getObject() {BR User ur = (User)item.getModelObject();BR return ur.getLastName(); } BR}BR));BR item.add(new TextField(ContactPhone, new AbstractReadOnlyModel() { BRpublic Object getObject() BR{ BRUser ur = (User)item.getModelObject();BR return ur.getPhone(); }BR }BR)); BRitem.add(new TextField(Email, new AbstractReadOnlyModel()BR {BR public Object getObject()BR {BR User ur = (User)item.getModelObject(); BR return ur.getEmail();BR } BR}BR)BR); BRitem.add(new PasswordTextField(Password, new AbstractReadOnlyModel() {BR public Object getObject() BR{ BRUser ur = (User)item.getModelObject(); BR return ur.getPassword(); BR} BR}BR)); BR}BR protected Item newItem(String id, int index, IModel model) BR{BR // this item sets markup class attribute to either 'odd' orBR // 'even' for decoration return new OddEvenItem(id, index, model); BR}BR }; BRrefreshingView.setOutputMarkupId(true); BRrefreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy());
Re: Loadable-detachable collections?
I wasn't getting the error from the main LDM but from the underlying collection (and its reference back to 'owner'). I need to display all collections elements in this instance but maybe on other pages, only a subset. Thanks both for your replies. I'm probably going to have a look at DataView. jwcarman wrote: Yes, perhaps I wasn't clear enough. But, Martijn is correct. A DataView (which uses a DataProvider) might be a better choice in your situation (unless you have to load the entity to display other parts of your page anyway). Are you always showing all members of the nested collection? -- View this message in context: http://www.nabble.com/Loadable-detachable-collections--tp19685949p19692314.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loadable-detachable collections?
How about sharing some code with us as to how you're setting up your models? On Fri, Sep 26, 2008 at 12:48 PM, Neil McT [EMAIL PROTECTED] wrote: I wasn't getting the error from the main LDM but from the underlying collection (and its reference back to 'owner'). I need to display all collections elements in this instance but maybe on other pages, only a subset. Thanks both for your replies. I'm probably going to have a look at DataView. jwcarman wrote: Yes, perhaps I wasn't clear enough. But, Martijn is correct. A DataView (which uses a DataProvider) might be a better choice in your situation (unless you have to load the entity to display other parts of your page anyway). Are you always showing all members of the nested collection? -- View this message in context: http://www.nabble.com/Loadable-detachable-collections--tp19685949p19692314.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Model object not geeting updated inside a RefreshingView
Ok. Should i need to call submitForm() on the event onClick() for the link? add(new Link(edit) { public void onClick() { int resultCode=0; User usr = (User)getParent().getModelObject(); System.out.println(firstname==+usr.getFirstName()); } }); } -krishna igor.vaynberg wrote: that is because your form never submits, otherwise you woudlve gotten a stacktrace because you were using a readonlymodel previously -igor On Fri, Sep 26, 2008 at 9:43 AM, krisnv [EMAIL PROTECTED] wrote: I tried using the PropertyModel , add(new textfield(name, new propertymodel(item.getmodel(), name)); still not getting the new value. - krishna igor.vaynberg wrote: equals seems ok, although your hashcode is broken you do realize you are adding read only models to your textfields...those models never update model objects. in fact you shouldve gotten a stack trace in your log indicating that you cannot call setobject on a readonlymodel. if you do not see this i am guessing your form never submits. the proper way to do this would be: add(new textfield(name, new propertymodel(item.getmodel(), name)); -igor On Fri, Sep 26, 2008 at 9:14 AM, krisnv [EMAIL PROTECTED] wrote: Yes I think so. Below is my code : public boolean equals(final Object obj) { if (obj == this) { return true; } else if (obj == null) { return false; } else if (obj instanceof DetachableUserModel) { DetachableUserModel other = (DetachableUserModel)obj; return other.userId == this.userId; } return false; } public int hashCode() { return super.hashCode(); } - krishna igor.vaynberg wrote: does your model properly implement equals and hashcode? and i mean your actual IModel you are using, not the object inside it... -igor On Fri, Sep 26, 2008 at 8:55 AM, krisnv [EMAIL PROTECTED] wrote: igor, I am already setting it . Do i have to provide any custom implementation? refreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); -krishna igor.vaynberg wrote: see IItemReuseStrategy -igor On Fri, Sep 26, 2008 at 8:41 AM, krisnv [EMAIL PROTECTED] wrote: pThanks for you reply and pointing to the right component to use. Just curious, is there any way to fix this to make it work using this approach?/p pkrishna/p Matej Knopp-2 wrote: That's probably because refreshing view is creating new components on every request. Try using listView nad don't forget to call setReuseItems(true) on it. -Matej On Fri, Sep 26, 2008 at 4:49 PM, krisnv [EMAIL PROTECTED] wrote: can any of you please respond. krisnv wrote: pI have RefreshingView similar to Contact Editor in Wicket Examples.BR I added a Panel and TextFields to this RefreshingView. BRI populate these TextFields from a list from Database and have assigned Model objects to each TextField component. The problem is when user modifies a value in any of the text fields, i still get old value from the original list. Model is not getting updated to reflect new value entered by the use. Here is the code:/p p RefreshingView refreshingView = new RefreshingView(simple) { BR protected Iterator getItemModels() {BR return new ModelIteratorAdapter(users)BR { BRprotected IModel model(Object object) {BR return new DetachableUserModel((User)object); BR}BR }; BR}BR protected void populateItem(final Item item) { BR// populate the row of the repeaterBR IModel user = item.getModel(); BRitem.add(new ActionPanel(actions, item.getModel()).setOutputMarkupId(true));BR item.add(new TextField(UserName, new AbstractReadOnlyModel() BR{ BRpublic Object getObject() BR{BR User ur = (User)item.getModelObject(); return ur.getUserName();BR }BR }BR));BR item.add(new TextField(FirstName, new AbstractReadOnlyModel()BR { BRpublic Object getObject()BR {BR User ur = (User)item.getModelObject(); BRreturn ur.getFirstName();BR } BR}BR));BR item.add(new TextField(LastName, new AbstractReadOnlyModel() { BRpublic Object getObject() {BR User ur = (User)item.getModelObject();BR return ur.getLastName(); } BR}BR));BR item.add(new TextField(ContactPhone, new AbstractReadOnlyModel() { BRpublic Object getObject() BR{ BRUser ur = (User)item.getModelObject();BR return ur.getPhone(); }BR }BR)); BRitem.add(new TextField(Email, new AbstractReadOnlyModel()BR {BR public Object getObject()BR {BR User ur = (User)item.getModelObject(); BR return ur.getEmail();BR } BR}BR)BR); BRitem.add(new PasswordTextField(Password, new AbstractReadOnlyModel() {BR public Object getObject() BR{ BRUser ur = (User)item.getModelObject(); BR return ur.getPassword(); BR} BR}BR)); BR}BR protected Item newItem(String id,
Re: Model object not geeting updated inside a RefreshingView
Never mind. I used SubmitLink instead of Link and that fixed it. Thanks a lot Igor and others for your time and replies. - krishna krisnv wrote: Ok. Should i need to call submitForm() on the event onClick() for the link? add(new Link(edit) { public void onClick() { int resultCode=0; User usr = (User)getParent().getModelObject(); System.out.println(firstname==+usr.getFirstName()); } }); } -krishna igor.vaynberg wrote: that is because your form never submits, otherwise you woudlve gotten a stacktrace because you were using a readonlymodel previously -igor On Fri, Sep 26, 2008 at 9:43 AM, krisnv [EMAIL PROTECTED] wrote: I tried using the PropertyModel , add(new textfield(name, new propertymodel(item.getmodel(), name)); still not getting the new value. - krishna igor.vaynberg wrote: equals seems ok, although your hashcode is broken you do realize you are adding read only models to your textfields...those models never update model objects. in fact you shouldve gotten a stack trace in your log indicating that you cannot call setobject on a readonlymodel. if you do not see this i am guessing your form never submits. the proper way to do this would be: add(new textfield(name, new propertymodel(item.getmodel(), name)); -igor On Fri, Sep 26, 2008 at 9:14 AM, krisnv [EMAIL PROTECTED] wrote: Yes I think so. Below is my code : public boolean equals(final Object obj) { if (obj == this) { return true; } else if (obj == null) { return false; } else if (obj instanceof DetachableUserModel) { DetachableUserModel other = (DetachableUserModel)obj; return other.userId == this.userId; } return false; } public int hashCode() { return super.hashCode(); } - krishna igor.vaynberg wrote: does your model properly implement equals and hashcode? and i mean your actual IModel you are using, not the object inside it... -igor On Fri, Sep 26, 2008 at 8:55 AM, krisnv [EMAIL PROTECTED] wrote: igor, I am already setting it . Do i have to provide any custom implementation? refreshingView.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); -krishna igor.vaynberg wrote: see IItemReuseStrategy -igor On Fri, Sep 26, 2008 at 8:41 AM, krisnv [EMAIL PROTECTED] wrote: pThanks for you reply and pointing to the right component to use. Just curious, is there any way to fix this to make it work using this approach?/p pkrishna/p Matej Knopp-2 wrote: That's probably because refreshing view is creating new components on every request. Try using listView nad don't forget to call setReuseItems(true) on it. -Matej On Fri, Sep 26, 2008 at 4:49 PM, krisnv [EMAIL PROTECTED] wrote: can any of you please respond. krisnv wrote: pI have RefreshingView similar to Contact Editor in Wicket Examples.BR I added a Panel and TextFields to this RefreshingView. BRI populate these TextFields from a list from Database and have assigned Model objects to each TextField component. The problem is when user modifies a value in any of the text fields, i still get old value from the original list. Model is not getting updated to reflect new value entered by the use. Here is the code:/p p RefreshingView refreshingView = new RefreshingView(simple) { BR protected Iterator getItemModels() {BR return new ModelIteratorAdapter(users)BR { BRprotected IModel model(Object object) {BR return new DetachableUserModel((User)object); BR}BR }; BR}BR protected void populateItem(final Item item) { BR// populate the row of the repeaterBR IModel user = item.getModel(); BRitem.add(new ActionPanel(actions, item.getModel()).setOutputMarkupId(true));BR item.add(new TextField(UserName, new AbstractReadOnlyModel() BR{ BRpublic Object getObject() BR{BR User ur = (User)item.getModelObject(); return ur.getUserName();BR }BR }BR));BR item.add(new TextField(FirstName, new AbstractReadOnlyModel()BR { BRpublic Object getObject()BR {BR User ur = (User)item.getModelObject(); BRreturn ur.getFirstName();BR } BR}BR));BR item.add(new TextField(LastName, new AbstractReadOnlyModel() { BRpublic Object getObject() {BR User ur = (User)item.getModelObject();BR return ur.getLastName(); } BR}BR));BR item.add(new TextField(ContactPhone, new AbstractReadOnlyModel() { BRpublic Object getObject() BR{ BRUser ur = (User)item.getModelObject();BR return ur.getPhone(); }BR }BR)); BRitem.add(new TextField(Email, new AbstractReadOnlyModel()BR {BR public Object getObject()BR {BR User ur = (User)item.getModelObject(); BR return ur.getEmail();BR } BR}BR)BR); BRitem.add(new PasswordTextField(Password, new
Re: Loadable-detachable collections?
Sure. Originally I had it set up like (note that userModel is a LDM which wraps a SystemUser. SystemUser contains a collection of Contact objects). final WebMarkupContainer listContainer = new WebMarkupContainer(listContainer); ListView displayList = new ListView(contactsList, userModel.getObject().getContacts()){ @Override protected void populateItem(final ListItem item) { Contact contact = (Contact)item.getModelObject(); item.add(new Label(contactName, contact.getName())); etc etc This was producing the original error AbstractPersistentCollection.owner [class=com.myapp.domain.SystemUser] - field that is not serializable I then tried. final WebMarkupContainer listContainer = new WebMarkupContainer(listContainer); ListView displayList = new ListView( contactsList, new PropertyModel(userModel.getObject(), contacts)){ @Override protected void populateItem(final ListItem item) { item.add(new Label(contactName, ((Contact)item.getModelObject()).getName())); etc etc And was getting private java.lang.Object org.apache.wicket.model.AbstractPropertyModel.target [class=com.pyso.domain.SystemUser] - field that is not serializable I'm assuming, from the PropertyModel. jwcarman wrote: How about sharing some code with us as to how you're setting up your models? -- View this message in context: http://www.nabble.com/Loadable-detachable-collections--tp19685949p19693132.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loadable-detachable collections?
And checkout the AjaxFallbackDefaultDataTable while your at it.. It's really nice too. Neil McT wrote: I wasn't getting the error from the main LDM but from the underlying collection (and its reference back to 'owner'). I need to display all collections elements in this instance but maybe on other pages, only a subset. Thanks both for your replies. I'm probably going to have a look at DataView. jwcarman wrote: Yes, perhaps I wasn't clear enough. But, Martijn is correct. A DataView (which uses a DataProvider) might be a better choice in your situation (unless you have to load the entity to display other parts of your page anyway). Are you always showing all members of the nested collection? -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loadable-detachable collections?
You are not chaining... This is how: new PropertyModel(userModel,contacts) Neil McT wrote: Sure. Originally I had it set up like (note that userModel is a LDM which wraps a SystemUser. SystemUser contains a collection of Contact objects). final WebMarkupContainer listContainer = new WebMarkupContainer(listContainer); ListView displayList = new ListView(contactsList, userModel.getObject().getContacts()){ @Override protected void populateItem(final ListItem item) { Contact contact = (Contact)item.getModelObject(); item.add(new Label(contactName, contact.getName())); etc etc This was producing the original error AbstractPersistentCollection.owner [class=com.myapp.domain.SystemUser] - field that is not serializable I then tried. final WebMarkupContainer listContainer = new WebMarkupContainer(listContainer); ListView displayList = new ListView( contactsList, new PropertyModel(userModel.getObject(), contacts)){ @Override protected void populateItem(final ListItem item) { item.add(new Label(contactName, ((Contact)item.getModelObject()).getName())); etc etc And was getting private java.lang.Object org.apache.wicket.model.AbstractPropertyModel.target [class=com.pyso.domain.SystemUser] - field that is not serializable I'm assuming, from the PropertyModel. jwcarman wrote: How about sharing some code with us as to how you're setting up your models? -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
illegal relative path element?
hi, i just noticed that a panel that remained untouched for weeks (and that worked ok) is now failing - sometimes! the panel simply contains a search form. depending on which checkbox i check, it behaves fine, or sometimes it doesn't, if i play with the back button it will eventually work. i'm completely lost with this one. componment hierarchy changed between rendering and form submission? (i wonder how could this be done) note that the panel is rendered in the search page, and re-rendered with the results (after submission). i am using wicket 1.4-m3 thanks a lot for your help! francisco org.apache.wicket.WicketRuntimeException: submitted http post value [check11] for CheckGroup component [35:recherche:form:niveaux] contains an illegal relative path element [check11] which does not point to a Check component. Due to this the CheckGroup component cannot resolve the selected Check component pointed to by the illegal value. A possible reason is that componment hierarchy changed between rendering and form submission. at org.apache.wicket.markup.html.form.CheckGroup.convertValue(CheckGroup.java:134) at org.apache.wicket.markup.html.form.CheckGroup.convertValue(CheckGroup.java:59) at org.apache.wicket.markup.html.form.FormComponent.convertInput(FormComponent.java:1206) at org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1110) at org.apache.wicket.markup.html.form.Form$20.validate(Form.java:1893) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:167) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:427) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:414) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:391) at org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1082) at org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1884) at org.apache.wicket.markup.html.form.Form.validate(Form.java:1873) at org.apache.wicket.markup.html.form.Form.process(Form.java:861) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:826) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:162) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1169) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1347) at org.apache.wicket.RequestCycle.request(RequestCycle.java:497) the panel: public RecherchePanel(String id, Recherche dto) { super(id); FormRecherche form = new FormRecherche(form); form.setModel(new CompoundPropertyModelRecherche(dto)); form.add(new DropDownChoiceInteger(surfaceMin, tranches)); form.add(new DropDownChoiceInteger(surfaceMax, tranches)); form.add(new EnumCheckGroupPlan.Niveau(niveaux, Plan.Niveau.values())); form.add(new EnumCheckGroupPlan.Style(styles, Plan.Style.values())); form.add(new Button(submit) { @Override public void onSubmit() { Recherche dto = (Recherche) getParent().getDefaultModelObject(); setResponsePage(new CataloguePage(dto)); } }); add(form); } enumcheckgroup: public class EnumCheckGroupT extends EnumT extends CheckGroupT { public EnumCheckGroup(String id, T[] values) { super(id); ListViewT listview = new ListViewT(items, Arrays.asList(values)) { protected void populateItem(ListItemT item) { item.add(new CheckT(check, item.getModel())); item.add(new Label(label, new ResourceModel(item.getModelObject().name(; }; }.setReuseItems(true); add(listview); } } panel html: wicket:panel form wicket:id=form div h4Surface/h4 select wicket:id=surfaceMin id=surfaceMin/select label for=surfaceMinmsup2/label select wicket:id=surfaceMax id=surfaceMax/select label for=surfaceMaxmsup2/label br /br / span
Re: Ajax calls loads my server
On Thu, 25 Sep 2008, Benny Weingarten wrote: I want to have a functionality that if a user types something in field2, the checkbox becomes disabled. currently I use an onChangeAjaxBehavior on the textfield, and that is AJAX, making a call to the server. I don't really want that sort of communication. Would I need to write my own javascript? I think so, yes. is there some sort of wicket component with this sort of behavior? Most of the Javascript that comes with Wicket has more to do with the communication with serverside (submits, Ajax). That is because it's a serverside framework anyway. Having more handy Javascript bundled in would be more to maintain, and there are a plenty of Javascript libraries available nowadays. Maybe it would be handy to have more by default however. One interesting idea that has been tossed around is making it possible to somehow use GWT code to have more client-side functionality on Wicket components. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loadable-detachable collections?
That worked a charm Nino, thanks. I can see now that I was previously setting a raw SystemUser object as the ListView model as opposed to the wrapped LDM object. I'll still check out the DataView as well. Thanks all for your replies. Nino.Martinez wrote: You are not chaining... This is how: new PropertyModel(userModel,contacts) -- View this message in context: http://www.nabble.com/Loadable-detachable-collections--tp19685949p19693433.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checkbox and enum value
Thanks Igor, it was exactly what i needed :-) To complete this post, here is the solution I found : http://surunairdejava.blogspot.com/2008/09/wicket-checkbox-abstractcheckboxmodel.html Sorry it's in french but the code is easy to understand... Cedric On Wed, Sep 24, 2008 at 2:46 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see abstractcheckboxmodel -igor On Wed, Sep 24, 2008 at 11:37 AM, Cédric Thiébault [EMAIL PROTECTED] wrote: Hi, I'm trying to use a checkbox to set an enum value on my form object but I always get a type mismatch error (boolean is not an enum and vice versa). My form object has an enum and I want to display a list of checkboxes to allow the user to select the value. I don't want to use a radio because my enum can be null and I can't unselect my radio group once a radio is selected. I tried to extends Checkbox to convert teh boolean to the specified enum... it works only in one way (to set the enum value) but it does not work when my enum has a value and the checkbox need to render itself (the value must be a boolean). public class CheckBoxEnum extends CheckBox { private final Enum? enumValue; public CheckBoxEnum(String id, IModel model, String property, Enum? enumValue) { super(id, new PropertyModel(model, property)); this.enumValue = enumValue; } @Override protected void convertInput() { String value = getValue(); if (value != null BooleanUtils.toBoolean(value)) setConvertedInput(enumValue); } } Any ideas ? Thanks Cedric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FormTester.getTextComponentValue not equals with textfield
On Tue, 23 Sep 2008, Emanuele Gesuato wrote: I'm writing a testcase in which i try to compare the value of a textfield in a form with the value of a pojo. This value is a BigDecimal. This is the code: FormTester ft = tester.newFormTester(GestisciListino.tags.pizzaForm.toString()); assertEquals(pizza.getPrezzo().toString(), ft.getTextComponentValue(Pizza.CAMPO_PREZZO)); if the BigDecimal is 5.00, ft.getTextComponentValue(Pizza.CAMPO_PREZZO) is 5, and the assertion fails. But if i try to use the form using the browser the value setted in the form is correctly 5.00. Why this difference ? I'm expecting that the value retrieved using ft.getTextComponentValue has to be equals with the value displayed by the browser. Am i missing something ? What are you trying to test actually? The test seems to just check that the raw input object would match to the input you just fed, no? Normally with FormTester it makes more sense to submit the form and see how some interesting values of your domain objects get updated or something like that. Anyway, the discrepancy you're seeing might be because of how BigDecimal gets converted by Wicket. But I wouldn't worry about fixing that unless it becomes a problem in a meaningful test. Also, Money class would be a lot better for handling money than BigDecimal :) Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checkbox and enum value
i'm sorry i didn't see this post before-- i came up with a solution a couple of weeks ago. i called it EnumCheckGroup (that is, i went for CheckGroup rather than CheckBox). usage: for a given enum: public static enum Niveau { etage, mezzanine, sous_sol; } form.add(new EnumCheckGroupPlan.Niveau(niveaux, Plan.Niveau.values())); span wicket:id=niveaux span wicket:id=items input type=checkbox wicket:id=check / span wicket:id=label/spanbr / /span /span impl: public class EnumCheckGroupT extends EnumT extends CheckGroupT { public EnumCheckGroup(String id, T[] values) { super(id); ListViewT listview = new ListViewT(items, Arrays.asList(values)) { protected void populateItem(ListItemT item) { item.add(new CheckT(check, item.getModel())); item.add(new Label(label, new ResourceModel(item.getModelObject().name(; }; }.setReuseItems(true); add(listview); } } obviously you must have the keys in your properties file, such as: etage=Étage mezzanine=Mezzanine sous_sol=Sous-sol francisco On Fri, Sep 26, 2008 at 4:29 PM, Cédric Thiébault [EMAIL PROTECTED] wrote: Thanks Igor, it was exactly what i needed :-) To complete this post, here is the solution I found : http://surunairdejava.blogspot.com/2008/09/wicket-checkbox-abstractcheckboxmodel.html Sorry it's in french but the code is easy to understand... Cedric On Wed, Sep 24, 2008 at 2:46 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see abstractcheckboxmodel -igor On Wed, Sep 24, 2008 at 11:37 AM, Cédric Thiébault [EMAIL PROTECTED] wrote: Hi, I'm trying to use a checkbox to set an enum value on my form object but I always get a type mismatch error (boolean is not an enum and vice versa). My form object has an enum and I want to display a list of checkboxes to allow the user to select the value. I don't want to use a radio because my enum can be null and I can't unselect my radio group once a radio is selected. I tried to extends Checkbox to convert teh boolean to the specified enum... it works only in one way (to set the enum value) but it does not work when my enum has a value and the checkbox need to render itself (the value must be a boolean). public class CheckBoxEnum extends CheckBox { private final Enum? enumValue; public CheckBoxEnum(String id, IModel model, String property, Enum? enumValue) { super(id, new PropertyModel(model, property)); this.enumValue = enumValue; } @Override protected void convertInput() { String value = getValue(); if (value != null BooleanUtils.toBoolean(value)) setConvertedInput(enumValue); } } Any ideas ? Thanks Cedric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Breadcrumb + previous button
Hi, I'm working in an application that is using the Breadcrumb component and everything works as expected. Currently I'm trying to add a previous/return button in some of my modules to give the user a friendlier environment, but I don't know how to send the user to the previous panel and remove the current participant from the bread crumb bar. Right now when the user press my Previous button the breadcrumb bar prints: Panel A / Panel B / Panel C / Panel B What I want is: Panel A / Panel B I don't want to use the javascript:history.back(1) code because it doesn't feel right... Could someone help me with this? Thanks, Daniel -- View this message in context: http://www.nabble.com/Breadcrumb-%2B-previous-button-tp19696315p19696315.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
The Wicket Reflex Game Post thoughts?
Hi Guys One of the major problems with the game are that if you click a box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) are in process you will get an error, since the box's component has changed and no longer carries that behavior. I've tried to solve this by adding a transparent veil to the page once the heartbeat processes, it's simply not good enough, it's still possible to get errors. So how do I solve this? I have one idea but im not liking it, all box's could have behaviors even if you wont get an score, that way we will not get an error. This is a potential pitfall if you ever will have two Ajax components that can remove the ones behavior, if the user clicks the other while loading then it's gonna complain. On the other hand im not sure what wicket can do besides throw a runtime exception. -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checkbox and enum value
Why not just pass the enum class into the constructor? But, also have one that allows you to provide a subset of enum values (as you already have). On Fri, Sep 26, 2008 at 4:43 PM, francisco treacy [EMAIL PROTECTED] wrote: i'm sorry i didn't see this post before-- i came up with a solution a couple of weeks ago. i called it EnumCheckGroup (that is, i went for CheckGroup rather than CheckBox). usage: for a given enum: public static enum Niveau { etage, mezzanine, sous_sol; } form.add(new EnumCheckGroupPlan.Niveau(niveaux, Plan.Niveau.values())); span wicket:id=niveaux span wicket:id=items input type=checkbox wicket:id=check / span wicket:id=label/spanbr / /span /span impl: public class EnumCheckGroupT extends EnumT extends CheckGroupT { public EnumCheckGroup(String id, T[] values) { super(id); ListViewT listview = new ListViewT(items, Arrays.asList(values)) { protected void populateItem(ListItemT item) { item.add(new CheckT(check, item.getModel())); item.add(new Label(label, new ResourceModel(item.getModelObject().name(; }; }.setReuseItems(true); add(listview); } } obviously you must have the keys in your properties file, such as: etage=Étage mezzanine=Mezzanine sous_sol=Sous-sol francisco On Fri, Sep 26, 2008 at 4:29 PM, Cédric Thiébault [EMAIL PROTECTED] wrote: Thanks Igor, it was exactly what i needed :-) To complete this post, here is the solution I found : http://surunairdejava.blogspot.com/2008/09/wicket-checkbox-abstractcheckboxmodel.html Sorry it's in french but the code is easy to understand... Cedric On Wed, Sep 24, 2008 at 2:46 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see abstractcheckboxmodel -igor On Wed, Sep 24, 2008 at 11:37 AM, Cédric Thiébault [EMAIL PROTECTED] wrote: Hi, I'm trying to use a checkbox to set an enum value on my form object but I always get a type mismatch error (boolean is not an enum and vice versa). My form object has an enum and I want to display a list of checkboxes to allow the user to select the value. I don't want to use a radio because my enum can be null and I can't unselect my radio group once a radio is selected. I tried to extends Checkbox to convert teh boolean to the specified enum... it works only in one way (to set the enum value) but it does not work when my enum has a value and the checkbox need to render itself (the value must be a boolean). public class CheckBoxEnum extends CheckBox { private final Enum? enumValue; public CheckBoxEnum(String id, IModel model, String property, Enum? enumValue) { super(id, new PropertyModel(model, property)); this.enumValue = enumValue; } @Override protected void convertInput() { String value = getValue(); if (value != null BooleanUtils.toBoolean(value)) setConvertedInput(enumValue); } } Any ideas ? Thanks Cedric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checkbox and enum value
Also, you could have a varargs feature so that users could specify exactly what they want without having to instantiate an array. On Fri, Sep 26, 2008 at 6:15 PM, James Carman [EMAIL PROTECTED] wrote: Why not just pass the enum class into the constructor? But, also have one that allows you to provide a subset of enum values (as you already have). On Fri, Sep 26, 2008 at 4:43 PM, francisco treacy [EMAIL PROTECTED] wrote: i'm sorry i didn't see this post before-- i came up with a solution a couple of weeks ago. i called it EnumCheckGroup (that is, i went for CheckGroup rather than CheckBox). usage: for a given enum: public static enum Niveau { etage, mezzanine, sous_sol; } form.add(new EnumCheckGroupPlan.Niveau(niveaux, Plan.Niveau.values())); span wicket:id=niveaux span wicket:id=items input type=checkbox wicket:id=check / span wicket:id=label/spanbr / /span /span impl: public class EnumCheckGroupT extends EnumT extends CheckGroupT { public EnumCheckGroup(String id, T[] values) { super(id); ListViewT listview = new ListViewT(items, Arrays.asList(values)) { protected void populateItem(ListItemT item) { item.add(new CheckT(check, item.getModel())); item.add(new Label(label, new ResourceModel(item.getModelObject().name(; }; }.setReuseItems(true); add(listview); } } obviously you must have the keys in your properties file, such as: etage=Étage mezzanine=Mezzanine sous_sol=Sous-sol francisco On Fri, Sep 26, 2008 at 4:29 PM, Cédric Thiébault [EMAIL PROTECTED] wrote: Thanks Igor, it was exactly what i needed :-) To complete this post, here is the solution I found : http://surunairdejava.blogspot.com/2008/09/wicket-checkbox-abstractcheckboxmodel.html Sorry it's in french but the code is easy to understand... Cedric On Wed, Sep 24, 2008 at 2:46 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see abstractcheckboxmodel -igor On Wed, Sep 24, 2008 at 11:37 AM, Cédric Thiébault [EMAIL PROTECTED] wrote: Hi, I'm trying to use a checkbox to set an enum value on my form object but I always get a type mismatch error (boolean is not an enum and vice versa). My form object has an enum and I want to display a list of checkboxes to allow the user to select the value. I don't want to use a radio because my enum can be null and I can't unselect my radio group once a radio is selected. I tried to extends Checkbox to convert teh boolean to the specified enum... it works only in one way (to set the enum value) but it does not work when my enum has a value and the checkbox need to render itself (the value must be a boolean). public class CheckBoxEnum extends CheckBox { private final Enum? enumValue; public CheckBoxEnum(String id, IModel model, String property, Enum? enumValue) { super(id, new PropertyModel(model, property)); this.enumValue = enumValue; } @Override protected void convertInput() { String value = getValue(); if (value != null BooleanUtils.toBoolean(value)) setConvertedInput(enumValue); } } Any ideas ? Thanks Cedric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checkbox and enum value
Also, you could have a varargs feature so that users could specify exactly what they want without having to instantiate an array. yes, of course there is place for improvements... public EnumCheckGroup(String id, T... values) Why not just pass the enum class into the constructor? if i pass the enum object itself, how do i actually get the values? francisco On Fri, Sep 26, 2008 at 4:43 PM, francisco treacy [EMAIL PROTECTED] wrote: i'm sorry i didn't see this post before-- i came up with a solution a couple of weeks ago. i called it EnumCheckGroup (that is, i went for CheckGroup rather than CheckBox). usage: for a given enum: public static enum Niveau { etage, mezzanine, sous_sol; } form.add(new EnumCheckGroupPlan.Niveau(niveaux, Plan.Niveau.values())); span wicket:id=niveaux span wicket:id=items input type=checkbox wicket:id=check / span wicket:id=label/spanbr / /span /span impl: public class EnumCheckGroupT extends EnumT extends CheckGroupT { public EnumCheckGroup(String id, T[] values) { super(id); ListViewT listview = new ListViewT(items, Arrays.asList(values)) { protected void populateItem(ListItemT item) { item.add(new CheckT(check, item.getModel())); item.add(new Label(label, new ResourceModel(item.getModelObject().name(; }; }.setReuseItems(true); add(listview); } } obviously you must have the keys in your properties file, such as: etage=Étage mezzanine=Mezzanine sous_sol=Sous-sol francisco On Fri, Sep 26, 2008 at 4:29 PM, Cédric Thiébault [EMAIL PROTECTED] wrote: Thanks Igor, it was exactly what i needed :-) To complete this post, here is the solution I found : http://surunairdejava.blogspot.com/2008/09/wicket-checkbox-abstractcheckboxmodel.html Sorry it's in french but the code is easy to understand... Cedric On Wed, Sep 24, 2008 at 2:46 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see abstractcheckboxmodel -igor On Wed, Sep 24, 2008 at 11:37 AM, Cédric Thiébault [EMAIL PROTECTED] wrote: Hi, I'm trying to use a checkbox to set an enum value on my form object but I always get a type mismatch error (boolean is not an enum and vice versa). My form object has an enum and I want to display a list of checkboxes to allow the user to select the value. I don't want to use a radio because my enum can be null and I can't unselect my radio group once a radio is selected. I tried to extends Checkbox to convert teh boolean to the specified enum... it works only in one way (to set the enum value) but it does not work when my enum has a value and the checkbox need to render itself (the value must be a boolean). public class CheckBoxEnum extends CheckBox { private final Enum? enumValue; public CheckBoxEnum(String id, IModel model, String property, Enum? enumValue) { super(id, new PropertyModel(model, property)); this.enumValue = enumValue; } @Override protected void convertInput() { String value = getValue(); if (value != null BooleanUtils.toBoolean(value)) setConvertedInput(enumValue); } } Any ideas ? Thanks Cedric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checkbox and enum value
* i meant enum class On Fri, Sep 26, 2008 at 7:51 PM, francisco treacy [EMAIL PROTECTED] wrote: Also, you could have a varargs feature so that users could specify exactly what they want without having to instantiate an array. yes, of course there is place for improvements... public EnumCheckGroup(String id, T... values) Why not just pass the enum class into the constructor? if i pass the enum object itself, how do i actually get the values? francisco On Fri, Sep 26, 2008 at 4:43 PM, francisco treacy [EMAIL PROTECTED] wrote: i'm sorry i didn't see this post before-- i came up with a solution a couple of weeks ago. i called it EnumCheckGroup (that is, i went for CheckGroup rather than CheckBox). usage: for a given enum: public static enum Niveau { etage, mezzanine, sous_sol; } form.add(new EnumCheckGroupPlan.Niveau(niveaux, Plan.Niveau.values())); span wicket:id=niveaux span wicket:id=items input type=checkbox wicket:id=check / span wicket:id=label/spanbr / /span /span impl: public class EnumCheckGroupT extends EnumT extends CheckGroupT { public EnumCheckGroup(String id, T[] values) { super(id); ListViewT listview = new ListViewT(items, Arrays.asList(values)) { protected void populateItem(ListItemT item) { item.add(new CheckT(check, item.getModel())); item.add(new Label(label, new ResourceModel(item.getModelObject().name(; }; }.setReuseItems(true); add(listview); } } obviously you must have the keys in your properties file, such as: etage=Étage mezzanine=Mezzanine sous_sol=Sous-sol francisco On Fri, Sep 26, 2008 at 4:29 PM, Cédric Thiébault [EMAIL PROTECTED] wrote: Thanks Igor, it was exactly what i needed :-) To complete this post, here is the solution I found : http://surunairdejava.blogspot.com/2008/09/wicket-checkbox-abstractcheckboxmodel.html Sorry it's in french but the code is easy to understand... Cedric On Wed, Sep 24, 2008 at 2:46 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see abstractcheckboxmodel -igor On Wed, Sep 24, 2008 at 11:37 AM, Cédric Thiébault [EMAIL PROTECTED] wrote: Hi, I'm trying to use a checkbox to set an enum value on my form object but I always get a type mismatch error (boolean is not an enum and vice versa). My form object has an enum and I want to display a list of checkboxes to allow the user to select the value. I don't want to use a radio because my enum can be null and I can't unselect my radio group once a radio is selected. I tried to extends Checkbox to convert teh boolean to the specified enum... it works only in one way (to set the enum value) but it does not work when my enum has a value and the checkbox need to render itself (the value must be a boolean). public class CheckBoxEnum extends CheckBox { private final Enum? enumValue; public CheckBoxEnum(String id, IModel model, String property, Enum? enumValue) { super(id, new PropertyModel(model, property)); this.enumValue = enumValue; } @Override protected void convertInput() { String value = getValue(); if (value != null BooleanUtils.toBoolean(value)) setConvertedInput(enumValue); } } Any ideas ? Thanks Cedric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checkbox and enum value
Yeah, check out: https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/component/choice/EnumDropDownChoice.java On Fri, Sep 26, 2008 at 7:44 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: Class ? extends Enum ? enumClass; enumClass.getEnumConstants(); -igor On Fri, Sep 26, 2008 at 4:32 PM, Cédric Thiébault [EMAIL PROTECTED] wrote: Thanks for the input... I've updated my code :) James, I have the same question as Francisco: how do you get the values from the class of an enum? Cedric On Fri, Sep 26, 2008 at 6:57 PM, francisco treacy [EMAIL PROTECTED] wrote: * i meant enum class On Fri, Sep 26, 2008 at 7:51 PM, francisco treacy [EMAIL PROTECTED] wrote: Also, you could have a varargs feature so that users could specify exactly what they want without having to instantiate an array. yes, of course there is place for improvements... public EnumCheckGroup(String id, T... values) Why not just pass the enum class into the constructor? if i pass the enum object itself, how do i actually get the values? francisco On Fri, Sep 26, 2008 at 4:43 PM, francisco treacy [EMAIL PROTECTED] wrote: i'm sorry i didn't see this post before-- i came up with a solution a couple of weeks ago. i called it EnumCheckGroup (that is, i went for CheckGroup rather than CheckBox). usage: for a given enum: public static enum Niveau { etage, mezzanine, sous_sol; } form.add(new EnumCheckGroupPlan.Niveau(niveaux, Plan.Niveau.values())); span wicket:id=niveaux span wicket:id=items input type=checkbox wicket:id=check / span wicket:id=label/spanbr / /span /span impl: public class EnumCheckGroupT extends EnumT extends CheckGroupT { public EnumCheckGroup(String id, T[] values) { super(id); ListViewT listview = new ListViewT(items, Arrays.asList(values)) { protected void populateItem(ListItemT item) { item.add(new CheckT(check, item.getModel())); item.add(new Label(label, new ResourceModel(item.getModelObject().name(; }; }.setReuseItems(true); add(listview); } } obviously you must have the keys in your properties file, such as: etage=Étage mezzanine=Mezzanine sous_sol=Sous-sol francisco On Fri, Sep 26, 2008 at 4:29 PM, Cédric Thiébault [EMAIL PROTECTED] wrote: Thanks Igor, it was exactly what i needed :-) To complete this post, here is the solution I found : http://surunairdejava.blogspot.com/2008/09/wicket-checkbox-abstractcheckboxmodel.html Sorry it's in french but the code is easy to understand... Cedric On Wed, Sep 24, 2008 at 2:46 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see abstractcheckboxmodel -igor On Wed, Sep 24, 2008 at 11:37 AM, Cédric Thiébault [EMAIL PROTECTED] wrote: Hi, I'm trying to use a checkbox to set an enum value on my form object but I always get a type mismatch error (boolean is not an enum and vice versa). My form object has an enum and I want to display a list of checkboxes to allow the user to select the value. I don't want to use a radio because my enum can be null and I can't unselect my radio group once a radio is selected. I tried to extends Checkbox to convert teh boolean to the specified enum... it works only in one way (to set the enum value) but it does not work when my enum has a value and the checkbox need to render itself (the value must be a boolean). public class CheckBoxEnum extends CheckBox { private final Enum? enumValue; public CheckBoxEnum(String id, IModel model, String property, Enum? enumValue) { super(id, new PropertyModel(model, property)); this.enumValue = enumValue; } @Override protected void convertInput() { String value = getValue(); if (value != null BooleanUtils.toBoolean(value)) setConvertedInput(enumValue); } } Any ideas ? Thanks Cedric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The Wicket Reflex Game Post thoughts?
Nino Saturnino Martinez Vazquez Wael wrote: Hi Guys One of the major problems with the game are that if you click a box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) are in process you will get an error, since the box's component has changed and no longer carries that behavior. I've tried to solve this by adding a transparent veil to the page once the heartbeat processes, it's simply not good enough, it's still possible to get errors. So how do I solve this? I have one idea but im not liking it, all box's could have behaviors even if you wont get an score, that way we will not get an error. This is a potential pitfall if you ever will have two Ajax components that can remove the ones behavior, if the user clicks the other while loading then it's gonna complain. On the other hand im not sure what wicket can do besides throw a runtime exception. Can't you use synchronized (obj) { ... }, to serialize multiple threads of each ajax call? Adriano - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Get object form Parameters
Hi All, I wanted to pass an object from one page to another page,so I set an object into a parameter: PageParameters para=new PageParameters(); para.put(result,resultList);//resultList is a List contains some pojo. //jump to another page setResponsePage(DeviceEnquiry.class,para); Then at DeviceEnquiry.java ,I want to get resultList: class DeviceEnquiry extends WebPage { public DeviceEnquiry (PageParameters param) { List list = (List)param.get(result); // } } But I got an exception: WicketMessage: Can't instantiate page using constructor public com.hk.xportal.xseries.enquiry.DeviceEnquiry(org.apache.wicket.PageParameters) and argument result = [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Root cause: java.lang.ClassCastException: [Ljava.lang.String; at com.hk.xportal.xseries.enquiry.DeviceEnquiry.init(DeviceEnquiry.java:16) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:147) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:88) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:268) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1171) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1248) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) Complete stack: org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.hk.xportal.xseries.enquiry.DeviceEnquiry(org.apache.wicket.PageParameters) and argument result = [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:168) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:88) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:268) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1171) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1248) at
Re: Get object form Parameters
pageparameters is used for passing parameters on the url, so it only supports strings or whatever you can convert to a string. -igor On Fri, Sep 26, 2008 at 9:35 PM, fish3934 [EMAIL PROTECTED] wrote: Hi All, I wanted to pass an object from one page to another page,so I set an object into a parameter: PageParameters para=new PageParameters(); para.put(result,resultList);//resultList is a List contains some pojo. //jump to another page setResponsePage(DeviceEnquiry.class,para); Then at DeviceEnquiry.java ,I want to get resultList: class DeviceEnquiry extends WebPage { public DeviceEnquiry (PageParameters param) { List list = (List)param.get(result); // } } But I got an exception: WicketMessage: Can't instantiate page using constructor public com.hk.xportal.xseries.enquiry.DeviceEnquiry(org.apache.wicket.PageParameters) and argument result = [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Root cause: java.lang.ClassCastException: [Ljava.lang.String; at com.hk.xportal.xseries.enquiry.DeviceEnquiry.init(DeviceEnquiry.java:16) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:147) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:88) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:268) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1171) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1248) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) Complete stack: org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.hk.xportal.xseries.enquiry.DeviceEnquiry(org.apache.wicket.PageParameters) and argument result = [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:168) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:88) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:268) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) at
Re: Get object form Parameters
pass id, and then get that object from that id 2008/9/27 Igor Vaynberg [EMAIL PROTECTED] pageparameters is used for passing parameters on the url, so it only supports strings or whatever you can convert to a string. -igor On Fri, Sep 26, 2008 at 9:35 PM, fish3934 [EMAIL PROTECTED] wrote: Hi All, I wanted to pass an object from one page to another page,so I set an object into a parameter: PageParameters para=new PageParameters(); para.put(result,resultList);//resultList is a List contains some pojo. //jump to another page setResponsePage(DeviceEnquiry.class,para); Then at DeviceEnquiry.java ,I want to get resultList: class DeviceEnquiry extends WebPage { public DeviceEnquiry (PageParameters param) { List list = (List)param.get(result); // } } But I got an exception: WicketMessage: Can't instantiate page using constructor public com.hk.xportal.xseries.enquiry.DeviceEnquiry(org.apache.wicket.PageParameters) and argument result = [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Root cause: java.lang.ClassCastException: [Ljava.lang.String; at com.hk.xportal.xseries.enquiry.DeviceEnquiry.init(DeviceEnquiry.java:16) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:147) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:88) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:268) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1171) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1248) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) Complete stack: org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.hk.xportal.xseries.enquiry.DeviceEnquiry(org.apache.wicket.PageParameters) and argument result = [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:168) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:88) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:268) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) at
Re:Re: Get object form Parameters
OH.Thinks for the reply. Yes,I can get a string through parameter. How to pass id and got that object from that id? I am sorry,I learned wicket just a few days.Is there any other ways to pass an object form one page to another page? 在2008-09-27,张伟 [EMAIL PROTECTED] 写道: pass id, and then get that object from that id 2008/9/27 Igor Vaynberg (DeviceEnquiry.java:16) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:147) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:88) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:268) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1171) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1248) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) Complete stack: org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.hk.xportal.xseries.enquiry.DeviceEnquiry(org.apache.wicket.PageParameters) and argument result = [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:168) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:88) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:268) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1171) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1248) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387) // - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]