Re: Pass page parameters
Ok I solved it. I changed the line User userSelected= (User) getModelObject(); to User userSelected= (User) getParent().getModelObject(); The problem must have been no model set for link. tsuresh wrote: Hello I have a list of users with links in class UserList. When I click the link I need to display the clicked name in another page (DisplayUser). My code snippet is as follows. When i click the link i get the error : No get method defined for class: class User expression: link. When I added get/set methods for link in User class ,it threw NPE. What should I do,please help? add(new PropertyListView(rows, userList) { protected void populateItem(ListItem item) { User user= (User) item.getModelObject(); item.add(new Link(link) { public void onClick() { User userSelected= (User) getModelObject(); setResponsePage(new DisplayUser(userSelected.getUserName())); } }.add(new Label(name, user.getUserName(; } }); } -- View this message in context: http://www.nabble.com/Pass-page-parameters-tp14782931p14783279.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: the flow of wicket
On Sunday 13 January 2008 04:19:30 Igor Vaynberg wrote: Ok, so rarely you need to roll your own IRequestTargetUrlCodingStrategy, we do provide implementations to cover most common cases. And even if you do, you only need to know about IRequestTarget - which has good javadoc, and so does the coding strategy. You dont need to know anything about the irequestcycleprocessor, in fact it might even go away at a later release. May be it's just me but I didn't get how to use IRequestTargetUrlCodingStrategy after reading javadocs (I don't say they're bad). Though you're right request processor is not that important in this case, probably WebRequestCodingStrategy is. Anyway if you do something not very straightforward it may be quite useful to know at least something about the context in which your code is called. Coming back to onBeginRequest() I think it's not obvious to user whether he can use in it application, request, response or session object unless he knows workflow. If request cycle processor goes away I'm sure you'll do it right. I liked the way wicket changed from 1.2 to 1.3. Dima - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Any quickstart for wicket-terracotta
I am aware that there is such an integration between wicket and terracotta however, I have yet to see any example. Anyone can point me to that? -- View this message in context: http://www.nabble.com/Any-quickstart-for-wicket-terracotta-tp14783593p14783593.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]
PagingNavigator refactoring request
Hi guys, would it be possible to change PagingNavigator's constructor from public PagingNavigator(final String id, final IPageable pageable, final IPagingLabelProvider labelProvider) { super(id); // Get the navigation bar and add it to the hierarchy this.pagingNavigation = newNavigation(pageable, labelProvider); add(pagingNavigation); // Add additional page links add(newPagingNavigationLink(first, pageable, 0)); add(newPagingNavigationIncrementLink(prev, pageable, -1)); add(newPagingNavigationIncrementLink(next, pageable, 1)); add(newPagingNavigationLink(last, pageable, -1)); } /** to public PagingNavigator(final String id, final IPageable pageable, final IPagingLabelProvider labelProvider) { super(id); initNavigator(pageable, labelProvider); } protected initNavigator(pageable, provider) { this.pagingNavigation = newNavigation(pageable, labelProvider); add(pagingNavigation); } I'm asking because I subclassed PagingNavigator and I have additional constructor parameters I want to pass to the constructor before invoking initNavigator. Thanks for your time! -- View this message in context: http://www.nabble.com/PagingNavigator-refactoring-request-tp14783646p14783646.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: Resizable and reorderable grid components
On Jan 13, 2008 6:01 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: so exactly what kinds of components would it be nice to see? a weather widget? I initially read that as a feather widget (a Wicket component that shows the Apache feather). Martijn -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pass page parameters
You could also do: add(new Link(foo, item.getModel()) { }); Martijn On Jan 13, 2008 9:29 AM, tsuresh [EMAIL PROTECTED] wrote: Ok I solved it. I changed the line User userSelected= (User) getModelObject(); to User userSelected= (User) getParent().getModelObject(); The problem must have been no model set for link. tsuresh wrote: Hello I have a list of users with links in class UserList. When I click the link I need to display the clicked name in another page (DisplayUser). My code snippet is as follows. When i click the link i get the error : No get method defined for class: class User expression: link. When I added get/set methods for link in User class ,it threw NPE. What should I do,please help? add(new PropertyListView(rows, userList) { protected void populateItem(ListItem item) { User user= (User) item.getModelObject(); item.add(new Link(link) { public void onClick() { User userSelected= (User) getModelObject(); setResponsePage(new DisplayUser(userSelected.getUserName())); } }.add(new Label(name, user.getUserName(; } }); } -- View this message in context: http://www.nabble.com/Pass-page-parameters-tp14782931p14783279.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you do this in wicket?
Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: the flow of wicket
On Sunday 13 January 2008 12:47:44 Dmitry Kandalov wrote: On Sunday 13 January 2008 04:19:30 Igor Vaynberg wrote: Ok, so rarely you need to roll your own IRequestTargetUrlCodingStrategy, we do provide implementations to cover most common cases. And even if you do, you only need to know about IRequestTarget - which has good javadoc, and so does the coding strategy. You dont need to know anything about the irequestcycleprocessor, in fact it might even go away at a later release. If request cycle processor goes away I'm sure you'll do it right. I liked the way wicket changed from 1.2 to 1.3. Ah.. sorry it wasn't relevant to what you said. Dima - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Raw urls using WicketTester 1.3.0
Hi! My main question is: how to process multiple consecutive raw requests using WicketTester, during the same user session. By raw I mean page requests that do not result from clicking links on pages, but instead, they would be equivalent to the user simply typing them into the browser (like the startPage). My scheme is as follows: We assume the user is logged in, but certain member functionality (MemberArea -page) is not accessible until email has been confirmed. 1. In the Unit-test the user starts a session with wicketTester.startPage(MemberArea.class); 2. Authentication scheme remembers the user and logs her in. 3. Authentication scheme, however, notices the user has not confirmed her email, and issues a throw new RestartResponseAtInterceptPageException(EmailConfirmationPending.class); 4. In order to be allowed to continue, the user is supposed visit a bookmarkable email confirmation link http://site/EmailConfirmation/confirmationKey If the email confirmation is approved, the EmailConfirmation -page should redirect the user back to the originally requested content (i.e., MemberArea -page in this test case). This is the scenario we want to be unit-tested. Now, if she was using a browser, it would be easy: just type the url into the browser. However, with the wicketTester, I cannot seem to find a way of accomplishing this. I cannot embed the link onto the web page, because this would not correspond to the standard scheme: the link is supposed to arrive separately via email. I have tried the following approaches with results indicated below: a) calling new WicketTester(myApplication).startPage(new EmailConfirmation(pageParameters)), which results in a completely cleared PageMap and the method continueToOriginalDestination() in EmailConfirmation fails for some reason. Instead, wicketTester.assertRenderedPage(MemberArea.class) should return true, but it does not because the EmailConfirmation.class is rendered. b) calling wicketTester.setupRequestAndResponse(); and wicketTester.getLastRenderedPage().setResponsePage(new EmailConfirmation(pageParameters)), results in a slightly better functionality. However, instead of continueToOriginalDestination() on the EmailConfirmation page rendering the MemberArea page, it now renders the EmailConfirmationPending -page which intercepted the request. Not good. c) another try, calling wicketTester.setupRequestAndResponse() and wicketTester.getServletRequest().setRequestToComponent(new EmailConfirmation(pageParameters)) gives the same results as b). If I perform the same tests with a browser, I get the expected results. Is this somehow not the proper way to handle the raw requests with wicketTester and expecting the PageMap to be updated accordingly? Hou should I properly implement such tests? Or is it a bug/missing feature in wicket? Thank you in advance! -- Martin Makundi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to display as is
What do you mean that browser displays as amp;? Is it in source code? Because that is right. The needs to be escaped, but unless your browser is broken the user should never see amp; unless he looks to source code. Anyway, label.setEscapeModelStrings(false) prevents wicket from escaping it. -Matej On Jan 13, 2008 1:35 PM, [EMAIL PROTECTED] wrote: Hello: I use Label(id, A B) and the is supposed to be kept as is since it is what the title would read. but the browser displays A amp; B What should I do to avoid this? Thanks -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding breadcrumbs
I gave it a try but I really cannot figure it out how to do it with pages instead of panels. Any help would be appreciated. Eelco Hillenius wrote: Could you give me code examples how to do that? Not without having to spend a couple of hours on it, and I'm afraid I don't have time for that now, sorry. Best rest assured, it is doable... just fire up that grey matter of yours ;-) Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Adding-breadcrumbs-tp14753894p14785242.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: How to display as is
Thanks for the quick response. That solves the problem. What do you mean that browser displays as amp;? Is it in source code? Because that is right. The needs to be escaped, but unless your browser is broken the user should never see amp; unless he looks to source code. Anyway, label.setEscapeModelStrings(false) prevents wicket from escaping it. -Matej On Jan 13, 2008 1:35 PM, [EMAIL PROTECTED] wrote: Hello: I use Label(id, A B) and the is supposed to be kept as is since it is what the title would read. but the browser displays A amp; B What should I do to avoid this? Thanks -- Resizable and reorderable grid components. http://www.inmethod.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]
How to display as is
Hello: I use Label(id, A B) and the is supposed to be kept as is since it is what the title would read. but the browser displays A amp; B What should I do to avoid this? Thanks
Re: London Wicket Event - Schedule/Bigger Room
Ian has sent me the project and I will be reviewing it soon. In case he doesn't see this thread I'll ask him to send us a one paragraph summary that does it justice. Regards - Cemal http://jWeekend.co.uk http://jWeekend.co.uk Johan Compagner wrote: Whats that new wicket security framework? On 1/12/08, jweekend [EMAIL PROTECTED] wrote: We seem to be back up to the original interest levels again for our Feb 6th London Wicket Users Group event. As we had already pretty much hit our capacity for the first conference room we had booked with 4 weeks still to go, we have now booked a bigger room at Google that seats over 50 people (thanks again Al), so more people can come along; I'd still advise people to book early as Wicket seems to be getting more interesting for more developers almost daily these days (the number of new names on the mailing list gives a decent indication of this), especially with 1.3.0 being released (thanks to all concerned for that; this release makes it that much easier to argue for the use of Wicket on many classes of systems, especially in the corporate world). I'd like to remind those of you that have already registered (or plan to) to please ensure that their place is either confirmed or cancelled by clicking on the link in the automated registration-confirmation email to help us make good use of the available space? Here's the schedule: 18:30 Cemal Bayramoglu: Introduction and short presentation: Injecting Spring Beans Into Wicket Components 19:00 Ian Godman: New Wicket Security Framework (open source) 19:30 Al Maw: Creating an AJAXified drag and drop list editor We will have a joint QA session at the end and no doubt there will be a few people heading for a bite to eat or a drink after that. We are trying to arrange for some snacks too (TBC, Al?). Regards - Cemal http://jWeekend.co.uk http://jWeekend.co.uk PS Could someone please update the http://wicket.apache.org/ Wicket home page to reflect the fact that our events are now on the first Wednesday of every month? -- View this message in context: http://www.nabble.com/London-Wicket-Event---Schedule-Bigger-Room-tp14779697p14779697.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/London-Wicket-Event---Schedule-Bigger-Room-tp14779697p14785248.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: How do you do this in wicket?
Thank you Martijin. Ken Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14786207.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: How do you do this in wicket?
Another option is too look at wicket-auth-roles. It is really simple (basically an example) but for a lot of applications it is in the sweet spot. Two default roles: user and admin. The wicket examples have the auth roles examples in them. Martijn On Jan 13, 2008 3:31 PM, xdirewolfx [EMAIL PROTECTED] wrote: Thank you Martijin. Ken Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14786207.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you do this in wicket?
The reason we went for such an approach was because user will design the lookfeel, content and whether it is public or private(authentication needed) on runtime using view metadata. We used proprietary technology earlier on and decided to give a short in wicket as it fits better and much more intuitive. Keep up the good work wicket team. Martijn Dashorst wrote: Another option is too look at wicket-auth-roles. It is really simple (basically an example) but for a lot of applications it is in the sweet spot. Two default roles: user and admin. The wicket examples have the auth roles examples in them. Martijn On Jan 13, 2008 3:31 PM, xdirewolfx [EMAIL PROTECTED] wrote: Thank you Martijin. Ken Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14786207.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14787020.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: Problem with Wicket and Guice
iirc objects that aren't components are not injected as they are not under Wicket's control. In the spring integration you need to do: Cart() { InjectionHolder.inject(this); } I imagine this is similar to the Wicket guice integration. Martijn On 1/13/08, t.weitzel [EMAIL PROTECTED] wrote: I'm not sure this is done right, but here is what I did and the problem I'm having: There is MyApplication that's somehow instantiated by GuiceWebApplicationFactory via web.xml: filter filter-namemy/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.guice.GuiceWebApplicationFactory/param-value /init-param init-param param-namemodule/param-name param-valuecom.synformation.wicket.my.MyGuiceModule/param-value /init-param /filter MyGuiceModule.java: public class MyGuiceModule implements Module { public void configure(Binder binder) { binder .bind(WebApplication.class) .to(MyApplication.class); binder .bind(IAddress.class) .to(Address.class); } This works since I see the pages of MyApplication without a problem. Also, I've set a breakpoint in configure() where I see that my implementations are bound to the interfaces. So GuiceWebApplicationFactory pulls MyApplication out of MyGuiceModule. Next, I try to inject an Address into the Cart class: @Inject private IAddress address; ... public IAddress getAddress() { return address; } My Wicket page tries to access it: IAddress address = cart.getAddress(); form.add(new TextField(name, new PropertyModel(address, name))); I get an exception. Part of stack trace: java.lang.IllegalArgumentException: Parameter modelObject cannot be null at org.apache.wicket.model.AbstractPropertyModel.init(AbstractPropertyModel.java:66) at org.apache.wicket.model.PropertyModel.init(PropertyModel.java:99) The object returned by getAddress() is null. It seems that the Address object never gets injected. -- View this message in context: http://www.nabble.com/Problem-with-Wicket-and-Guice-tp14787021p14787021.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you do this in wicket?
I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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: How do you do this in wicket?
iirc: setResponsePage(LoginPage.class); setRedirect(true); getSession().invalidate(); Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you do this in wicket?
Doesn't work for me... I have a PageLink class with a onClick() method that looks like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } super.onClick(); sets the response page. I do not end up with the desired login page, but get Page Expired. /Anders Martijn Dashorst wrote: iirc: setResponsePage(LoginPage.class); setRedirect(true); getSession().invalidate(); Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you do this in wicket?
You *MUST* redirect to a bookmarkable page, not a page instance. A page instance is always relative to your current session, which you just conveniently invalidated. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: Doesn't work for me... I have a PageLink class with a onClick() method that looks like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } super.onClick(); sets the response page. I do not end up with the desired login page, but get Page Expired. /Anders Martijn Dashorst wrote: iirc: setResponsePage(LoginPage.class); setRedirect(true); getSession().invalidate(); Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Wicket and Guice
Martijn Dashorst wrote: iirc objects that aren't components are not injected as they are not under Wicket's control. Ah. Ok, when I setup a second module for all other objects and inject them the Guice way, it works indeed. Thanks! I'm not sure about your other suggestion: InjectionHolder.inject(this), mainly because I somehow need to get hold of the Injector to pass it to the InjectionHolder first, and I don't know how (it's not set by Wicket). -- View this message in context: http://www.nabble.com/Problem-with-Wicket-and-Guice-tp14787021p14787792.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]
InjectorHolder has not been assigned an injector error
Hello Again, I am upgrading to the latest and greatest release of wicket 1.3. I made the change to register my converters by overriding the newConverterLocator method. In my customer converter class, in the constructor, I am calling InjectorHolder.getInjector().inject( this ); The converter class is using a couple of spring beans. I am getting the following error when started tomcat. java.lang.IllegalStateException: InjectorHolder has not been assigned an injector. Use InjectorHolder.setInjector() to assign an injector. In most cases this should be done once inside SpringWebApplication subclass's init() method. In the my Application class, (which is extends AuthenticatedWebApplication) @Override protected void init() { super.init(); addComponentInstantiationListener( new SpringComponentInjector( this ); . .. I tried calling the InjectorHolder.setInjector to assign an injector but still get the error. Again the only change I made that caused the error was using the new way to register converters and of course upgrading my wicket. My converter needs to call InjectorHolder.getInjector().inject( this ). I'm guessing that the call to newConverterLocater happens before Spring injection. Any ideas on how to fix this? Thanks Karen (Wicket Newbie) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Wicket and Guice
I'm not sure about your other suggestion: InjectionHolder.inject(this), mainly because I somehow need to get hold of the Injector to pass it to the InjectionHolder first, and I don't know how (it's not set by Wicket). InjectorHolder.getInjector().inject(this); It is set by Wicket if you initialize it properly (by creating SpringComponentInjector). Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding breadcrumbs
class abstract basepage extends page { private listbasepage history=new arraylist(); public basepage() { add(new listview(history, new PropertyModel(this, history)) { protected void onpopulateitem(listitem item) { link link=new link(link, item.getmodel()) { protected void onclick() { setresponsepage(getmodelobject()); } } link.add(new label(title, item.getmodelobject().gettitle())); } } public basepage(basepage crumb) { this(); history.add(crumb); } protected abstract imodel gettitle(); } not the most efficient way, but should get you started -igor On Jan 13, 2008 4:47 AM, WickedMan [EMAIL PROTECTED] wrote: I gave it a try but I really cannot figure it out how to do it with pages instead of panels. Any help would be appreciated. Eelco Hillenius wrote: Could you give me code examples how to do that? Not without having to spend a couple of hours on it, and I'm afraid I don't have time for that now, sorry. Best rest assured, it is doable... just fire up that grey matter of yours ;-) Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Adding-breadcrumbs-tp14753894p14785242.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: InjectorHolder has not been assigned an injector error
I'm guessing that the call to newConverterLocater happens before Spring injection. Yeah. Too bad, maybe in hind sight it would have been better to create it lazily. Any ideas on how to fix this? I think just creating the SpringComponentInjector in your webapp's constructor instead of in the init method should do the trick. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: InjectorHolder has not been assigned an injector error
-Original Message- From: Eelco Hillenius [mailto:[EMAIL PROTECTED] Sent: Sunday, January 13, 2008 12:11 PM To: users@wicket.apache.org Subject: Re: InjectorHolder has not been assigned an injector error I'm guessing that the call to newConverterLocater happens before Spring injection. Yeah. Too bad, maybe in hind sight it would have been better to create it lazily. Any ideas on how to fix this? I think just creating the SpringComponentInjector in your webapp's constructor instead of in the init method should do the trick. Tried putting addComponentInstantiationListener( new SpringComponentInjector(this ); into the constructor of Application which extends AuthentationWebApplication... but I now get the following error. java.lang.IllegalStateException: servletContext is not set yet. Any code in your Application object that uses the wicket filter instance should be put in the init() method instead of your constructor Thanks for the suggestion anyhow. Eelco - 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: Any quickstart for wicket-terracotta
Wicket support is provided as a Terracotta configuration module. Once you have Terracotta set up for sessions, you just need to add the wicket configuration module to your terracotta config. Here's a link to using the Terracotta sessions configurator: http://www.terracotta.org/confluence/display/docs1/Sessions+Quick+Start Here's a link to for using the Wicket configuration module: http://www.terracotta.org/confluence/display/integrations/Wicket I'd be very interested to hear your feedback about how the documentation could be improved to make this stuff easier to find and easier to get started. Cheers, Orion xdirewolfx wrote: I am aware that there is such an integration between wicket and terracotta however, I have yet to see any example. Anyone can point me to that? -- View this message in context: http://www.nabble.com/Any-quickstart-for-wicket-terracotta-tp14783593p14788712.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: InjectorHolder has not been assigned an injector error
Tried putting addComponentInstantiationListener( new SpringComponentInjector(this ); into the constructor of Application which extends AuthentationWebApplication... but I now get the following error. java.lang.IllegalStateException: servletContext is not set yet. Any code in your Application object that uses the wicket filter instance should be put in the init() method instead of your constructor That sucks. How about - big hack - doing it in your newConverterLocater method, just before you create the locator? That should definitively work, though it's a bit nasty :-) Could you please open a JIRA issue for this? We should probably create the converterLocator and possibly the session store lazily instead of in Application#internalInit. Cheers, Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel onClick
Is there a way for me to go into Edit Mode on an AjaxEditableLabel without clicking on the actual label? I would like to have an Edit link or button somewhere that will put the field in edit mode when clicked by the user. The best thing to do for you is to dig into how the component is implemented and either create your own, or customize parts of it (in particular, you'd have to override newLabel and return your own label implementation). Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resizable and reorderable grid components
well, for example, while DefaultDataTable does the bulk of what we needed, it's not the easiest to extend when you start looking at toolbars and ordering and the like. Some of what we needed was more chrome, but some of it is alterations of some of the functionaly. None of it was hard to do by any stretch. But seeing how easy/common it is to do such things before having written code would've greased the skids with the pro-tapestry participants. But wicket won so it wasn't a showstopper. Just would've been nice. On Jan 13, 2008 12:01 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: what matej built isnt that far from the examples we have of datatable and tree/treetable. he added a ton more chrome, but in terms of functionality they are pretty much the same... so exactly what kinds of components would it be nice to see? a weather widget? -igor On Jan 12, 2008 7:57 PM, Evan Chooly [EMAIL PROTECTED] wrote: No, not really. I knew about and used that page. But one of the questions that came up was about prebuilt components and the like. We used a number of wiki pages and the examples page and others to ultimately push wicket through. But a showcase of components being used beyond the rather vanilla components on the examples page might have made the conversations easier. On Jan 12, 2008 7:25 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: On Jan 12, 2008 12:50 PM, Evan Chooly [EMAIL PROTECTED] wrote: I know what I was trying to convince my current company to use wicket the question of where else is it used came up several times. Something like that would certainly have helped. you mean http://cwiki.apache.org/WICKET/#Index-SitesusingWicket -igor On Jan 12, 2008 4:27 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: I like it! Who knows... JSF keeps rambling about a market place for custom component libraries, .net has such a market place. I don't see why we shouldn't try to pursuit such an avenue. Martijn On Jan 12, 2008 8:47 AM, Johan Compagner [EMAIL PROTECTED] wrote: If there would be a market for commercial components then i can see the value of wicketstuff.org/marketplace for such components, commercial or not its still stuff for wicket On 1/11/08, Evan Chooly [EMAIL PROTECTED] wrote: Is that not the official website for the wicket stuff projects? Just kinda struck me as odd is all. On Jan 10, 2008 6:26 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: dont really see this as that weird. its a private server... -igor - 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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - 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: Resizable and reorderable grid components
DefaultDataTable is just that, a default. It isnt meant to be extended, just a convinient implementation of what most people would like. You should extend DataTable and add the toolbars yourself in any order you want... -igor On Jan 13, 2008 10:08 AM, Evan Chooly [EMAIL PROTECTED] wrote: well, for example, while DefaultDataTable does the bulk of what we needed, it's not the easiest to extend when you start looking at toolbars and ordering and the like. Some of what we needed was more chrome, but some of it is alterations of some of the functionaly. None of it was hard to do by any stretch. But seeing how easy/common it is to do such things before having written code would've greased the skids with the pro-tapestry participants. But wicket won so it wasn't a showstopper. Just would've been nice. On Jan 13, 2008 12:01 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: what matej built isnt that far from the examples we have of datatable and tree/treetable. he added a ton more chrome, but in terms of functionality they are pretty much the same... so exactly what kinds of components would it be nice to see? a weather widget? -igor On Jan 12, 2008 7:57 PM, Evan Chooly [EMAIL PROTECTED] wrote: No, not really. I knew about and used that page. But one of the questions that came up was about prebuilt components and the like. We used a number of wiki pages and the examples page and others to ultimately push wicket through. But a showcase of components being used beyond the rather vanilla components on the examples page might have made the conversations easier. On Jan 12, 2008 7:25 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: On Jan 12, 2008 12:50 PM, Evan Chooly [EMAIL PROTECTED] wrote: I know what I was trying to convince my current company to use wicket the question of where else is it used came up several times. Something like that would certainly have helped. you mean http://cwiki.apache.org/WICKET/#Index-SitesusingWicket -igor On Jan 12, 2008 4:27 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: I like it! Who knows... JSF keeps rambling about a market place for custom component libraries, .net has such a market place. I don't see why we shouldn't try to pursuit such an avenue. Martijn On Jan 12, 2008 8:47 AM, Johan Compagner [EMAIL PROTECTED] wrote: If there would be a market for commercial components then i can see the value of wicketstuff.org/marketplace for such components, commercial or not its still stuff for wicket On 1/11/08, Evan Chooly [EMAIL PROTECTED] wrote: Is that not the official website for the wicket stuff projects? Just kinda struck me as odd is all. On Jan 10, 2008 6:26 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: dont really see this as that weird. its a private server... -igor - 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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - 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: InjectorHolder has not been assigned an injector error
Tried putting addComponentInstantiationListener( new SpringComponentInjector(this ); into the constructor of Application which extends AuthentationWebApplication... but I now get the following error. java.lang.IllegalStateException: servletContext is not set yet. Any code in your Application object that uses the wicket filter instance should be put in the init() method instead of your constructor That sucks. How about - big hack - doing it in your newConverterLocater method, just before you create the locator? That should definitively work, though it's a bit nasty :-) Yes that worked. Now I'm onto other upgrading issues :) Could you please open a JIRA issue for this? We should probably create the converterLocator and possibly the session store lazily instead of in Application#internalInit. Sure. Cheers, Eelco - 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: Problem with Wicket and Guice
Eelco Hillenius wrote: InjectorHolder.getInjector().inject(this); It is set by Wicket if you initialize it properly (by creating SpringComponentInjector). The applications is set up via GuiceWebApplicationFactory and web.xml. When I try to get the Injector (that Wicket has somewhere) via InjectorHolder.getInjector() , all I get is an exception: java.lang.IllegalStateException: InjectorHolder has not been assigned an injector. Use InjectorHolder.setInjector() to assign an injector. In most cases this should be done once inside SpringWebApplication subclass's init() method. t.weitzel wrote: I somehow need to get hold of the Injector to pass it to the InjectionHolder first, and I don't know how (it's not set by Wicket) I've probably not set it up right, but I really don't know how to get hold of the Injector. -- View this message in context: http://www.nabble.com/Problem-with-Wicket-and-Guice-tp14787021p14789635.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: How do you do this in wicket?
Then where do I call that invalidation code? It's not possible to override onClick() with BookmarkablePageLink. /Anders Martijn Dashorst wrote: You *MUST* redirect to a bookmarkable page, not a page instance. A page instance is always relative to your current session, which you just conveniently invalidated. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: Doesn't work for me... I have a PageLink class with a onClick() method that looks like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } super.onClick(); sets the response page. I do not end up with the desired login page, but get Page Expired. /Anders Martijn Dashorst wrote: iirc: setResponsePage(LoginPage.class); setRedirect(true); getSession().invalidate(); Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://ojalgo.org/ Mathematics, Linear Algebra and Optimisation with Java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you do this in wicket?
I have never done new LoginPage(), and I never said I did - that's something you assumed. It has always been LoginPage.class. In my original code the LoginPage.class was passed as an argument to the PageLink constructor and then I had an onClick method like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } Is that the problem: Do I have to call this.setResponsePage(LoginPage.class); after super.onClick(); ? (Don't have access to the code at the moment.) /Anders Martijn Dashorst wrote: If you read my previous message closely you would have seen: setResponsePage(LoginPage.class); LoginPage.class instead of new LoginPage() That generates the difference between a bookmarkable URL and a session relative URL. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: Then where do I call that invalidation code? It's not possible to override onClick() with BookmarkablePageLink. /Anders Martijn Dashorst wrote: You *MUST* redirect to a bookmarkable page, not a page instance. A page instance is always relative to your current session, which you just conveniently invalidated. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: Doesn't work for me... I have a PageLink class with a onClick() method that looks like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } super.onClick(); sets the response page. I do not end up with the desired login page, but get Page Expired. /Anders Martijn Dashorst wrote: iirc: setResponsePage(LoginPage.class); setRedirect(true); getSession().invalidate(); Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://ojalgo.org/ Mathematics, Linear Algebra and Optimisation with Java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://ojalgo.org/ Mathematics, Linear Algebra and Optimisation with Java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you do this in wicket?
For the record: I can't smell or magically see what you do in your call to super(). I tried it in an application here, and I haven't reproduced your problem. It works here. As long as you don't share the whole code, I have to assume that what I can validate on my side is your problem. setResponsePage(new LoginPage()) gives me the session expired page. setResponsePage(LoginPage.class) doesn't. I also ensured that the session is actually invalidated, and that I did have a session prior to invalidating. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have never done new LoginPage(), and I never said I did - that's something you assumed. It has always been LoginPage.class. In my original code the LoginPage.class was passed as an argument to the PageLink constructor and then I had an onClick method like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } Is that the problem: Do I have to call this.setResponsePage(LoginPage.class); after super.onClick(); ? (Don't have access to the code at the moment.) /Anders Martijn Dashorst wrote: If you read my previous message closely you would have seen: setResponsePage(LoginPage.class); LoginPage.class instead of new LoginPage() That generates the difference between a bookmarkable URL and a session relative URL. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: Then where do I call that invalidation code? It's not possible to override onClick() with BookmarkablePageLink. /Anders Martijn Dashorst wrote: You *MUST* redirect to a bookmarkable page, not a page instance. A page instance is always relative to your current session, which you just conveniently invalidated. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: Doesn't work for me... I have a PageLink class with a onClick() method that looks like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } super.onClick(); sets the response page. I do not end up with the desired login page, but get Page Expired. /Anders Martijn Dashorst wrote: iirc: setResponsePage(LoginPage.class); setRedirect(true); getSession().invalidate(); Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://ojalgo.org/ Mathematics, Linear Algebra and Optimisation with Java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://ojalgo.org/ Mathematics, Linear Algebra and Optimisation with Java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe,
Re: Javascript call to wicket
I did not find the results of this thread on the Wiki yet, so I created the following page: http://cwiki.apache.org/confluence/display/WICKET/Calling+Wicket+from+Javascript Comments and edits are appreciated. There is a TODO on the page for providing an example that adds Javascript to the header. Or perhaps this should be on another page under AJAX? Thanks for sharing the information! Regards, Erik. Gwyn Evans wrote: As Cemel suggested, if you have time to put a summary up on the Wiki, it would be appreciated! /Gwyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you do this in wicket?
Try using a normal Link instead of PageLink and do the setResponsePage stuff in the onClick. Maurice On Jan 13, 2008 9:41 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: For the record: I can't smell or magically see what you do in your call to super(). I tried it in an application here, and I haven't reproduced your problem. It works here. As long as you don't share the whole code, I have to assume that what I can validate on my side is your problem. setResponsePage(new LoginPage()) gives me the session expired page. setResponsePage(LoginPage.class) doesn't. I also ensured that the session is actually invalidated, and that I did have a session prior to invalidating. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have never done new LoginPage(), and I never said I did - that's something you assumed. It has always been LoginPage.class. In my original code the LoginPage.class was passed as an argument to the PageLink constructor and then I had an onClick method like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } Is that the problem: Do I have to call this.setResponsePage(LoginPage.class); after super.onClick(); ? (Don't have access to the code at the moment.) /Anders Martijn Dashorst wrote: If you read my previous message closely you would have seen: setResponsePage(LoginPage.class); LoginPage.class instead of new LoginPage() That generates the difference between a bookmarkable URL and a session relative URL. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: Then where do I call that invalidation code? It's not possible to override onClick() with BookmarkablePageLink. /Anders Martijn Dashorst wrote: You *MUST* redirect to a bookmarkable page, not a page instance. A page instance is always relative to your current session, which you just conveniently invalidated. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: Doesn't work for me... I have a PageLink class with a onClick() method that looks like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } super.onClick(); sets the response page. I do not end up with the desired login page, but get Page Expired. /Anders Martijn Dashorst wrote: iirc: setResponsePage(LoginPage.class); setRedirect(true); getSession().invalidate(); Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://ojalgo.org/ Mathematics, Linear Algebra and Optimisation with Java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://ojalgo.org/ Mathematics, Linear Algebra and Optimisation with Java
Cannot create Spring Bean via Proxy in Wicket
Hello, My WebApplication extends SpringWebApplication and I use proxy-based approach for bean instantiation. I'm using JDK1.4, so I'm unable to just annotate the beans, but have to do it in the following way: MyWebApplication { private UserDao userDao; ... public UserDao getUserDao() { if (userDao == null) { userDao = (JdbcUserDao) createSpringBeanProxy( JdbcUserDao.class, userDao); } return userDao; } } However, I get the following exception: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'userDao' must be of type [com.myapp.user.JdbcUserDao], but was actually of type [$Proxy9] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:309) ... My configurations are pretty much taken from wicket-phonebook example, the only major difference is that phonebook uses Wicket 1.2 with Wicket is configured as servlet, while I use it as filter to enable Acegi support. If you're still with me, here're related entries from web.xml...: filter filter-nameSpring Application Factory Filter/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter /filter-class init-param param-nameapplicationFactoryClassName/param-name param-value org.apache.wicket.spring.SpringWebApplicationFactory/param-value /init-param /filter filter-mapping filter-nameSpring Application Factory Filter/filter-name url-pattern/myapp/*/url-pattern /filter-mapping listener listener-class org.springframework.web.context.ContextLoaderListener/listener-class /listener ...and from applicationContext.xml: bean id=userDaoTarget class=com.myapp.user.JdbcUserDao property name=dataSource ref=dataSource/ /bean bean id=transactionManager class= org.springframework.jdbc.datasource.DataSourceTransactionManager property name=dataSource ref=dataSource/ /bean !-- this is a transactional proxy for userdetails dao which ensures proper transaction handling -- bean id=userDao class= org.springframework.transaction.interceptor.TransactionProxyFactoryBean property name=transactionManager ref=transactionManager / property name=target ref=userDaoTarget/ property name=transactionAttributes props prop key=savePROPAGATION_REQUIRED/prop prop key=*PROPAGATION_REQUIRED,readOnly/prop /props /property /bean I'd be happy if someone could point me on where to look at since I'm a little afraid to dig into the whole Spring's proxy instantiation thing. I use Wicket 1.3, Wicket-Spring 1.3 and Spring 2.5. -- sp
Re: Cannot create Spring Bean via Proxy in Wicket
if you could provide a quickstart maybe someone can look into it -igor On Jan 13, 2008 1:34 PM, Sergey Podatelev [EMAIL PROTECTED] wrote: Hello, My WebApplication extends SpringWebApplication and I use proxy-based approach for bean instantiation. I'm using JDK1.4, so I'm unable to just annotate the beans, but have to do it in the following way: MyWebApplication { private UserDao userDao; ... public UserDao getUserDao() { if (userDao == null) { userDao = (JdbcUserDao) createSpringBeanProxy( JdbcUserDao.class, userDao); } return userDao; } } However, I get the following exception: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'userDao' must be of type [com.myapp.user.JdbcUserDao], but was actually of type [$Proxy9] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:309) ... My configurations are pretty much taken from wicket-phonebook example, the only major difference is that phonebook uses Wicket 1.2 with Wicket is configured as servlet, while I use it as filter to enable Acegi support. If you're still with me, here're related entries from web.xml...: filter filter-nameSpring Application Factory Filter/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter /filter-class init-param param-nameapplicationFactoryClassName/param-name param-value org.apache.wicket.spring.SpringWebApplicationFactory/param-value /init-param /filter filter-mapping filter-nameSpring Application Factory Filter/filter-name url-pattern/myapp/*/url-pattern /filter-mapping listener listener-class org.springframework.web.context.ContextLoaderListener/listener-class /listener ...and from applicationContext.xml: bean id=userDaoTarget class=com.myapp.user.JdbcUserDao property name=dataSource ref=dataSource/ /bean bean id=transactionManager class= org.springframework.jdbc.datasource.DataSourceTransactionManager property name=dataSource ref=dataSource/ /bean !-- this is a transactional proxy for userdetails dao which ensures proper transaction handling -- bean id=userDao class= org.springframework.transaction.interceptor.TransactionProxyFactoryBean property name=transactionManager ref=transactionManager / property name=target ref=userDaoTarget/ property name=transactionAttributes props prop key=savePROPAGATION_REQUIRED/prop prop key=*PROPAGATION_REQUIRED,readOnly/prop /props /property /bean I'd be happy if someone could point me on where to look at since I'm a little afraid to dig into the whole Spring's proxy instantiation thing. I use Wicket 1.3, Wicket-Spring 1.3 and Spring 2.5. -- sp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot create Spring Bean via Proxy in Wicket
You have to use interface and cast to the interface unless Spring is forced to use cglib for proxy creation. If your UserDao is interface then just cast to it, not to the JdbcUserDao and it should be fine. - Original Message From: Sergey Podatelev [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Sunday, January 13, 2008 1:34:08 PM Subject: Cannot create Spring Bean via Proxy in Wicket Hello, My WebApplication extends SpringWebApplication and I use proxy-based approach for bean instantiation. I'm using JDK1.4, so I'm unable to just annotate the beans, but have to do it in the following way: MyWebApplication { private UserDao userDao; ... public UserDao getUserDao() { if (userDao == null) { userDao = (JdbcUserDao) createSpringBeanProxy( JdbcUserDao.class, userDao); } return userDao; } } However, I get the following exception: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'userDao' must be of type [com.myapp.user.JdbcUserDao], but was actually of type [$Proxy9] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:309) ... My configurations are pretty much taken from wicket-phonebook example, the only major difference is that phonebook uses Wicket 1.2 with Wicket is configured as servlet, while I use it as filter to enable Acegi support. If you're still with me, here're related entries from web.xml...: filter filter-nameSpring Application Factory Filter/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter /filter-class init-param param-nameapplicationFactoryClassName/param-name param-value org.apache.wicket.spring.SpringWebApplicationFactory/param-value /init-param /filter filter-mapping filter-nameSpring Application Factory Filter/filter-name url-pattern/myapp/*/url-pattern /filter-mapping listener listener-class org.springframework.web.context.ContextLoaderListener/listener-class /listener ...and from applicationContext.xml: bean id=userDaoTarget class=com.myapp.user.JdbcUserDao property name=dataSource ref=dataSource/ /bean bean id=transactionManager class= org.springframework.jdbc.datasource.DataSourceTransactionManager property name=dataSource ref=dataSource/ /bean !-- this is a transactional proxy for userdetails dao which ensures proper transaction handling -- bean id=userDao class= org.springframework.transaction.interceptor.TransactionProxyFactoryBean property name=transactionManager ref=transactionManager / property name=target ref=userDaoTarget/ property name=transactionAttributes props prop key=savePROPAGATION_REQUIRED/prop prop key=*PROPAGATION_REQUIRED,readOnly/prop /props /property /bean I'd be happy if someone could point me on where to look at since I'm a little afraid to dig into the whole Spring's proxy instantiation thing. I use Wicket 1.3, Wicket-Spring 1.3 and Spring 2.5. -- sp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot create Spring Bean via Proxy in Wicket
Thanks for your fast responses. On Jan 14, 2008 1:13 AM, Konstantin Ignatyev [EMAIL PROTECTED] wrote: If your UserDao is interface then just cast to it, not to the JdbcUserDao and it should be fine. Actually, that was just a typo in the code I've pasted here. It supposed to be JdbcUserDao instead of UserDao everywhere. You have to use interface and cast to the interface unless Spring is forced to use cglib for proxy creation. Well, Spring asked for cglib and I included it into libraries. Thanks for the tip though, I'll try it. -- sp
Re: Autocomplete Textfield gets submitted twice on mouse click
Just in case anybody is interested: the problem was, that clicking with the mouse fired the onchange event of the auto complete field. The javascript responsible for handling the autocomplete fired it again after finishing it's work. Since I am using a hidden field to store and communicate the id's of the autocomplete selections the workaround was straightforward: I hooked the onchange event to the hidden field and made the autocomplete javascript fire an onchange on the hidden field. ckuehne wrote: In the use case from the ajax autocomplete example the field gets submitted twice when the selection is made with the mouse (the onchange event handler gets called twice). Is there a quick way to fix this? Conny -- View this message in context: http://www.nabble.com/Autocomplete-Textfield-gets-submitted-twice-on-mouse-click-tp14777002p14792287.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: Autocomplete Textfield gets submitted twice on mouse click
file a bug report please -igor On Jan 13, 2008 2:44 PM, ckuehne [EMAIL PROTECTED] wrote: Just in case anybody is interested: the problem was, that clicking with the mouse fired the onchange event of the auto complete field. The javascript responsible for handling the autocomplete fired it again after finishing it's work. Since I am using a hidden field to store and communicate the id's of the autocomplete selections the workaround was straightforward: I hooked the onchange event to the hidden field and made the autocomplete javascript fire an onchange on the hidden field. ckuehne wrote: In the use case from the ajax autocomplete example the field gets submitted twice when the selection is made with the mouse (the onchange event handler gets called twice). Is there a quick way to fix this? Conny -- View this message in context: http://www.nabble.com/Autocomplete-Textfield-gets-submitted-twice-on-mouse-click-tp14777002p14792287.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: the flow of wicket
On Jan 12, 2008 8:56 PM, Dmitry Kandalov [EMAIL PROTECTED] wrote: On the whole I think it's the matter of knowing the big picture and not using framework as a black box. Exactly. For knowledge's sake. Documenting Wicket's inner implementations and strategies, beyond its API, is desirable and a huge plus for hardcore developers. Sure, we could study the code, but it can lead to bad assumptions if it's not coupled with some sort of high-level, even gross-grained, documentation. So, +1 for Paolo, even if I understand that the documentation effort can become huge. Cheers, Fabio Fioretti - WindoM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: the flow of wicket
On Jan 13, 2008 3:28 PM, Fabio Fioretti [EMAIL PROTECTED] wrote: Documenting Wicket's inner implementations and strategies, beyond its API, is desirable and a huge plus for hardcore developers. i wouldnt think hardcore developers would be afraid of setting a breakpoint and walking the code. maybe one of them could even create a wiki page - open source and all that. So, +1 for Paolo, even if I understand that the documentation effort can become huge. easy to say when its not you who has to put in the huge effort :) -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: the flow of wicket
Documenting Wicket's inner implementations and strategies, beyond its API, is desirable and a huge plus for hardcore developers. i wouldnt think hardcore developers would be afraid of setting a breakpoint and walking the code. maybe one of them could even create a wiki page - open source and all that. Yup. Please anyone, take the initiative and write a WIKI page. That's more constructive than complaining about it here :-) Good if it is done by someone outside anyway, because that someone won't make the assumptions we probably would make. We'll be happy to review. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
lang.merge is not a function error
Hello Again, I am experience a strange issue when using the new date picker in conjunction with the YUI menu. I can use them each alone but when then are together I get this error in firebug. The error is lang.merge is not a function which is located in the yuiloader-beta-min.js. This js is located in the wicket-datetime. I googled lang.merge and is it possible that it should be YAHOO.lang.merge. Thanks for any help. I think this is my last problem due to upgrade to wicket 1.3. Karen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: lang.merge is not a function error
is the YUI menu from the wicketstuff project? if so, what YUI version does it use? i suspect this only happens if the YUI menu js files (yahoo, dom, event, menu, ...) are loaded before the datepickers yuiloader-beta-min.js. yuiloader checks if YAHOO.lang is already available (which it would be if the YUI menu is loaded first) and reuses it instead of creating a new YAHOO object. if there is no such method YAHOO.lang.merge prior to 2.4.1 (which is used by wicket-datetime), then the issue you are experiencing is almost definitely caused by a version conflict. Gerolf On Jan 14, 2008 2:16 AM, Karen Schaper [EMAIL PROTECTED] wrote: Hello Again, I am experience a strange issue when using the new date picker in conjunction with the YUI menu. I can use them each alone but when then are together I get this error in firebug. The error is lang.merge is not a function which is located in the yuiloader-beta-min.js. This js is located in the wicket-datetime. I googled lang.merge and is it possible that it should be YAHOO.lang.merge. Thanks for any help. I think this is my last problem due to upgrade to wicket 1.3. Karen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot create Spring Bean via Proxy in Wicket
On Jan 14, 2008 1:13 AM, Konstantin Ignatyev [EMAIL PROTECTED] wrote: You have to use interface and cast to the interface Too bad I've forgotten about the whole injection idea of using interfaces instead of their specific implementations. Surely, your suggestion did the trick. Thanks a bunch. -- sp
AutoCompleBehavior is an abstract class.
Dear all, I just want to share with the list that AutoCompleBehavior is abstract, but the http://wicketstuff.org/confluence/display/STUFFWIKI/Script.aculo.us+AutoCompleteBehaviorshows an example using it as a concrete class. Bye! -- Fernando Wermus.
Re: Adding breadcrumbs
Thanks igor. I'll give it a try. igor.vaynberg wrote: class abstract basepage extends page { private listbasepage history=new arraylist(); public basepage() { add(new listview(history, new PropertyModel(this, history)) { protected void onpopulateitem(listitem item) { link link=new link(link, item.getmodel()) { protected void onclick() { setresponsepage(getmodelobject()); } } link.add(new label(title, item.getmodelobject().gettitle())); } } public basepage(basepage crumb) { this(); history.add(crumb); } protected abstract imodel gettitle(); } not the most efficient way, but should get you started -igor On Jan 13, 2008 4:47 AM, WickedMan [EMAIL PROTECTED] wrote: I gave it a try but I really cannot figure it out how to do it with pages instead of panels. Any help would be appreciated. Eelco Hillenius wrote: Could you give me code examples how to do that? Not without having to spend a couple of hours on it, and I'm afraid I don't have time for that now, sorry. Best rest assured, it is doable... just fire up that grey matter of yours ;-) Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Adding-breadcrumbs-tp14753894p14785242.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/Adding-breadcrumbs-tp14753894p14795564.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]