Re: Where is InjectorHolder for Guice?
Just created a ticket and attached a patch https://issues.apache.org/jira/browse/WICKET-2761 On Sun, 2010-02-28 at 21:29 -0300, Mauro Ciancio wrote: José María, For example, sometimes I need an injected object in a DataProvider, but this is constructed in the context of a page. So, I can easily pass the injected object into the page to the DataProvider. Code: public page extends page { @inject myservice page() { new provider(myservice); } } Is this your case? PS: I think you would have understood me better if I wrote to you in spanish :) Cheers. 2010/2/28 José María Ruiz josema...@simpleoption.com: Hi, I'm trying to inject an object that it's not a Component. I've found that, with Spring, is as simple as using: InjectorHolder.getInjector().inject(this); But there aren't anything similar for Guice, the nearest thing looks to be: ((GuiceInjectorHolder) ((MyApplication) MyApplication.get()).getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector().injectMembers(this); as said in: http://old.nabble.com/Problem-with-Wicket-and-Guice-td14787021.html Is there a simpler way? If not, are there plans to introduce something similar in Wicket-Guice? Best regards. -- José María Ruiz - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket-securty
Hi Team; I am just wondering, are the wicket security features enough or i have to integrate something like apache-shiro ? How are you guys implementing security? Regards Josh.
Re: Wicket-securty
This would entirely depend on your requirements? So far, i did not need to integrate other frameworks for this but for more complex scenario you probably need to. On Mon, Mar 1, 2010 at 09:14, Josh Kamau joshnet2...@gmail.com wrote: Hi Team; I am just wondering, are the wicket security features enough or i have to integrate something like apache-shiro ? How are you guys implementing security? Regards Josh. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-securty
Thanks Bert. I will evaluate my requirements . On Mon, Mar 1, 2010 at 11:19 AM, Bert taser...@gmail.com wrote: This would entirely depend on your requirements? So far, i did not need to integrate other frameworks for this but for more complex scenario you probably need to. On Mon, Mar 1, 2010 at 09:14, Josh Kamau joshnet2...@gmail.com wrote: Hi Team; I am just wondering, are the wicket security features enough or i have to integrate something like apache-shiro ? How are you guys implementing security? Regards Josh. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Serialization and Form Models
I found Igors post on smart entity models very helpful on that matter: http://wicketinaction.com/2008/09/building-a-smart-entitymodel/ basically, it attaches/detaches only if an Id is set (hence, it can be fetched from the backend) Bert - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh outer panel
marioosh.net wrote: I have LoginPanel like below: public class LoginPanel extends Panel { public LoginPanel(String id) { super(id); MySession.get().setLoginPanel(this); this.setOutputMarkupId(true); if(MySession.get().getUser() != null) { add(new LoggedPanel(panel)); } else { add(new LoggedOutPanel(panel)); } } } I have save in MySession reference to this panel. public final class MySession extends WebSession { private Tuser user; private LoginPanel loginPanel; public LoginPanel getLoginPanel() { return loginPanel; } public void setLoginPanel(LoginPanel loginPanel) { this.loginPanel = loginPanel; } public static MySession get() { return (MySession)Session.get(); } ... } Is possible to reload LoginPanel from inner panels: LoggedPanel and LoggedOutPanel ? I have do that like below, but it doesn't reload LoginPanel: public class LoggedOutPanel extends Panel { private final Tuser b = new Tuser(); public LoggedOutPanel(String id) { super(id); ... AjaxSubmitLink ok = new AjaxSubmitLink(ok) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { //ajax reload loginpanel LoginPanel lp = MySession.get().getLoginPanel(); target.addComponent(lp); } }; ... } } -- Greetings, marioosh - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Idiscover that ajax in my example works! :) I need ONLY one hint: Where and how do i have to put code to replacing LoggedPanel with LoggedOutPanel and vice versa: if(MySession.get().getUser() != null) { //replace LoggedOutPanel with LoggedPanel } else { //replace LoggedPanel with LoggedOutPanel } I see that i can override onRender method in WebPage class... Anybody help with that ? -- View this message in context: http://old.nabble.com/Ajax-refresh-outer-panel-tp27721145p27741408.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Make Wicket component ID HTML element ID?
On Mon, Mar 1, 2010 at 7:52 AM, Jeremy Thomerson jer...@wickettraining.com wrote: You could also use a component instantiation listener and have it automatically called for every component that is created. +1 Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to 'resolve' URL in stylesheet?
*bonks self on the head* Somehow I never realised that paths in CSS are resolved against CSS itself, not the HTML page (being a total HTML noob and all it's not that surprising). Thanks for the pointer Igor, I've been inventing problem where there's none. igor.vaynberg wrote: if you keep your css and your images together in a package and use relative urls in the css it will work. -- View this message in context: http://old.nabble.com/How-to-%27resolve%27-URL-in-stylesheet--tp27720293p27741978.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh outer panel
If i recall correctly, then you can't change the component tree once the rendering started. Not 100% sure here. What i would do is to add both panels and override the isVisible() funktion in them. In there you check is a user is logged in or not .. Bert - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to specify codebase for applet?
Hi, in our application we need to make use of an applet. For the size and logistics reasons I don't want to package the required applet jars inside Java packages (that is unlike e.g. images and css that we do package together with the components). So, say, I'll package the jars under 'applet' web folder so that they are web-accessible via http://server/context-path/applet/jar1.jar etc. Now I don't want to hardcore context-path into the markup file, so I don't want to simply write in HTML: applet codebase=/context-path/applet code=Applet archive=jar1.jar,jar2.jar name=Applet You need Java support to run this applet. /applet What do I need to write so that codebase refers to the proper folder regardless of the chosen context-path? (folder name inside the context-path will still be the same) Thanks in advance! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to specify codebase for applet?
See the source for ContextImage for an example. Martijn On Mon, Mar 1, 2010 at 1:19 PM, Sergey Olefir solf.li...@gmail.com wrote: Hi, in our application we need to make use of an applet. For the size and logistics reasons I don't want to package the required applet jars inside Java packages (that is unlike e.g. images and css that we do package together with the components). So, say, I'll package the jars under 'applet' web folder so that they are web-accessible via http://server/context-path/applet/jar1.jar etc. Now I don't want to hardcore context-path into the markup file, so I don't want to simply write in HTML: applet codebase=/context-path/applet code=Applet archive=jar1.jar,jar2.jar name=Applet You need Java support to run this applet. /applet What do I need to write so that codebase refers to the proper folder regardless of the chosen context-path? (folder name inside the context-path will still be the same) Thanks in advance! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Where is InjectorHolder for Guice?
Thank you very much Martin :) On 01/03/2010 09:00, Martin Grigorov wrote: Just created a ticket and attached a patch https://issues.apache.org/jira/browse/WICKET-2761 On Sun, 2010-02-28 at 21:29 -0300, Mauro Ciancio wrote: José María, For example, sometimes I need an injected object in a DataProvider, but this is constructed in the context of a page. So, I can easily pass the injected object into the page to the DataProvider. Code: public page extends page { @inject myservice page() { new provider(myservice); } } Is this your case? PS: I think you would have understood me better if I wrote to you in spanish :) Cheers. 2010/2/28 José María Ruizjosema...@simpleoption.com: Hi, I'm trying to inject an object that it's not a Component. I've found that, with Spring, is as simple as using: InjectorHolder.getInjector().inject(this); But there aren't anything similar for Guice, the nearest thing looks to be: ((GuiceInjectorHolder) ((MyApplication) MyApplication.get()).getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector().injectMembers(this); as said in: http://old.nabble.com/Problem-with-Wicket-and-Guice-td14787021.html Is there a simpler way? If not, are there plans to introduce something similar in Wicket-Guice? Best regards. -- José María Ruiz - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- José María Ruiz Aguilera Simple Option S.L.U. Telf/Fax:+34 951930122 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How can i know when a users redirects to other page
Hello, everyone! I was wondering if there's a way to know for instance if the user is on a page is there an event fired that indicates that the user is no longer on this page. I saw the method 'onRedirect()', but it's fired when the user comes to the page. I want to know when the user changes the page. Thanks in advance! Regards, Martin
Re: SV: Make Wicket component ID HTML element ID?
You are right. I need to be cautoius on this. I am new in Wicket. Just for the sake of discussion. I put the following code in the top page's constructor: visitChildren(new IVisitorComponent() { @Override public Object component(Component c) { c.setMarkupId(c.getId()); c.setOutputMarkupId(true); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); I notice that sub-page Wicket componets did not get their ID outputed as HTML element ID. I am confused. Aren't sub-page components are children of the top page? Thanks! --- On Mon, 3/1/10, Wilhelmsen Tor Iver toriv...@arrive.no wrote: From: Wilhelmsen Tor Iver toriv...@arrive.no Subject: SV: Make Wicket component ID HTML element ID? To: users@wicket.apache.org users@wicket.apache.org Date: Monday, March 1, 2010, 2:50 AM I notice one thing that is not what I want: instead of generating wanted HTML element ID such as signInOut or feedback, Wicket added one number or letter to wicket ID as HTML element ID (for example: signInOut4, feedbackb). How can I overcome this? Are you sure you want to? Do you use any repeaters (ListView, Loop, RepeatingView)? In that case you actually want this disambiguation so that you don't end up with multiple elements with the same id which messes with any Ajax you want to use. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Make Wicket component ID HTML element ID?
Thanks for this new tip and it shows another approach, which makes me feel the flexibility of Wicket. I am new in Wicket. Cheers! --- On Mon, 3/1/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: Re: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Monday, March 1, 2010, 1:52 AM You could also use a component instantiation listener and have it automatically called for every component that is created. -- Jeremy Thomerson http://www.wickettraining.com On Sun, Feb 28, 2010 at 9:52 PM, David Chang david_q_zh...@yahoo.comwrote: Thanks for the tip. I added this approach to the top page. Here is my implemenetation: visitChildren(new IVisitorComponent() { @Override public Object component(Component c) { c.setOutputMarkupId(true); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); Is this the right way to implement? I notice one thing that is not what I want: instead of generating wanted HTML element ID such as signInOut or feedback, Wicket added one number or letter to wicket ID as HTML element ID (for example: signInOut4, feedbackb). How can I overcome this? Regards. --- On Sun, 2/28/10, Andrew Lombardi and...@mysticcoders.com wrote: From: Andrew Lombardi and...@mysticcoders.com Subject: Re: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 6:41 PM Use a Component.IVisitor and you can setOutputMarkupId on every child component On Feb 28, 2010, at 2:47 PM, David Chang wrote: Thanks for the info. But this method is only component-level. How can I make all Wicket components do this without repeating setOutputMarkupId(true) for each component? Regards. --- On Sun, 2/28/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: RE: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 5:15 PM setOutputMarkupId(true) Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: David Chang david_q_zh...@yahoo.com Sent: Sunday, February 28, 2010 4:02 PM To: users@wicket.apache.org Subject: Make Wicket component ID HTML element ID? I have many Wicket components that are unique on pages. I would like to make their wicket ID HTML element ID instead of typing HTML id attribute. How can I do this? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: jWicket release 0.5.0
Hi Stefan, I'm a bit lost in the wicketstuff maven repository - when I browse I only see 1.4.1 and 1.4.2-SNAPSHOT. Any idea when this version will be in the maven repo? But for now it would be great if you could send me the pre-build jar. Thanks! Antoine On Fri, Feb 26, 2010 at 2:57 PM, Stefan Lindner lind...@visionet.de wrote: I have committed jWicket version 0.5.0 to wicketstuff Changes: - jQuery update to Version 1.4.2 - jQuery UI update to 1.8RC2 - drag/drop/resize improvements to work in IE 6/7/8 after AJAX update or in LazyLoad panels - drag/drop/resize improvements for less footprint in HTML, smaller js code generation - Effects rewritten completely, now covering all effects - Effects now support a chain of multiple effects Known Issues - Example application not very attractive - Example applicatioin contains some debugging code Let me know if someone needs prebuild jar files. Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- take your photos everywhere you go - https://www.memolio.com follow us on Twitter - http://twitter.com/Memolio - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-securty
Josh, I think if your security is just needing role/authentication enforcement (e.g. Ok Bob is an ADMIN, he can do all this stuff, but Jeff is a NORMAL user, so he can only do this and Anon is ANONYMOUS so he can only view) Wicket should have you covered. I'm not familiar with Shiro, so I don't know what else it provides that you might need. -R On Mon, Mar 1, 2010 at 1:22 AM, Josh Kamau joshnet2...@gmail.com wrote: Thanks Bert. I will evaluate my requirements . On Mon, Mar 1, 2010 at 11:19 AM, Bert taser...@gmail.com wrote: This would entirely depend on your requirements? So far, i did not need to integrate other frameworks for this but for more complex scenario you probably need to. On Mon, Mar 1, 2010 at 09:14, Josh Kamau joshnet2...@gmail.com wrote: Hi Team; I am just wondering, are the wicket security features enough or i have to integrate something like apache-shiro ? How are you guys implementing security? Regards Josh. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh outer panel
If there was a div wicket:id=loggedState container in your HTML that contained your loggedIn or loggedOut panel, then I imagine in your page code you would have a WebMarkupContainer that you did a removeAll() on then added the appropriate panel to it when building the page. I imagine your loggedOut panel has a Username/Password field and a Login button on it, so that'll post to the server at which point you could do that work? -R On Mon, Mar 1, 2010 at 3:47 AM, Bert taser...@gmail.com wrote: If i recall correctly, then you can't change the component tree once the rendering started. Not 100% sure here. What i would do is to add both panels and override the isVisible() funktion in them. In there you check is a user is logged in or not .. Bert - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How can i know when a users redirects to other page
Martin can you explain your use-case, namely what is the importance of seeing which page a user is no-longer on? Seems like a super-easy way to do this would be to extend a base-page that updates a Session metadata element with the current page the user is on and allow a listener to be notified when this changes? But depending on who you want listening to this I suppose you could do away with the whole listener/metadata thing and just have your basepage call some trigger method onRender that would do some work? -R On Mon, Mar 1, 2010 at 5:31 AM, Martin Asenov mase...@velti.com wrote: Hello, everyone! I was wondering if there's a way to know for instance if the user is on a page is there an event fired that indicates that the user is no longer on this page. I saw the method 'onRedirect()', but it's fired when the user comes to the page. I want to know when the user changes the page. Thanks in advance! Regards, Martin
How to encrypt/obfuscate resource reference?
Hi, out of the box Wicket generates urls for packaged resources that contain fully-qualified class names, e.g.: link rel=stylesheet type=text/css href=resources/org.example.MyClassName/decorations/style.css / Now in accordance with our security policies we are not allowed to expose internal application details -- and fully qualified class name certainly fits that category. On the other hand we do very much want to package resources together with the components that use them -- this approach seems to be way more convenient in practice than any other option. So I've been looking into whether it is possible to encrypt resource references (at least the class name part). My research led me to SharedResources.resourceKey(final Class? scope, final String path, final Locale locale, final String style) method which apparently is responsible for inserting FQNs into urls. Unfortunately this place seems to be locked down hard -- method is 'NOT PART OF THE WICKET PUBLIC API' and corresponding accessor method in Application is final. Moreover the field containing the instance in Application is private final -- so even reflection is no help. So any ideas how can I encrypt/obfuscate resource references without resorting to aliasing every single class on the classloader path? (aliasing 'as needed' is not really an option as it would be devilishly hard to ensure that there are no un-aliased urls as the system is developed in the future and new components/resources are added) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Error Ajaxlink don't call onSubmit
Hi, I change the version of wicket from 1.4.0 to 1.4.6 and i can't submit my form. I have an new AjaxSubmitLink(addLink, form) { @Override public void onSubmit(AjaxRequestTarget target, Form form) { //do things } } in wicket 1.4.0 this work well but , when i change to wicket 1.4.6 this link don't work any more. Can anyone help?
Re: Generic warning ListMultipleChoice
Of course these are only details, but I wanted to get clear. It seems that in this case I cannot use List interface although List interface has super-interface Collection. When List is replaced with Collection all is OK, no compiler warnings: IModelCollectionString allYearsModel = new PropertyModelCollectionString(this, allYears); ListMultipleChoiceString allYears = new ListMultipleChoiceString(allYears, allYearsModel, new ArrayListString()); I haven't checked the source yet, but probably someone could comment on this - why so? Juris On 27 February 2010 11:47, Juris Maskalans jmaskal...@gmail.com wrote: Thanks for your quick response. But I have already tried to add needed type, e.g. String and got the error. I suppose the case is not so simple. IModelListString allYearsModel = new PropertyModelListString(this, selectedYears); ListMultipleChoiceString allYears = new ListMultipleChoiceString(allYears, allYearsModel, new ArrayListString()); gives error: The constructor ListMultipleChoiceString(String, IModelListString, ArrayListString) is undefined Should it not be a valid constructor for: ListMultipleChoice(java.lang.String id, IModeljava.util.CollectionT object, java.util.ListT choices) When I use constructor without IModel, all is OK: ListMultipleChoiceString allYears = new ListMultipleChoiceString(allYears, new ArrayListString()); When I look at DropDownChoice it works with similar constructor, e.g., IModelString allYearsModel = new PropertyModelString(this, selectedYears); DropDownChoiceString placeDdc = new DropDownChoiceString(place, allYearsModel, new ArrayListString()); I can not figure out, why so. Juris On 27 February 2010 00:15, Igor Vaynberg igor.vaynb...@gmail.com wrote: ListMultipleChoiceString tmp = new ListMultipleChoiceString(... -igor On Fri, Feb 26, 2010 at 2:07 PM, Juris Maskalans jmaskal...@gmail.com wrote: Hi, I have a question regarding ListMultipleChoice. How to overcome generic warning. ListMultipleChoice is a raw type. References to generic type ListMultipleChoiceT should be parameterized Despite of this the code works fine: ListMultipleChoice tmp = new ListMultipleChoice(tmp, new PropertyModelListString( this, selectedYears), new ArrayListString()); Thanks! Juris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How can i know when a users redirects to other page
Just an idea... Use a component instantiation listener and delete the file, if it exists, whenever any other page is created. Regards, Ernesto On Mon, Mar 1, 2010 at 4:09 PM, Martin Asenov mase...@velti.com wrote: The use case is that I generate a file located in a temp folder that appears on page under a download link. I want to delete the file when the user goes in another page. Regards, Martin -Original Message- From: Riyad Kalla [mailto:rka...@gmail.com] Sent: Monday, March 01, 2010 4:31 PM To: users@wicket.apache.org Subject: Re: How can i know when a users redirects to other page Martin can you explain your use-case, namely what is the importance of seeing which page a user is no-longer on? Seems like a super-easy way to do this would be to extend a base-page that updates a Session metadata element with the current page the user is on and allow a listener to be notified when this changes? But depending on who you want listening to this I suppose you could do away with the whole listener/metadata thing and just have your basepage call some trigger method onRender that would do some work? -R On Mon, Mar 1, 2010 at 5:31 AM, Martin Asenov mase...@velti.com wrote: Hello, everyone! I was wondering if there's a way to know for instance if the user is on a page is there an event fired that indicates that the user is no longer on this page. I saw the method 'onRedirect()', but it's fired when the user comes to the page. I want to know when the user changes the page. Thanks in advance! Regards, Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Role-based wicket application
Hi, Thank you and James for the reply. I'v read the Wicket in action book and knew the interface IAuthorizationStrategy. Just implemnenting it(like the book introduces) will force us building a lot of classes and a lot of code in that two methods for authorization handling. Following your suggestion I read the document of wicket-security and think it could be suitable for our requirement. Thanks! further questions: - Does wicket-security 1.4-snapshot work well with wicket 1.4? - Any roadmap for the wicket-security 1.4 final version? Best regards Jing -Original Message- From: Early Morning [mailto:goodmorning...@gmail.com] Sent: Montag, 1. März 2010 04:51 To: users@wicket.apache.org Subject: Re: Role-based wicket application Hi, We just use one application/page for all roles, otherwise, you'd have a hard time maintaining everything especially if you have dynamic roles. Wicket has an interface you can implement for authorization (IAuthorizationStrategy); there are also existing projects that implement it for you as well and cover the general use case such as wicket-auth-roles and wicket-security. However, we just implemented our own IAuthorizationStrategy since we have an existing role-based system from older applications so I haven't had much experience with the existing projects. The basics of implementing your own are covered pretty well in the Wicket in Action book as well, but if the existing projects cover your needs then you should be able to use them pretty easily. On Fri, Feb 26, 2010 at 6:35 PM, Jing Ge (Besitec IT DEHAM) j...@besitec.com wrote: Hello guys, We have been using wicket since more than one year. It is very comfortable to work with wicket and live here in this community. Thanks you guys! Now we want to add more features into our application and we get a (actually very common) problem: What is the correct way for building a role-based wicket application? The requirement is something like this: 1. Users are assigned to different roles, or groups, or projects. 2. Some pages looks similar to the users of different roles. But they are not same. We have thought about it for a while and get some ideas: 1. One application for all roles and one page for all roles. (with if.. else maybe, we know it is not good). Is it possible with wicket? Since the wicket:id, that is defined in the html , must be added in the java class. Maybe show/hide it for different roles? 2. One application for all roles but one page for each role. The drawback is the duplicated code logic. This could be solved by class inheritance. But the html files are still duplicated. 3. One application for each role. Build a base project and then let other projects inheritance from the base one. We know that the third choice is not good (actually very bad from the technical point of view, has a lot of problems for changes, release, deployment, etc.), but it has also one real great benefit: role relevant changes will be limited only to the users of that role. That means, for such changes, only the application for that role needed to be updated, redeployed, and restarted. Is there any features of wicket can solve such problem? Does anyone of you guys has some better ideas? We appreciate any suggestions, guides, helps, etc. Thanks! Best regards Jing - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
spanish wicket group is going to organize its first wicket meeting at Buenos Aires, Argentina in saturday march 6th
Hi all, I am one of the administrator of wicket...@googlegroups.com which is a group related to Wicket in spanish. We will have our first meeting in Buenos Aires, Argentina in saturday march 6th. This meeting is aimed to prepare a public wicket meeting where we can promote the framework. For more information, you are welcomed to join to wicket-es and send us an email. thanks -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: How to encrypt/obfuscate resource reference?
for a discussion and suggestion see http://old.nabble.com/CryptedUrlWebRequestCodingStrategy-%2B-WebRequestCodingStrategy-%3D-resource-URLs-are-not-encrypted-(bug-).-td27209560.html quote I was able to get around this by subclassing WebRequestCodingStrategy and overriding methods: addResourceParameters(..); encode(RequestCycle requestCycle, ISharedResourceRequestTarget requestTarget); to use arguments rather than path as resource reference. haven't tried that myself yet, but will need it in the near future. IMHO it would make sense to include this in the CryptedUrlWebRequestCodingStrategy. regards Antoine. On Mon, Mar 1, 2010 at 4:01 PM, Sergey Olefir solf.li...@gmail.com wrote: Hi, out of the box Wicket generates urls for packaged resources that contain fully-qualified class names, e.g.: link rel=stylesheet type=text/css href=resources/org.example.MyClassName/decorations/style.css / Now in accordance with our security policies we are not allowed to expose internal application details -- and fully qualified class name certainly fits that category. On the other hand we do very much want to package resources together with the components that use them -- this approach seems to be way more convenient in practice than any other option. So I've been looking into whether it is possible to encrypt resource references (at least the class name part). My research led me to SharedResources.resourceKey(final Class? scope, final String path, final Locale locale, final String style) method which apparently is responsible for inserting FQNs into urls. Unfortunately this place seems to be locked down hard -- method is 'NOT PART OF THE WICKET PUBLIC API' and corresponding accessor method in Application is final. Moreover the field containing the instance in Application is private final -- so even reflection is no help. So any ideas how can I encrypt/obfuscate resource references without resorting to aliasing every single class on the classloader path? (aliasing 'as needed' is not really an option as it would be devilishly hard to ensure that there are no un-aliased urls as the system is developed in the future and new components/resources are added) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- take your photos everywhere you go - https://www.memolio.com follow us on Twitter - http://twitter.com/Memolio - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
check browser version and java script enabled for every request
I want to check the browser version and java script enabled for every request using a servlet filter , I am currently using the org.apache.wicket.protocol.http.request.WebClientInfo, this just checks at the begin of session and uses the same information, is there anything to check browser information for every request
Cant Read Variable From PageParameters (Wicket 1.4.6)
Wicket Version 1.4.6 Link: http://localhost:8084/site2/?param1=c Code: paramValue= params.getString(param1, ); Output: paramValue returns empty String I am using the default mount Settings. am I missing something - - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Cant Read Variable From PageParameters (Wicket 1.4.6)
What happens when you use: http://localhost:8084/site2?param1=c ? On Mon, Mar 1, 2010 at 9:33 AM, Ayodeji Aladejebi aladej...@gmail.comwrote: Wicket Version 1.4.6 Link: http://localhost:8084/site2/?param1=c Code: paramValue= params.getString(param1, ); Output: paramValue returns empty String I am using the default mount Settings. am I missing something - - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SV: Make Wicket component ID HTML element ID?
constructors of subclasses are called after -igor On Mon, Mar 1, 2010 at 5:06 AM, David Chang david_q_zh...@yahoo.com wrote: You are right. I need to be cautoius on this. I am new in Wicket. Just for the sake of discussion. I put the following code in the top page's constructor: visitChildren(new IVisitorComponent() { �...@override public Object component(Component c) { c.setMarkupId(c.getId()); c.setOutputMarkupId(true); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); I notice that sub-page Wicket componets did not get their ID outputed as HTML element ID. I am confused. Aren't sub-page components are children of the top page? Thanks! --- On Mon, 3/1/10, Wilhelmsen Tor Iver toriv...@arrive.no wrote: From: Wilhelmsen Tor Iver toriv...@arrive.no Subject: SV: Make Wicket component ID HTML element ID? To: users@wicket.apache.org users@wicket.apache.org Date: Monday, March 1, 2010, 2:50 AM I notice one thing that is not what I want: instead of generating wanted HTML element ID such as signInOut or feedback, Wicket added one number or letter to wicket ID as HTML element ID (for example: signInOut4, feedbackb). How can I overcome this? Are you sure you want to? Do you use any repeaters (ListView, Loop, RepeatingView)? In that case you actually want this disambiguation so that you don't end up with multiple elements with the same id which messes with any Ajax you want to use. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: How can i know when a users redirects to other page
Thank you all for the support, I highly appreciate it! Regards, Martin -Original Message- From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Sent: Monday, March 01, 2010 5:31 PM To: users@wicket.apache.org Subject: Re: How can i know when a users redirects to other page Just an idea... Use a component instantiation listener and delete the file, if it exists, whenever any other page is created. Regards, Ernesto On Mon, Mar 1, 2010 at 4:09 PM, Martin Asenov mase...@velti.com wrote: The use case is that I generate a file located in a temp folder that appears on page under a download link. I want to delete the file when the user goes in another page. Regards, Martin -Original Message- From: Riyad Kalla [mailto:rka...@gmail.com] Sent: Monday, March 01, 2010 4:31 PM To: users@wicket.apache.org Subject: Re: How can i know when a users redirects to other page Martin can you explain your use-case, namely what is the importance of seeing which page a user is no-longer on? Seems like a super-easy way to do this would be to extend a base-page that updates a Session metadata element with the current page the user is on and allow a listener to be notified when this changes? But depending on who you want listening to this I suppose you could do away with the whole listener/metadata thing and just have your basepage call some trigger method onRender that would do some work? -R On Mon, Mar 1, 2010 at 5:31 AM, Martin Asenov mase...@velti.com wrote: Hello, everyone! I was wondering if there's a way to know for instance if the user is on a page is there an event fired that indicates that the user is no longer on this page. I saw the method 'onRedirect()', but it's fired when the user comes to the page. I want to know when the user changes the page. Thanks in advance! Regards, Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to encrypt/obfuscate resource reference?
He he, that was my old thread there :) Thing is, I just recently discovered, that encoding resources as arguments (rather than paths) completely breaks relative URLs discussed there: http://old.nabble.com/How-to-'resolve'-URL-in-stylesheet--td27720293.html (for the simple reason that browser strips out arguments when resolving relative url). So it is necessary to come up with some other solution. Antoine van Wel wrote: for a discussion and suggestion see http://old.nabble.com/CryptedUrlWebRequestCodingStrategy-%2B-WebRequestCodingStrategy-%3D-resource-URLs-are-not-encrypted-(bug-).-td27209560.html -- View this message in context: http://old.nabble.com/How-to-encrypt-obfuscate-resource-reference--tp27744679p27745911.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Make Wicket component ID HTML element ID?
there is also IComponentOnBeforeRenderListener which may be a better fit if you will need access to the complete component hierarchy -igor On Mon, Mar 1, 2010 at 5:09 AM, David Chang david_q_zh...@yahoo.com wrote: Thanks for this new tip and it shows another approach, which makes me feel the flexibility of Wicket. I am new in Wicket. Cheers! --- On Mon, 3/1/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: Re: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Monday, March 1, 2010, 1:52 AM You could also use a component instantiation listener and have it automatically called for every component that is created. -- Jeremy Thomerson http://www.wickettraining.com On Sun, Feb 28, 2010 at 9:52 PM, David Chang david_q_zh...@yahoo.comwrote: Thanks for the tip. I added this approach to the top page. Here is my implemenetation: visitChildren(new IVisitorComponent() { @Override public Object component(Component c) { c.setOutputMarkupId(true); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); Is this the right way to implement? I notice one thing that is not what I want: instead of generating wanted HTML element ID such as signInOut or feedback, Wicket added one number or letter to wicket ID as HTML element ID (for example: signInOut4, feedbackb). How can I overcome this? Regards. --- On Sun, 2/28/10, Andrew Lombardi and...@mysticcoders.com wrote: From: Andrew Lombardi and...@mysticcoders.com Subject: Re: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 6:41 PM Use a Component.IVisitor and you can setOutputMarkupId on every child component On Feb 28, 2010, at 2:47 PM, David Chang wrote: Thanks for the info. But this method is only component-level. How can I make all Wicket components do this without repeating setOutputMarkupId(true) for each component? Regards. --- On Sun, 2/28/10, Jeremy Thomerson jer...@wickettraining.com wrote: From: Jeremy Thomerson jer...@wickettraining.com Subject: RE: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Sunday, February 28, 2010, 5:15 PM setOutputMarkupId(true) Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: David Chang david_q_zh...@yahoo.com Sent: Sunday, February 28, 2010 4:02 PM To: users@wicket.apache.org Subject: Make Wicket component ID HTML element ID? I have many Wicket components that are unique on pages. I would like to make their wicket ID HTML element ID instead of typing HTML id attribute. How can I do this? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to specify codebase for applet?
Thanks for the pointer, I was able to solve my problem with this information. However I had to roll my own versions of ContextImage and ContextPathGenerator -- because the ones supplied with Wicket appear to be hardcoded to use 'src' attribute. Maybe generic versions that are able to manipulate specified attribute should be included in Wicket distribution? Martijn Dashorst wrote: See the source for ContextImage for an example. Martijn -- View this message in context: http://old.nabble.com/How-to-specify-codebase-for-applet--tp27742745p27745948.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Uses of wicket:panel Tag?
Where to use wicket:panel tag and uses? Thanks, Sravang
Re: How can i know when a users redirects to other page
1 other idea (among others that would probably work) is a custom IRequestCycleProcessor impl that checks the returned IRequestTarget ( http://wicket.apache.org/docs/1.4/org/apache/wicket/IRequestTarget.html) to see if it's sending back the PageRequestTarget ( http://wicket.apache.org/docs/1.4/org/apache/wicket/request/target/component/PageRequestTarget.html) that belongs to the page that generates the temp file, and if it is, generate the file, if it isn't, erase it. I'll admit I've not done any of this, so I'd defer to someone smarter for the right approach. These are just ideas. On Mon, Mar 1, 2010 at 9:44 AM, Martin Asenov mase...@velti.com wrote: Thank you all for the support, I highly appreciate it! Regards, Martin -Original Message- From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Sent: Monday, March 01, 2010 5:31 PM To: users@wicket.apache.org Subject: Re: How can i know when a users redirects to other page Just an idea... Use a component instantiation listener and delete the file, if it exists, whenever any other page is created. Regards, Ernesto On Mon, Mar 1, 2010 at 4:09 PM, Martin Asenov mase...@velti.com wrote: The use case is that I generate a file located in a temp folder that appears on page under a download link. I want to delete the file when the user goes in another page. Regards, Martin -Original Message- From: Riyad Kalla [mailto:rka...@gmail.com] Sent: Monday, March 01, 2010 4:31 PM To: users@wicket.apache.org Subject: Re: How can i know when a users redirects to other page Martin can you explain your use-case, namely what is the importance of seeing which page a user is no-longer on? Seems like a super-easy way to do this would be to extend a base-page that updates a Session metadata element with the current page the user is on and allow a listener to be notified when this changes? But depending on who you want listening to this I suppose you could do away with the whole listener/metadata thing and just have your basepage call some trigger method onRender that would do some work? -R On Mon, Mar 1, 2010 at 5:31 AM, Martin Asenov mase...@velti.com wrote: Hello, everyone! I was wondering if there's a way to know for instance if the user is on a page is there an event fired that indicates that the user is no longer on this page. I saw the method 'onRedirect()', but it's fired when the user comes to the page. I want to know when the user changes the page. Thanks in advance! Regards, Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Uses of wicket:panel Tag?
I asked Google, he's quite helpful: http://www.javalobby.org/java/forums/t60926.html On Mon, Mar 1, 2010 at 2:02 AM, sravan g sravangs...@gmail.com wrote: Where to use wicket:panel tag and uses? Thanks, Sravang
Re: SV: Make Wicket component ID HTML element ID?
You are perfectly right. That explains. Thanks a lot!!! --- On Mon, 3/1/10, Igor Vaynberg igor.vaynb...@gmail.com wrote: From: Igor Vaynberg igor.vaynb...@gmail.com Subject: Re: SV: Make Wicket component ID HTML element ID? To: users@wicket.apache.org Date: Monday, March 1, 2010, 11:41 AM constructors of subclasses are called after -igor On Mon, Mar 1, 2010 at 5:06 AM, David Chang david_q_zh...@yahoo.com wrote: You are right. I need to be cautoius on this. I am new in Wicket. Just for the sake of discussion. I put the following code in the top page's constructor: visitChildren(new IVisitorComponent() { �...@override public Object component(Component c) { c.setMarkupId(c.getId()); c.setOutputMarkupId(true); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); I notice that sub-page Wicket componets did not get their ID outputed as HTML element ID. I am confused. Aren't sub-page components are children of the top page? Thanks! --- On Mon, 3/1/10, Wilhelmsen Tor Iver toriv...@arrive.no wrote: From: Wilhelmsen Tor Iver toriv...@arrive.no Subject: SV: Make Wicket component ID HTML element ID? To: users@wicket.apache.org users@wicket.apache.org Date: Monday, March 1, 2010, 2:50 AM I notice one thing that is not what I want: instead of generating wanted HTML element ID such as signInOut or feedback, Wicket added one number or letter to wicket ID as HTML element ID (for example: signInOut4, feedbackb). How can I overcome this? Are you sure you want to? Do you use any repeaters (ListView, Loop, RepeatingView)? In that case you actually want this disambiguation so that you don't end up with multiple elements with the same id which messes with any Ajax you want to use. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Cant Read Variable From PageParameters (Wicket 1.4.6)
The Link changes to http://localhost:8084/site2/?param1=c still the same problem On Mon, Mar 1, 2010 at 5:40 PM, Riyad Kalla rka...@gmail.com wrote: What happens when you use: http://localhost:8084/site2?param1=c ? On Mon, Mar 1, 2010 at 9:33 AM, Ayodeji Aladejebi aladej...@gmail.comwrote: Wicket Version 1.4.6 Link: http://localhost:8084/site2/?param1=c Code: paramValue= params.getString(param1, ); Output: paramValue returns empty String I am using the default mount Settings. am I missing something - - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Cant Read Variable From PageParameters (Wicket 1.4.6)
Can you paste the code for the page that isn't working? You have a constructor for that page that takes a PageParameters arg that you named 'params' right? On Mon, Mar 1, 2010 at 11:15 AM, Ayodeji Aladejebi aladej...@gmail.comwrote: The Link changes to http://localhost:8084/site2/?param1=c still the same problem On Mon, Mar 1, 2010 at 5:40 PM, Riyad Kalla rka...@gmail.com wrote: What happens when you use: http://localhost:8084/site2?param1=c ? On Mon, Mar 1, 2010 at 9:33 AM, Ayodeji Aladejebi aladej...@gmail.com wrote: Wicket Version 1.4.6 Link: http://localhost:8084/site2/?param1=c Code: paramValue= params.getString(param1, ); Output: paramValue returns empty String I am using the default mount Settings. am I missing something - - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Announcing: visural-wicket 0.5 released - open source wicket components
It works great now, thank you very much!
Re: How to encrypt/obfuscate resource reference?
Oops :-) can't you just take the path and encrypt that using the same strategy as the cryptedurl.. thingy is using? Antoine On Mon, Mar 1, 2010 at 5:43 PM, Sergey Olefir solf.li...@gmail.com wrote: He he, that was my old thread there :) Thing is, I just recently discovered, that encoding resources as arguments (rather than paths) completely breaks relative URLs discussed there: http://old.nabble.com/How-to-'resolve'-URL-in-stylesheet--td27720293.html (for the simple reason that browser strips out arguments when resolving relative url). So it is necessary to come up with some other solution. Antoine van Wel wrote: for a discussion and suggestion see http://old.nabble.com/CryptedUrlWebRequestCodingStrategy-%2B-WebRequestCodingStrategy-%3D-resource-URLs-are-not-encrypted-(bug-).-td27209560.html -- View this message in context: http://old.nabble.com/How-to-encrypt-obfuscate-resource-reference--tp27744679p27745911.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- take your photos everywhere you go - https://www.memolio.com follow us on Twitter - http://twitter.com/Memolio - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Cant Read Variable From PageParameters (Wicket 1.4.6)
My Bad :) private HomePage(PageParameters params); instead of public HomePage(PageParameters params); i just dont know how i typed private instead of public. So it was the default empty constructor that was getting called instead Thanks On Mon, Mar 1, 2010 at 7:19 PM, Riyad Kalla rka...@gmail.com wrote: Can you paste the code for the page that isn't working? You have a constructor for that page that takes a PageParameters arg that you named 'params' right? On Mon, Mar 1, 2010 at 11:15 AM, Ayodeji Aladejebi aladej...@gmail.comwrote: The Link changes to http://localhost:8084/site2/?param1=c still the same problem On Mon, Mar 1, 2010 at 5:40 PM, Riyad Kalla rka...@gmail.com wrote: What happens when you use: http://localhost:8084/site2?param1=c ? On Mon, Mar 1, 2010 at 9:33 AM, Ayodeji Aladejebi aladej...@gmail.com wrote: Wicket Version 1.4.6 Link: http://localhost:8084/site2/?param1=c Code: paramValue= params.getString(param1, ); Output: paramValue returns empty String I am using the default mount Settings. am I missing something - - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Making label visible using Ajax, does not update model
Hi, I have labels defined in the following way: MarkupContainer f = new WebMarkupContainer(viewPanel); f.setOutputMarkupPlaceholderTag(true); form.add(f); f.setVisible(false); f.add(new Label(label1, data.getLabel1())); f.add(new Label(label2, data.getLabel2())); AjaxSubmitLink submitbutton = new AjaxSubmitLink(submit) { private static final long serialVersionUID = 1L; protected void onSubmit(AjaxRequestTarget target, Form? form) { data = Manager.getData(data); f.setVisible(true); target.addComponent(f); } }; div wicket:id=viewPanel div wicket:id=label1/div div wicket:id=label2/div /div Originally data.getLabel1() return empty string. Manager.getData(data) sets the values for the labels to some values. But when the panel becomes visible, the values are still empty. Why are models not updated to display new values? Thanks, Anna
Re: Making label visible using Ajax, does not update model
You're not using a real model. You're constructing the labels with an empty string (the data.getLabel1() is evaluated when you construct the Label object). On Mon, Mar 1, 2010 at 2:57 PM, Anna Simbirtsev asimbirt...@gmail.com wrote: Hi, I have labels defined in the following way: MarkupContainer f = new WebMarkupContainer(viewPanel); f.setOutputMarkupPlaceholderTag(true); form.add(f); f.setVisible(false); f.add(new Label(label1, data.getLabel1())); f.add(new Label(label2, data.getLabel2())); AjaxSubmitLink submitbutton = new AjaxSubmitLink(submit) { private static final long serialVersionUID = 1L; protected void onSubmit(AjaxRequestTarget target, Form? form) { data = Manager.getData(data); f.setVisible(true); target.addComponent(f); } }; div wicket:id=viewPanel div wicket:id=label1/div div wicket:id=label2/div /div Originally data.getLabel1() return empty string. Manager.getData(data) sets the values for the labels to some values. But when the panel becomes visible, the values are still empty. Why are models not updated to display new values? Thanks, Anna - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Cant Read Variable From PageParameters (Wicket 1.4.6)
Ah! I love things that are that easy to fix. Glad it's working now. On Mon, Mar 1, 2010 at 11:51 AM, Ayodeji Aladejebi aladej...@gmail.comwrote: My Bad :) private HomePage(PageParameters params); instead of public HomePage(PageParameters params); i just dont know how i typed private instead of public. So it was the default empty constructor that was getting called instead Thanks On Mon, Mar 1, 2010 at 7:19 PM, Riyad Kalla rka...@gmail.com wrote: Can you paste the code for the page that isn't working? You have a constructor for that page that takes a PageParameters arg that you named 'params' right? On Mon, Mar 1, 2010 at 11:15 AM, Ayodeji Aladejebi aladej...@gmail.com wrote: The Link changes to http://localhost:8084/site2/?param1=c still the same problem On Mon, Mar 1, 2010 at 5:40 PM, Riyad Kalla rka...@gmail.com wrote: What happens when you use: http://localhost:8084/site2?param1=c ? On Mon, Mar 1, 2010 at 9:33 AM, Ayodeji Aladejebi aladej...@gmail.com wrote: Wicket Version 1.4.6 Link: http://localhost:8084/site2/?param1=c Code: paramValue= params.getString(param1, ); Output: paramValue returns empty String I am using the default mount Settings. am I missing something - - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Making label visible using Ajax, does not update model
But how can I use a label with a real model? On Mon, Mar 1, 2010 at 2:59 PM, James Carman jcar...@carmanconsulting.comwrote: You're not using a real model. You're constructing the labels with an empty string (the data.getLabel1() is evaluated when you construct the Label object). On Mon, Mar 1, 2010 at 2:57 PM, Anna Simbirtsev asimbirt...@gmail.com wrote: Hi, I have labels defined in the following way: MarkupContainer f = new WebMarkupContainer(viewPanel); f.setOutputMarkupPlaceholderTag(true); form.add(f); f.setVisible(false); f.add(new Label(label1, data.getLabel1())); f.add(new Label(label2, data.getLabel2())); AjaxSubmitLink submitbutton = new AjaxSubmitLink(submit) { private static final long serialVersionUID = 1L; protected void onSubmit(AjaxRequestTarget target, Form? form) { data = Manager.getData(data); f.setVisible(true); target.addComponent(f); } }; div wicket:id=viewPanel div wicket:id=label1/div div wicket:id=label2/div /div Originally data.getLabel1() return empty string. Manager.getData(data) sets the values for the labels to some values. But when the panel becomes visible, the values are still empty. Why are models not updated to display new values? Thanks, Anna - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Anna Simbirtsev (416) 729-7331
Re: Making label visible using Ajax, does not update model
Anna, Try this: == f.add(new Label(label1, new PopertyModel(data, label1))); f.add(new Label(label2, new PopertyModel(data, label2))); == That way when the model is queried for the value, the propertymodel will dynamically query data's appropriate property name (in this case label1 and label2) for the values. -R On Mon, Mar 1, 2010 at 1:06 PM, Anna Simbirtsev asimbirt...@gmail.com wrote: But how can I use a label with a real model? On Mon, Mar 1, 2010 at 2:59 PM, James Carman jcar...@carmanconsulting.comwrote: You're not using a real model. You're constructing the labels with an empty string (the data.getLabel1() is evaluated when you construct the Label object). On Mon, Mar 1, 2010 at 2:57 PM, Anna Simbirtsev asimbirt...@gmail.com wrote: Hi, I have labels defined in the following way: MarkupContainer f = new WebMarkupContainer(viewPanel); f.setOutputMarkupPlaceholderTag(true); form.add(f); f.setVisible(false); f.add(new Label(label1, data.getLabel1())); f.add(new Label(label2, data.getLabel2())); AjaxSubmitLink submitbutton = new AjaxSubmitLink(submit) { private static final long serialVersionUID = 1L; protected void onSubmit(AjaxRequestTarget target, Form? form) { data = Manager.getData(data); f.setVisible(true); target.addComponent(f); } }; div wicket:id=viewPanel div wicket:id=label1/div div wicket:id=label2/div /div Originally data.getLabel1() return empty string. Manager.getData(data) sets the values for the labels to some values. But when the panel becomes visible, the values are still empty. Why are models not updated to display new values? Thanks, Anna - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Anna Simbirtsev (416) 729-7331 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Making label visible using Ajax, does not update model
Thanks. On Mon, Mar 1, 2010 at 3:08 PM, Riyad Kalla rka...@gmail.com wrote: Anna, Try this: == f.add(new Label(label1, new PopertyModel(data, label1))); f.add(new Label(label2, new PopertyModel(data, label2))); == That way when the model is queried for the value, the propertymodel will dynamically query data's appropriate property name (in this case label1 and label2) for the values. -R On Mon, Mar 1, 2010 at 1:06 PM, Anna Simbirtsev asimbirt...@gmail.com wrote: But how can I use a label with a real model? On Mon, Mar 1, 2010 at 2:59 PM, James Carman jcar...@carmanconsulting.comwrote: You're not using a real model. You're constructing the labels with an empty string (the data.getLabel1() is evaluated when you construct the Label object). On Mon, Mar 1, 2010 at 2:57 PM, Anna Simbirtsev asimbirt...@gmail.com wrote: Hi, I have labels defined in the following way: MarkupContainer f = new WebMarkupContainer(viewPanel); f.setOutputMarkupPlaceholderTag(true); form.add(f); f.setVisible(false); f.add(new Label(label1, data.getLabel1())); f.add(new Label(label2, data.getLabel2())); AjaxSubmitLink submitbutton = new AjaxSubmitLink(submit) { private static final long serialVersionUID = 1L; protected void onSubmit(AjaxRequestTarget target, Form? form) { data = Manager.getData(data); f.setVisible(true); target.addComponent(f); } }; div wicket:id=viewPanel div wicket:id=label1/div div wicket:id=label2/div /div Originally data.getLabel1() return empty string. Manager.getData(data) sets the values for the labels to some values. But when the panel becomes visible, the values are still empty. Why are models not updated to display new values? Thanks, Anna - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Anna Simbirtsev (416) 729-7331 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Anna Simbirtsev (416) 729-7331
Re: How to encrypt/obfuscate resource reference?
The easiest way around this is to specify http://wicket.apache.org/docs/1.4/org/apache/wicket/SharedResources.html#putClassAlias(java.lang.Class, java.lang.String) class aliases . The upside is that you control the generated URL, the downside is that you have to make sure the alias is unique. Sergey Olefir wrote: Hi, out of the box Wicket generates urls for packaged resources that contain fully-qualified class names, e.g.: link rel=stylesheet type=text/css href=resources/org.example.MyClassName/decorations/style.css / Now in accordance with our security policies we are not allowed to expose internal application details -- and fully qualified class name certainly fits that category. -- View this message in context: http://old.nabble.com/How-to-encrypt-obfuscate-resource-reference--tp27744679p27748507.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Ajax File Upload (Safari and Chrome)?
Are there any known issues with the FileUploadField when submitting via Ajax on Safari 4.x or Chrome 5.x? In the AjaxButton.onSubmit(), I am attempting to update other components and it doesn't seem to repaint the component(s) in Safari or Chrome, but does work as I expect in Firefox 3.x. J.D.
persisting a javascript object via wicket
We are looking at building a JQuery plugin that would give us some drag and drop capabilities. When the users does this, we'd like to persist the state to the db. How can we trigger an ajax call to wicket so that our persistence method for the page will get called? Douglas Ferguson mobile: 512.293.7279 office/fax: 512.462.0408 skype: stillrecording aim: DaAmericanRuse - http://www.linkedin.com/in/douglasferguson http://www.myspace.com/douglasferguson http://www.douglasferguson.us/ http://www.distilleryrecords.com/ http://www.stillrecording.com/ Join my mailing list: distilleryrecords-subscr...@yahoogroups.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: persisting a javascript object via wicket
Douglas, See Al's drag 'n' drop list editor slides at http://jweekend.com/dev/ArticlesPage . Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 1 March 2010 22:58, Douglas Ferguson doug...@douglasferguson.us wrote: We are looking at building a JQuery plugin that would give us some drag and drop capabilities. When the users does this, we'd like to persist the state to the db. How can we trigger an ajax call to wicket so that our persistence method for the page will get called? Douglas Ferguson mobile: 512.293.7279 office/fax: 512.462.0408 skype: stillrecording aim: DaAmericanRuse - http://www.linkedin.com/in/douglasferguson http://www.myspace.com/douglasferguson http://www.douglasferguson.us/ http://www.distilleryrecords.com/ http://www.stillrecording.com/ Join my mailing list: distilleryrecords-subscr...@yahoogroups.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: persisting a javascript object via wicket
there are a bunch of drag and drop implementations for wicket, google is your friend. im sure some if not most have serverside callbacks. -igor On Mon, Mar 1, 2010 at 2:58 PM, Douglas Ferguson doug...@douglasferguson.us wrote: We are looking at building a JQuery plugin that would give us some drag and drop capabilities. When the users does this, we'd like to persist the state to the db. How can we trigger an ajax call to wicket so that our persistence method for the page will get called? Douglas Ferguson mobile: 512.293.7279 office/fax: 512.462.0408 skype: stillrecording aim: DaAmericanRuse - http://www.linkedin.com/in/douglasferguson http://www.myspace.com/douglasferguson http://www.douglasferguson.us/ http://www.distilleryrecords.com/ http://www.stillrecording.com/ Join my mailing list: distilleryrecords-subscr...@yahoogroups.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Submitlink and show popup page
Hi everybody, I have a page where a user inputs a number of values. The user them clicks on a calculate button, and the form is submitted. I would now like to display the calculated result in a popup page. Since SubmitLink does not support PopupSettings - I was wondering if anybody here have tried doing this before? I have seen a previous post, where Igor suggests the following: class popperupper extends abstractbehavior implements iheadercontributor { // some logic to only output the script once } button { onsubmit() { TextField tf=; String value=tf.getModelObject(); add(new popperupper()); }} I must however admit, I'm not quite following the example :-$ Med venlig hilsen/Best regards Anders Sørensen
Re: RE: How can i know when a users redirects to other page
Would on session expiry be a better place to handle this? Implementation would be simple and you could avoid ever needing to regenerate a file if that is useful to you. It also naturally handles the case where a user doesn't leave the page. Ed. On Mar 1, 2010 10:09 AM, Martin Asenov mase...@velti.com wrote: The use case is that I generate a file located in a temp folder that appears on page under a download link. I want to delete the file when the user goes in another page. Regards, Martin -Original Message- From: Riyad Kalla [mailto:rka...@gmail.com] Sent: Monday, March 01, 201... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Serialization and Form Models
RaBe wrote: I found Igors post on smart entity models very helpful on that matter: http://wicketinaction.com/2008/09/building-a-smart-entitymodel/ basically, it attaches/detaches only if an Id is set (hence, it can be fetched from the backend) I had read that blog entry several times before but the significance of that last part hadn't stuck with me. I adapted my entity model (using Neo4J not Hibernate) and it looks like a good solution. Thanks for the pointer! -- View this message in context: http://old.nabble.com/Serialization-and-Form-Models-tp27738959p27751745.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Mail:to link
Hi guys; How do i generate a Mail:to link dynamically (e.g for the email addresses of users stored in the database) Kind regards and thanks for you support. Josh
Re: Mail:to link
I got it here : http://old.nabble.com/Generating-email-link-td22738181.html. thanks. On Tue, Mar 2, 2010 at 9:42 AM, Josh Kamau joshnet2...@gmail.com wrote: Hi guys; How do i generate a Mail:to link dynamically (e.g for the email addresses of users stored in the database) Kind regards and thanks for you support. Josh
RE: RE: How can i know when a users redirects to other page
Hi, Ed! How do I know when the session expires? I can't see a method onInvalidate() for instance. Would you give me a hint on this? Thank you all for the help! Best regards, Martin -Original Message- From: Edward Zarecor [mailto:edw...@indeterminate.org] Sent: Tuesday, March 02, 2010 1:46 AM To: users@wicket.apache.org Subject: Re: RE: How can i know when a users redirects to other page Would on session expiry be a better place to handle this? Implementation would be simple and you could avoid ever needing to regenerate a file if that is useful to you. It also naturally handles the case where a user doesn't leave the page. Ed. On Mar 1, 2010 10:09 AM, Martin Asenov mase...@velti.com wrote: The use case is that I generate a file located in a temp folder that appears on page under a download link. I want to delete the file when the user goes in another page. Regards, Martin -Original Message- From: Riyad Kalla [mailto:rka...@gmail.com] Sent: Monday, March 01, 201... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org