Re: wiquery css
Natalie, On Tue, Feb 21, 2012 at 3:10 PM, N. Metzger nmetz...@odu.edu wrote: Hi all, I'm having another of my blind mornings. I just tried wiquery for the first time and had an accordion running within a few minutes, so first of all: thanks!!! Now: what's the best way to change the look and feel? I saw a that you can define a jquery theme and upload if somehow. How? You can roll your own theme(s) making your web application implement IThemableApplication... Or should I just define the css for my page? If the latter, what should I use as my base? if changes are minor you can always override default theme rolling you own CSS. Ernesto
RE: wiquery css
To roll your own theme use www.themeroller.com and when done choose download. You can then use the contents of the zipfile to create your own resourcereference to use in IThemableApplication. Hielke -Original Message- From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Sent: woensdag 22 februari 2012 9:36 To: users@wicket.apache.org Subject: Re: wiquery css Natalie, On Tue, Feb 21, 2012 at 3:10 PM, N. Metzger nmetz...@odu.edu wrote: Hi all, I'm having another of my blind mornings. I just tried wiquery for the first time and had an accordion running within a few minutes, so first of all: thanks!!! Now: what's the best way to change the look and feel? I saw a that you can define a jquery theme and upload if somehow. How? You can roll your own theme(s) making your web application implement IThemableApplication... Or should I just define the css for my page? If the latter, what should I use as my base? if changes are minor you can always override default theme rolling you own CSS. Ernesto - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Stateless form broken with 1.5.4?
Hi, I've found a problem with the latest Wicket version (1.5.4) and stateless forms. Now the values of input fields are passed via GET parameters and are always appended to form's action attribute and it's not possible to change field's value after the first submit. You can reproduce the problem running wicket-examples and going to path /stateless/foo (StatelessPage is mounted on this path). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to modify attribute (eg. class) in component with setRenderBodyOnly(true) ?
Hi, Is it possible to modify tag attribute (eg. add a CSS class) of component which has set renderBodyOnly flag to true? When using component.add(new AttributeModifier(...)) it has no effect, because a tag in which this class attribute is appended is not rendered in HTML (because of setRenderBodyOnly(true)). Here is an example: LinkContainer is a component (extends Panel) which has setRenderBodyOnly(true). wicket:panel a wicket:id=linkwicket:container wicket:id=linkContent[link content]/wicket:container/a /wicket:panel Somewhere inside a page or panel: add(new LinkContainer(link, ...).add(new AttributeModifier(class, Model.of(my-link-style; But of course this class='my-link-style' will not be rendered anywhere. I want to add a class attribute to contained a tag but using a behavior which can be added to the whole LinkContainer. Is it any simple solution to achieve this? -- DS - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Stateless form broken with 1.5.4?
Yes, bad. We noticed this soon after releasing 1.5.4 ... It is fixed : https://issues.apache.org/jira/browse/WICKET-4365 On Wed, Feb 22, 2012 at 11:37 AM, Andrea Del Bene adelb...@ciseonweb.it wrote: Hi, I've found a problem with the latest Wicket version (1.5.4) and stateless forms. Now the values of input fields are passed via GET parameters and are always appended to form's action attribute and it's not possible to change field's value after the first submit. You can reproduce the problem running wicket-examples and going to path /stateless/foo (StatelessPage is mounted on this path). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to modify attribute (eg. class) in component with setRenderBodyOnly(true) ?
Hi, So you want to not have a (because this is what .setRenderBodyOnly(true) does) and in the same time you want to set a class an that non-existing tag ?! The easiest way is to remove the call to .setRenderBodyOnly(true). On Wed, Feb 22, 2012 at 11:38 AM, Daniel Stoch daniel.st...@gmail.com wrote: Hi, Is it possible to modify tag attribute (eg. add a CSS class) of component which has set renderBodyOnly flag to true? When using component.add(new AttributeModifier(...)) it has no effect, because a tag in which this class attribute is appended is not rendered in HTML (because of setRenderBodyOnly(true)). Here is an example: LinkContainer is a component (extends Panel) which has setRenderBodyOnly(true). wicket:panel a wicket:id=linkwicket:container wicket:id=linkContent[link content]/wicket:container/a /wicket:panel Somewhere inside a page or panel: add(new LinkContainer(link, ...).add(new AttributeModifier(class, Model.of(my-link-style; But of course this class='my-link-style' will not be rendered anywhere. I want to add a class attribute to contained a tag but using a behavior which can be added to the whole LinkContainer. Is it any simple solution to achieve this? -- DS - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to modify attribute (eg. class) in component with setRenderBodyOnly(true) ?
No. I want to have a. When you use this LinkContainer from my example in HTML like: div wicket:id=link /div It will be rendered as: a wicket:id=link.../a So any attributes modified using behavior will disappear. But if LinkContainer will not have setRenderBodyOnly(true), the the corresponding HTML will be: div wicket:id=link class='my-link-style' a wicket:id=link.../a /div -- DS On Wed, Feb 22, 2012 at 11:49 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, So you want to not have a (because this is what .setRenderBodyOnly(true) does) and in the same time you want to set a class an that non-existing tag ?! The easiest way is to remove the call to .setRenderBodyOnly(true). On Wed, Feb 22, 2012 at 11:38 AM, Daniel Stoch daniel.st...@gmail.com wrote: Hi, Is it possible to modify tag attribute (eg. add a CSS class) of component which has set renderBodyOnly flag to true? When using component.add(new AttributeModifier(...)) it has no effect, because a tag in which this class attribute is appended is not rendered in HTML (because of setRenderBodyOnly(true)). Here is an example: LinkContainer is a component (extends Panel) which has setRenderBodyOnly(true). wicket:panel a wicket:id=linkwicket:container wicket:id=linkContent[link content]/wicket:container/a /wicket:panel Somewhere inside a page or panel: add(new LinkContainer(link, ...).add(new AttributeModifier(class, Model.of(my-link-style; But of course this class='my-link-style' will not be rendered anywhere. I want to add a class attribute to contained a tag but using a behavior which can be added to the whole LinkContainer. Is it any simple solution to achieve this? -- DS - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.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: How to modify attribute (eg. class) in component with setRenderBodyOnly(true) ?
On Wed, Feb 22, 2012 at 12:01 PM, Daniel Stoch daniel.st...@gmail.com wrote: No. I want to have a. When you use this LinkContainer from my example in HTML like: div wicket:id=link /div It will be rendered as: a wicket:id=link.../a So any attributes modified using behavior will disappear. But if LinkContainer will not have setRenderBodyOnly(true), the the corresponding HTML will be: div wicket:id=link class='my-link-style' a wicket:id=link.../a /div Now it is more clear what you do. You need to add the AttributeModifier to the Link, not to the LinkContainer if you want to manipulate a. -- DS On Wed, Feb 22, 2012 at 11:49 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, So you want to not have a (because this is what .setRenderBodyOnly(true) does) and in the same time you want to set a class an that non-existing tag ?! The easiest way is to remove the call to .setRenderBodyOnly(true). On Wed, Feb 22, 2012 at 11:38 AM, Daniel Stoch daniel.st...@gmail.com wrote: Hi, Is it possible to modify tag attribute (eg. add a CSS class) of component which has set renderBodyOnly flag to true? When using component.add(new AttributeModifier(...)) it has no effect, because a tag in which this class attribute is appended is not rendered in HTML (because of setRenderBodyOnly(true)). Here is an example: LinkContainer is a component (extends Panel) which has setRenderBodyOnly(true). wicket:panel a wicket:id=linkwicket:container wicket:id=linkContent[link content]/wicket:container/a /wicket:panel Somewhere inside a page or panel: add(new LinkContainer(link, ...).add(new AttributeModifier(class, Model.of(my-link-style; But of course this class='my-link-style' will not be rendered anywhere. I want to add a class attribute to contained a tag but using a behavior which can be added to the whole LinkContainer. Is it any simple solution to achieve this? -- DS - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to modify attribute (eg. class) in component with setRenderBodyOnly(true) ?
On Wed, Feb 22, 2012 at 12:11 PM, Martin Grigorov mgrigo...@apache.org wrote: On Wed, Feb 22, 2012 at 12:01 PM, Daniel Stoch daniel.st...@gmail.com wrote: No. I want to have a. When you use this LinkContainer from my example in HTML like: div wicket:id=link /div It will be rendered as: a wicket:id=link.../a So any attributes modified using behavior will disappear. But if LinkContainer will not have setRenderBodyOnly(true), the the corresponding HTML will be: div wicket:id=link class='my-link-style' a wicket:id=link.../a /div Now it is more clear what you do. You need to add the AttributeModifier to the Link, not to the LinkContainer if you want to manipulate a. Well, I know it is possible in this way. But my question is more general: does using behaviors which changes a markup (like AttributeModifier) on components with setRenderBodyOnly(true) make sense? To add the AttributeModifier to the Link I have to write extra method inside a LinkContainer which adds a behavior to enclosing component (Link is created inside LinkContainer and because of ecapsulation it should not be visible outside it). But the cleaner solution will be to add a behavior to LinkContainer, but then it should be transparently added to the one of its child components. Then I can use AttributeModifier (or related behaviors) the same way with component which has setRenderBodyOnly(true) or not. But now I need to know a component implementation to decide if I can use such modifiers with it or no. -- DS - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Redirect to external page without jsessionid in referrer
Hi folks, I'm struggling with the documentation of ExternalLink (applies for both 1.4 and 1.5): http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/link/ExternalLink.html I.e. especially with this paragraph: Note: in the case when the support for cookies in the browser is disabled the user's jsessionid will leak in the 'Referrer' header after clicking this link. If this is a problem for the application then better use a Link which redirects to a shared resource (see WebApplication#mountResource(String, org.apache.wicket.request.resource.ResourceReference) , e.g. /myapp/redirecting-resource?url=...) which on its side redirects to the new URL using RedirectToUrlException. Another option is to use rel=noreferrer attribute in your markup but this will work only in the modern browsers (supporting HTML5 standard). For several internal reasons which can't be discussed here, the jsessionid has to be contained in the URL and I want to achieve exactly what is described in the documentation: have a somewhat generic referrer which doesn't contain the jsessionid. But honestly, I am totally confused by the description. How could I mount something which is able to throw a RedirectToUrlException, i.e. something backed by Java logic, as a resource? As far as I understand the concept of shared resources they are always things like images, CSS, etc., but not pages or something similar. Both creating a link to a shared a resource and throwing a RedirectToUrlException in the request cycle are fine by themselves, but I just can't see how to connect these two steps. Thus, I would be very pleased if someone could give me a hint on how to manage this. Thanks! :-) Cheers, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Redirect to external page without jsessionid in referrer
If all you want to do is remove the jsessionid from the URL there is a wiki entry on how to do this. It is under SEO optimization. This will force a new session on every Sent from my iPhone On Feb 22, 2012, at 8:00 AM, geissb...@gmx.org wrote: Hi folks, I'm struggling with the documentation of ExternalLink (applies for both 1.4 and 1.5): http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/link/ExternalLink.html I.e. especially with this paragraph: Note: in the case when the support for cookies in the browser is disabled the user's jsessionid will leak in the 'Referrer' header after clicking this link. If this is a problem for the application then better use a Link which redirects to a shared resource (see WebApplication#mountResource(String, org.apache.wicket.request.resource.ResourceReference) , e.g. /myapp/redirecting-resource?url=...) which on its side redirects to the new URL using RedirectToUrlException. Another option is to use rel=noreferrer attribute in your markup but this will work only in the modern browsers (supporting HTML5 standard). For several internal reasons which can't be discussed here, the jsessionid has to be contained in the URL and I want to achieve exactly what is described in the documentation: have a somewhat generic referrer which doesn't contain the jsessionid. But honestly, I am totally confused by the description. How could I mount something which is able to throw a RedirectToUrlException, i.e. something backed by Java logic, as a resource? As far as I understand the concept of shared resources they are always things like images, CSS, etc., but not pages or something similar. Both creating a link to a shared a resource and throwing a RedirectToUrlException in the request cycle are fine by themselves, but I just can't see how to connect these two steps. Thus, I would be very pleased if someone could give me a hint on how to manage this. Thanks! :-) Cheers, Michael - 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: Redirect to external page without jsessionid in referrer
So my last message got off. This will force a new session on every request of the page since the jsessionid is not in url and cookies are not being accepted by the browser. I would look at the wiki entry and see if that is what you are looking for. -- Jeff Schneller Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Wednesday, February 22, 2012 at 8:31 AM, Jeff Schneller wrote: If all you want to do is remove the jsessionid from the URL there is a wiki entry on how to do this. It is under SEO optimization. This will force a new session on every Sent from my iPhone On Feb 22, 2012, at 8:00 AM, geissb...@gmx.org (mailto:geissb...@gmx.org) wrote: Hi folks, I'm struggling with the documentation of ExternalLink (applies for both 1.4 and 1.5): http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/link/ExternalLink.html I.e. especially with this paragraph: Note: in the case when the support for cookies in the browser is disabled the user's jsessionid will leak in the 'Referrer' header after clicking this link. If this is a problem for the application then better use a Link which redirects to a shared resource (see WebApplication#mountResource(String, org.apache.wicket.request.resource.ResourceReference) , e.g. /myapp/redirecting-resource?url=...) which on its side redirects to the new URL using RedirectToUrlException. Another option is to use rel=noreferrer attribute in your markup but this will work only in the modern browsers (supporting HTML5 standard). For several internal reasons which can't be discussed here, the jsessionid has to be contained in the URL and I want to achieve exactly what is described in the documentation: have a somewhat generic referrer which doesn't contain the jsessionid. But honestly, I am totally confused by the description. How could I mount something which is able to throw a RedirectToUrlException, i.e. something backed by Java logic, as a resource? As far as I understand the concept of shared resources they are always things like images, CSS, etc., but not pages or something similar. Both creating a link to a shared a resource and throwing a RedirectToUrlException in the request cycle are fine by themselves, but I just can't see how to connect these two steps. Thus, I would be very pleased if someone could give me a hint on how to manage this. Thanks! :-) Cheers, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org (mailto:users-unsubscr...@wicket.apache.org) For additional commands, e-mail: users-h...@wicket.apache.org (mailto:users-h...@wicket.apache.org)
Re: How to modify attribute (eg. class) in component with setRenderBodyOnly(true) ?
On Wed, Feb 22, 2012 at 12:31 PM, Martin Grigorov mgrigo...@apache.org wrote: On Wed, Feb 22, 2012 at 12:20 PM, Daniel Stoch daniel.st...@gmail.com wrote: On Wed, Feb 22, 2012 at 12:11 PM, Martin Grigorov mgrigo...@apache.org wrote: On Wed, Feb 22, 2012 at 12:01 PM, Daniel Stoch daniel.st...@gmail.com wrote: No. I want to have a. When you use this LinkContainer from my example in HTML like: div wicket:id=link /div It will be rendered as: a wicket:id=link.../a So any attributes modified using behavior will disappear. But if LinkContainer will not have setRenderBodyOnly(true), the the corresponding HTML will be: div wicket:id=link class='my-link-style' a wicket:id=link.../a /div Now it is more clear what you do. You need to add the AttributeModifier to the Link, not to the LinkContainer if you want to manipulate a. Well, I know it is possible in this way. But my question is more general: does using behaviors which changes a markup (like AttributeModifier) on components with setRenderBodyOnly(true) make sense? No. To add the AttributeModifier to the Link I have to write extra method inside a LinkContainer which adds a behavior to enclosing component (Link is created inside LinkContainer and because of ecapsulation it should not be visible outside it). But the cleaner solution will be to add a behavior to LinkContainer, but then it should be transparently added to the one of its child components. To which child exactly ? How to decide that for you ? Then I can use AttributeModifier (or related behaviors) the same way with component which has setRenderBodyOnly(true) or not. But now I need to know a component implementation to decide if I can use such modifiers with it or no. Each behavior has a reference to the component it is bound to. So you can assign your own Behavior to the parent class and then in behavior's onComponentTag, renderHead(), ... you can do whatever you need with the parent and all its children. It is a bit harder to get the children ComponentTags but it is possible: new MarkupStream(getMarkup()) and iterate over the elements in the MarkupStream. Thanks for your feedback and suggestions. I have done a simple behavior to achieve what I want. Maybe this is not very elegant solution but it should work. It writes out attributes added as AttributeModifiers to a parent component to a child component which has this behavior. public class AttributeModifierPropagator extends AbstractBehavior { private final MarkupContainer parent; public AttributeModifierPropagator(MarkupContainer parent) { super(); if (parent == null) { throw new IllegalArgumentException(Argument [parent] cannot be null); } this.parent = parent; } @Override public void onComponentTag(Component component, ComponentTag tag) { for (IBehavior behavior : parent.getBehaviors()) { if ((behavior instanceof AttributeModifier) || (behavior instanceof SimpleAttributeModifier)) { behavior.onComponentTag(component, tag); } } } } And then inside a LinkContainer after creating nested Link link I can add this behavior to it: link.add(new AttributeModifierPropagator(this)); -- DS - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Adding extra request parameters to AJAX calls
Thanks for the quick response. However, I'm still a bit lost. I'm currently still using Wicket 1.4 (although upgrading to 1.5 is possible). Both of the links in your reply take me to pages that appear to be related to Wicket 6. They both talk about a class named AjaxRequestAttributes that does not appear to exists in 1.4 or 1.5. Was there an additional link that you meant to include? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-extra-request-parameters-to-AJAX-calls-tp4405842p4410571.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: Adding extra request parameters to AJAX calls
On Wed, Feb 22, 2012 at 3:51 PM, gmparker2000 greg.par...@brovada.com wrote: Thanks for the quick response. However, I'm still a bit lost. I'm currently still using Wicket 1.4 (although upgrading to 1.5 is possible). Both of the links in your reply take me to pages that appear to be related to Wicket 6. They both talk about a class named AjaxRequestAttributes that does not appear to exists in 1.4 or 1.5. Was there an additional link that you meant to include? Oh. Indeed the link is not there ... http://code.google.com/p/londonwicket/downloads/detail?name=LondonWicket-Paint.zipcan=2q= This project shows how to do it in pre 6.0 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-extra-request-parameters-to-AJAX-calls-tp4405842p4410571.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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataTable and HeadersToolBar
On Wed, Feb 22, 2012 at 4:03 PM, grazia grazia.russolass...@gmail.com wrote: I am trying to use the org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable following the example in Igor Vaynberg's Apache Wicket Cookbook. The line table.addTopToolbar(new HeadersToolbar(table, null)); gives me the error I It seems 'null' is not allowed as ISortStateLocator .. Wicket should give you a better exception message ... pasted below; when I remove the line, my code renders the content of the table, but no headers, obviously. All code examples I find pass a null stateLocator to the constructor of HeadersToolbar(table, null). IColumnContact[] columns = new IColumn[3]; columns[0] = new PropertyColumnContact(Model.of(Name), name, name); columns[1] = new PropertyColumnContact(Model.of(Phone), phone, phone); columns[2] = new PropertyColumnContact(Model.of(Email), email, email); final ContactProvider contactProvider = new ContactProvider(); contactProvider.setData(contacts); DataTableContact table = new DataTableContact(contacts, columns, contactProvider, 10); table.addBottomToolbar(new NavigationToolbar(table)); table.addTopToolbar(new HeadersToolbar(table, null)); add(table); SEVERE: Error attaching this container for rendering: [MarkupContainer [Componen t id = 1]] org.apache.wicket.WicketRuntimeException: Error attaching this container for ren dering: [MarkupContainer [Component id = 1]] at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContai ner.java:1766) at org.apache.wicket.Component.onBeforeRender(Component.java:3966) at org.apache.wicket.Component.internalBeforeRender(Component.java:1066) at org.apache.wicket.Component.beforeRender(Component.java:1100) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren( MarkupContainer.java:1754) (...) *Caused by: java.lang.NullPointerException at org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByLi nk$CssModifier$1.getObject(OrderByLink.java:201)* at org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByLi nk$CssModifier$1.getObject(OrderByLink.java:206) at org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByLi nk$CssModifier.isEnabled(OrderByLink.java:220) at org.apache.wicket.Component.isBehaviorAccepted(Component.java:3900) at org.apache.wicket.Component.configure(Component.java:1167) at org.apache.wicket.Component.internalBeforeRender(Component.java:1053) at org.apache.wicket.Component.beforeRender(Component.java:1100) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContai ner.java:1754) ... 55 more -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataTable-and-HeadersToolBar-tp4410609p4410609.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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Adding extra request parameters to AJAX calls
I gave that a try on a DropDownChoice with no success. I'm probably doing something wrong. Here is what I tried: I added this to the constructor of the page: DropDownChoice myDropDown = new DropDownChoice(myDropDown); myDropDown.add(new ConversationAjaxBehavior()); add(myDropDown); And added this nested class to my page: class ConversationAjaxBehavior extends AbstractDefaultAjaxBehavior { @Override protected void respond(AjaxRequestTarget target) { } @Override public CharSequence getCallbackUrl() { System.out.println(Adding conversation id); return super.getCallbackUrl(); } } Unfortunately the getCallbackUrl never gets called. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-extra-request-parameters-to-AJAX-calls-tp4405842p4410787.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: Adding extra request parameters to AJAX calls
On Wed, Feb 22, 2012 at 4:50 PM, gmparker2000 greg.par...@brovada.com wrote: I gave that a try on a DropDownChoice with no success. I'm probably doing something wrong. Here is what I tried: I added this to the constructor of the page: DropDownChoice myDropDown = new DropDownChoice(myDropDown); myDropDown.add(new ConversationAjaxBehavior()); add(myDropDown); And added this nested class to my page: class ConversationAjaxBehavior extends AbstractDefaultAjaxBehavior { replace AbstractDefaultAjaxBehavior with AjaxEventBehavior This behavior should fire on event, e.g. when the drop-down's value changes. @Override protected void respond(AjaxRequestTarget target) { } @Override public CharSequence getCallbackUrl() { System.out.println(Adding conversation id); return super.getCallbackUrl(); } } Unfortunately the getCallbackUrl never gets called. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-extra-request-parameters-to-AJAX-calls-tp4405842p4410787.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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Adding extra request parameters to AJAX calls
I appreciate all the help but still no luck. I changed things to look like this: DropDownChoice myDropDown = new DropDownChoice(myDropDown); myDropDown.add(new ConversationAjaxBehavior(onchange)); add(myDropDown); and: class ConversationAjaxBehavior extends AjaxEventBehavior { public ConversationAjaxBehavior(String event) { super(event); } @Override public CharSequence getCallbackUrl() { System.out.println(Adding conversation id); return super.getCallbackUrl() + cID=2; } @Override protected void onEvent(AjaxRequestTarget target) { } } The onEvent method is called when I change the selection but getCallbackURL is still not being called. Just to be sure I've described what I'm trying to do properly here is approximately what I would expect to see when viewing the source in my browser after adding a conversation parameter (cID would be on the end of the querystring): select wicket:id=... id=... type=... name=... class=... onchange=var wcall=wicketAjaxPost('?cID=2wicket:interface=:1:form: .. So the onchange method would have a cID request parameter that is posted when I changed the drop down selection. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-extra-request-parameters-to-AJAX-calls-tp4405842p4410882.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: Adding extra request parameters to AJAX calls
Put a break point at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#getCallbackScript() and see what happens This method should be called when the page HTML is generated. Long before you are able to click in the browser. On Wed, Feb 22, 2012 at 5:18 PM, gmparker2000 greg.par...@brovada.com wrote: I appreciate all the help but still no luck. I changed things to look like this: DropDownChoice myDropDown = new DropDownChoice(myDropDown); myDropDown.add(new ConversationAjaxBehavior(onchange)); add(myDropDown); and: class ConversationAjaxBehavior extends AjaxEventBehavior { public ConversationAjaxBehavior(String event) { super(event); } @Override public CharSequence getCallbackUrl() { System.out.println(Adding conversation id); return super.getCallbackUrl() + cID=2; } @Override protected void onEvent(AjaxRequestTarget target) { } } The onEvent method is called when I change the selection but getCallbackURL is still not being called. Just to be sure I've described what I'm trying to do properly here is approximately what I would expect to see when viewing the source in my browser after adding a conversation parameter (cID would be on the end of the querystring): select wicket:id=... id=... type=... name=... class=... onchange=var wcall=wicketAjaxPost('?cID=2wicket:interface=:1:form: .. So the onchange method would have a cID request parameter that is posted when I changed the drop down selection. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-extra-request-parameters-to-AJAX-calls-tp4405842p4410882.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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to write an HTTP header (to detect cookie disablement)?
Hi Martin, COOKIES --- I'm fine for this. My cookie code actually works. (But if the user's browser disables cookies, then I want to use HTTP headers to be able to say The user is on his/her second page, and still no cookie, so cookies are definitely disabled (I cannot tell this on the first page).) HTTP HEADERS Many thanks for your tip about FireBug! Grand. (I had never thought about that.) All my web pages are descended from my PageBase class, which in turn descends from Wicket's WebPage. I set my HTTP header in code in my PageBase constructor using org.apache.wicket.request.http.WebResponse.addHeader(...); In the first call to the app (which shows the home page), I can see this header in the response headers using FireBug under GET PageHome?0. Sadly, I cannot detect this in my PageBase constructor using import org.apache.wicket.request.cycle.RequestCycle; import org.apache.wicket.request.http.WebRequest; RequestCycle rcRequestCycle = getRequestCycle(); WebRequest wreqRequest = (WebRequest)rcRequestCycle.getRequest(); String sHeaderValue = wreqRequest.getHeader(X-MyApp-NotFirstPageBase-1); since I get sHeaderValue to be null. Also, I cannot see this header in the request headers using FireBug. After clicking the link on my home page to the About us page, I can see this header in the response headers using FireBug under GET PageAbout?1, but nowhere else (including request headers even though I believe that I add this to each web request unconditionally). If I add org.apache.wicket.request.http.WebResponse.addHeader(...); to my PageHome's form's onSubmit() method, then after form submission I do see this header, but in the response only in POST page?1-1.IFormSubmitListener-frmForm of http://localhost:8080/wicket/page?1-1.IFormSubmitListener-frmForm (I am running locally). Am I looking in the wrong place in my code (and thus in the request cycle) to find my header in a request? Martin Grigorov-4 wrote Hi Ian, If you add/set a header in the HttpServletResponse (even thru Wicket's WebResponse) then it will be written to the browser. You can verify that by investigating the request in Firebug's Net panel. If you want to send a cookie you should either use #addCookie() or set/addHeader(Set-Cookie). Check in google for more info. So you set the cookie in the current response and if not expired it should be available in the next *request* (HttpServletRequest or Wicket's WebRequest). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-write-an-HTTP-header-to-detect-cookie-disablement-tp4397827p4411061.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: How to write an HTTP header (to detect cookie disablement)?
Hi, Headers are not cookies. By setting a header in the response you should not expect that it will come in the next request. A request header is set by the client (the browser in this case). You can use UrlConnection or Apache HttpClient to set header request which will be available thru WebRequest.getHeader(). Cookies work as you want - set it once in the response and then it will travel around in the next requests/responses until expire. On Wed, Feb 22, 2012 at 6:09 PM, Ian Marshall ianmarshall...@gmail.com wrote: Hi Martin, COOKIES --- I'm fine for this. My cookie code actually works. (But if the user's browser disables cookies, then I want to use HTTP headers to be able to say The user is on his/her second page, and still no cookie, so cookies are definitely disabled (I cannot tell this on the first page).) HTTP HEADERS Many thanks for your tip about FireBug! Grand. (I had never thought about that.) All my web pages are descended from my PageBase class, which in turn descends from Wicket's WebPage. I set my HTTP header in code in my PageBase constructor using org.apache.wicket.request.http.WebResponse.addHeader(...); In the first call to the app (which shows the home page), I can see this header in the response headers using FireBug under GET PageHome?0. Sadly, I cannot detect this in my PageBase constructor using import org.apache.wicket.request.cycle.RequestCycle; import org.apache.wicket.request.http.WebRequest; RequestCycle rcRequestCycle = getRequestCycle(); WebRequest wreqRequest = (WebRequest)rcRequestCycle.getRequest(); String sHeaderValue = wreqRequest.getHeader(X-MyApp-NotFirstPageBase-1); since I get sHeaderValue to be null. Also, I cannot see this header in the request headers using FireBug. After clicking the link on my home page to the About us page, I can see this header in the response headers using FireBug under GET PageAbout?1, but nowhere else (including request headers even though I believe that I add this to each web request unconditionally). If I add org.apache.wicket.request.http.WebResponse.addHeader(...); to my PageHome's form's onSubmit() method, then after form submission I do see this header, but in the response only in POST page?1-1.IFormSubmitListener-frmForm of http://localhost:8080/wicket/page?1-1.IFormSubmitListener-frmForm (I am running locally). Am I looking in the wrong place in my code (and thus in the request cycle) to find my header in a request? Martin Grigorov-4 wrote Hi Ian, If you add/set a header in the HttpServletResponse (even thru Wicket's WebResponse) then it will be written to the browser. You can verify that by investigating the request in Firebug's Net panel. If you want to send a cookie you should either use #addCookie() or set/addHeader(Set-Cookie). Check in google for more info. So you set the cookie in the current response and if not expired it should be available in the next *request* (HttpServletRequest or Wicket's WebRequest). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-write-an-HTTP-header-to-detect-cookie-disablement-tp4397827p4411061.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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Adding extra request parameters to AJAX calls
Got it. I was overriding the wrong getCallbackURL method: public CharSequence getCallbackUrl() instead of: public CharSequence getCallbackUrl(final boolean onlyTargetActivePage); Thanks a lot!! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-extra-request-parameters-to-AJAX-calls-tp4405842p441.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: AjaxFormValidatingBehavior Submits Form When I Clicked Submit Button second Time
Hi, what kind of exception do you get the second time? Hi to everyone, i have added some jquery validation code to my page and add AjaxFormValidatingBehavior to my submit button.When i do not fill fields and click on submit button, it gives error next to each field and does not submit anything.When i changed anything and click on submit button, page is submitted and exception occurs. I did not understand, why is it submitted on the second time? Is there any idea? With my best regards. - Wicket-Java -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxFormValidatingBehavior-Submits-Form-When-I-Clicked-Submit-Button-second-Time-tp4410686p4410686.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: Reusing forms in different contexts
Hi Martin, Thanks for the tip! This is an interesting approach as well. On 22/02/2012 2:49 AM, Martin Grigorov wrote: HI Bertrand, I'm not quite sure whether this is your concern but take a look at org.apache.wicket.markup.html.tree.BaseTree#newLink() It uses LinkType to decide what kind of Link to create. You can use the same approach. On Wed, Feb 22, 2012 at 6:12 AM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Thanks Igor. This is actually very close to what I used as my first approach. The problem I had then was that depending on the context in which the panel is used, the component must be one of the following: 1-A Link/Button, like in your code 2-A BookmarkablePageLink 3-An AjaxLink (ajax replacement, close modal window, etc.) In your example, myformpanel can only work with case #1. This is essentially the problem that has me scratching my head. Regards, Bertrand On 21/02/2012 7:04 PM, Igor Vaynberg wrote: *abstract* class myformpanel extends panel { public myformpanel(string id) { add(new button(save) { onsubmit() { *onsave(model);* });} *protected abstract void onsave(imodel);* } add(new myformpanel(panel) { protected void onsave(imodel) { // do stuff setResponsePage() or replaceWith() or whatever you want }} -igor On Tue, Feb 21, 2012 at 3:53 PM, Bertrand Guay-Paquet ber...@step.polymtl.cawrote: Hi, I want to reuse the same form panels in different contexts and would like to know how fellow Wicket users achieve this. The core of the problem is how to let the user of a form panel specify where to navigate when the form is submitted or canceled. There are multiple possibilities for this: -setResponsePage a bookmarkable page -setResponsePage a page instance (to go back to the previous page for example) -replace the form panel via ajax -close a modal window via ajax -bubble a Wicket event I've tried 2 approaches up to now : -some form of markup inheritance. This requires subclassing the form panel at each usage site. -navigation factories provided to the form panel which are responsible for populating it with the proper submit and cancel links/buttons. Both of these approaches are kludgy and I have the feeling there has to be a better way. Which way is the Wicket way to let the user of a panel customize its navigation? Thanks, Bertrand - 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: Performance optimization
Hi, Have you seen the following thread? http://apache-wicket.1842946.n4.nabble.com/Shrinking-the-session-size-simply-by-zipping-it-Saved-my-day-td4402980.html Perhaps this can help you. That said, 10MB seems HUGE! Since you already use detachable models, maybe you could have a look at a memory profiler like Java VisualVM to find out which objects take the most space. Bertrand On 22/02/2012 10:12 PM, Martin Makundi wrote: Hi! Any experiences how to optimize the performance of a Page that contains nested ListView:s with a total page serialized size of over 10 MB? I have made all actual data objects non-serializable and available via loadabledetachablemodel, but page Serialization seems to kill the performance in ajax requests where I might be modifying just a single cell in the maze. I tried callinc removeAll at onDetach... it improved performance but ofcourse event listeners don't work anymore ;) I could write custom event listeners as workaround, though, which would know to call onPopulate() before triggering an event. Any experiences of similar situation? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket 1.5.4 - Application crashing on German umlaut characters
Wicket : 1.5.4 Tomcat : 6.0.28 to 6.0.35 JDK - 1.6 I have a simple search application where I could enter search parameters like city name in a input textbox component. I am using displaying the results in a separate page by passing search criteria as pageparameters. searchForm.add(new Button(submitSearch) { @Override public void onSubmit() { PageParameters params = new PageParameters(); params.set(city, req.getCity()); setResponsePage(SearchResultPage.class, params); } }); If a pass normal String like 'Munich' without umlauts everything works ok The url is like http://localhost:8080/ecom/home/results?city=Munich which is ok and working fine If I pass the city name with umlaut like 'München' then, I get url like http://localhost:8080/ecom/home/results?city=Münchencity=Münchencity=Münchencity=MÃÂünchencity=MÃÂÃÂÃÂünchencity=MÃÂÃÂÃÂÃÂÃÂÃÂÃÂünchencity=MÃÂÃÂÃÂÃÂà and EXCEPTION trace in my log file looks like 05:18:28,092 DEBUG pache.wicket.page.PageAccessSynchronizer: 219 - 'http-8080-1' notifying blocked threads 23.02.2012 05:18:28 org.apache.coyote.http11.Http11Processor process SCHWERWIEGEND: Error processing request java.lang.ArrayIndexOutOfBoundsException: 8192 at org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:730) at org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:641) at org.apache.coyote.http11.InternalOutputBuffer.sendHeader(InternalOutputBuffer.java:514) at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1637) at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:956) at org.apache.coyote.Response.action(Response.java:183) at org.apache.coyote.Response.sendHeaders(Response.java:379) at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:314) at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:274) at org.apache.catalina.connector.Response.finishResponse(Response.java:493) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:317) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) 23.02.2012 05:18:28 org.apache.coyote.http11.Http11Processor process There itself is no RuntimeException thrown from wicket but somehow it generates some strange url which causes ArrayIndexOutofBoundException. Is this a bug in Wicket or that my preassumption was wrong that pageparameters should be encoded by Wicket when displayed in the url ? What is the wa to get around this problem ? Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-4-Application-crashing-on-German-umlaut-characters-tp4412794p4412794.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: Performance optimization
The problem is that the SERIALIZATION takes time. So it does not help to ZIP AFTER serialization... I have debugged it and it's just thousands and thousands of components. Even printing the component paths alone take almost 10mb or more because there is repetition ;) ** Martin 2012/2/23 Bertrand Guay-Paquet ber...@step.polymtl.ca Hi, Have you seen the following thread? http://apache-wicket.1842946.**n4.nabble.com/Shrinking-the-** session-size-simply-by-**zipping-it-Saved-my-day-**td4402980.htmlhttp://apache-wicket.1842946.n4.nabble.com/Shrinking-the-session-size-simply-by-zipping-it-Saved-my-day-td4402980.html Perhaps this can help you. That said, 10MB seems HUGE! Since you already use detachable models, maybe you could have a look at a memory profiler like Java VisualVM to find out which objects take the most space. Bertrand On 22/02/2012 10:12 PM, Martin Makundi wrote: Hi! Any experiences how to optimize the performance of a Page that contains nested ListView:s with a total page serialized size of over 10 MB? I have made all actual data objects non-serializable and available via loadabledetachablemodel, but page Serialization seems to kill the performance in ajax requests where I might be modifying just a single cell in the maze. I tried callinc removeAll at onDetach... it improved performance but ofcourse event listeners don't work anymore ;) I could write custom event listeners as workaround, though, which would know to call onPopulate() before triggering an event. Any experiences of similar situation? ** Martin --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Performance optimization
Hi, Wicket 1.5 has support for pluggable serializers via ISerializer interface, you could try to plug in different serializer implementations, for example this one https://github.com/wicketstuff/core/wiki/Kryo-Serializer . That should make the serialization bit faster. -- Juha Syrjälä On 02/23/2012 05:12 AM, Martin Makundi wrote: Hi! Any experiences how to optimize the performance of a Page that contains nested ListView:s with a total page serialized size of over 10 MB? I have made all actual data objects non-serializable and available via loadabledetachablemodel, but page Serialization seems to kill the performance in ajax requests where I might be modifying just a single cell in the maze. I tried callinc removeAll at onDetach... it improved performance but ofcourse event listeners don't work anymore ;) I could write custom event listeners as workaround, though, which would know to call onPopulate() before triggering an event. Any experiences of similar situation? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Performance optimization
But is serializing wicket native components only.. I would assume wicket does it best. 2012/2/23 Juha Syrjälä juha.syrj...@gmail.com: Hi, Wicket 1.5 has support for pluggable serializers via ISerializer interface, you could try to plug in different serializer implementations, for example this one https://github.com/wicketstuff/core/wiki/Kryo-Serializer . That should make the serialization bit faster. -- Juha Syrjälä On 02/23/2012 05:12 AM, Martin Makundi wrote: Hi! Any experiences how to optimize the performance of a Page that contains nested ListView:s with a total page serialized size of over 10 MB? I have made all actual data objects non-serializable and available via loadabledetachablemodel, but page Serialization seems to kill the performance in ajax requests where I might be modifying just a single cell in the maze. I tried callinc removeAll at onDetach... it improved performance but ofcourse event listeners don't work anymore ;) I could write custom event listeners as workaround, though, which would know to call onPopulate() before triggering an event. Any experiences of similar situation? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Performance optimization
Hi, I would guess that Wicket uses a normal Java built-in serializer by default. Here are some benchmarks for different serializer implementations https://github.com/eishay/jvm-serializers/wiki/ . Java's built-in serializer is not the fastest... -- Juha Syrjälä On 02/23/2012 08:45 AM, Martin Makundi wrote: But is serializing wicket native components only.. I would assume wicket does it best. 2012/2/23 Juha Syrjäläjuha.syrj...@gmail.com: Hi, Wicket 1.5 has support for pluggable serializers via ISerializer interface, you could try to plug in different serializer implementations, for example this one https://github.com/wicketstuff/core/wiki/Kryo-Serializer . That should make the serialization bit faster. -- Juha Syrjälä On 02/23/2012 05:12 AM, Martin Makundi wrote: Hi! Any experiences how to optimize the performance of a Page that contains nested ListView:s with a total page serialized size of over 10 MB? I have made all actual data objects non-serializable and available via loadabledetachablemodel, but page Serialization seems to kill the performance in ajax requests where I might be modifying just a single cell in the maze. I tried callinc removeAll at onDetach... it improved performance but ofcourse event listeners don't work anymore ;) I could write custom event listeners as workaround, though, which would know to call onPopulate() before triggering an event. Any experiences of similar situation? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Performance optimization
I think that would be something that should be implemented at wicket core... anybody done this before? Is there any way to tell wicket NOT to serialize a page? For example give a timer if user does not invoke the page for 1 minutes it will not be serializeed..? ** Martin 2012/2/23 Juha Syrjälä juha.syrj...@gmail.com: Hi, I would guess that Wicket uses a normal Java built-in serializer by default. Here are some benchmarks for different serializer implementations https://github.com/eishay/jvm-serializers/wiki/ . Java's built-in serializer is not the fastest... -- Juha Syrjälä On 02/23/2012 08:45 AM, Martin Makundi wrote: But is serializing wicket native components only.. I would assume wicket does it best. 2012/2/23 Juha Syrjäläjuha.syrj...@gmail.com: Hi, Wicket 1.5 has support for pluggable serializers via ISerializer interface, you could try to plug in different serializer implementations, for example this one https://github.com/wicketstuff/core/wiki/Kryo-Serializer . That should make the serialization bit faster. -- Juha Syrjälä On 02/23/2012 05:12 AM, Martin Makundi wrote: Hi! Any experiences how to optimize the performance of a Page that contains nested ListView:s with a total page serialized size of over 10 MB? I have made all actual data objects non-serializable and available via loadabledetachablemodel, but page Serialization seems to kill the performance in ajax requests where I might be modifying just a single cell in the maze. I tried callinc removeAll at onDetach... it improved performance but ofcourse event listeners don't work anymore ;) I could write custom event listeners as workaround, though, which would know to call onPopulate() before triggering an event. Any experiences of similar situation? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - 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: Performance optimization
(ofcourse I mean invoke within 1 minute...) 2012/2/23 Martin Makundi martin.maku...@koodaripalvelut.com: I think that would be something that should be implemented at wicket core... anybody done this before? Is there any way to tell wicket NOT to serialize a page? For example give a timer if user does not invoke the page for 1 minutes it will not be serializeed..? ** Martin 2012/2/23 Juha Syrjälä juha.syrj...@gmail.com: Hi, I would guess that Wicket uses a normal Java built-in serializer by default. Here are some benchmarks for different serializer implementations https://github.com/eishay/jvm-serializers/wiki/ . Java's built-in serializer is not the fastest... -- Juha Syrjälä On 02/23/2012 08:45 AM, Martin Makundi wrote: But is serializing wicket native components only.. I would assume wicket does it best. 2012/2/23 Juha Syrjäläjuha.syrj...@gmail.com: Hi, Wicket 1.5 has support for pluggable serializers via ISerializer interface, you could try to plug in different serializer implementations, for example this one https://github.com/wicketstuff/core/wiki/Kryo-Serializer . That should make the serialization bit faster. -- Juha Syrjälä On 02/23/2012 05:12 AM, Martin Makundi wrote: Hi! Any experiences how to optimize the performance of a Page that contains nested ListView:s with a total page serialized size of over 10 MB? I have made all actual data objects non-serializable and available via loadabledetachablemodel, but page Serialization seems to kill the performance in ajax requests where I might be modifying just a single cell in the maze. I tried callinc removeAll at onDetach... it improved performance but ofcourse event listeners don't work anymore ;) I could write custom event listeners as workaround, though, which would know to call onPopulate() before triggering an event. Any experiences of similar situation? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - 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: Performance optimization
Hi, Wicket 1.5 uses by default JavaSerializer (ISerializer impl based on Java Serialization API) because it is tested well (in previous versions of Wicket). It may be slower than other serialization frameworks but it works well in all cases. KryoSerializer is easy to use with Java objects and it is very easy to optiimize it for specific classes but it is not that well test and fail you in corner cases. And Kryo itself is actively developed at the moment... But ISerializer is in Wicket 1.5 (I think Makundi still use 1.4). Wicket is optimized to have as small as possible components. If you see optimization in any of them please file a ticket and we will improve it. But adding thousands of small components will still produce a big page... Suggestions: - show less items per page. Who wants to scroll a page with thousands items ?! Use paging and filters. - experiment with Jolira's stateless ajax behaviors By making your page stateless it wont be serialized at all (this answers your question about tell Wicket to not serialize) HTH On Thu, Feb 23, 2012 at 8:07 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: (ofcourse I mean invoke within 1 minute...) 2012/2/23 Martin Makundi martin.maku...@koodaripalvelut.com: I think that would be something that should be implemented at wicket core... anybody done this before? Is there any way to tell wicket NOT to serialize a page? For example give a timer if user does not invoke the page for 1 minutes it will not be serializeed..? ** Martin 2012/2/23 Juha Syrjälä juha.syrj...@gmail.com: Hi, I would guess that Wicket uses a normal Java built-in serializer by default. Here are some benchmarks for different serializer implementations https://github.com/eishay/jvm-serializers/wiki/ . Java's built-in serializer is not the fastest... -- Juha Syrjälä On 02/23/2012 08:45 AM, Martin Makundi wrote: But is serializing wicket native components only.. I would assume wicket does it best. 2012/2/23 Juha Syrjäläjuha.syrj...@gmail.com: Hi, Wicket 1.5 has support for pluggable serializers via ISerializer interface, you could try to plug in different serializer implementations, for example this one https://github.com/wicketstuff/core/wiki/Kryo-Serializer . That should make the serialization bit faster. -- Juha Syrjälä On 02/23/2012 05:12 AM, Martin Makundi wrote: Hi! Any experiences how to optimize the performance of a Page that contains nested ListView:s with a total page serialized size of over 10 MB? I have made all actual data objects non-serializable and available via loadabledetachablemodel, but page Serialization seems to kill the performance in ajax requests where I might be modifying just a single cell in the maze. I tried callinc removeAll at onDetach... it improved performance but ofcourse event listeners don't work anymore ;) I could write custom event listeners as workaround, though, which would know to call onPopulate() before triggering an event. Any experiences of similar situation? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org