RE: Generic modal windows
It appears that nothing much happens with a ModalWindow until a user clicks on a button to bring up a ModalWindow. That should mean that the only performance consequences for embedding ModalWindow capability in an application's base page class (and therefore every page in the app) is that every page then has the small amount of extra memory required to house that placeholder and perhaps an extra tag in the HTML served to the browsers. That should have negligible affect. Chris Colman Step Ahead Software http://stepaheadsoftware.com All of our pages derive from a single page class and I was wondering if there's any performance penalty for placing a single tag like the above in our base class mark up and have the base page class deal with modals generically. What would be the consequence of this plan for pages that don't actually have a modal window? Is there a way to handle this nicely? Presumably if the tag now exists in all page markups then wicket is going to want to see a corresponding ModalWindow object added in each page class. Another potential problem: currently some panels manage modals themselves. I.e. they have their own modal window tag. Would it be possible for them to employ the tag in the base page class rather than them all having to have their own tag as well? - 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
How to change content in ModalWindow
Searching Nable shows this question has been asked before but there none of the solutions proposed there work for me. I have a link in PanelA that, when clicked, should cause PanelB to display in the same ModalWindow (PanelB replaced PanelA). The onClick event handler does something like the following: add ( new AjaxLink(selectionLink) { public void onClick(AjaxRequestTarget target) { PanelB panelB = new PanelB(modalContentWindow.getContentId()); modalContentWindow.setContent(panelB); modalContentWindow.setTitle(Hi, I'm PanelB); target.addComponent(panelB); } } ); When the link is pressed the panel A content disappears (popup content goes blank) but the panel B content does not appear. Should this work or have I missed something? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
modal window contained and displayed by another modal window
Hello guys! I was trying to trigger a modal window from another modal window, but on top modal window closing seems like the bottom page gets refreshed, or something like this, because when I click on something on the middle frame (first modal) that is active after the closing of the top modal, I get something like 'component not found [modal]' and get redirected to home page. Is there a way to use modal window in another modal window? Thanks! Regards, Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxSelfUpdatingTimerBehavior and session timeout
1) So, if I didn't access the session in my ajax callback then the page would eventually expire. Another way to say this is if I simply had the original Clock implementation on this page then the session would expire? 2) Is there an easy way of implement this countdown to expire? On Mon, Jan 25, 2010 at 1:14 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: your behavior is always touching the session, so it will never timeout. using this behavior is actually a solution to preventing the session from ever timing out :) -igor On Sun, Jan 24, 2010 at 9:10 PM, Chuck Brinkman chasb1...@gmail.com wrote: I thought it would be fun to add a 'time to session expiration' display to my pages. So I attempted this using the AjaxSelfUpdatingTimerBehavior. I just took the Clock example and hacked it as follows hsession = request.getHttpServletRequest().getSession(); lastAccessTime = hsession.getLastAccessedTime(); thisTime = *new* java.util.Date().getTime(); elapsedTime = thisTime - lastAccessTime; The problem is that elapsedTime is always the duration specified when I create the clock instance. So, my question is, if I have a page that uses AjaxSelfUpdatingTimerBehavior and the user is displaying that page then his session will never expire? Or am I missing something? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: modal window contained and displayed by another modal window
On Mon, 2010-01-25 at 11:26 +0200, Martin Asenov wrote: Hello guys! I was trying to trigger a modal window from another modal window, but on top modal window closing seems like the bottom page gets refreshed, or something like this, because when I click on something on the middle frame (first modal) that is active after the closing of the top modal, I get something like 'component not found [modal]' and get redirected to home page. Is there a way to use modal window in another modal window? There is: http://www.wicketstuff.org/wicket14/ajax/modal-window But you should use ModalWindow with a Page, not with Panel. Thanks! 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: modal window contained and displayed by another modal window
Thanks, namesake, this is useful! -Original Message- From: Martin Grigorov [mailto:mcgreg...@e-card.bg] Sent: Monday, January 25, 2010 12:06 PM To: users@wicket.apache.org Subject: Re: modal window contained and displayed by another modal window On Mon, 2010-01-25 at 11:26 +0200, Martin Asenov wrote: Hello guys! I was trying to trigger a modal window from another modal window, but on top modal window closing seems like the bottom page gets refreshed, or something like this, because when I click on something on the middle frame (first modal) that is active after the closing of the top modal, I get something like 'component not found [modal]' and get redirected to home page. Is there a way to use modal window in another modal window? There is: http://www.wicketstuff.org/wicket14/ajax/modal-window But you should use ModalWindow with a Page, not with Panel. Thanks! 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Future of Wicket Security (WASP/SWARM)
No one has a feeling about making a super/parent security framework for wicket and then let providers implement their solution.. Like JPA ? It would mean that it would be the same using Shiro or Swarm / Wasp etc.. You just switch provider? 2010/1/22 nino martinez wael nino.martinez.w...@gmail.com I am in doubt. What I think would be best are creating a parent framework like wicket ioc. And then the different security providers could use that.. Does it seem reasonable? That would mean keeping Wicket security at stuff, but probably extracting interfaces? And maybe adopting a few committers from wicket shiro / wicket security and if there are other integrations to a sub project at Apache Wicket, to make it less of a burden as Igor writes. [ ] adopt Wicket security into Apache Wicket [X ] keep Wicket security at Wicket Stuff 2010/1/22 Martijn Dashorst martijn.dasho...@gmail.com Guys, I'd like to discuss the future of the Wicket Security project. Currently the project lives on/in the wicketstuff repository, but uses group id and package names org.apache.wicket. IMO We should either: - adopt Wicket Security into the Wicket project and move everything over from Wicket Stuff into a subproject within Apache Wicket (and adopt the committers), or - keep Wicket Security at wicketstuff and move it into the fold of wicket stuff, including groupid/package rename. Since development on wicket security 1.4 is currently happening with a 1.4-beta1 just released, it is prudent to decide its future now (with a pending package rename). Considering that both the wicket security contributors and the Wicket PMC members are needed to make this happen, all their opinions are considered binding. [ ] adopt Wicket security into Apache Wicket [ ] keep Wicket security at Wicket Stuff Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Resource JS
Yeah you should be able to cache / compress resources with Apache http. If your resources are dynamic (session dependant) then offcourse it's not possible. 2010/1/25 Douglas Ferguson doug...@douglasferguson.us Hmm... Actually, I'm wanting to gzip them are they gziped? Another thought was to do something like this: Alias /resources/com.package/ /user/local/tomcat5.5/webapps/resources/path/to/package So that apache can serve up the static content.. D/ On Jan 24, 2010, at 9:18 AM, Martin Grigorov wrote: On Sun, 2010-01-24 at 03:19 -0800, Douglas Ferguson wrote: I recently configured apache to gzip my js files instead of going through tomcat. Can this be done for the js files that are loaded as resources? see Application.get().getResourceSettings().getJavascriptCompressor() if this returns null then any JavascriptPackageResource will be not compressed D/ - 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: Override fragments in subclasses
Hi, Thanks for your help, that works. But there's always an issue: I'd like to display component that is common in all classes So in my parent html : body span wicket:id=myDiv/span div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body And add a label with id myDiv in related parent java. This part is common to all classes. But when I render the TestFormOne, that doesn't work because, apparently the label myDiv must be define in subclass. What do you think? Best Regards, Aurélie -Message d'origine- De : Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de] Envoyé : vendredi 22 janvier 2010 11:50 À : users@wicket.apache.org Cc : zze-Nsb BOITEUX A ext RD-MAPS-GRE Objet : Re: Override fragments in subclasses Hi, And the related html: body wicket:extend wicket:fragment wicket:id=myNewPanel span wicket:id=label/ /wicket:fragment /wicket:extend remove wicket:extend and /wicket:extend. wicket:id=myNewPanel is not part of the wicket:child declaration of the parent class. Best Regards, Ilja Pavkovic -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker * This message and any attachments (the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. Messages are susceptible to alteration. France Telecom Group shall not be liable for the message if altered, changed or falsified. If you are not the intended addressee of this message, please cancel it immediately and inform the sender. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SV: Override fragments in subclasses
So in my parent html : body span wicket:id=myDiv/span div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body And add a label with id myDiv in related parent java. This part is common to all classes. But when I render the TestFormOne, that doesn't work because, apparently the label myDiv must be define in subclass. You should add a default component for it in the parent class then use replace() in subclasses as needed. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SV: Override fragments in subclasses
public abstract class MyPage extends WebPage { public MyPage() { add(createMyDiv(myDiv)); } public abstract Component createMyDiv(String markuId); } public MyConcretePage extends MyPage { public createMyDiv(String markupId) { return new Label(markupId); } } Am Montag, 25. Januar 2010 11:24:55 schrieb Wilhelmsen Tor Iver: So in my parent html : body span wicket:id=myDiv/span div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body And add a label with id myDiv in related parent java. This part is common to all classes. But when I render the TestFormOne, that doesn't work because, apparently the label myDiv must be define in subclass. You should add a default component for it in the parent class then use replace() in subclasses as needed. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket bench in eclipse
Hej, 2010/1/21 Lionel Port lio...@portconnection.com: Not strictly a wicket question, I know. For me tools are an important part of a framework's ecosystem. Does anyone have wicket bench working in Galileo or recent version of eclipse or know of a good plugin I should be using?. My project has a maven structure, not sure if thats why it doesn't work. Yes, it works quite well for me. Quite well means that there are some bugs that lead me to open a page in the Wicket editor and the Java editor parallel quite often. I didn't have any installation or project setup problems other than not to end the context root with a slash and not to begin css files with one. But it looks like this Eclipse plugin is not actively developed? Is it time to buy an IDEA license where there seems to be a quite nice toolset for Wicket? Hej då Hauke Ingmar - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Future of Wicket Security (WASP/SWARM)
I do think this is a good idea, however it will be difficult to implement. WASP/SWARM already provides this setup. WASP defines the interface, where SWARM is the implementation of that interface. I do not know about Shiro, but I don't think it is implemented on top of WASP. So should SWARM be build on top of the abstractions provided by Shiro (does it even have those abstractions?) or should Shiro be build on top of WASP? Either way will require a lot of work. I don't know who is the maintainer of Shiro, but I don't mind changing WASP to allow Shiro to be build on top of it, or the other way around (building SWARM on top of Shiro). Perhaps this core security framework can then be integrated into the wicket core. However, I doubt if such a thing can be accomplished for wicket 1.5 (or at all). Best regards, Emond Papegaaij On Monday 25 January 2010 11:11:31 nino martinez wael wrote: No one has a feeling about making a super/parent security framework for wicket and then let providers implement their solution.. Like JPA ? It would mean that it would be the same using Shiro or Swarm / Wasp etc.. You just switch provider? 2010/1/22 nino martinez wael nino.martinez.w...@gmail.com I am in doubt. What I think would be best are creating a parent framework like wicket ioc. And then the different security providers could use that.. Does it seem reasonable? That would mean keeping Wicket security at stuff, but probably extracting interfaces? And maybe adopting a few committers from wicket shiro / wicket security and if there are other integrations to a sub project at Apache Wicket, to make it less of a burden as Igor writes. [ ] adopt Wicket security into Apache Wicket [X ] keep Wicket security at Wicket Stuff 2010/1/22 Martijn Dashorst martijn.dasho...@gmail.com Guys, I'd like to discuss the future of the Wicket Security project. Currently the project lives on/in the wicketstuff repository, but uses group id and package names org.apache.wicket. IMO We should either: - adopt Wicket Security into the Wicket project and move everything over from Wicket Stuff into a subproject within Apache Wicket (and adopt the committers), or - keep Wicket Security at wicketstuff and move it into the fold of wicket stuff, including groupid/package rename. Since development on wicket security 1.4 is currently happening with a 1.4-beta1 just released, it is prudent to decide its future now (with a pending package rename). Considering that both the wicket security contributors and the Wicket PMC members are needed to make this happen, all their opinions are considered binding. [ ] adopt Wicket security into Apache Wicket [ ] keep Wicket security at Wicket Stuff Martijn - 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 change content in ModalWindow
Aren't you missing a : modalContentWindow.show(target) in the onClick callback ? 2010/1/25 Chris Colman chr...@stepaheadsoftware.com Searching Nable shows this question has been asked before but there none of the solutions proposed there work for me. I have a link in PanelA that, when clicked, should cause PanelB to display in the same ModalWindow (PanelB replaced PanelA). The onClick event handler does something like the following: add ( new AjaxLink(selectionLink) { public void onClick(AjaxRequestTarget target) { PanelB panelB = new PanelB(modalContentWindow.getContentId()); modalContentWindow.setContent(panelB); modalContentWindow.setTitle(Hi, I'm PanelB); target.addComponent(panelB); } } ); When the link is pressed the panel A content disappears (popup content goes blank) but the panel B content does not appear. Should this work or have I missed something? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Future of Wicket Security (WASP/SWARM)
On Mon, Jan 25, 2010 at 6:11 AM, Emond Papegaaij emond.papega...@topicus.nl wrote: I do think this is a good idea, however it will be difficult to implement. WASP/SWARM already provides this setup. WASP defines the interface, where SWARM is the implementation of that interface. I do not know about Shiro, but I don't think it is implemented on top of WASP. So should SWARM be build on top of the abstractions provided by Shiro (does it even have those abstractions?) or should Shiro be build on top of WASP? Either way will require a lot of work. Shiro shouldn't have to know anything about WASP. What should happen is Wicket-Security (or whatever we're going to call it) would declare a SPI interface that could be implemented to adapt any security framework (spring-security, shiro, etc.) to the Wicket-Security API. The security frameworks themselves wouldn't necessarily (most likely they would not) implement the interface; there would be an integration library (e.g. wicket-security-shiro) that bridges the gap. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxSelfUpdatingTimerBehavior and session timeout
On Mon, Jan 25, 2010 at 4:37 AM, Chuck Brinkman chasb1...@gmail.com wrote: 1) So, if I didn't access the session in my ajax callback then the page would eventually expire. Another way to say this is if I simply had the original Clock implementation on this page then the session would expire? No, the ajax self updating behavior has to touch the session because it has to know how to get back to itself to do its work. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxSelfUpdatingTimerBehavior and session timeout
James, Thanks for the information. I wonder if those using AjaxSelfUpdatingTimerBehavior realize that this prevents session timeout? Chuck On Mon, Jan 25, 2010 at 7:09 AM, James Carman jcar...@carmanconsulting.comwrote: On Mon, Jan 25, 2010 at 4:37 AM, Chuck Brinkman chasb1...@gmail.com wrote: 1) So, if I didn't access the session in my ajax callback then the page would eventually expire. Another way to say this is if I simply had the original Clock implementation on this page then the session would expire? No, the ajax self updating behavior has to touch the session because it has to know how to get back to itself to do its work. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Future of Wicket Security (WASP/SWARM)
On Monday 25 January 2010 13:02:05 James Carman wrote: On Mon, Jan 25, 2010 at 6:11 AM, Emond Papegaaij emond.papega...@topicus.nl wrote: I do think this is a good idea, however it will be difficult to implement. WASP/SWARM already provides this setup. WASP defines the interface, where SWARM is the implementation of that interface. I do not know about Shiro, but I don't think it is implemented on top of WASP. So should SWARM be build on top of the abstractions provided by Shiro (does it even have those abstractions?) or should Shiro be build on top of WASP? Either way will require a lot of work. Shiro shouldn't have to know anything about WASP. What should happen is Wicket-Security (or whatever we're going to call it) would declare a SPI interface that could be implemented to adapt any security framework (spring-security, shiro, etc.) to the Wicket-Security API. The security frameworks themselves wouldn't necessarily (most likely they would not) implement the interface; there would be an integration library (e.g. wicket-security-shiro) that bridges the gap. That sounds a bit overkill to me. I don't think anyone will ever want to use SWARM in a non-Wicket application. Naturally, this is a bit different for Shiro and spring-security, because these are existing projects (if I'm not mistaken), which can also be used without Wicket. WASP (Wicket Abstract Security Platform) is what could serve as a basis for what you call 'the Wicket-Security API'. It will require some work to make it more generic and less 'SWARM'-like, but I think the concept is quite good. This can then serve as a basis to build security providers, such as wicket- security-shiro, wicket-security-spring and SWARM. Emond Papegaaij - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Empty Form Error Message
I have updated the wicket libraries from 1.4.0 to 1.4.5 and now all pages with form don't submit. On the feedback panel appear an empty li, the form raise the onError but all components inside validate without errors. I've iterated over components in the form but all FeedBackMessage property is set to null. It's a bug, o from 1.4.0 to 1.4.5 there is something to change? Thanks
PageExpiredException after fourth call modal window
1.4.5 In window with list, I call modal window (org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow) with my edit window (extends org.apache.wicket.markup.html.WebPage with WebSession.get().createAutoPageMap()). This edit window contains some link, wich also create modal window for select value from list. If user click on this link fourth times (even user click on same link and close select modal window without any select), after close edit window wicket throws exception PageExpiredException. Stacktrace on PageExpiredException contructor: at org.apache.wicket.protocol.http.PageExpiredException.init(PageExpiredException.java:36) at org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:132) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket bench in eclipse
Hi! But it looks like this Eclipse plugin is not actively developed? Is it time to buy an IDEA license where there seems to be a quite nice toolset for Wicket? I downloaded the open source version of IntelliJ and the wicket plugin seems to work. There is also a wicket plugin for NetBeans, which is working. But a pure maven project wihtout a plugin isn't that different. Or am I missing an important feature of the eclipse plugin? Regards, Peter. -- Free your timetabling! http://timefinder.sourceforge.net/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Future of Wicket Security (WASP/SWARM)
On Mon, Jan 25, 2010 at 8:07 AM, Emond Papegaaij emond.papega...@topicus.nl wrote: That sounds a bit overkill to me. I don't think anyone will ever want to use SWARM in a non-Wicket application. Naturally, this is a bit different for Shiro and spring-security, because these are existing projects (if I'm not mistaken), which can also be used without Wicket. Overkill? It's not overkill to provide a framework where you can plug in providers. I didn't say that SWARM should be used outside of Wicket (I personally wouldn't use it anywhere because I think it's too complicated). What I was saying was that any security framework for Wicket should allow you to bring your own security provider (shiro, spring-security, etc). That's exactly what the wicket-security code provides right now with the AuthenticatedWebApplication, AuthenticatedWebSession, etc. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SV: Override fragments in subclasses
That's what I did when the component has to be overriden in subclasses. But how does it work when the component is common to every concrete page? I would not want to redefine common component in every concrete page. Let's see my example, In my parent page : public abstract class TestForm extends WebPage { public TestForm() { add(new Label(myDiv, my div from test form)); = common to every concrete page add(createDivWithComponent(myNewPanel)); = has to be redefine by each concrete page add(createDivWithComponent2(myNewPanel2)); = has to be redefine by each concrete page } protected abstract WebMarkupContainer createDivWithComponent(String divId); protected abstract WebMarkupContainer createDivWithComponent2(String divId); } body div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body And, the concrete page : public class TestFormOne extends TestForm { public TestFormOne() { super(); } @Override protected WebMarkupContainer createDivWithComponent(String divId) { WebMarkupContainer container = new WebMarkupContainer(divId); container.add(new Label(label,My very good label 1)); return container; } @Override protected WebMarkupContainer createDivWithComponent2(String divId) { WebMarkupContainer container = new WebMarkupContainer(divId); WebMarkupContainer container2 = new WebMarkupContainer(div1); container2.add(new Label(label2,My very good label 2)); container.add(container2); return container; } } body div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body And this is the error message I get : WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered).1. [Component id = myDiv] What did I miss? Thank you. Ilja Pavkovic-3 wrote: public abstract class MyPage extends WebPage { public MyPage() { add(createMyDiv(myDiv)); } public abstract Component createMyDiv(String markuId); } public MyConcretePage extends MyPage { public createMyDiv(String markupId) { return new Label(markupId); } } Am Montag, 25. Januar 2010 11:24:55 schrieb Wilhelmsen Tor Iver: So in my parent html : body div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body And add a label with id myDiv in related parent java. This part is common to all classes. But when I render the TestFormOne, that doesn't work because, apparently the label myDiv must be define in subclass. You should add a default component for it in the parent class then use replace() in subclasses as needed. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Override-fragments-in-subclasses-tp27271408p27306708.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: SV: Override fragments in subclasses
Ok, There was a problem when copy/paste html, sorry about that: TestForm.html (parent html): body div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body and TestFormOne.html(subclass html): body wicket:fragment wicket:id=myNewPanel /wicket:fragment wicket:fragment wicket:id=myNewPanel2 div wicket:id=div1/div /wicket:fragment /body aurelie.boiteux wrote: That's what I did when the component has to be overriden in subclasses. But how does it work when the component is common to every concrete page? I would not want to redefine common component in every concrete page. Let's see my example, In my parent page : public abstract class TestForm extends WebPage { public TestForm() { add(new Label(myDiv, my div from test form)); = common to every concrete page add(createDivWithComponent(myNewPanel)); = has to be redefine by each concrete page add(createDivWithComponent2(myNewPanel2)); = has to be redefine by each concrete page } protected abstract WebMarkupContainer createDivWithComponent(String divId); protected abstract WebMarkupContainer createDivWithComponent2(String divId); } body div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body And, the concrete page : public class TestFormOne extends TestForm { public TestFormOne() { super(); } @Override protected WebMarkupContainer createDivWithComponent(String divId) { WebMarkupContainer container = new WebMarkupContainer(divId); container.add(new Label(label,My very good label 1)); return container; } @Override protected WebMarkupContainer createDivWithComponent2(String divId) { WebMarkupContainer container = new WebMarkupContainer(divId); WebMarkupContainer container2 = new WebMarkupContainer(div1); container2.add(new Label(label2,My very good label 2)); container.add(container2); return container; } } body wicket:fragment wicket:id=myNewPanel /wicket:fragment wicket:fragment wicket:id=myNewPanel2 div wicket:id=div1/div /wicket:fragment /body And this is the error message I get : WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered).1. [Component id = myDiv] What did I miss? Thank you. Ilja Pavkovic-3 wrote: public abstract class MyPage extends WebPage { public MyPage() { add(createMyDiv(myDiv)); } public abstract Component createMyDiv(String markuId); } public MyConcretePage extends MyPage { public createMyDiv(String markupId) { return new Label(markupId); } } Am Montag, 25. Januar 2010 11:24:55 schrieb Wilhelmsen Tor Iver: So in my parent html : body div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body And add a label with id myDiv in related parent java. This part is common to all classes. But when I render the TestFormOne, that doesn't work because, apparently the label myDiv must be define in subclass. You should add a default component for it in the parent class then use replace() in subclasses as needed. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Override-fragments-in-subclasses-tp27271408p27306736.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: wicket bench in eclipse
Hej, 2010/1/25 Peter Karich peat...@yahoo.de: Is it time to buy an IDEA license where there seems to be a quite nice toolset for Wicket? I downloaded the open source version of IntelliJ and the wicket plugin seems to work. Yes, but the free version of IDEA is lacking too much in other fields: http://www.jetbrains.com/idea/features/editions_comparison_matrix.html . There is also a wicket plugin for NetBeans, which is working. Well, yes, but then it's Netbeans... But a pure maven project wihtout a plugin isn't that different. Or am I missing an important feature of the eclipse plugin? Hm... Maven and the different Wicket IDE plugins don't intersect in functionality. The plugins all try to give a little help when working with Wicket components and pages, e.g. showing the wicket:ids when working with the Java code to prevent hierarchy mismatch or offering property model navigation as this is (still) string based. Eclipse plugin features: http://www.laughingpanda.org/~inhuman/wicket-bench/docs/features-0.5.html Netbeans: https://nbwicketsupport.dev.java.net/ (well, that page needs a little make over...) IDEA: http://code.google.com/p/wicketforge/wiki/PluginFeatures Hej då Hauke Ingmar - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SV: Override fragments in subclasses
Hi, I think you should provide component classes that are responsible for sub elements class TestFormPanel extends Panel { public TestFormPanel(String markupId) { super(markupId); add(new Label(label,My very good label 1)); } } TestFormPanel.html: body div wicket:id=label[label]/div /body and use it in TestFormOne public class TestFormOne extends TestForm { @Override protected Component createDivWithComponent(String divId) { return new TestFormPanel(divId); } But maybe I don't quite understand your problem. Best Regards, Ilja There was a problem when copy/paste html, sorry about that: TestForm.html (parent html): body div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body and TestFormOne.html(subclass html): body wicket:fragment wicket:id=myNewPanel /wicket:fragment wicket:fragment wicket:id=myNewPanel2 div wicket:id=div1/div /wicket:fragment /body aurelie.boiteux wrote: That's what I did when the component has to be overriden in subclasses. But how does it work when the component is common to every concrete page? I would not want to redefine common component in every concrete page. Let's see my example, In my parent page : public abstract class TestForm extends WebPage { public TestForm() { add(new Label(myDiv, my div from test form)); = common to every concrete page add(createDivWithComponent(myNewPanel)); = has to be redefine by each concrete page add(createDivWithComponent2(myNewPanel2)); = has to be redefine by each concrete page } protected abstract WebMarkupContainer createDivWithComponent(String divId); protected abstract WebMarkupContainer createDivWithComponent2(String divId); } body div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body And, the concrete page : public class TestFormOne extends TestForm { public TestFormOne() { super(); } @Override protected WebMarkupContainer createDivWithComponent(String divId) { WebMarkupContainer container = new WebMarkupContainer(divId); container.add(new Label(label,My very good label 1)); return container; } @Override protected WebMarkupContainer createDivWithComponent2(String divId) { WebMarkupContainer container = new WebMarkupContainer(divId); WebMarkupContainer container2 = new WebMarkupContainer(div1); container2.add(new Label(label2,My very good label 2)); container.add(container2); return container; } } body wicket:fragment wicket:id=myNewPanel /wicket:fragment wicket:fragment wicket:id=myNewPanel2 div wicket:id=div1/div /wicket:fragment /body And this is the error message I get : WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered).1. [Component id = myDiv] What did I miss? Thank you. Ilja Pavkovic-3 wrote: public abstract class MyPage extends WebPage { public MyPage() { add(createMyDiv(myDiv)); } public abstract Component createMyDiv(String markuId); } public MyConcretePage extends MyPage { public createMyDiv(String markupId) { return new Label(markupId); } } Am Montag, 25. Januar 2010 11:24:55 schrieb Wilhelmsen Tor Iver: So in my parent html : body div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body And add a label with id myDiv in related parent java. This part is common to all classes. But when I render the TestFormOne, that doesn't work because, apparently the label myDiv must be define in subclass. You should add a default component for it in the parent class then use replace() in subclasses as needed. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Future of Wicket Security (WASP/SWARM)
On Monday 25 January 2010 14:31:47 James Carman wrote: On Mon, Jan 25, 2010 at 8:07 AM, Emond Papegaaij emond.papega...@topicus.nl wrote: That sounds a bit overkill to me. I don't think anyone will ever want to use SWARM in a non-Wicket application. Naturally, this is a bit different for Shiro and spring-security, because these are existing projects (if I'm not mistaken), which can also be used without Wicket. Overkill? It's not overkill to provide a framework where you can plug in providers. I didn't say that SWARM should be used outside of Wicket (I personally wouldn't use it anywhere because I think it's too complicated). What I was saying was that any security framework for Wicket should allow you to bring your own security provider (shiro, spring-security, etc). That's exactly what the wicket-security code provides right now with the AuthenticatedWebApplication, AuthenticatedWebSession, etc. I didn't mean that providing a general framework for security providers is overkill, just that modifying SWARM to be usable outside a Wicket-environment is overkill. There is no need to split SWARM into a general security framework and a Wicket integration part. The current wicket-security code is somewhat limited in what you can do with it. WASP provides a much richer (probably too rich) interface for security. I see WASP as a viable basis for the wicket-security API where providers can plug in to. One of these providers will be SWARM, but also wicket-security- shiro and wicket-security-spring. Maybe even auth-roles. However WASP in its current state is a too bloated for this. It will require a major cleanup. On the other hand, the current wicket-security API is too limited for a real security framework to plug in to. For this to work, we need to find the fine line that provides a clean, but complete API. Emond Papegaaij - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Future of Wicket Security (WASP/SWARM)
On Mon, Jan 25, 2010 at 9:11 AM, Emond Papegaaij emond.papega...@topicus.nl wrote: I didn't mean that providing a general framework for security providers is overkill, just that modifying SWARM to be usable outside a Wicket-environment is overkill. There is no need to split SWARM into a general security framework and a Wicket integration part. And I didn't intend to imply that either. The current wicket-security code is somewhat limited in what you can do with it. WASP provides a much richer (probably too rich) interface for security. I see WASP as a viable basis for the wicket-security API where providers can plug in to. One of these providers will be SWARM, but also wicket-security- shiro and wicket-security-spring. Maybe even auth-roles. Agreed it's limited, so we should definitely make the API rich enough so that you can do very fine-grained authorization control or more coarse-grained. Some projects (like ours) will be okay with just saying this page has to have this role. However WASP in its current state is a too bloated for this. It will require a major cleanup. On the other hand, the current wicket-security API is too limited for a real security framework to plug in to. For this to work, we need to find the fine line that provides a clean, but complete API. Agreed. When I look at the documentation for SWARM/WASP, I cringe. I, being one of the (now defunct) Apache HiveMind committers, also take offense to the name of the HiveMind class. :) Actually, I really don't like the cutesy names in the API at all. The names don't make any sense? Why is a hive called a hive for instance? Why is the HiveMind class called HiveMind. Just looking at it, it's really not intuitive. There also seems to be a lot of configuration required to get things off the ground properly. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Generics
I've noticed in some places where generics wildcards may be useful that they are not used. For example, in IColumn. If I have a Type and a SubType that extends Type, I can't use IColumnType in a DataTableSubType. Is there any reason for this or was it just not implemented? Not the most necessary feature, but it couldn't hurt. Also is there a reason ListView and similar components require an IModelList, and will not accept an IModelCollection? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Localization properties overriding
Hi all, I have a question regarding property binding when using localized property files, consider following: UserHomePage page has one property for localization and that is title=User's Home which is then used in markup as: head titlewicket:message key=title //title /head ... This page has inside an UserAddPanel with form with following properties: formContainer.uaForm.title=Title formContainer.uaForm.name=First Name ... for markup: wicket:panel div wicket:id=formContainer form wicket:id=uaForm label for=titlewicket:message key=title //label label for=namewicket:message key=name //label ... The name and other labels are generated fine (no reason not to) but the title is set to User's Home which is not desired. I would understood this behavior if I hadn't defined such 'fine-grained' property as formContainer.uaForm.title but why is it overriden when there is precise declaration on lower level? Is there a way to achieve behavior which I described or do I have to rename title in form to something else? TIA, Marek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
JSR 330 Spring
Hello, I am using wicket together with spring. Getting it going with @SpringBean was pretty straight forward but now I am wondering if it is possible to get it going with JSR 330 annotations as the spring side of my app is already using it. Thanks, Jochen
Re: Future of Wicket Security (WASP/SWARM)
On Monday 25 January 2010 15:22:42 James Carman wrote: On Mon, Jan 25, 2010 at 9:11 AM, Emond Papegaaij The current wicket-security code is somewhat limited in what you can do with it. WASP provides a much richer (probably too rich) interface for security. I see WASP as a viable basis for the wicket-security API where providers can plug in to. One of these providers will be SWARM, but also wicket-security- shiro and wicket-security-spring. Maybe even auth-roles. Agreed it's limited, so we should definitely make the API rich enough so that you can do very fine-grained authorization control or more coarse-grained. Some projects (like ours) will be okay with just saying this page has to have this role. I think a good security framework needs to provide an API that allows, but not require, fine-grained control. However WASP in its current state is a too bloated for this. It will require a major cleanup. On the other hand, the current wicket-security API is too limited for a real security framework to plug in to. For this to work, we need to find the fine line that provides a clean, but complete API. Agreed. When I look at the documentation for SWARM/WASP, I cringe. I, being one of the (now defunct) Apache HiveMind committers, also take offense to the name of the HiveMind class. :) Actually, I really don't like the cutesy names in the API at all. The names don't make any sense? Why is a hive called a hive for instance? Why is the HiveMind class called HiveMind. Just looking at it, it's really not intuitive. There also seems to be a lot of configuration required to get things off the ground properly. Most of the complicated stuff is from SWARM, which indeed requires a lot of configuration. The difference between WASP and SWARM is not quite clear from the documentation, nor is the separation of the two. Some of the naming could use some improvement indeed :). The HiveMind manages the Hives used in the VM. A Hive contains all principals and permissions of an application and ultimately determines if a permission is granted or not. However, the Hive (and mind) are part of SWARM and should not be part of a general API. The main elements of WASP are: - A set of secure components - Several security checks - The ActionFactory, with a set of default actions - The WaspAuthorizationStrategy, which implements IAuthorizationStrategy With this, WASP only provides an interface to make you Wicket application secure. It has no implementation what-so-ever on how to check the security. Therefore, I think it is a good starting point for creating a general security API for Wicket. Emond - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Localization properties overriding
Hi Erik, I understand this - I use it eg. HomePage has title=Home, UserHomePage has title=User's Home etc... and it works top-down as expected. But why does this topmost property title, that should bind itself to key=title of wicket:messages attached to page component itself, got bounded to title two levels deeper in hierarchy precisely defined in lower most level (top-down should use the last found, shouldn't it?). According to what happens my UserHomePage should read only Home Page in it's title Sorry to bother, regards, Marek On 01/25/2010 03:39 PM, Erik van Oosten wrote: He Marek, The idea of Wicket i18n is that when you use a component, you can override its default texts with your own. That's why the lookup is top-down and not bottom-up. To solve this you'll need to use a more fine-grained name for the home page's title. Regards, Erik. Marek Šabo write: Hi all, I have a question regarding property binding when using localized property files, consider following: UserHomePage page has one property for localization and that is title=User's Home which is then used in markup as: head titlewicket:message key=title //title /head ... This page has inside an UserAddPanel with form with following properties: formContainer.uaForm.title=Title formContainer.uaForm.name=First Name ... for markup: wicket:panel div wicket:id=formContainer form wicket:id=uaForm label for=titlewicket:message key=title //label label for=namewicket:message key=name //label ... The name and other labels are generated fine (no reason not to) but the title is set to User's Home which is not desired. I would understood this behavior if I hadn't defined such 'fine-grained' property as formContainer.uaForm.title but why is it overriden when there is precise declaration on lower level? Is there a way to achieve behavior which I described or do I have to rename title in form to something else? TIA, Marek -- Marek Šabo Chief Server Manager Club SU CTU Buben Bubenečská Kolej Terronská 28, Prague 16000 XMPP: zeratul...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Future of Wicket Security (WASP/SWARM)
On Mon, Jan 25, 2010 at 9:50 AM, Emond Papegaaij emond.papega...@topicus.nl wrote: I think a good security framework needs to provide an API that allows, but not require, fine-grained control. Exactly! That's what I'm looking for. For the folks who want to get down-and-dirty and really tighten the screws on their authorization, they can do that. But, for me and my somewhat limited authorization concerns, I'd like to use something simple. Most of the complicated stuff is from SWARM, which indeed requires a lot of configuration. The difference between WASP and SWARM is not quite clear from the documentation, nor is the separation of the two. Some of the naming could use some improvement indeed :). The HiveMind manages the Hives used in the VM. A Hive contains all principals and permissions of an application and ultimately determines if a permission is granted or not. However, the Hive (and mind) are part of SWARM and should not be part of a general API. The main elements of WASP are: - A set of secure components - Several security checks - The ActionFactory, with a set of default actions - The WaspAuthorizationStrategy, which implements IAuthorizationStrategy With this, WASP only provides an interface to make you Wicket application secure. It has no implementation what-so-ever on how to check the security. Therefore, I think it is a good starting point for creating a general security API for Wicket. So, what does WASP add to wicket-auth-roles that it doesn't have already? Is it generic enough that we should just put it into wicket-auth-roles (or a new wicket-security module)? I really don't like the name WASP. I think wicket-security is intuitive enough (and follows the other names already out there wicket-ioc, wicket-spring, etc.). I really don't like the fact that when folks ask questions about wicket-auth-roles, the usual answer is wicket-auth-roles is only a demonstration or something to that effect. There really should be a sanctioned/preferred (and pluggable) security framework for Wicket that we can all get behind. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Generics
Basically the list view depend from List interface due some calls to his get(index) method. It means that the order of the components on the collections, are meaninful to the component. If it is not your case (order, item indexes doesn't matters), you can use an wrapper model in an list view, like: WrapperModel implements IModel { public WrapperModel (IModel wrappedModel) { this.wrappedModel = wrappedModel; } public Object getObject() { return new ArrayList(wrappedModel.getObject()); } } then you can create an list view like: new ListView(id, new PropertyModel(bean, listPropertyFromThatBean)) On Mon, Jan 25, 2010 at 12:29 PM, Sam Barrow s...@sambarrow.com wrote: I've noticed in some places where generics wildcards may be useful that they are not used. For example, in IColumn. If I have a Type and a SubType that extends Type, I can't use IColumnType in a DataTableSubType. Is there any reason for this or was it just not implemented? Not the most necessary feature, but it couldn't hurt. Also is there a reason ListView and similar components require an IModelList, and will not accept an IModelCollection? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
Re: Localization properties overriding
The search for any given property key is top-down, the first result is found. Why? As I said, to allow an override of the component (which may be third party). Regards, Erik. Marek Šabo wrote: Hi Erik, I understand this - I use it eg. HomePage has title=Home, UserHomePage has title=User's Home etc... and it works top-down as expected. But why does this topmost property title, that should bind itself to key=title of wicket:messages attached to page component itself, got bounded to title two levels deeper in hierarchy precisely defined in lower most level (top-down should use the last found, shouldn't it?). According to what happens my UserHomePage should read only Home Page in it's title Sorry to bother, regards, Marek On 01/25/2010 03:39 PM, Erik van Oosten wrote: He Marek, The idea of Wicket i18n is that when you use a component, you can override its default texts with your own. That's why the lookup is top-down and not bottom-up. To solve this you'll need to use a more fine-grained name for the home page's title. Regards, Erik. Marek Šabo write: Hi all, I have a question regarding property binding when using localized property files, consider following: UserHomePage page has one property for localization and that is title=User's Home which is then used in markup as: head titlewicket:message key=title //title /head ... This page has inside an UserAddPanel with form with following properties: formContainer.uaForm.title=Title formContainer.uaForm.name=First Name ... for markup: wicket:panel div wicket:id=formContainer form wicket:id=uaForm label for=titlewicket:message key=title //label label for=namewicket:message key=name //label ... The name and other labels are generated fine (no reason not to) but the title is set to User's Home which is not desired. I would understood this behavior if I hadn't defined such 'fine-grained' property as formContainer.uaForm.title but why is it overriden when there is precise declaration on lower level? Is there a way to achieve behavior which I described or do I have to rename title in form to something else? TIA, Marek -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Generics
That's exactly what I do now (wrapped model). Just wondering if there was a technical reason behind it. Sent via BlackBerry from T-Mobile -Original Message- From: Pedro Santos pedros...@gmail.com Date: Mon, 25 Jan 2010 13:03:16 To: users@wicket.apache.org Subject: Re: Generics Basically the list view depend from List interface due some calls to his get(index) method. It means that the order of the components on the collections, are meaninful to the component. If it is not your case (order, item indexes doesn't matters), you can use an wrapper model in an list view, like: WrapperModel implements IModel { public WrapperModel (IModel wrappedModel) { this.wrappedModel = wrappedModel; } public Object getObject() { return new ArrayList(wrappedModel.getObject()); } } then you can create an list view like: new ListView(id, new PropertyModel(bean, listPropertyFromThatBean)) On Mon, Jan 25, 2010 at 12:29 PM, Sam Barrow s...@sambarrow.com wrote: I've noticed in some places where generics wildcards may be useful that they are not used. For example, in IColumn. If I have a Type and a SubType that extends Type, I can't use IColumnType in a DataTableSubType. Is there any reason for this or was it just not implemented? Not the most necessary feature, but it couldn't hurt. Also is there a reason ListView and similar components require an IModelList, and will not accept an IModelCollection? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
Re: Generics
Just make sure that the items on the collection have an index (List interface ensure it). It is important to the implementation of ListItemModel.setObject for instance and turn possible the component pagination. On Mon, Jan 25, 2010 at 1:05 PM, s...@sambarrow.com wrote: That's exactly what I do now (wrapped model). Just wondering if there was a technical reason behind it. Sent via BlackBerry from T-Mobile -Original Message- From: Pedro Santos pedros...@gmail.com Date: Mon, 25 Jan 2010 13:03:16 To: users@wicket.apache.org Subject: Re: Generics Basically the list view depend from List interface due some calls to his get(index) method. It means that the order of the components on the collections, are meaninful to the component. If it is not your case (order, item indexes doesn't matters), you can use an wrapper model in an list view, like: WrapperModel implements IModel { public WrapperModel (IModel wrappedModel) { this.wrappedModel = wrappedModel; } public Object getObject() { return new ArrayList(wrappedModel.getObject()); } } then you can create an list view like: new ListView(id, new PropertyModel(bean, listPropertyFromThatBean)) On Mon, Jan 25, 2010 at 12:29 PM, Sam Barrow s...@sambarrow.com wrote: I've noticed in some places where generics wildcards may be useful that they are not used. For example, in IColumn. If I have a Type and a SubType that extends Type, I can't use IColumnType in a DataTableSubType. Is there any reason for this or was it just not implemented? Not the most necessary feature, but it couldn't hurt. Also is there a reason ListView and similar components require an IModelList, and will not accept an IModelCollection? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos -- Pedro Henrique Oliveira dos Santos
Re: Future of Wicket Security (WASP/SWARM)
On Monday 25 January 2010 15:59:53 James Carman wrote: On Mon, Jan 25, 2010 at 9:50 AM, Emond Papegaaij Most of the complicated stuff is from SWARM, which indeed requires a lot of configuration. The difference between WASP and SWARM is not quite clear from the documentation, nor is the separation of the two. Some of the naming could use some improvement indeed :). The HiveMind manages the Hives used in the VM. A Hive contains all principals and permissions of an application and ultimately determines if a permission is granted or not. However, the Hive (and mind) are part of SWARM and should not be part of a general API. The main elements of WASP are: - A set of secure components - Several security checks - The ActionFactory, with a set of default actions - The WaspAuthorizationStrategy, which implements IAuthorizationStrategy With this, WASP only provides an interface to make you Wicket application secure. It has no implementation what-so-ever on how to check the security. Therefore, I think it is a good starting point for creating a general security API for Wicket. So, what does WASP add to wicket-auth-roles that it doesn't have already? Is it generic enough that we should just put it into wicket-auth-roles (or a new wicket-security module)? I really don't like the name WASP. I think wicket-security is intuitive enough (and follows the other names already out there wicket-ioc, wicket-spring, etc.). I really don't like the fact that when folks ask questions about wicket-auth-roles, the usual answer is wicket-auth-roles is only a demonstration or something to that effect. There really should be a sanctioned/preferred (and pluggable) security framework for Wicket that we can all get behind. I think WASP is a good name for what it is now: a separate project. A general security framework for wicket should be named wicket-security. WASP makes it possible to authorize single components, models of components and classes. This authorization can be performed on multiple levels, not just RENDER and ENABLE. It also provides the ISecurityCheck interface, which can be used to create reusable security checks. Some default implementations are already provided. The secure components are components that are used often, such as a SecurePageLink that is only visible when the target is authorized. I don't think WASP (or wicket-security) should be integrated into wicket-auth- roles, but auth-roles should be one of the security providers available for Wicket. My vision is that WASP replaces the interfaces in Wicket itself (such as IAuthorizationStrategy) and become part of the core of Wicket. Other frameworks can then build on this interface. However, as I said before, currently WASP is too bloated to be considered as a 'general security API'. Emond - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Localization properties overriding
Hi, well I see where was the misunderstanding. The FIRST result found. What I'm used to when going from top to down is the LAST definition takes effect. Well maybe I will see to it when I will do some modules but for now I'll just rename it and won't use single name properties anymore to avoid this kind of problems. Thanks On 01/25/2010 04:05 PM, Erik van Oosten wrote: The search for any given property key is top-down, the first result is found. Why? As I said, to allow an override of the component (which may be third party). Regards, Erik. Marek Šabo wrote: Hi Erik, I understand this - I use it eg. HomePage has title=Home, UserHomePage has title=User's Home etc... and it works top-down as expected. But why does this topmost property title, that should bind itself to key=title of wicket:messages attached to page component itself, got bounded to title two levels deeper in hierarchy precisely defined in lower most level (top-down should use the last found, shouldn't it?). According to what happens my UserHomePage should read only Home Page in it's title Sorry to bother, regards, Marek On 01/25/2010 03:39 PM, Erik van Oosten wrote: He Marek, The idea of Wicket i18n is that when you use a component, you can override its default texts with your own. That's why the lookup is top-down and not bottom-up. To solve this you'll need to use a more fine-grained name for the home page's title. Regards, Erik. Marek Šabo write: Hi all, I have a question regarding property binding when using localized property files, consider following: UserHomePage page has one property for localization and that is title=User's Home which is then used in markup as: head titlewicket:message key=title //title /head ... This page has inside an UserAddPanel with form with following properties: formContainer.uaForm.title=Title formContainer.uaForm.name=First Name ... for markup: wicket:panel div wicket:id=formContainer form wicket:id=uaForm label for=titlewicket:message key=title //label label for=namewicket:message key=name //label ... The name and other labels are generated fine (no reason not to) but the title is set to User's Home which is not desired. I would understood this behavior if I hadn't defined such 'fine-grained' property as formContainer.uaForm.title but why is it overriden when there is precise declaration on lower level? Is there a way to achieve behavior which I described or do I have to rename title in form to something else? TIA, Marek -- Marek Šabo Chief Server Manager Club SU CTU Buben Bubenečská Kolej Terronská 28, Prague 16000 XMPP: zeratul...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: JSR 330 Spring
On Mon, 2010-01-25 at 15:34 +0100, Jochen Mader wrote: Hello, I am using wicket together with spring. Getting it going with @SpringBean was pretty straight forward but now I am wondering if it is possible to get it going with JSR 330 annotations as the spring side of my app is already using it. Thanks, Jochen Currently it wont work because there is no implementation in Wicket for these annotations. As far as I remember wicket-ioc needs to use @SpringBean and @Inject because this way each Injector implementation knows which annotated members to inject. If you use jsr330 and have registered both Spring and Guice annotations then they will not know which one to process the annotated member. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxSelfUpdatingTimerBehavior and session timeout
On Mon, 2010-01-25 at 07:09 -0500, James Carman wrote: On Mon, Jan 25, 2010 at 4:37 AM, Chuck Brinkman chasb1...@gmail.com wrote: 1) So, if I didn't access the session in my ajax callback then the page would eventually expire. Another way to say this is if I simply had the original Clock implementation on this page then the session would expire? You may use plain JavaScript to show such a counter. Just pass the value to the client side and then start counting down. I don't know of a Servlet API to read the value of session-timeout element so you may need to hardcode it in your code... No, the ajax self updating behavior has to touch the session because it has to know how to get back to itself to do its work. - 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 change content in ModalWindow
I tried that initially but calling modalContentWindow.show when there already is a ModalWindow being displayed creates a new ModalWindow that sits over the top of the original one meaning I now have 2 windows that the user has to close. My aim is to have only one ModalWindow but just switch its contents. Aren't you missing a : modalContentWindow.show(target) in the onClick callback ? 2010/1/25 Chris Colman chr...@stepaheadsoftware.com Searching Nable shows this question has been asked before but there none of the solutions proposed there work for me. I have a link in PanelA that, when clicked, should cause PanelB to display in the same ModalWindow (PanelB replaced PanelA). The onClick event handler does something like the following: add ( new AjaxLink(selectionLink) { public void onClick(AjaxRequestTarget target) { PanelB panelB = new PanelB(modalContentWindow.getContentId()); modalContentWindow.setContent(panelB); modalContentWindow.setTitle(Hi, I'm PanelB); target.addComponent(panelB); } } ); When the link is pressed the panel A content disappears (popup content goes blank) but the panel B content does not appear. Should this work or have I missed 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: How to change content in ModalWindow
My use case might explain the situation better: User visits a page that needs authentication. A ModalWindow appears with a username/password field pair and a 'sign in' button. In case they are a new user it also contains a 'create account' button. If they click this then the contents of the ModalWindow changes to hold more fields, name, email, password, confirm password etc., sufficient to creating a new account. I wanted to do a nice smooth switch from the 'sign in' presentation to the 'create account' presentation without the flicker of closing the form and bringing up a new form. -Original Message- From: Chris Colman [mailto:chr...@stepaheadsoftware.com] Sent: Tuesday, 26 January 2010 3:58 AM To: users@wicket.apache.org Subject: RE: How to change content in ModalWindow I tried that initially but calling modalContentWindow.show when there already is a ModalWindow being displayed creates a new ModalWindow that sits over the top of the original one meaning I now have 2 windows that the user has to close. My aim is to have only one ModalWindow but just switch its contents. Aren't you missing a : modalContentWindow.show(target) in the onClick callback ? 2010/1/25 Chris Colman chr...@stepaheadsoftware.com Searching Nable shows this question has been asked before but there none of the solutions proposed there work for me. I have a link in PanelA that, when clicked, should cause PanelB to display in the same ModalWindow (PanelB replaced PanelA). The onClick event handler does something like the following: add ( new AjaxLink(selectionLink) { public void onClick(AjaxRequestTarget target) { PanelB panelB = new PanelB(modalContentWindow.getContentId()); modalContentWindow.setContent(panelB); modalContentWindow.setTitle(Hi, I'm PanelB); target.addComponent(panelB); } } ); When the link is pressed the panel A content disappears (popup content goes blank) but the panel B content does not appear. Should this work or have I missed 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: JSR 330 Spring
Thanks for the quick answer. I never came across a scenario where somebody did or I would use two IoC containers in the same application. Why would you do that? Cheers, Jochen
RE: How to change content in ModalWindow
For this to work can I use Panels for the Modal content or do I need to use Pages for the content and set up a PageCreator? -Original Message- From: Chris Colman [mailto:chr...@stepaheadsoftware.com] Sent: Tuesday, 26 January 2010 4:03 AM To: users@wicket.apache.org Subject: RE: How to change content in ModalWindow My use case might explain the situation better: User visits a page that needs authentication. A ModalWindow appears with a username/password field pair and a 'sign in' button. In case they are a new user it also contains a 'create account' button. If they click this then the contents of the ModalWindow changes to hold more fields, name, email, password, confirm password etc., sufficient to creating a new account. I wanted to do a nice smooth switch from the 'sign in' presentation to the 'create account' presentation without the flicker of closing the form and bringing up a new form. -Original Message- From: Chris Colman [mailto:chr...@stepaheadsoftware.com] Sent: Tuesday, 26 January 2010 3:58 AM To: users@wicket.apache.org Subject: RE: How to change content in ModalWindow I tried that initially but calling modalContentWindow.show when there already is a ModalWindow being displayed creates a new ModalWindow that sits over the top of the original one meaning I now have 2 windows that the user has to close. My aim is to have only one ModalWindow but just switch its contents. Aren't you missing a : modalContentWindow.show(target) in the onClick callback ? 2010/1/25 Chris Colman chr...@stepaheadsoftware.com Searching Nable shows this question has been asked before but there none of the solutions proposed there work for me. I have a link in PanelA that, when clicked, should cause PanelB to display in the same ModalWindow (PanelB replaced PanelA). The onClick event handler does something like the following: add ( new AjaxLink(selectionLink) { public void onClick(AjaxRequestTarget target) { PanelB panelB = new PanelB(modalContentWindow.getContentId()); modalContentWindow.setContent(panelB); modalContentWindow.setTitle(Hi, I'm PanelB); target.addComponent(panelB); } } ); When the link is pressed the panel A content disappears (popup content goes blank) but the panel B content does not appear. Should this work or have I missed 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: How to change content in ModalWindow - minor success!
Well I managed to get the panels to replace without adding a new ModalWindow to the stack each time: replacePanel(Panel existingPanel, Panel newPanel, String title, AjaxRequestTarget target) { existingPanel.replaceWith(newPanel); newPanel.setOutputMarkupId(true); modalContentWindow.setTitle(title); target.addComponent(newPanel); } This appears to work wonderfully - it allows me to toggle the ModalWindow content between two different PanelS and it does so cleanly with no flicker. However the 'Close' button that I added to each Panel will only work if no content toggling has taken place. Once the content has been toggled the Close button doesn't trigger a modal close. The 'X' in the top right of the Modal still works fine. -Original Message- From: Chris Colman [mailto:chr...@stepaheadsoftware.com] Sent: Tuesday, 26 January 2010 4:27 AM To: users@wicket.apache.org Subject: RE: How to change content in ModalWindow For this to work can I use Panels for the Modal content or do I need to use Pages for the content and set up a PageCreator? -Original Message- From: Chris Colman [mailto:chr...@stepaheadsoftware.com] Sent: Tuesday, 26 January 2010 4:03 AM To: users@wicket.apache.org Subject: RE: How to change content in ModalWindow My use case might explain the situation better: User visits a page that needs authentication. A ModalWindow appears with a username/password field pair and a 'sign in' button. In case they are a new user it also contains a 'create account' button. If they click this then the contents of the ModalWindow changes to hold more fields, name, email, password, confirm password etc., sufficient to creating a new account. I wanted to do a nice smooth switch from the 'sign in' presentation to the 'create account' presentation without the flicker of closing the form and bringing up a new form. -Original Message- From: Chris Colman [mailto:chr...@stepaheadsoftware.com] Sent: Tuesday, 26 January 2010 3:58 AM To: users@wicket.apache.org Subject: RE: How to change content in ModalWindow I tried that initially but calling modalContentWindow.show when there already is a ModalWindow being displayed creates a new ModalWindow that sits over the top of the original one meaning I now have 2 windows that the user has to close. My aim is to have only one ModalWindow but just switch its contents. Aren't you missing a : modalContentWindow.show(target) in the onClick callback ? 2010/1/25 Chris Colman chr...@stepaheadsoftware.com Searching Nable shows this question has been asked before but there none of the solutions proposed there work for me. I have a link in PanelA that, when clicked, should cause PanelB to display in the same ModalWindow (PanelB replaced PanelA). The onClick event handler does something like the following: add ( new AjaxLink(selectionLink) { public void onClick(AjaxRequestTarget target) { PanelB panelB = new PanelB(modalContentWindow.getContentId()); modalContentWindow.setContent(panelB); modalContentWindow.setTitle(Hi, I'm PanelB); target.addComponent(panelB); } } ); When the link is pressed the panel A content disappears (popup content goes blank) but the panel B content does not appear. Should this work or have I missed 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 - 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 change content in ModalWindow - minor success!
Also, it seems like ModalWindow.setTitle will not update the title after the initial ModalWindow.show has been called. Is there any way to trigger a title update after show has been called? -Original Message- From: Chris Colman [mailto:chr...@stepaheadsoftware.com] Sent: Tuesday, 26 January 2010 5:15 AM To: users@wicket.apache.org Subject: RE: How to change content in ModalWindow - minor success! Well I managed to get the panels to replace without adding a new ModalWindow to the stack each time: replacePanel(Panel existingPanel, Panel newPanel, String title, AjaxRequestTarget target) { existingPanel.replaceWith(newPanel); newPanel.setOutputMarkupId(true); modalContentWindow.setTitle(title); target.addComponent(newPanel); } This appears to work wonderfully - it allows me to toggle the ModalWindow content between two different PanelS and it does so cleanly with no flicker. However the 'Close' button that I added to each Panel will only work if no content toggling has taken place. Once the content has been toggled the Close button doesn't trigger a modal close. The 'X' in the top right of the Modal still works fine. -Original Message- From: Chris Colman [mailto:chr...@stepaheadsoftware.com] Sent: Tuesday, 26 January 2010 4:27 AM To: users@wicket.apache.org Subject: RE: How to change content in ModalWindow For this to work can I use Panels for the Modal content or do I need to use Pages for the content and set up a PageCreator? -Original Message- From: Chris Colman [mailto:chr...@stepaheadsoftware.com] Sent: Tuesday, 26 January 2010 4:03 AM To: users@wicket.apache.org Subject: RE: How to change content in ModalWindow My use case might explain the situation better: User visits a page that needs authentication. A ModalWindow appears with a username/password field pair and a 'sign in' button. In case they are a new user it also contains a 'create account' button. If they click this then the contents of the ModalWindow changes to hold more fields, name, email, password, confirm password etc., sufficient to creating a new account. I wanted to do a nice smooth switch from the 'sign in' presentation to the 'create account' presentation without the flicker of closing the form and bringing up a new form. -Original Message- From: Chris Colman [mailto:chr...@stepaheadsoftware.com] Sent: Tuesday, 26 January 2010 3:58 AM To: users@wicket.apache.org Subject: RE: How to change content in ModalWindow I tried that initially but calling modalContentWindow.show when there already is a ModalWindow being displayed creates a new ModalWindow that sits over the top of the original one meaning I now have 2 windows that the user has to close. My aim is to have only one ModalWindow but just switch its contents. Aren't you missing a : modalContentWindow.show(target) in the onClick callback ? 2010/1/25 Chris Colman chr...@stepaheadsoftware.com Searching Nable shows this question has been asked before but there none of the solutions proposed there work for me. I have a link in PanelA that, when clicked, should cause PanelB to display in the same ModalWindow (PanelB replaced PanelA). The onClick event handler does something like the following: add ( new AjaxLink(selectionLink) { public void onClick(AjaxRequestTarget target) { PanelB panelB = new PanelB(modalContentWindow.getContentId()); modalContentWindow.setContent(panelB); modalContentWindow.setTitle(Hi, I'm PanelB); target.addComponent(panelB); } } ); When the link is pressed the panel A content disappears (popup content goes blank) but the panel B content does not appear. Should this work or have I missed 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
Wicket tab panels detaching too early
Hi all, Our Wicket 1.4 project (currently 1.4.3) uses tabs on some pages to display linked information. For example, an Account may have a User. On the Account page, there would be a User tab in this case. The User is a PropertyModel on a LoadableDetachableModel for the Account (which grabs from the DB). We notice that whenever one tab accesses any part of the model in its constructor, we get two queries to the database to display the page. Some digging revealed the cause: Tabbed panel does the following (simplified). 1. Instantiate the new Panel being switched to (which causes the LoadableDetachableModel to load() as the constructor uses it) 2. call addOrReplace with this new Panel. This causes the old Panel to be removed and detach() to be called on it. Unfortunately, the other tab also had a PropertyModel on the same Account object. This means that the LoadableDetachableModel that's already queried the db within this request will detach() Later, the rendering causes the LoadableDetachableModel to load() again. It could be argued that we shouldn't be accessing the model directly in the constructor but instead setting PropertyModels on its attributes to be displayed at render time. I have managed to fix almost all of our pages to do this*, but the problem is how fragile this is. It's difficult to write a test case that verifies that no page needlessly causes two loads() in any LodableDetachableModel, and the consequence of such a mistake would be no less than doubling the load on the database. I suggest that TabbedPanel should instead remove any old tab before instantiating the new tab so models won't be unexpectedly detached before rendering even happens. I would be willing to supply a JIRA and patch unless somebody out there a knows better way to do all of this :) Thanks, Neil * My main obstacle has been PageParameters links which don't seem to be able to take a Model as an argument. Is there a way to work around this?
Re: Wicket tab panels detaching too early
Wicket needs to detach the replaced panel because it is no longer attached to the component hierarchy. If we didn't detach at that time, hell [c/w]ould break loose. We assume with loadable detachable models that people use proper caching such that the database won't be hit hard. E.G. if you use Hibernate, loading the object for the second time during the request would retrieve it from the first level cache (hibernate's Session object). If the session is no longer available we assume it is retrieved from the second level cache. In short: detaching the replaced panel is done on purpose. Martijn On Mon, Jan 25, 2010 at 7:52 PM, Neil Curzon neil.cur...@gmail.com wrote: Hi all, Our Wicket 1.4 project (currently 1.4.3) uses tabs on some pages to display linked information. For example, an Account may have a User. On the Account page, there would be a User tab in this case. The User is a PropertyModel on a LoadableDetachableModel for the Account (which grabs from the DB). We notice that whenever one tab accesses any part of the model in its constructor, we get two queries to the database to display the page. Some digging revealed the cause: Tabbed panel does the following (simplified). 1. Instantiate the new Panel being switched to (which causes the LoadableDetachableModel to load() as the constructor uses it) 2. call addOrReplace with this new Panel. This causes the old Panel to be removed and detach() to be called on it. Unfortunately, the other tab also had a PropertyModel on the same Account object. This means that the LoadableDetachableModel that's already queried the db within this request will detach() Later, the rendering causes the LoadableDetachableModel to load() again. It could be argued that we shouldn't be accessing the model directly in the constructor but instead setting PropertyModels on its attributes to be displayed at render time. I have managed to fix almost all of our pages to do this*, but the problem is how fragile this is. It's difficult to write a test case that verifies that no page needlessly causes two loads() in any LodableDetachableModel, and the consequence of such a mistake would be no less than doubling the load on the database. I suggest that TabbedPanel should instead remove any old tab before instantiating the new tab so models won't be unexpectedly detached before rendering even happens. I would be willing to supply a JIRA and patch unless somebody out there a knows better way to do all of this :) Thanks, Neil * My main obstacle has been PageParameters links which don't seem to be able to take a Model as an argument. Is there a way to work around this? -- 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: Wicket tab panels detaching too early
I do understand and appreciate the need to detatch the models. It's just that if the detached happened a few lines earlier, before the new tab is instantiated, it would be a lot less error prone with respect to accidentally causing more db load. Current mechanism: 1. Instantiate new tab (causes model to load) 2. replace old tab with new tab (detach chains to model that the new tab is also connected to) 3. render. This causes the above model to reload, twice in the same request Proposed mechanism 1. Remove current tab if it's already there 2. Instantiate new tab (model loads) 3. Render. Model is already loaded, so no second load. I think this order is a little less error prone. On Mon, Jan 25, 2010 at 2:52 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: Wicket needs to detach the replaced panel because it is no longer attached to the component hierarchy. If we didn't detach at that time, hell [c/w]ould break loose. We assume with loadable detachable models that people use proper caching such that the database won't be hit hard. E.G. if you use Hibernate, loading the object for the second time during the request would retrieve it from the first level cache (hibernate's Session object). If the session is no longer available we assume it is retrieved from the second level cache. In short: detaching the replaced panel is done on purpose. Martijn On Mon, Jan 25, 2010 at 7:52 PM, Neil Curzon neil.cur...@gmail.com wrote: Hi all, Our Wicket 1.4 project (currently 1.4.3) uses tabs on some pages to display linked information. For example, an Account may have a User. On the Account page, there would be a User tab in this case. The User is a PropertyModel on a LoadableDetachableModel for the Account (which grabs from the DB). We notice that whenever one tab accesses any part of the model in its constructor, we get two queries to the database to display the page. Some digging revealed the cause: Tabbed panel does the following (simplified). 1. Instantiate the new Panel being switched to (which causes the LoadableDetachableModel to load() as the constructor uses it) 2. call addOrReplace with this new Panel. This causes the old Panel to be removed and detach() to be called on it. Unfortunately, the other tab also had a PropertyModel on the same Account object. This means that the LoadableDetachableModel that's already queried the db within this request will detach() Later, the rendering causes the LoadableDetachableModel to load() again. It could be argued that we shouldn't be accessing the model directly in the constructor but instead setting PropertyModels on its attributes to be displayed at render time. I have managed to fix almost all of our pages to do this*, but the problem is how fragile this is. It's difficult to write a test case that verifies that no page needlessly causes two loads() in any LodableDetachableModel, and the consequence of such a mistake would be no less than doubling the load on the database. I suggest that TabbedPanel should instead remove any old tab before instantiating the new tab so models won't be unexpectedly detached before rendering even happens. I would be willing to supply a JIRA and patch unless somebody out there a knows better way to do all of this :) Thanks, Neil * My main obstacle has been PageParameters links which don't seem to be able to take a Model as an argument. Is there a way to work around this? -- 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: Resource JS
How are you frontending Tomcat with Apache? If it's by proxying, you may just be able to configure it to do the gzip for you on anything in the resources directory. -- Jeremy Thomerson http://www.wickettraining.com On Sun, Jan 24, 2010 at 10:30 PM, Douglas Ferguson doug...@douglasferguson.us wrote: Hmm... Actually, I'm wanting to gzip them are they gziped? Another thought was to do something like this: Alias /resources/com.package/ /user/local/tomcat5.5/webapps/resources/path/to/package So that apache can serve up the static content.. D/ On Jan 24, 2010, at 9:18 AM, Martin Grigorov wrote: On Sun, 2010-01-24 at 03:19 -0800, Douglas Ferguson wrote: I recently configured apache to gzip my js files instead of going through tomcat. Can this be done for the js files that are loaded as resources? see Application.get().getResourceSettings().getJavascriptCompressor() if this returns null then any JavascriptPackageResource will be not compressed D/ - 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
SV: SV: Override fragments in subclasses
public abstract class TestForm extends WebPage { public TestForm() { add(new Label(myDiv, my div from test form)); = common to every concrete page add(createDivWithComponent(myNewPanel)); = has to be redefine by each concrete page add(createDivWithComponent2(myNewPanel2)); = has to be redefine by each concrete page } protected abstract WebMarkupContainer createDivWithComponent(String divId); protected abstract WebMarkupContainer createDivWithComponent2(String divId); } An alternative is to have these either provide default/null components or throw WicketRuntimeExceptions. body div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body protected WebMarkupContainer createDivWithComponent2(String divId) { WebMarkupContainer container = new WebMarkupContainer(divId); WebMarkupContainer container2 = new WebMarkupContainer(div1); container2.add(new Label(label2,My very good label 2)); container.add(container2); return container; } } body div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body That markup is missing the div1 and label2 markup, but it does not get that far because And this is the error message I get : WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered).1. [Component id = myDiv] ... this means that there is no markup for the component you added at the start of the parent constructor: add(new Label(myDiv, my div from test form)); - Tor Iver
RE: Override fragments in subclasses
Would your issue be better solved by the ability to override more than one section of markup in a base page (the arbitrary figure of 'one', it was agreed, was not mandated by java class hierarchy or any OO design principles of or for any other reason - the page class still only derives from a single base - it's just that multiple sections instead of arbitrary limit of only one section can be overridden in derived page classes). There was a feature request raised for this: http://issues.apache.org/jira/browse/WICKET-1134 There was also a number of discussions in this group back in 2007 on this topic. One of them had the subject Multiple wicket:child / tags on a single base page? The main issue was that allowing for multiple overrideable sections would mandate that the sections be named because with more than one section it is no longer obvious which section a derived markup is overriding. In the absence of the implementation of this feature our team wrote a HTML preparser/compiler that allows us to write OO markup with multiple overridable sections (much like a Java class allows you to override multiple non final methods). The compiler outputs multiple HTML markups that are wicket compliant. We found that made it much easier to create and maintain markup that 'doing the wicket:fragment dance' ;) -Original Message- From: aboiteux@orange-ftgroup.com [mailto:aboiteux@orange- ftgroup.com] Sent: Monday, 25 January 2010 9:22 PM To: ilja.pavko...@binaere-bauten.de; users@wicket.apache.org Subject: RE: Override fragments in subclasses Hi, Thanks for your help, that works. But there's always an issue: I'd like to display component that is common in all classes So in my parent html : body span wicket:id=myDiv/span div wicket:id=myNewPanel/div div wicket:id=myNewPanel2/div /body And add a label with id myDiv in related parent java. This part is common to all classes. But when I render the TestFormOne, that doesn't work because, apparently the label myDiv must be define in subclass. What do you think? Best Regards, Aurélie -Message d'origine- De : Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de] Envoyé : vendredi 22 janvier 2010 11:50 À : users@wicket.apache.org Cc : zze-Nsb BOITEUX A ext RD-MAPS-GRE Objet : Re: Override fragments in subclasses Hi, And the related html: body wicket:extend wicket:fragment wicket:id=myNewPanel span wicket:id=label/ /wicket:fragment /wicket:extend remove wicket:extend and /wicket:extend. wicket:id=myNewPanel is not part of the wicket:child declaration of the parent class. Best Regards, Ilja Pavkovic -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker * This message and any attachments (the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. Messages are susceptible to alteration. France Telecom Group shall not be liable for the message if altered, changed or falsified. If you are not the intended addressee of this message, please cancel it immediately and inform the sender. - 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
Resetting a form after ajax submit
I have a panel with a form on it. I've attached an ajaxButton to submit the form. Afterward, I want the inputs to be reset with the backing model reset. I've done a lot of refreshing with an ajax submit, but I can't seem to get the form's values to reset in the webpage. The backing model seems to be reset, but when I add the form (or it's individual children) to the target, they don't refresh. I've done a variation of this where I have a repeating view up top and when that row is selected, it would populate the form, but I had to put the form in a fragment and add the fragment to the target to get that to work. Can somebody tell me what I'm doing wrong here? Thanks public class MyPanel extends Panel { public MyPanel(String id, Widget myWidget) { MyForm myForm = new MyForm(myForm, new MyWidget()); add(myForm); add(new AjaxButton(saveLink, myForm) { @Override protected void onSubmit(AjaxRequestTarget target, Form form) { //save stuff //refresh repeating view //now reset the form so the input fields are cleared and there's //a new backing model form.clearInput(); //this isn't working form.setDefaultModelObject(new MyWidget()); //this seems to reset the backing model, but the inputs are still popuated on the page target.addComponent(form); } } } private MyForm myForm extends Form { public MyForm(String id, Widget myWidget) { TextField textField = new TextFieldString(myField, new PropertyModelString(myWidget, myField)); add(textField); ... } } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Resource JS
I'm using modjk. On Jan 25, 2010, at 4:05 PM, Jeremy Thomerson wrote: How are you frontending Tomcat with Apache? If it's by proxying, you may just be able to configure it to do the gzip for you on anything in the resources directory. -- Jeremy Thomerson http://www.wickettraining.com On Sun, Jan 24, 2010 at 10:30 PM, Douglas Ferguson doug...@douglasferguson.us wrote: Hmm... Actually, I'm wanting to gzip them are they gziped? Another thought was to do something like this: Alias /resources/com.package/ /user/local/tomcat5.5/webapps/resources/path/to/package So that apache can serve up the static content.. D/ On Jan 24, 2010, at 9:18 AM, Martin Grigorov wrote: On Sun, 2010-01-24 at 03:19 -0800, Douglas Ferguson wrote: I recently configured apache to gzip my js files instead of going through tomcat. Can this be done for the js files that are loaded as resources? see Application.get().getResourceSettings().getJavascriptCompressor() if this returns null then any JavascriptPackageResource will be not compressed D/ - 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: Resetting a form after ajax submit
call form.modelchanged() after setting the new model -igor On Mon, Jan 25, 2010 at 9:23 PM, Flavius flav...@silverlion.com wrote: I have a panel with a form on it. I've attached an ajaxButton to submit the form. Afterward, I want the inputs to be reset with the backing model reset. I've done a lot of refreshing with an ajax submit, but I can't seem to get the form's values to reset in the webpage. The backing model seems to be reset, but when I add the form (or it's individual children) to the target, they don't refresh. I've done a variation of this where I have a repeating view up top and when that row is selected, it would populate the form, but I had to put the form in a fragment and add the fragment to the target to get that to work. Can somebody tell me what I'm doing wrong here? Thanks public class MyPanel extends Panel { public MyPanel(String id, Widget myWidget) { MyForm myForm = new MyForm(myForm, new MyWidget()); add(myForm); add(new AjaxButton(saveLink, myForm) { �...@override protected void onSubmit(AjaxRequestTarget target, Form form) { //save stuff //refresh repeating view //now reset the form so the input fields are cleared and there's //a new backing model form.clearInput(); //this isn't working form.setDefaultModelObject(new MyWidget()); //this seems to reset the backing model, but the inputs are still popuated on the page target.addComponent(form); } } } private MyForm myForm extends Form { public MyForm(String id, Widget myWidget) { TextField textField = new TextFieldString(myField, new PropertyModelString(myWidget, myField)); add(textField); ... } } } - 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: Resetting a form after ajax submit
I tried that. It didn't work. Actually Component#setDefaultModelObject() already calls modelChanging(); model.setObject(object); modelChanged(); I also looked at the ajax guestbook example. igor.vaynberg wrote: call form.modelchanged() after setting the new model -igor On Mon, Jan 25, 2010 at 9:23 PM, Flavius flav...@silverlion.com wrote: I have a panel with a form on it. I've attached an ajaxButton to submit the form. Afterward, I want the inputs to be reset with the backing model reset. I've done a lot of refreshing with an ajax submit, but I can't seem to get the form's values to reset in the webpage. The backing model seems to be reset, but when I add the form (or it's individual children) to the target, they don't refresh. I've done a variation of this where I have a repeating view up top and when that row is selected, it would populate the form, but I had to put the form in a fragment and add the fragment to the target to get that to work. Can somebody tell me what I'm doing wrong here? Thanks public class MyPanel extends Panel { public MyPanel(String id, Widget myWidget) { MyForm myForm = new MyForm(myForm, new MyWidget()); add(myForm); add(new AjaxButton(saveLink, myForm) { �...@override protected void onSubmit(AjaxRequestTarget target, Form form) { //save stuff //refresh repeating view //now reset the form so the input fields are cleared and there's //a new backing model form.clearInput(); //this isn't working form.setDefaultModelObject(new MyWidget()); //this seems to reset the backing model, but the inputs are still popuated on the page target.addComponent(form); } } } private MyForm myForm extends Form { public MyForm(String id, Widget myWidget) { TextField textField = new TextFieldString(myField, new PropertyModelString(myWidget, myField)); add(textField); ... } } } - 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 -- View this message in context: http://old.nabble.com/Resetting-a-form-after-ajax-submit-tp27318108p27318409.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: [release] Wicket Security 1.4-beta1
I've just checked in a major commit on wicket-security-1.4, adding generics, cleaning up the API where needed and introducing a project wide source code formatting. This commit has changed the API of wicket-security in some places. If it breaks for you, please let me know, so I can fix it or provide a solution in another way. If you do not want to test this commit, you can always stick to beta1, released last week. Best regards, Emond Papegaaij On Thursday 21 January 2010 10:48:36 Emond Papegaaij wrote: Wicket Security 1.4-beta1 has just been released. This release contains all updates made by Olger Warnier in the last 6 months to make Wicket Security work with Wicket 1.4 and the examples he added. It also contains the new ComponentSubclassPermission, which makes it possible to authorize a class and all its subclasses. But most importantly: it is the first release for Wicket Security 1.4! To include Wicket Security (with Swarm) in your project, add: dependency groupIdorg.apache.wicket.wicket-security/groupId artifactIdswarm/artifactId version1.4-beta1/version /dependency More information about Wicket Security can be found at: http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security Although this release works with Wicket 1.4, it does not yet make use of the generics provided in Wicket 1.4. This will be included in the next release (beta2), which will follow shortly. Best regards, Martijn and Emond - 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