Re: Updating Component On a Different Page
Another approach could be to use wicket-auth-roles. All is there. And you could simply add an annotation to the page which needs the authentication. Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wizard newOverviewBar, creating some king of overview
Hey Wicketeers! I just started to include a Wizard in our project, just the simple and clean non-dynamic implementation. All seems to work fine, amazing you can include such a lot of functionality with just a few lines of code. But here it comes: I now want to create a kind of overview on wizard level, a panel indicating which step is the current, which ones has been done, and the ones coming next. In the apidocs there is already a hook created called newOverviewBar, to be overwritten. Now I run into trouble... How is this supposed to be overwritten in my Wizard implementation, and in what way should I implement it in the constructor? Maybe someone can give me a hint to help me on the way, maybe there is even some sample inplementation code, I guess this has been done be several people? thanks for the help, best regards, Frank Prins
Re: Wizard newOverviewBar, creating some king of overview
extend the base Wizard, and your implementation override newOverviewBar and return you overview bar On Fri, 2009-10-16 at 08:24 +0200, Frank Prins wrote: Hey Wicketeers! I just started to include a Wizard in our project, just the simple and clean non-dynamic implementation. All seems to work fine, amazing you can include such a lot of functionality with just a few lines of code. But here it comes: I now want to create a kind of overview on wizard level, a panel indicating which step is the current, which ones has been done, and the ones coming next. In the apidocs there is already a hook created called newOverviewBar, to be overwritten. Now I run into trouble... How is this supposed to be overwritten in my Wizard implementation, and in what way should I implement it in the constructor? Maybe someone can give me a hint to help me on the way, maybe there is even some sample inplementation code, I guess this has been done be several people? thanks for the help, best regards, Frank Prins - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Open Source projects using Wicket
Pushing definitely is more performance efficient - you know exactly when and where you push it and it's easy (happy-day-scenario) to optimize. Partly the ease of optimization results from difficulty of making complex relations. I would expect push to put more load on your servers due to serializing to second level cache, and getting a page back from that cache might also be more expensive. Of course, it depends where you pull from. And then when you're within one request, you probably have that data you'd push already in memory (e.g. Hibernate's session cache if you use that), so it might not be more expensive in that sense either. I do agree that pull models can lead to more complex structures, but that also depends on what kind of models you use (e.g. reflection based models actually can save code, but obviously using lots of anonymous classes won't). :-) Eelco A third option, which from my POV is perhaps the most elegant, is to roll your own page store that serializes the pages instantly after the request. The serialization have special hooks to replace entites or whatever that you would prefer to have as LDM with a placeholder that just stores the type and id when serialized. When/if the page is later deserialized you get the entity fresh from your object repository (cache). Why is this elegant? You get the programming model of push with the benefits of pull without writing any code for model proxies. I have communicated this idea before but nobody but me seems to prefer it, I'm actually surprised :-) // Daniel jalbum.net - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Automatic detaching during serialization (was Re: Open Source projects using Wicket)
On Fri, Oct 16, 2009 at 9:00 AM, Daniel Frisk dan...@jalbum.net wrote: A third option, which from my POV is perhaps the most elegant, is to roll your own page store that serializes the pages instantly after the request. The serialization have special hooks to replace entites or whatever that you would prefer to have as LDM with a placeholder that just stores the type and id when serialized. When/if the page is later deserialized you get the entity fresh from your object repository (cache). Why is this elegant? You get the programming model of push with the benefits of pull without writing any code for model proxies. I have communicated this idea before but nobody but me seems to prefer it, I'm actually surprised :-) I've proposed such a solution but someone (I believe Matej) told me that there would be gremlins in the order of the models that get detached/replaced etc. Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wickettester change locale of request
Hi, Ik had the same problem. I digged in the code and found that the Mock implementation of the request used -as you say- the default Locale. Unfortunately, there was no way to set de Locale on that mock request... I ended up to set the default locale using Locale.setDefault(getLocale()) when I create the WicketTester instance. (getLocale() can then be overridden by concerned Test) This might not be the most elegant solution, but it certainly does its job On Thu, Oct 15, 2009 at 1:45 PM, Per Newgro per.new...@gmx.ch wrote: Hi i would like to test my code on new session creation in application. A task in this process is to validate the resulting session locale. Because the session locale will be taken from the request i have to provide my test value in the Wickettester.servletRequest attribute. But how can i set it manually to avoid usage of system default locale? MyApplication public Session newSession(Request request, Response response) { MySession session = new MySession(request); if (isInvalid(session.getLocale())) { session.setLocale(Locale.ENGLISH); } return session; } private boolean isInvalid(Locale locale) { return isUndefined(new Locale(locale.getLanguage())) isUndefined(locale); } private boolean isUndefined(Locale locale) { return !_locales.contains(locale); } MyApplicationTest @Test public void invalidLanguageLocale() { assertEquals(Locale.CHINESE, prepareSession(toHtmlHeaderString(Locale.ENGLISH)).getLocale()); } private String toHtmlHeaderString(Locale locale) { String result = locale.getLanguage(); if (locale.getCountry() != null locale.getCountry().trim().length() 0) { result = result + - + locale.getCountry(); } return result; } private Session prepareSession(String locale) { _tester.setupRequestAndResponse(); MockHttpServletRequest request = _tester.getServletRequest(); request.addHeader(Accept-Language, locale); Session session = (Session) _testee.newSession(_tester.getWicketRequest(), _tester.getWicketResponse()); return session; } -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pieter Degraeuwe Systemworks bvba Belgiëlaan 61 9070 Destelbergen GSM: +32 (0)485/68.60.85 Email: pieter.degrae...@systemworks.be visit us at http://www.systemworks.be
Null Model Error
I have a List-Component and after sending a Form-Request it shows me the error: java.lang.IllegalStateException: Attempt to set model object on null model of component: mainPanel:taggingBereich:addTagging:taggingList at org.apache.wicket.Component.setDefaultModelObject(Component.java:3038) That's the specific List // Component taggingList = new ListMultipleChoiceInteger(taggingList, choices, renderer).setMaxRows(10); taggingList.setOutputMarkupId(true); // Setting Model choices.setObject(new ArrayListInteger(tagging.keySet())); // Model-Variable IModelList? extends Integer choices; // IChoiceRenderer renderer = new IChoiceRendererInteger() { public Object getDisplayValue(Integer arg0) { return tagging.get(arg0); } public String getIdValue(Integer arg0, int arg1) { return arg0.toString(); } }; choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); The of Method is crossed out by eclipse due to some reason I can't recognize -- But it works. Only after submitting the form I get this error (above) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Null Model Error
you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Null Model Error
yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - 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: Open Source projects using Wicket
probably because serialization is not guaranteed. you can use a http session store on a single node cluster and never have anything serialized. -igor On Fri, Oct 16, 2009 at 12:00 AM, Daniel Frisk dan...@jalbum.net wrote: Pushing definitely is more performance efficient - you know exactly when and where you push it and it's easy (happy-day-scenario) to optimize. Partly the ease of optimization results from difficulty of making complex relations. I would expect push to put more load on your servers due to serializing to second level cache, and getting a page back from that cache might also be more expensive. Of course, it depends where you pull from. And then when you're within one request, you probably have that data you'd push already in memory (e.g. Hibernate's session cache if you use that), so it might not be more expensive in that sense either. I do agree that pull models can lead to more complex structures, but that also depends on what kind of models you use (e.g. reflection based models actually can save code, but obviously using lots of anonymous classes won't). :-) Eelco A third option, which from my POV is perhaps the most elegant, is to roll your own page store that serializes the pages instantly after the request. The serialization have special hooks to replace entites or whatever that you would prefer to have as LDM with a placeholder that just stores the type and id when serialized. When/if the page is later deserialized you get the entity fresh from your object repository (cache). Why is this elegant? You get the programming model of push with the benefits of pull without writing any code for model proxies. I have communicated this idea before but nobody but me seems to prefer it, I'm actually surprised :-) // Daniel jalbum.net - 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
AjaxFallbackButton doesn't update ajax components when validation fails?
Hi! I've got a form in which I use some textfields and other components which have validators attached. The form also has the two standard ok and cancel buttons. One important feature of the form is that the user should be able to query the altitude of a geoposition. Therefore the form has a latitude and longitude textfield and a query altitude button. When there is text in latitude and in longitude and the user clicks the query altitude button a web service is queried for the appropriate altitude. Then the form's model object is updated with the altitude. Everything works as expected when no other component in the form fails validation. The altitude is sent back to the client. But when any other component fails validation, the altitude text field also isn't updated. How can I omit this behaviour and get the altitude field updated, regardless of the validation result of the other components? Here's my query-altitude-button code: queryAltitudeButton = new AjaxFallbackButton(queryAltitudeButton, form) { @Override protected void onError(AjaxRequestTarget target, Form? form) { queryAlti(target); } @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { queryAlti(target); } private void queryAlti(AjaxRequestTarget target) { Double alti = AltitudeService.getAltitude(place.getLatitude(), place.getLongitude()); if( alti != null alti = -300.0 alti = 9000.0) { place.setElevation(alti); } else { place.setElevation(null); } if( target != null ) { target.addComponent(altitudeTextField); target.addComponent(feedbackPanel); } } }; queryAltitudeButton.setOutputMarkupId(true); form.add(queryAltitudeButton); Thanks! chris -- Christian Reiter|||c.rei...@gmx.net - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxFallbackButton doesn't update ajax components when validation fails?
Just one idea... add some AjaxBehaivior that updates altitude field in event onchange. So, that even if validation fails you already have your altitude updated... Best, Ernesto On Fri, Oct 16, 2009 at 9:58 AM, Christian Reiter c.rei...@gmx.net wrote: Hi! I've got a form in which I use some textfields and other components which have validators attached. The form also has the two standard ok and cancel buttons. One important feature of the form is that the user should be able to query the altitude of a geoposition. Therefore the form has a latitude and longitude textfield and a query altitude button. When there is text in latitude and in longitude and the user clicks the query altitude button a web service is queried for the appropriate altitude. Then the form's model object is updated with the altitude. Everything works as expected when no other component in the form fails validation. The altitude is sent back to the client. But when any other component fails validation, the altitude text field also isn't updated. How can I omit this behaviour and get the altitude field updated, regardless of the validation result of the other components? Here's my query-altitude-button code: queryAltitudeButton = new AjaxFallbackButton(queryAltitudeButton, form) { @Override protected void onError(AjaxRequestTarget target, Form? form) { queryAlti(target); } @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { queryAlti(target); } private void queryAlti(AjaxRequestTarget target) { Double alti = AltitudeService.getAltitude(place.getLatitude(), place.getLongitude()); if( alti != null alti = -300.0 alti = 9000.0) { place.setElevation(alti); } else { place.setElevation(null); } if( target != null ) { target.addComponent(altitudeTextField); target.addComponent(feedbackPanel); } } }; queryAltitudeButton.setOutputMarkupId(true); form.add(queryAltitudeButton); Thanks! chris -- Christian Reiter|||c.rei...@gmx.net - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wickettester change locale of request
Thanks Pieter, right in place i found the same solution :-). Cause of our problem is that creation of WicketTester is not following a (maybe common-base) wicket rule: Let the user override defaults by providing protected creation methods e.g. newRequest(). All is done in MockWebApplication Constructor by using new Constructors for the MockHttpServletRequest. A second barrier is that the MockHttpServletRequest only provides default initialization of header attributes by usage of setDefaultHeaders which is private. Another way of providing locales in http headers would be if MockHttpServletRequest.addHeader(String, String) would exchange values or even better provide a setHeader(String, String) which is implemented that way. But there is still the problem with unaccessible instance creation of requests. So the solution for me would be: 1. add method to MockWebApplication protected MockHttpServletRequest newMockHttpServletRequest(Application application, ServletSession servletSession, ServletContext context) { return new MockHttpServletRequest(application, servletSession, context); } 2. call new Method in Constructor servletRequest = newMockHttpServletRequest(this.application, servletSession, context); 3. make setDefaultHeaders() in MockHttpServletRequest protected. But the third change could have drawbacks i don't see now :-). Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Really strange markup exception
Hello, wicket users and developers, I need your help, can't find the reason of problem. Tried this with 1.4.1 and 1.4.2 wicket versions. My class IconImage extends WebMarkupContainer and adds src attribute to img tag depending on some logic and I use it in several panels. It works perfectly until I want to use it in this breadcrump markup: wicket:panel span wicket:id=breadcrumb a wicket:id=link img wicket:id=icon src= alt= / span wicket:id=text/span /a span wicket:id=gt img src=.../gtdot.gif alt=gt;/ /span /span img src=.../gtdot.gif alt=gt;/ a wicket:id=nameimglink class=noadecoration img src=.../link.gif alt= title=/ /a a wicket:id=goodLink img wicket:id=goodIcon src= alt= / span wicket:id=name/span /a /wicket:panel Span [wicket:id=breadcrumb] is filled using ListView, here IconImage is added to [wicket:id=icon], it WORKS here. But last [wicket:id=goodIcon] throws org.apache.wicket.markup.MarkupException: Unable to find component with id 'goodIcon' in [MarkupContainer [Component id = goodLink]] When I replace IconImage with simple WebMarkupContainer - everything starts to work. Even when I make simple extend of WebMarkupContainer without any logic it throws this exception. What's the matter? Best regards, -- Tony - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Really strange markup exception
Forget it, please, I found my fault after 1 minute!!! Thank you! On Fri, Oct 16, 2009 at 4:38 PM, Anton Veretennikov anton.veretenni...@gmail.com wrote: Hello, wicket users and developers, I need your help, can't find the reason of problem. Tried this with 1.4.1 and 1.4.2 wicket versions. My class IconImage extends WebMarkupContainer and adds src attribute to img tag depending on some logic and I use it in several panels. It works perfectly until I want to use it in this breadcrump markup: wicket:panel span wicket:id=breadcrumb a wicket:id=link img wicket:id=icon src= alt= / span wicket:id=text/span /a span wicket:id=gt img src=.../gtdot.gif alt=gt;/ /span /span img src=.../gtdot.gif alt=gt;/ a wicket:id=nameimglink class=noadecoration img src=.../link.gif alt= title=/ /a a wicket:id=goodLink img wicket:id=goodIcon src= alt= / span wicket:id=name/span /a /wicket:panel Span [wicket:id=breadcrumb] is filled using ListView, here IconImage is added to [wicket:id=icon], it WORKS here. But last [wicket:id=goodIcon] throws org.apache.wicket.markup.MarkupException: Unable to find component with id 'goodIcon' in [MarkupContainer [Component id = goodLink]] When I replace IconImage with simple WebMarkupContainer - everything starts to work. Even when I make simple extend of WebMarkupContainer without any logic it throws this exception. What's the matter? Best regards, -- Tony - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
WicketMessage: Error attaching this container for rendering
Can i have some brief explanation on what could have possibly caused this to happen? WicketMessage: Error attaching this container for rendering: [MarkupContainer [Component id = subtree]] Root cause: java.lang.NullPointerException at wickettree.nested.Subtree$ModelIterator.init(Subtree.java:133) at wickettree.nested.Subtree$1.getItemModels(Subtree.java:75) at org.apache.wicket.markup.repeater.RefreshingView.onPopulate(RefreshingView.java:94) at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:131) at org.apache.wicket.Component.internalBeforeRender(Component.java:1061) at org.apache.wicket.Component.beforeRender(Component.java:1095) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1751) at org.apache.wicket.Component.onBeforeRender(Component.java:3863) at org.apache.wicket.Component.internalBeforeRender(Component.java:1061) at org.apache.wicket.Component.beforeRender(Component.java:1095) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1751) at org.apache.wicket.Component.onBeforeRender(Component.java:3863) at org.apache.wicket.Component.internalBeforeRender(Component.java:1061) at org.apache.wicket.Component.beforeRender(Component.java:1095) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1751) at org.apache.wicket.Component.onBeforeRender(Component.java:3863) at org.apache.wicket.Component.internalBeforeRender(Component.java:1061) at org.apache.wicket.Component.beforeRender(Component.java:1095) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1751) at org.apache.wicket.Component.onBeforeRender(Component.java:3863) at org.apache.wicket.Page.onBeforeRender(Page.java:1501) at com.is.web.sam.role.BaseRoleManagementPage.onBeforeRender(BaseRoleManagementPage.java:239) at org.apache.wicket.Component.internalBeforeRender(Component.java:1061) at org.apache.wicket.Component.beforeRender(Component.java:1095) at org.apache.wicket.Component.prepareForRender(Component.java:2232) at org.apache.wicket.Component.prepareForRender(Component.java:2269) at org.apache.wicket.Page.renderPage(Page.java:893) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) 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:456) at com.is.java.common.util.MySecureFilter.doGet(MySecureFilter.java:127) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 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:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) 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:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:595) Complete stack: org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [MarkupContainer [Component id = subtree]] at
Re: WicketMessage: Error attaching this container for rendering
Subtree.java:133 throws java.lang.NullPointerException -- Tony On Fri, Oct 16, 2009 at 4:50 PM, ping ping sping_p...@hotmail.com wrote: Can i have some brief explanation on what could have possibly caused this to happen? WicketMessage: Error attaching this container for rendering: [MarkupContainer [Component id = subtree]] Root cause: java.lang.NullPointerException at wickettree.nested.Subtree$ModelIterator.init(Subtree.java:133) at wickettree.nested.Subtree$1.getItemModels(Subtree.java:75) at org.apache.wicket.markup.repeater.RefreshingView.onPopulate(RefreshingView.java:94) at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:131) at org.apache.wicket.Component.internalBeforeRender(Component.java:1061) at org.apache.wicket.Component.beforeRender(Component.java:1095) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1751) at org.apache.wicket.Component.onBeforeRender(Component.java:3863) at org.apache.wicket.Component.internalBeforeRender(Component.java:1061) at org.apache.wicket.Component.beforeRender(Component.java:1095) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1751) at org.apache.wicket.Component.onBeforeRender(Component.java:3863) at org.apache.wicket.Component.internalBeforeRender(Component.java:1061) at org.apache.wicket.Component.beforeRender(Component.java:1095) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1751) at org.apache.wicket.Component.onBeforeRender(Component.java:3863) at org.apache.wicket.Component.internalBeforeRender(Component.java:1061) at org.apache.wicket.Component.beforeRender(Component.java:1095) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1751) at org.apache.wicket.Component.onBeforeRender(Component.java:3863) at org.apache.wicket.Page.onBeforeRender(Page.java:1501) at com.is.web.sam.role.BaseRoleManagementPage.onBeforeRender(BaseRoleManagementPage.java:239) at org.apache.wicket.Component.internalBeforeRender(Component.java:1061) at org.apache.wicket.Component.beforeRender(Component.java:1095) at org.apache.wicket.Component.prepareForRender(Component.java:2232) at org.apache.wicket.Component.prepareForRender(Component.java:2269) at org.apache.wicket.Page.renderPage(Page.java:893) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) 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:456) at com.is.java.common.util.MySecureFilter.doGet(MySecureFilter.java:127) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 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:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) 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:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:595) Complete stack:
RE: Wizard newOverviewBar, creating some king of overview
Jahid, In fact very simple again works fine, thanks! Frank -Original Message- From: Md. Jahid Shohel [mailto:ja...@outscore.se] Sent: vrijdag 16 oktober 2009 8:59 To: users@wicket.apache.org Subject: Re: Wizard newOverviewBar, creating some king of overview extend the base Wizard, and your implementation override newOverviewBar and return you overview bar On Fri, 2009-10-16 at 08:24 +0200, Frank Prins wrote: Hey Wicketeers! I just started to include a Wizard in our project, just the simple and clean non-dynamic implementation. All seems to work fine, amazing you can include such a lot of functionality with just a few lines of code. But here it comes: I now want to create a kind of overview on wizard level, a panel indicating which step is the current, which ones has been done, and the ones coming next. In the apidocs there is already a hook created called newOverviewBar, to be overwritten. Now I run into trouble... How is this supposed to be overwritten in my Wizard implementation, and in what way should I implement it in the constructor? Maybe someone can give me a hint to help me on the way, maybe there is even some sample inplementation code, I guess this has been done be several people? thanks for the help, best regards, Frank Prins - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Open Source projects using Wicket
Of course, serialization isn't always necessary but in this case the idea was to _enforce_ serialization. The cost of serialization compared to the actual page construction time (often with database accesses and such) seems to often be very small. Scalability is the same as for using explicit LDMs in your code. Once you have set it up you can never forget to detach stuff and end up with an overstuffed session. You don't have to serialize to disk either you can keep the data in memory or in your Terracotta cluster or whatever. I think it has clear advantages to explicit model proxies. Models proxies are still necessary in some cases, but usually you can just put an entity in your component and it will work as if you had used LDMs. I'm not saying this is a golden... But it's a really nice alternative in many cases. // Daniel jalbum.net probably because serialization is not guaranteed. you can use a http session store on a single node cluster and never have anything serialized. -igor A third option, which from my POV is perhaps the most elegant, is to roll your own page store that serializes the pages instantly after the request. The serialization have special hooks to replace entites or whatever that you would prefer to have as LDM with a placeholder that just stores the type and id when serialized. When/if the page is later deserialized you get the entity fresh from your object repository (cache). Why is this elegant? You get the programming model of push with the benefits of pull without writing any code for model proxies. I have communicated this idea before but nobody but me seems to prefer it, I'm actually surprised :-) // Daniel jalbum.net
Re: Open Source projects using Wicket
eHour is using Wicket (1.3, not yet migrated to 1.4). Site at http://www.ehour.nl/ with the svn repo at http://svn.te-con.nl/repos/ehour/trunk Dave B wrote: Hi, I'm in the process of evaluating Wicket (after an arduous JSF project, that has made us re-evaluate our web platform.) I've read Wicket in Action and whole bunch of blog and mailing list posts, done some proof-of-concept work and am now interested in reading source code from a project using Wicket, since I want to see Wicket in the wild. I know Artifactory uses Wicket, but their Subversion access instructions seem to be out of date. Does anyone know of an open source project using Wicket, so that I can peruse the source code? Many thanks, Dave - 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: FileUploadField blocks component submission when an empty file is selected
igor.vaynberg wrote: 1.4-RC1??? you know that 1.4.2 is out... -igor Thank you for this prod. I was using Geertjan's Wicket 1.4 Support plug-in for NetBeans. I have now taken the plunge and updated my plug-in installation to 1.4.2. I have checked that this version's .jar file is used by my built app. The issue persists; I have updated my JIRA submission (Wicket-2523) to reflect the 1.4.2 version of Wicket. -- View this message in context: http://www.nabble.com/FileUploadField-blocks-component-submission-when-an-empty-file-is-selected-tp25855504p25922234.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: Open Source projects using Wicket
I dont really get what you mean by pushing and pulling models. Could you please give me an example? Is creating a component without providing a model, relying in the parent page/panel/component's default model pushing data? //Swanthe Jeremy Thomerson wrote: Sorry, that was an overly terse statement. Peter Thomas has put a lot of work into JTrac, and has done a lot of things that I admire (for instance, some of his performance testing blog entries, etc). He is also very helpful on the mailing list. The reason I said not to look at it is that when I was using it, I found that nearly all of the components were created without the use of models - pushing data into the component rather than making it pull from a model. While that works fine for a small bug tracker, it would not work well in most enterprise applications - leading to performance and potentially memory issues. It's not that it's bad software - but I've taught enough training classes to see that one of the most common pitfalls to those new to Wicket is to always push data into the models. This works fine in some instances, but is not a best practice and can lead to a lot of problems later if you don't know what you're doing. That's why I said what I did. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 15, 2009 at 7:29 PM, Dave B d...@davebolton.net wrote: Any particular reason? Form a (very) cursory ten minute look, the lack of tests was glaring, though not an indictment of the actual Wicket usage. Thanks, Dave On Fri, Oct 16, 2009 at 11:04 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Don't look at jtrac. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 15, 2009 at 6:42 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: keeping that in mind, i wouldnt look at brix, most wicket-related code there has to do with plumbing and implementing a development model that is unlike wicket but works better for cmses. maybe look at http://www.jtrac.info/ , i think that uses wicket... -igor On Thu, Oct 15, 2009 at 4:40 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Beware - just like any other app, OS or not, you will find OS projects out there that will teach you all kind of wrong ways to use Wicket. I know of a couple because I tried to use them, thinking they would be easier to build on because they used Wicket. But they were so poorly written that it would be a bad place for someone new to the framework to start. http://code.google.com/p/brix-cms/ was written by some of the core committers, so the Wicket code in it will be good. Not sure how much of the code is actually Wicket specific, though. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 15, 2009 at 6:35 PM, Dave B d...@davebolton.net wrote: Hi, I'm in the process of evaluating Wicket (after an arduous JSF project, that has made us re-evaluate our web platform.) I've read Wicket in Action and whole bunch of blog and mailing list posts, done some proof-of-concept work and am now interested in reading source code from a project using Wicket, since I want to see Wicket in the wild. I know Artifactory uses Wicket, but their Subversion access instructions seem to be out of date. Does anyone know of an open source project using Wicket, so that I can peruse the source code? Many thanks, Dave - 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: Open Source projects using Wicket
Daniel do you have any sample code for this. Could be cool with a small quickstart, you could even use the Iolite for this, and drop it's ldms... 2009/10/16 Daniel Frisk dan...@jalbum.net Of course, serialization isn't always necessary but in this case the idea was to _enforce_ serialization. The cost of serialization compared to the actual page construction time (often with database accesses and such) seems to often be very small. Scalability is the same as for using explicit LDMs in your code. Once you have set it up you can never forget to detach stuff and end up with an overstuffed session. You don't have to serialize to disk either you can keep the data in memory or in your Terracotta cluster or whatever. I think it has clear advantages to explicit model proxies. Models proxies are still necessary in some cases, but usually you can just put an entity in your component and it will work as if you had used LDMs. I'm not saying this is a golden... But it's a really nice alternative in many cases. // Daniel jalbum.net probably because serialization is not guaranteed. you can use a http session store on a single node cluster and never have anything serialized. -igor A third option, which from my POV is perhaps the most elegant, is to roll your own page store that serializes the pages instantly after the request. The serialization have special hooks to replace entites or whatever that you would prefer to have as LDM with a placeholder that just stores the type and id when serialized. When/if the page is later deserialized you get the entity fresh from your object repository (cache). Why is this elegant? You get the programming model of push with the benefits of pull without writing any code for model proxies. I have communicated this idea before but nobody but me seems to prefer it, I'm actually surprised :-) // Daniel jalbum.net
Howto accept other then first locale in HTTP header Accept-Language?
Hi, after solving my problem with testing session locale filtering in thread Wickettester change locale of request i found a new problem. Assume your client browser accepts CHINA - locale by default (first) and ENGLISH as second. Your application supports FRENCH and ENGLISH locale. The system locale is FRENCH. All works great for the localization of wicket components by usage of java properties fallback system. But what happens if you try to use the locale in session for your data-localization (db-access etc)? Session gets the locale from request which is getting it out of HTTP header Accept-Language. Because first locale is defined - CHINA is set to session. If i filter session locale as described in other thread i can see that CHINA is not supported. But i don't have a chance to get the other accepted locale (ENGLISH). There is a similiar discussion here http://issues.apache.org/struts/browse/STR-2351 . A solution would be to extract the accepted langauges myself from header and set default only if no supported locale is accepted by client-browser. But then i have to (re)-implement language extraction similiar to MockHttpServletRequest.getLocale(). But this breaks the famous Don't repeat yourself programmming rule :-). A much better approch would be to provide a list of supported locales in application settings. So the request could set in automatically and use Locale.getDefault() only on last exit. What do you think? Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket Component Overview
Hi, i did some wicket component diagram stuff (model, listener etc.) http://www.wicket-praxis.de/blog/2009/10/16/wicket-component-overview/ glad to see some reply on this.. mm:) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Open Source projects using Wicket
Nice app! If http://www.ehour.nl/ is written using Wicket itself, I see the same strange ;jsessionid= added to all pages after I upgraded to 1.4. while navigating and it does not remove. And google started to contain all links with this attribute. Does anybody knows what's the promlem is? -- Tony On Fri, Oct 16, 2009 at 5:11 PM, Thies Edeling tedel...@gmail.com wrote: eHour is using Wicket (1.3, not yet migrated to 1.4). Site at http://www.ehour.nl/ with the svn repo at http://svn.te-con.nl/repos/ehour/trunk Dave B wrote: Hi, I'm in the process of evaluating Wicket (after an arduous JSF project, that has made us re-evaluate our web platform.) I've read Wicket in Action and whole bunch of blog and mailing list posts, done some proof-of-concept work and am now interested in reading source code from a project using Wicket, since I want to see Wicket in the wild. I know Artifactory uses Wicket, but their Subversion access instructions seem to be out of date. Does anyone know of an open source project using Wicket, so that I can peruse the source code? Many thanks, Dave - 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
AW: AW: Null Model Error
can anyone tell me how to use the list-component model properly? - Ursprüngliche Mail Von: Peter Arnulf Lustig u...@yahoo.de An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:55:19 Uhr Betreff: AW: Null Model Error yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - 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: Wicket Component Overview
Thank you. Very useful diagrams. Und danke fürs pointing zum Graphviz. On Fri, Oct 16, 2009 at 11:40 AM, Michael Mosmann mich...@mosmann.de wrote: Hi, i did some wicket component diagram stuff (model, listener etc.) http://www.wicket-praxis.de/blog/2009/10/16/wicket-component-overview/ glad to see some reply on this.. mm:) - 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: Open Source projects using Wicket
It's the servlet container reverting to url rewrite since it cannot set the session cookie.. 2009/10/16 Anton Veretennikov anton.veretenni...@gmail.com Nice app! If http://www.ehour.nl/ is written using Wicket itself, I see the same strange ;jsessionid= added to all pages after I upgraded to 1.4. while navigating and it does not remove. And google started to contain all links with this attribute. Does anybody knows what's the promlem is? -- Tony On Fri, Oct 16, 2009 at 5:11 PM, Thies Edeling tedel...@gmail.com wrote: eHour is using Wicket (1.3, not yet migrated to 1.4). Site at http://www.ehour.nl/ with the svn repo at http://svn.te-con.nl/repos/ehour/trunk Dave B wrote: Hi, I'm in the process of evaluating Wicket (after an arduous JSF project, that has made us re-evaluate our web platform.) I've read Wicket in Action and whole bunch of blog and mailing list posts, done some proof-of-concept work and am now interested in reading source code from a project using Wicket, since I want to see Wicket in the wild. I know Artifactory uses Wicket, but their Subversion access instructions seem to be out of date. Does anyone know of an open source project using Wicket, so that I can peruse the source code? Many thanks, Dave - 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: Open Source projects using Wicket
I can't understand what do you mean, Nino? Cookies are set, I see them in browser. -- Tony On Fri, Oct 16, 2009 at 6:04 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: It's the servlet container reverting to url rewrite since it cannot set the session cookie.. 2009/10/16 Anton Veretennikov anton.veretenni...@gmail.com Nice app! If http://www.ehour.nl/ is written using Wicket itself, I see the same strange ;jsessionid= added to all pages after I upgraded to 1.4. while navigating and it does not remove. And google started to contain all links with this attribute. Does anybody knows what's the promlem is? -- Tony On Fri, Oct 16, 2009 at 5:11 PM, Thies Edeling tedel...@gmail.com wrote: eHour is using Wicket (1.3, not yet migrated to 1.4). Site at http://www.ehour.nl/ with the svn repo at http://svn.te-con.nl/repos/ehour/trunk Dave B wrote: Hi, I'm in the process of evaluating Wicket (after an arduous JSF project, that has made us re-evaluate our web platform.) I've read Wicket in Action and whole bunch of blog and mailing list posts, done some proof-of-concept work and am now interested in reading source code from a project using Wicket, since I want to see Wicket in the wild. I know Artifactory uses Wicket, but their Subversion access instructions seem to be out of date. Does anyone know of an open source project using Wicket, so that I can peruse the source code? Many thanks, Dave - 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: Howto accept other then first locale in HTTP header Accept-Language?
If you are using Apache + Mod-JK in front of your webapp, you can use mod_rewrite features to rewrite the HTTP headers and force the accepted language field to a value your application supports. Otherwise you can simply create a class that extends WebPage, then override the getLocale() method and make all your page extend this class : @Override public Locale getLocale() { // TODO Implement a locale mapping and fallback return super.getLocale(); } 2009/10/16 Per Newgro per.new...@gmx.ch A solution would be to extract the accepted langauges myself from header and set default only if no supported locale is accepted by client-browser. But then i have to (re)-implement language extraction similiar to MockHttpServletRequest.getLocale(). But this breaks the famous Don't repeat yourself programmming rule :-). A much better approch would be to provide a list of supported locales in application settings. So the request could set in automatically and use Locale.getDefault() only on last exit. What do you think? Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Open Source projects using Wicket
I don't have a prepared sample, but that's a great idea. I will put one together (perhaps with Iolite). // Daniel jalbum.net Daniel do you have any sample code for this. Could be cool with a small quickstart, you could even use the Iolite for this, and drop it's ldms... 2009/10/16 Daniel Frisk dan...@jalbum.net Of course, serialization isn't always necessary but in this case the idea was to _enforce_ serialization. The cost of serialization compared to the actual page construction time (often with database accesses and such) seems to often be very small. Scalability is the same as for using explicit LDMs in your code. Once you have set it up you can never forget to detach stuff and end up with an overstuffed session. You don't have to serialize to disk either you can keep the data in memory or in your Terracotta cluster or whatever. I think it has clear advantages to explicit model proxies. Models proxies are still necessary in some cases, but usually you can just put an entity in your component and it will work as if you had used LDMs. I'm not saying this is a golden... But it's a really nice alternative in many cases. // Daniel jalbum.net probably because serialization is not guaranteed. you can use a http session store on a single node cluster and never have anything serialized. -igor A third option, which from my POV is perhaps the most elegant, is to roll your own page store that serializes the pages instantly after the request. The serialization have special hooks to replace entites or whatever that you would prefer to have as LDM with a placeholder that just stores the type and id when serialized. When/if the page is later deserialized you get the entity fresh from your object repository (cache). Why is this elegant? You get the programming model of push with the benefits of pull without writing any code for model proxies. I have communicated this idea before but nobody but me seems to prefer it, I'm actually surprised :-) // Daniel jalbum.net - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxFallbackButton doesn't update ajax components when validation fails?
Thanks, Ernesto! I'll try this ASAP! reiern70 wrote: Just one idea... add some AjaxBehaivior that updates altitude field in event onchange. So, that even if validation fails you already have your altitude updated... Best, Ernesto -- View this message in context: http://www.nabble.com/AjaxFallbackButton-doesn%27t-update-ajax-components-when-validation-fails--tp25921313p25923585.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: AW: Null Model Error
You have a list of tagging keys that user can select and a render to it, but you don't have an model to receive the selection made on component. Consider to use this contructor parsing an putTheUserSelectionHereModel http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/ListMultipleChoice.html#ListMultipleChoice%28java.lang.String,%20org.apache.wicket.model.IModel,%20org.apache.wicket.model.IModel,%20org.apache.wicket.markup.html.form.IChoiceRenderer%29 On Fri, Oct 16, 2009 at 6:52 AM, Peter Arnulf Lustig u...@yahoo.dewrote: can anyone tell me how to use the list-component model properly? - Ursprüngliche Mail Von: Peter Arnulf Lustig u...@yahoo.de An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:55:19 Uhr Betreff: AW: Null Model Error yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - 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 -- Pedro Henrique Oliveira dos Santos
Re: Open Source projects using Wicket
Hi Daniel! Your idea sounds quite reasonable to me. Have you got any demo code? Regards, chriss Daniel Frisk wrote: A third option, which from my POV is perhaps the most elegant, is to roll your own page store that serializes the pages instantly after the request. The serialization have special hooks to replace entites or whatever that you would prefer to have as LDM with a placeholder that just stores the type and id when serialized. When/if the page is later deserialized you get the entity fresh from your object repository (cache). Why is this elegant? You get the programming model of push with the benefits of pull without writing any code for model proxies. I have communicated this idea before but nobody but me seems to prefer it, I'm actually surprised :-) // Daniel jalbum.net -- View this message in context: http://www.nabble.com/Open-Source-projects-using-Wicket-tp25917713p25923855.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: Howto accept other then first locale in HTTP header Accept-Language?
Hi Olivier, isn't mod_jk a bit heavyweight for this little usecase? I like the locale usage of wicket. It is like magic and i don't have to worry about it. All i want to add to my application is the check for a supported locale on session startup. But thanks anyway. Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: AW: Null Model Error
wow - great information But how can I create / define such a model -- I can't find anything in the wicket examples! - Ursprüngliche Mail Von: Pedro Santos pedros...@gmail.com An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 13:24:45 Uhr Betreff: Re: AW: Null Model Error You have a list of tagging keys that user can select and a render to it, but you don't have an model to receive the selection made on component. Consider to use this contructor parsing an putTheUserSelectionHereModel http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/ListMultipleChoice.html#ListMultipleChoice%28java.lang.String,%20org.apache.wicket.model.IModel,%20org.apache.wicket.model.IModel,%20org.apache.wicket.markup.html.form.IChoiceRenderer%29 On Fri, Oct 16, 2009 at 6:52 AM, Peter Arnulf Lustig u...@yahoo.dewrote: can anyone tell me how to use the list-component model properly? - Ursprüngliche Mail Von: Peter Arnulf Lustig u...@yahoo.de An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:55:19 Uhr Betreff: AW: Null Model Error yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - 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 -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AW: Null Model Error
at javadoc: IModeljava.util.CollectionT model But how can I create / define such a model ? I have used org.apache.wicket.model.Model in one project for example like: new ListMultipleChoice(id, new Model(), choises, render) On Fri, Oct 16, 2009 at 9:00 AM, Peter Arnulf Lustig u...@yahoo.dewrote: wow - great information But how can I create / define such a model -- I can't find anything in the wicket examples! - Ursprüngliche Mail Von: Pedro Santos pedros...@gmail.com An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 13:24:45 Uhr Betreff: Re: AW: Null Model Error You have a list of tagging keys that user can select and a render to it, but you don't have an model to receive the selection made on component. Consider to use this contructor parsing an putTheUserSelectionHereModel http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/ListMultipleChoice.html#ListMultipleChoice%28java.lang.String,%20org.apache.wicket.model.IModel,%20org.apache.wicket.model.IModel,%20org.apache.wicket.markup.html.form.IChoiceRenderer%29 On Fri, Oct 16, 2009 at 6:52 AM, Peter Arnulf Lustig u...@yahoo.de wrote: can anyone tell me how to use the list-component model properly? - Ursprüngliche Mail Von: Peter Arnulf Lustig u...@yahoo.de An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:55:19 Uhr Betreff: AW: Null Model Error yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - 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 -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
DropDownChoice and null value internationalization key
Hi all, The DropDownChoice and overall AbstractSingleSelectChoice does not allow to specify the internationalization key for null nor nullValid values. Instead it laies down the management of those keys with getId() + .null. I suggest a very small enhancement to externalize the building of these keys in 2 protected methods getNullKey() and getNullValidKey() (the names don't really matter) and call them in the AbstractSingleSelectChoice.getDefaultChoice(Object) method. It won't disturb the actual running and allows developper to organize their keys as they like in order to help translators know what keys are about (with prefix for example). For now this is not possible, or we have to change component ids ... Here are the 2 methods : protected String getNullValidKey() { return getId() + .nullValid; } protected String getNullKey() { return getId() + .null; } If ok, I can create a JIRA enhancement with the full patch. Thanks
AW: AW: Null Model Error
I thank you very much! - Ursprüngliche Mail Von: Pedro Santos pedros...@gmail.com An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 14:13:46 Uhr Betreff: Re: AW: Null Model Error at javadoc: IModeljava.util.CollectionT model But how can I create / define such a model ? I have used org.apache.wicket.model.Model in one project for example like: new ListMultipleChoice(id, new Model(), choises, render) On Fri, Oct 16, 2009 at 9:00 AM, Peter Arnulf Lustig u...@yahoo.dewrote: wow - great information But how can I create / define such a model -- I can't find anything in the wicket examples! - Ursprüngliche Mail Von: Pedro Santos pedros...@gmail.com An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 13:24:45 Uhr Betreff: Re: AW: Null Model Error You have a list of tagging keys that user can select and a render to it, but you don't have an model to receive the selection made on component. Consider to use this contructor parsing an putTheUserSelectionHereModel http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/ListMultipleChoice.html#ListMultipleChoice%28java.lang.String,%20org.apache.wicket.model.IModel,%20org.apache.wicket.model.IModel,%20org.apache.wicket.markup.html.form.IChoiceRenderer%29 On Fri, Oct 16, 2009 at 6:52 AM, Peter Arnulf Lustig u...@yahoo.de wrote: can anyone tell me how to use the list-component model properly? - Ursprüngliche Mail Von: Peter Arnulf Lustig u...@yahoo.de An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:55:19 Uhr Betreff: AW: Null Model Error yes -- I do this here: choices = Model.of((ListInteger) new ArrayListInteger(tagging.keySet())); - Ursprüngliche Mail Von: Md. Jahid Shohel ja...@outscore.se An: users@wicket.apache.org Gesendet: Freitag, den 16. Oktober 2009, 9:53:01 Uhr Betreff: Re: Null Model Error you need to set the model for the list. On Fri, 2009-10-16 at 07:33 +, Peter Arnulf Lustig wrote: choices, - 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 -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Open Source projects using Wicket
push: new Model(myObject), which will keep a reference to the object for the entire life span of the component pull: new LoadableDetachableModel() { protected Object load() { return someService.getItFromSomewhereElse(); } } The difference is that with pull, you need to know the model object when creating the model, and pass it to that model right then, while with pull models you rather store the calculation to get a model object. Examples of the latter are LoadableDetachableModel and PropertyModel. Eelco On Fri, Oct 16, 2009 at 5:23 AM, Swanthe Lindgren swanthe.lindg...@megasol.se wrote: I dont really get what you mean by pushing and pulling models. Could you please give me an example? Is creating a component without providing a model, relying in the parent page/panel/component's default model pushing data? //Swanthe Jeremy Thomerson wrote: Sorry, that was an overly terse statement. Peter Thomas has put a lot of work into JTrac, and has done a lot of things that I admire (for instance, some of his performance testing blog entries, etc). He is also very helpful on the mailing list. The reason I said not to look at it is that when I was using it, I found that nearly all of the components were created without the use of models - pushing data into the component rather than making it pull from a model. While that works fine for a small bug tracker, it would not work well in most enterprise applications - leading to performance and potentially memory issues. It's not that it's bad software - but I've taught enough training classes to see that one of the most common pitfalls to those new to Wicket is to always push data into the models. This works fine in some instances, but is not a best practice and can lead to a lot of problems later if you don't know what you're doing. That's why I said what I did. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 15, 2009 at 7:29 PM, Dave B d...@davebolton.net wrote: Any particular reason? Form a (very) cursory ten minute look, the lack of tests was glaring, though not an indictment of the actual Wicket usage. Thanks, Dave On Fri, Oct 16, 2009 at 11:04 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Don't look at jtrac. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 15, 2009 at 6:42 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: keeping that in mind, i wouldnt look at brix, most wicket-related code there has to do with plumbing and implementing a development model that is unlike wicket but works better for cmses. maybe look at http://www.jtrac.info/ , i think that uses wicket... -igor On Thu, Oct 15, 2009 at 4:40 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Beware - just like any other app, OS or not, you will find OS projects out there that will teach you all kind of wrong ways to use Wicket. I know of a couple because I tried to use them, thinking they would be easier to build on because they used Wicket. But they were so poorly written that it would be a bad place for someone new to the framework to start. http://code.google.com/p/brix-cms/ was written by some of the core committers, so the Wicket code in it will be good. Not sure how much of the code is actually Wicket specific, though. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 15, 2009 at 6:35 PM, Dave B d...@davebolton.net wrote: Hi, I'm in the process of evaluating Wicket (after an arduous JSF project, that has made us re-evaluate our web platform.) I've read Wicket in Action and whole bunch of blog and mailing list posts, done some proof-of-concept work and am now interested in reading source code from a project using Wicket, since I want to see Wicket in the wild. I know Artifactory uses Wicket, but their Subversion access instructions seem to be out of date. Does anyone know of an open source project using Wicket, so that I can peruse the source code? Many thanks, Dave - 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
Localization of values coming from my Model
I am trying to display a page using my CompoundPropertyModel however some of the values coming from the model need to be localized before displaying to the user. This is being done inside of a wizard step. For example: My model has the following properties String gender boolean active Gender is either male or female I have a getter in my object which is getActiveString which returns Yes or No based on the T/F of the Boolean.public String getActiveString() {if (active) { return Yes;} else {return No;}} The html is: span wicket:id=gender/span span wicket:id=activeString/span The java code is: add(new Label(gender)); add(new Label(activeString)); The issue is that I need to localize the gender value. The activeString also needs to be localized. How would one do this? I need to store the values in the model as they are since it is being persisted to a db. However for certain users the data needs to be shown in their particular language when presented on the page. Any ideas? BTW... thanks you all for your previous help. I am finally in the final steps of development for my project. Thanks.
Re: DropDownChoice and null value internationalization key
sorry, i dont really understand... you want to change the name of the keys because you do not like the null and nullValid terms? or do you want to change them globally? in which case you can have the null and nullValid keys defined in your MyApplication.properties. -igor On Fri, Oct 16, 2009 at 5:30 AM, Guillaume Mary guillaume.m...@interview-efm.com wrote: Hi all, The DropDownChoice and overall AbstractSingleSelectChoice does not allow to specify the internationalization key for null nor nullValid values. Instead it laies down the management of those keys with getId() + .null. I suggest a very small enhancement to externalize the building of these keys in 2 protected methods getNullKey() and getNullValidKey() (the names don't really matter) and call them in the AbstractSingleSelectChoice.getDefaultChoice(Object) method. It won't disturb the actual running and allows developper to organize their keys as they like in order to help translators know what keys are about (with prefix for example). For now this is not possible, or we have to change component ids ... Here are the 2 methods : protected String getNullValidKey() { return getId() + .nullValid; } protected String getNullKey() { return getId() + .null; } If ok, I can create a JIRA enhancement with the full patch. Thanks - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Localization of values coming from my Model
Why don't you use special model for each component? Because this is very specific thing - CompoundPropertyModel is not supposed for this kind of model value's processing stuff. For example for activeString: add(new Label(activeString, new AbstractReadOnlyModelString() { @Override public String getObject() { return getString(yourModel.getActiveString()); } })); Anyway if you want it you can still write your own implementation of CompoundPropertyModel... -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] Sent: Friday, October 16, 2009 4:36 PM To: users@wicket.apache.org Subject: Localization of values coming from my Model I am trying to display a page using my CompoundPropertyModel however some of the values coming from the model need to be localized before displaying to the user. This is being done inside of a wizard step. For example: My model has the following properties String gender boolean active Gender is either male or female I have a getter in my object which is getActiveString which returns Yes or No based on the T/F of the Boolean.public String getActiveString() {if (active) { return Yes;} else {return No;}} The html is: span wicket:id=gender/span span wicket:id=activeString/span The java code is: add(new Label(gender)); add(new Label(activeString)); The issue is that I need to localize the gender value. The activeString also needs to be localized. How would one do this? I need to store the values in the model as they are since it is being persisted to a db. However for certain users the data needs to be shown in their particular language when presented on the page. Any ideas? BTW... thanks you all for your previous help. I am finally in the final steps of development for my project. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Localization of values coming from my Model
I tried this and it seems to work. Is this a correct way of doing it? Label gender = new Label(gender, new StringResourceModel(${gender}, this, model)); add(gender); Obviously the StringResourceModel uses the property file for the page. Thanks. -Original Message- From: Bernhard Michal [mailto:michal.bernh...@tigra.cz] Sent: Friday, October 16, 2009 1:39 PM To: users@wicket.apache.org Subject: RE: Localization of values coming from my Model Why don't you use special model for each component? Because this is very specific thing - CompoundPropertyModel is not supposed for this kind of model value's processing stuff. For example for activeString: add(new Label(activeString, new AbstractReadOnlyModelString() { @Override public String getObject() { return getString(yourModel.getActiveString()); } })); Anyway if you want it you can still write your own implementation of CompoundPropertyModel... -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] Sent: Friday, October 16, 2009 4:36 PM To: users@wicket.apache.org Subject: Localization of values coming from my Model I am trying to display a page using my CompoundPropertyModel however some of the values coming from the model need to be localized before displaying to the user. This is being done inside of a wizard step. For example: My model has the following properties String gender boolean active Gender is either male or female I have a getter in my object which is getActiveString which returns Yes or No based on the T/F of the Boolean.public String getActiveString() {if (active) { return Yes;} else {return No;}} The html is: span wicket:id=gender/span span wicket:id=activeString/span The java code is: add(new Label(gender)); add(new Label(activeString)); The issue is that I need to localize the gender value. The activeString also needs to be localized. How would one do this? I need to store the values in the model as they are since it is being persisted to a db. However for certain users the data needs to be shown in their particular language when presented on the page. Any ideas? BTW... thanks you all for your previous help. I am finally in the final steps of development for my project. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Localization of values coming from my Model
It doesn't seem correct... StringResourceModel expect string which is supposed to be resource key to find localization in resource bundle. I recommend you to read http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications .html. -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] I tried this and it seems to work. Is this a correct way of doing it? Label gender = new Label(gender, new StringResourceModel(${gender}, this, model)); add(gender); Obviously the StringResourceModel uses the property file for the page. -Original Message- From: Bernhard Michal [mailto:michal.bernh...@tigra.cz] Why don't you use special model for each component? Because this is very specific thing - CompoundPropertyModel is not supposed for this kind of model value's processing stuff. For example for activeString: add(new Label(activeString, new AbstractReadOnlyModelString() { @Override public String getObject() { return getString(yourModel.getActiveString()); } })); Anyway if you want it you can still write your own implementation of CompoundPropertyModel... -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] I am trying to display a page using my CompoundPropertyModel however some of the values coming from the model need to be localized before displaying to the user. This is being done inside of a wizard step. For example: My model has the following properties String gender boolean active Gender is either male or female I have a getter in my object which is getActiveString which returns Yes or No based on the T/F of the Boolean.public String getActiveString() {if (active) { return Yes;} else {return No;}} The html is: span wicket:id=gender/span span wicket:id=activeString/span The java code is: add(new Label(gender)); add(new Label(activeString)); The issue is that I need to localize the gender value. The activeString also needs to be localized. How would one do this? I need to store the values in the model as they are since it is being persisted to a db. However for certain users the data needs to be shown in their particular language when presented on the page. Any ideas? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Open Source projects using Wicket
Are you using a proxy server like apache? Usually when the jsessionid are appended, it is because the servlet container was unable to set the cookie then it tries url rewriting.. But it should have nothing todo with wicket versions.. 2009/10/16 Anton Veretennikov anton.veretenni...@gmail.com I can't understand what do you mean, Nino? Cookies are set, I see them in browser. -- Tony On Fri, Oct 16, 2009 at 6:04 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: It's the servlet container reverting to url rewrite since it cannot set the session cookie.. 2009/10/16 Anton Veretennikov anton.veretenni...@gmail.com Nice app! If http://www.ehour.nl/ is written using Wicket itself, I see the same strange ;jsessionid= added to all pages after I upgraded to 1.4. while navigating and it does not remove. And google started to contain all links with this attribute. Does anybody knows what's the promlem is? -- Tony On Fri, Oct 16, 2009 at 5:11 PM, Thies Edeling tedel...@gmail.com wrote: eHour is using Wicket (1.3, not yet migrated to 1.4). Site at http://www.ehour.nl/ with the svn repo at http://svn.te-con.nl/repos/ehour/trunk Dave B wrote: Hi, I'm in the process of evaluating Wicket (after an arduous JSF project, that has made us re-evaluate our web platform.) I've read Wicket in Action and whole bunch of blog and mailing list posts, done some proof-of-concept work and am now interested in reading source code from a project using Wicket, since I want to see Wicket in the wild. I know Artifactory uses Wicket, but their Subversion access instructions seem to be out of date. Does anyone know of an open source project using Wicket, so that I can peruse the source code? Many thanks, Dave - 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: Open Source projects using Wicket
Mail me if you need some help.. 2009/10/16 Daniel Frisk dan...@jalbum.net I don't have a prepared sample, but that's a great idea. I will put one together (perhaps with Iolite). // Daniel jalbum.net Daniel do you have any sample code for this. Could be cool with a small quickstart, you could even use the Iolite for this, and drop it's ldms... 2009/10/16 Daniel Frisk dan...@jalbum.net Of course, serialization isn't always necessary but in this case the idea was to _enforce_ serialization. The cost of serialization compared to the actual page construction time (often with database accesses and such) seems to often be very small. Scalability is the same as for using explicit LDMs in your code. Once you have set it up you can never forget to detach stuff and end up with an overstuffed session. You don't have to serialize to disk either you can keep the data in memory or in your Terracotta cluster or whatever. I think it has clear advantages to explicit model proxies. Models proxies are still necessary in some cases, but usually you can just put an entity in your component and it will work as if you had used LDMs. I'm not saying this is a golden... But it's a really nice alternative in many cases. // Daniel jalbum.net probably because serialization is not guaranteed. you can use a http session store on a single node cluster and never have anything serialized. -igor A third option, which from my POV is perhaps the most elegant, is to roll your own page store that serializes the pages instantly after the request. The serialization have special hooks to replace entites or whatever that you would prefer to have as LDM with a placeholder that just stores the type and id when serialized. When/if the page is later deserialized you get the entity fresh from your object repository (cache). Why is this elegant? You get the programming model of push with the benefits of pull without writing any code for model proxies. I have communicated this idea before but nobody but me seems to prefer it, I'm actually surprised :-) // Daniel jalbum.net - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Localization of values coming from my Model
Then is the javadoc wrong? This was taken right from the javadoc? http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wic ket/model/StringResourceModel.html === Example 2 In this example, the resource key is selected based on the evaluation of a property expression: public MyPage extends WebPage { public MyPage(final PageParameters parameters) { WeatherStation ws = new WeatherStation(); add(new Label(weatherMessage, new StringResourceModel(weather.${currentStatus}, this, new Model(ws))); } } Which will call the WeatherStation.getCurrentStatus() method each time the string resource model is used and where the resource bundle for the page contains the entries: weather.sunny=Don't forget sunscreen! weather.raining=You might need an umbrella weather.snowing=Got your skis? weather.overcast=Best take a coat to be safe -Original Message- From: Bernhard Michal [mailto:michal.bernh...@tigra.cz] Sent: Friday, October 16, 2009 2:15 PM To: users@wicket.apache.org Subject: RE: Localization of values coming from my Model It doesn't seem correct... StringResourceModel expect string which is supposed to be resource key to find localization in resource bundle. I recommend you to read http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications .html. -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] I tried this and it seems to work. Is this a correct way of doing it? Label gender = new Label(gender, new StringResourceModel(${gender}, this, model)); add(gender); Obviously the StringResourceModel uses the property file for the page. -Original Message- From: Bernhard Michal [mailto:michal.bernh...@tigra.cz] Why don't you use special model for each component? Because this is very specific thing - CompoundPropertyModel is not supposed for this kind of model value's processing stuff. For example for activeString: add(new Label(activeString, new AbstractReadOnlyModelString() { @Override public String getObject() { return getString(yourModel.getActiveString()); } })); Anyway if you want it you can still write your own implementation of CompoundPropertyModel... -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] I am trying to display a page using my CompoundPropertyModel however some of the values coming from the model need to be localized before displaying to the user. This is being done inside of a wizard step. For example: My model has the following properties String gender boolean active Gender is either male or female I have a getter in my object which is getActiveString which returns Yes or No based on the T/F of the Boolean.public String getActiveString() {if (active) { return Yes;} else {return No;}} The html is: span wicket:id=gender/span span wicket:id=activeString/span The java code is: add(new Label(gender)); add(new Label(activeString)); The issue is that I need to localize the gender value. The activeString also needs to be localized. How would one do this? I need to store the values in the model as they are since it is being persisted to a db. However for certain users the data needs to be shown in their particular language when presented on the page. Any ideas? - 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
Strong Password Validation using Ajax (with Fallback)
Hello, Is there such a thing as a Strong Password Validator? I found a jquery plugin which is nice: http://bassistance.de/jquery-plugins/jquery-plugin-password-validation/ But it lacks the serverside Java implementation and i18n. Does anyone know of such a component? The code isn't that complex, but if it is already there why implement it yourself. thx Bernhard - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Open Source projects using Wicket
I started working with Wicket just a week ago in order to develop a junit extension for integration testing called Mistletoe. See http://mistletoe.qos.ch for details. Mistletoe's design imposes a strict separation between the data-model layer and the presentation layer. I am mentioning this because after designing the data-later, I started writing the presentation layer using Wicket. It's was a very pleasant experience. Wicket just clicked in my mind. By the way, wicket encouraged me to re-design my data-model slightly and I am quite happy with the results. *After* the wicket implementation, I did a simpler implementation of the presentation later using servlets (without any .jsp files). Given the experience of the wicket-based implementation, the servlet-based version was pretty straightforward, thanks to wicket's component-based architecture. For small projects, I now know for certain that it is possible to create a web-application quickly and cleanly. I do not have experience with larger projects. Dave B wrote: Hi, I'm in the process of evaluating Wicket (after an arduous JSF project, that has made us re-evaluate our web platform.) I've read Wicket in Action and whole bunch of blog and mailing list posts, done some proof-of-concept work and am now interested in reading source code from a project using Wicket, since I want to see Wicket in the wild. I know Artifactory uses Wicket, but their Subversion access instructions seem to be out of date. Does anyone know of an open source project using Wicket, so that I can peruse the source code? Many thanks, Dave -- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Strong Password Validation using Ajax (with Fallback)
I don't think you want to validate passwords by sending them to the server multiple times. Ryan Gravener http://bit.ly/no_word_docs On Fri, Oct 16, 2009 at 2:31 PM, Bernhard Grünewaldt bernh...@gruenewaldt.net wrote: Hello, Is there such a thing as a Strong Password Validator? I found a jquery plugin which is nice: http://bassistance.de/jquery-plugins/jquery-plugin-password-validation/ But it lacks the serverside Java implementation and i18n. Does anyone know of such a component? The code isn't that complex, but if it is already there why implement it yourself. thx Bernhard - 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: Open Source projects using Wicket
When I wrote: it is possible to create a web-application quickly and cleanly, I meant to say that was possible to create a web-application quickly and cleanly *with* *Wicket*. Ceki Gulcu wrote: I started working with Wicket just a week ago in order to develop a junit extension for integration testing called Mistletoe. See http://mistletoe.qos.ch for details. Mistletoe's design imposes a strict separation between the data-model layer and the presentation layer. I am mentioning this because after designing the data-later, I started writing the presentation layer using Wicket. It's was a very pleasant experience. Wicket just clicked in my mind. By the way, wicket encouraged me to re-design my data-model slightly and I am quite happy with the results. *After* the wicket implementation, I did a simpler implementation of the presentation later using servlets (without any .jsp files). Given the experience of the wicket-based implementation, the servlet-based version was pretty straightforward, thanks to wicket's component-based architecture. For small projects, I now know for certain that it is possible to create a web-application quickly and cleanly. I do not have experience with larger projects. Dave B wrote: Hi, I'm in the process of evaluating Wicket (after an arduous JSF project, that has made us re-evaluate our web platform.) I've read Wicket in Action and whole bunch of blog and mailing list posts, done some proof-of-concept work and am now interested in reading source code from a project using Wicket, since I want to see Wicket in the wild. I know Artifactory uses Wicket, but their Subversion access instructions seem to be out of date. Does anyone know of an open source project using Wicket, so that I can peruse the source code? Many thanks, Dave -- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Open Source projects using Wicket
Hi, i've been working with Wicket for a while. It is not my primary job, but i've implemented some ideas at http://www.xaloon.org/blog such as: * enhanced @MountPage annotation in order to generate sitemap.xml for google, dynamic menu with spring security * VirtualPageFactory - to mount panels as pages * other additional stuff Currently i am working on open source sports betting component: http://www.xaloon.org/blog/xaloon-sports-betting-open-source-sports-component-for-apache-wicket First release may be found at http://www.leenle.com Since it is my first email to this group this might sound like introduction of myself :) Dave B wrote: Hi, I'm in the process of evaluating Wicket (after an arduous JSF project, that has made us re-evaluate our web platform.) I've read Wicket in Action and whole bunch of blog and mailing list posts, done some proof-of-concept work and am now interested in reading source code from a project using Wicket, since I want to see Wicket in the wild. I know Artifactory uses Wicket, but their Subversion access instructions seem to be out of date. Does anyone know of an open source project using Wicket, so that I can peruse the source code? Many thanks, Dave -- Regards, Vytautas Racelis --- phone:+370-600-34389 e-mail: turi...@gmail.com www.xaloon.org www.leenle.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Open Source projects using Wicket
Nice site, it was deployed in development mode and has a nice performance :) On Fri, Oct 16, 2009 at 5:16 PM, Vytautas Racelis turi...@gmail.com wrote: Hi, i've been working with Wicket for a while. It is not my primary job, but i've implemented some ideas at http://www.xaloon.org/blog such as: * enhanced @MountPage annotation in order to generate sitemap.xml for google, dynamic menu with spring security * VirtualPageFactory - to mount panels as pages * other additional stuff Currently i am working on open source sports betting component: http://www.xaloon.org/blog/xaloon-sports-betting-open-source-sports-component-for-apache-wicket First release may be found at http://www.leenle.com Since it is my first email to this group this might sound like introduction of myself :) Dave B wrote: Hi, I'm in the process of evaluating Wicket (after an arduous JSF project, that has made us re-evaluate our web platform.) I've read Wicket in Action and whole bunch of blog and mailing list posts, done some proof-of-concept work and am now interested in reading source code from a project using Wicket, since I want to see Wicket in the wild. I know Artifactory uses Wicket, but their Subversion access instructions seem to be out of date. Does anyone know of an open source project using Wicket, so that I can peruse the source code? Many thanks, Dave -- Regards, Vytautas Racelis --- phone:+370-600-34389 e-mail: turi...@gmail.com www.xaloon.org www.leenle.com - 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: Reporting Framework Wicket
I have to admit, I've never used Jasper or NexReports, so I'm not sure I follow all of this.. On Oct 15, 2009, at 10:14 AM, Decebal Suiu wrote: Hello, We use Wicket with NextReports (http://www.next-reports.com/) and Jasper. Basically, in Wicket you will have logic for the form that will fill report parameters. For Jasper we also have a logic for edit parameters (we added more functionality to parameter definition that we could not find in any jasper designer tool). Depending on how parameters are defined (in your report designer tool) you may have to add the following business : - chained parameters (to fill children parameters if parent parameters are selected) - default values (fill default values for parameters) - hidden parameters (parameters which are substituted with their values when the report is ran by human process or by scheduler process) After the parameter values selection process , you will just have to use the api offered by your reporting framework. For example in Next it is simple as this : FluentReportRunner.report(report) .connectTo(connection) .withQueryTimeout(60) .withParameterValues(createParameterValues()) .formatAs(ReportRunner.HTML_FORMAT) .run(stream); Douglas Ferguson-2 wrote: Hey, I'm starting to look into reporting frameworks and was curious if anybody had successfully integrated with wicket? Are there any off the shelf integrations or will I have to roll my own? D/ - 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://www.nabble.com/Reporting-Framework---Wicket-tp25894303p25910426.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org