Re: Wicket 1.5-M3 migration experiences
So basically you need org.apache.wicket.request.resource.PackageResource.getResourceStream() to become protected, right ? This way you can wrap super.getResourceStream() with compressing one. That would be awesome, yes. Hielke
Re: Wicket 1.5-M3 migration experiences
Since wiquery are our friends I did it without a ticket: r1050350 ;-) Enjoy On Fri, Dec 17, 2010 at 12:13 PM, Hielke Hoeve hielke.ho...@gmail.comwrote: So basically you need org.apache.wicket.request.resource.PackageResource.getResourceStream() to become protected, right ? This way you can wrap super.getResourceStream() with compressing one. That would be awesome, yes. Hielke
Re: Modify Attribute on DataView HTML Element
I also got it to work by using a wicket:container and a WebMarkupContainer HTML wicket:container wicket:id=dataview div wicket:id=wmc id=dynamic span wicket:id=myLabel / /div /wicket:container JAVA new DataViewPOJO(dataview, dataProvider) { protected void populateItem(ItemPOJO item) { WebMarkupContainer wmc = new WebMarkupContainer(wmc) { protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put(id, dynamicValue); } }; item.add(wmc); wmc.add(new Label(myLabel, item.getModelObject().getValue())); } } Is one way better than the other? On Thu, Dec 16, 2010 at 6:51 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: item.add(new AttributeModifier(attr, true, value)); dataview#oncomponenttag doesn't do anything since the dataview repeats its markup with a listitem. the list item#oncomponenttag actually receives the markup tag. Martijn On Thu, Dec 16, 2010 at 10:04 PM, Matt Schmidt mschmid...@gmail.com wrote: I'm trying to modify an attribute on the HTML element that goes with my DataView: HTML div wicket:id=dataview id=dynamic span wicket:id=myLabel / /div JAVA new DataViewPOJO(dataview, dataProvider) { protected void populateItem(ItemPOJO item) { item.add(new Label(myLabel, item.getModelObject().getValue())); } protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put(id, dynamicValue); } } I thought this would do it, but I never even hit DataView.onComponentTag(). Any other suggestions? -Matt -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Modify Attribute on DataView HTML Element
Your solution holds some unneccessary code/markup (a whole component) while Martijns approach is straight to the point. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to emulate an ajax-response with Wicket?
I've uploaded one to http://db.tt/VX3S5WL When you change de drop down value, wicketAjaxPost asks for [/ajaxresponse/localAjaxResponse?random=0.35342031461186707] and receives: ajax-responseredirect![CDATA[localAjaxResponse/random/0.35342031461186707]]/redirect/ajax-response The drop down doesn't change and you are redirected to [/ajaxresponse/localAjaxResponse/random/0.35342031461186707]. That explains why the browser it's redirected to the wrong webapp when localAjaxResponse is in another webapp. I don't know if I should try to change that behavior or look for another way to do this. Thank you in advance. On Thu, Dec 16, 2010 at 9:08 PM, Bruno Borges bruno.bor...@gmail.com wrote: Could you provide a wicket quickstart application with such case? Bruno Borges www.brunoborges.com.br +55 21 76727099 The glory of great men should always be measured by the means they have used to acquire it. - Francois de La Rochefoucauld - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[1,5]Error msg from Model?
Should the below add an error message to the stack, it does not: Session.get().error(Queue not found please select another); Are here a better way? regards Nino
Re: [1,5]Error msg from Model?
It should. There are no changes in that area, except that now all 'debug methods accept Serializable instead of String, but this is backward compatible On Fri, Dec 17, 2010 at 4:15 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Should the below add an error message to the stack, it does not: Session.get().error(Queue not found please select another); Are here a better way? regards Nino
Re: [1,5]Error msg from Model?
Hmm then there might be a problem, I have a model used for a dropdown, inside that I do mentioned earlier in the thread, no message on the page and no message in the log about unrendered messages... 2010/12/17 Martin Grigorov mgrigo...@apache.org It should. There are no changes in that area, except that now all 'debug methods accept Serializable instead of String, but this is backward compatible On Fri, Dec 17, 2010 at 4:15 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Should the below add an error message to the stack, it does not: Session.get().error(Queue not found please select another); Are here a better way? regards Nino
Re: Announcing the Topicus Dashboard
@Martijn - I work at Atlassian and was one of the organizers of the campaign. Thanks for your *awesome* entry and I appreciate your critiques below. :) We did think about the problem of the community vote favoring the early entries. Our rationale for having submissions and entries end at the same time included a couple factors: * Timing: Due to internal timing constraints we knew the 4 week contest was going to bump up against Thanksgiving, where a lot of US-based participants would be out of town. * Inevitability: Even a week or two extra could be too little to overcome an early leader. So, like any community vote (e.g. http://musicmachinery.com/2009/04/27/moot-wins-time-inc-loses/ Moot's gaming of the Time Poll ), it's often an imperfect balance. * Non-voting categories: We made the community prize the least significant and included two other judge-ranked categories to incentivize entrants and reduce the impact of community voting / timing. * Simplicity: We felt that entrants would most excited about sharing their entry when they submitted it, and for those not interested in a vote rush, it could've dragged out the campaign. As for how it ended up - the winner of the community award Walle-D entered the contest about halfway through and upset early favorite Willow Creek (who had a two week head-start). So the simultaneous deadline didn't end up being a impossible barrier. That all said, we're listening to everyone's feedback and promise to do a better job next time. Feel free to hit me up @ jlambe at atlassian dot com with any other thoughts. P.S. It doesn't look like you filled out the https://atlassian.wufoo.com/forms/the-ultimate-wallboard-tshirt/ Ultimate Wallboard t-shirt form - I'd be willing to let you enter late if you want a shirt - but you'll have to hustle and get it in today! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Announcing-the-Topicus-Dashboard-tp3058300p3092976.html Sent from the Users forum 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: Announcing the Topicus Dashboard
You should do it American Idol style. Don't let anyone vote until all contestants have had a chance to sing. Martijn, start practicing your singing for next year! :) On Fri, Dec 17, 2010 at 1:49 PM, Joe Lambe jla...@atlassian.com wrote: @Martijn - I work at Atlassian and was one of the organizers of the campaign. Thanks for your *awesome* entry and I appreciate your critiques below. :) We did think about the problem of the community vote favoring the early entries. Our rationale for having submissions and entries end at the same time included a couple factors: * Timing: Due to internal timing constraints we knew the 4 week contest was going to bump up against Thanksgiving, where a lot of US-based participants would be out of town. * Inevitability: Even a week or two extra could be too little to overcome an early leader. So, like any community vote (e.g. http://musicmachinery.com/2009/04/27/moot-wins-time-inc-loses/ Moot's gaming of the Time Poll ), it's often an imperfect balance. * Non-voting categories: We made the community prize the least significant and included two other judge-ranked categories to incentivize entrants and reduce the impact of community voting / timing. * Simplicity: We felt that entrants would most excited about sharing their entry when they submitted it, and for those not interested in a vote rush, it could've dragged out the campaign. As for how it ended up - the winner of the community award Walle-D entered the contest about halfway through and upset early favorite Willow Creek (who had a two week head-start). So the simultaneous deadline didn't end up being a impossible barrier. That all said, we're listening to everyone's feedback and promise to do a better job next time. Feel free to hit me up @ jlambe at atlassian dot com with any other thoughts. P.S. It doesn't look like you filled out the https://atlassian.wufoo.com/forms/the-ultimate-wallboard-tshirt/ Ultimate Wallboard t-shirt form - I'd be willing to let you enter late if you want a shirt - but you'll have to hustle and get it in today! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Announcing-the-Topicus-Dashboard-tp3058300p3092976.html Sent from the Users forum 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
Re: [1,5]Error msg from Model?
Show some code (quickstart). On Fri, Dec 17, 2010 at 9:23 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hmm then there might be a problem, I have a model used for a dropdown, inside that I do mentioned earlier in the thread, no message on the page and no message in the log about unrendered messages... 2010/12/17 Martin Grigorov mgrigo...@apache.org It should. There are no changes in that area, except that now all 'debug methods accept Serializable instead of String, but this is backward compatible On Fri, Dec 17, 2010 at 4:15 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Should the below add an error message to the stack, it does not: Session.get().error(Queue not found please select another); Are here a better way? regards Nino -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: Wicket resources (css, js and images)?
As Martin mentioned, I added a way for you to decorate all header responses in an application. See Application#setHeaderResponseDecorator. You can use this to create your own IHeaderResponse and intercept all calls to render JS / CSS references. Then, you could do smart things like keep all the references around until the end of the request (or actually, the renderHead traversal), and at that point, build a URL that references an aggregate of all requested CSS / JS resources. As Hielke mentioned, you then have problems because every page has a different combo of resources. So, I provided AbstractResourceAggregatingHeaderResponse that provides a framework for grouping resource references into aggregate groups. Now, your developer can specify groups for references. What groups you specify are totally up to you. The idea is that you group things that will be on every page into a group, and then the things that change on each page into another group. So, you get to take advantage of the browser caching for those things that are on every page. You can go further if you'd like. So, you could do something like the following to specify groups and load orders (things within a certain group may still need to be loaded before / after other things in same group). // example of things that may be shared for all your applications across your company, etc...: response.renderCSSReference(new GroupedAndOrderedResourceReference(ResourceGroup.GLOBAL, 0, HomePage.class, footer.css)); response.renderCSSReference(new GroupedAndOrderedResourceReference(ResourceGroup.GLOBAL, 0, HomePage.class, header.css)); // example of something that may be in this single application: response.renderCSSReference(new GroupedAndOrderedResourceReference(ResourceGroup.APPLICATION, 0, HomePage.class, app.css)); I've put together a working quickstart example of this. You can download it and play with it. http://wickettraining.com/attachments/resourceaggregation.tar.gz With some work, a standard set of aggregation groups could be defined, and this could be rolled into core. If someone wants to spearhead that, I would love it and do anything I can to assist. PS - In an ideal world, you wouldn't even need to specify the groups manually. You could have a smart algorithm that used each request to learn what things always appear together. The algorithm would start grouping things that commonly appear together into groups automatically. The first few requests wouldn't really group much, but as the requests continue, you would build better and better groups. -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org On Thu, Dec 16, 2010 at 4:36 AM, Martin Grigorov mgrigo...@apache.org wrote: I believe the latest changes by Jeremy added functionality for this. Jeremy can you please explain how the new org.apache.wicket.markup.html.IHeaderResponseDecorator can be used (is being used by your customer) ? On Wed, Dec 15, 2010 at 9:05 PM, Alex Objelean alex.objel...@gmail.com wrote: Though this topic is quite old, I think it is still actual. Since the 1.5 release is not far away, did anybody thought if the (at least) js resource merging should occur? This is very useful when you have a page with a large number of components, each loading a large number of small resources. Having a single resource (js and/or css) as a result of page rendering could have a dramatic page loading time improvement. Thanks! Alex Objelean -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-resources-css-js-and-images-tp1868800p3089781.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket resources (css, js and images)?
Also worth mentioning, there are two other example decorating header responses that I committed into core for you to build on: 1 - ResourceReferenceDependencyInjectingHeaderResponse - which allows you to create a IResourceReferenceDependencyConfigurationService which defines dependencies for your resource references. For instance, wicket-ajax.js depends on wicket-event.js. So, everywhere that we render a reference to wicket-ajax.js, we must be sure that a reference to wicket-event.js is also rendered. However, with the ResourceReferenceDependencyInjectingHeaderResponse, you can make this automatic. This is probably only worth the additional effort if you have many such reference dependencies. 2 - HeaderResponseContainerFilteringHeaderResponse - allows you to filter resource references into different buckets. One of these buckets is then rendered into the standard Wicket head location. The others can be rendered wherever you want in the page by embedding a HeaderResponseFilteredResponseContainer in your page. This is useful if you want CSS to appear in the header and JS just before the /body tag in your app (a recommendation by UI experts to decrease page load time). There is a default JavascriptFilteredIntoFooterHeaderResponse that performs the described header / footer split. -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org On Fri, Dec 17, 2010 at 11:45 PM, Jeremy Thomerson jer...@wickettraining.com wrote: As Martin mentioned, I added a way for you to decorate all header responses in an application. See Application#setHeaderResponseDecorator. You can use this to create your own IHeaderResponse and intercept all calls to render JS / CSS references. Then, you could do smart things like keep all the references around until the end of the request (or actually, the renderHead traversal), and at that point, build a URL that references an aggregate of all requested CSS / JS resources. As Hielke mentioned, you then have problems because every page has a different combo of resources. So, I provided AbstractResourceAggregatingHeaderResponse that provides a framework for grouping resource references into aggregate groups. Now, your developer can specify groups for references. What groups you specify are totally up to you. The idea is that you group things that will be on every page into a group, and then the things that change on each page into another group. So, you get to take advantage of the browser caching for those things that are on every page. You can go further if you'd like. So, you could do something like the following to specify groups and load orders (things within a certain group may still need to be loaded before / after other things in same group). // example of things that may be shared for all your applications across your company, etc...: response.renderCSSReference(new GroupedAndOrderedResourceReference(ResourceGroup.GLOBAL, 0, HomePage.class, footer.css)); response.renderCSSReference(new GroupedAndOrderedResourceReference(ResourceGroup.GLOBAL, 0, HomePage.class, header.css)); // example of something that may be in this single application: response.renderCSSReference(new GroupedAndOrderedResourceReference(ResourceGroup.APPLICATION, 0, HomePage.class, app.css)); I've put together a working quickstart example of this. You can download it and play with it. http://wickettraining.com/attachments/resourceaggregation.tar.gz With some work, a standard set of aggregation groups could be defined, and this could be rolled into core. If someone wants to spearhead that, I would love it and do anything I can to assist. PS - In an ideal world, you wouldn't even need to specify the groups manually. You could have a smart algorithm that used each request to learn what things always appear together. The algorithm would start grouping things that commonly appear together into groups automatically. The first few requests wouldn't really group much, but as the requests continue, you would build better and better groups. -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org On Thu, Dec 16, 2010 at 4:36 AM, Martin Grigorov mgrigo...@apache.org wrote: I believe the latest changes by Jeremy added functionality for this. Jeremy can you please explain how the new org.apache.wicket.markup.html.IHeaderResponseDecorator can be used (is being used by your customer) ? On Wed, Dec 15, 2010 at 9:05 PM, Alex Objelean alex.objel...@gmail.com wrote: Though this topic is quite old, I think it is still actual. Since the 1.5 release is not far away, did anybody thought if the (at least) js resource merging should occur? This is very useful when you have a page with a large number of components, each loading a large number of small resources. Having a single resource (js and/or css) as a result of page rendering could have a dramatic