Re: Component level cache
+1 agreed. Caching the data (models) coming from data providers and/or services is the best approach On 8/17/16 3:50 AM, Martin Grigorov wrote: Hi, I am not aware of such component. Usually the caching is done in the service layer, not in the UI. But if you prefer to do it with Wicket then do it in a Model that caches the DB results. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Aug 16, 2016 at 6:03 PM, Marcel Barbosa Pinto < marcel.po...@gmail.com> wrote: Hi, I was just wondering if there is some component to instead of let the a given component to render itself, check if there is a cache and display its rendered markup, thus avoiding unnecessary rendering, this could be useful for stateless components that need to display some list of categories from the database etc. Something like this: class Header extends Panel{ add(new ExpensiveCategoryListView()); } class Home extends Page{ add(new CachedComponent("headerContainer", Header.class)) } The CachedComponent would first check if there is an already rendered Header instance (could check in an in-memory store like, infinispan or hezelcast) What do you guys think? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicketstuff-htmlvalidator problem
Without the actual markup there's little we can help you with. What is the markup that generates these error reports? Martijn On Thu, Aug 18, 2016 at 12:00 PM, Dirk Forchelwrote: > Hi, > we're trying to use the Wicketstuff Html Validator (see > https://github.com/dashorst/wicket-stuff-markup-validator.) with our Wicket7 > project. We've built our application with the lates release of Wicket 7 > (7.4.0) and with the latest release of wicketstuff-htmlvalidator (1.11). > By the way, our generated Html markup is not valid, but we get all the time > if we're using the validator the following IllegalStateException. Any idea > how to solve the problem? > > ERROR [ValidationReport] Line 6 contains error at 81: value of attribute > "http-equiv" is invalid; must be equal to "content-type", "default-style" or > "refresh" > ERROR [ValidationReport] Line 7 contains error at 73: value of attribute > "http-equiv" is invalid; must be equal to "content-type", "default-style" or > "refresh" > ERROR [ValidationReport] Line 8 contains error at 50: value of attribute > "http-equiv" is invalid; must be equal to "content-type", "default-style" or > "refresh" > ERROR [ValidationReport] Line 9 contains error at 45: value of attribute > "http-equiv" is invalid; must be equal to "content-type", "default-style" or > "refresh" > ERROR [ValidationReport] Line 10 contains error at 51: value of attribute > "http-equiv" is invalid; must be equal to "content-type", "default-style" or > "refresh" > ERROR [ValidationReport] Line 11 contains error at 91: value of attribute > "http-equiv" is invalid; must be equal to "content-type", "default-style" or > "refresh" > ERROR [ValidationReport] Line 12 contains error at 46: value of attribute > "http-equiv" is invalid; must be equal to "content-type", "default-style" or > "refresh" > ERROR [ValidationReport] Line 13 contains error at 68: value of attribute > "http-equiv" is invalid; must be equal to "content-type", "default-style" or > "refresh" > ERROR [ValidationReport] Line 14 contains error at 74: value of attribute > "http-equiv" is invalid; must be equal to "content-type", "default-style" or > "refresh" > ERROR [ValidationReport] Line -1 contains error at -1: report: > Using the ômetaö element to specify the document-wide default language is > obsolete. Consider specifying the language on the root element instead. > ERROR [HtmlValidationResponseFilter] java.lang.IllegalStateException: > Calling Context.exit without previous Context.enter > java.lang.IllegalStateException: Calling Context.exit without previous > Context.enter > at org.mozilla.javascript.Context.exit(Unknown Source) > at org.mozilla.javascript.Context.exit(Unknown Source) > at org.whattf.datatype.FunctionBody.checkValid(FunctionBody.java:59) > at > org.whattf.datatype.AbstractDatatype.checkValid(AbstractDatatype.java:75) > at > com.thaiopensource.relaxng.pattern.DataDataDerivType.dataDeriv(DataDataDerivType.java:25) > at > com.thaiopensource.relaxng.pattern.PatternMemo.dataDeriv(PatternMemo.java:191) > at > com.thaiopensource.relaxng.pattern.PatternMatcher.matchAttributeValue(PatternMatcher.java:161) > at > com.thaiopensource.relaxng.sax.PatternValidator.startElement(PatternValidator.java:38) > at > com.thaiopensource.xml.sax.ForkContentHandler.startElement(ForkContentHandler.java:43) > at > org.wicketstuff.htmlvalidator.xml.dataattributes.DataAttributeDroppingContentHandlerWrapper.startElement(DataAttributeDroppingContentHandlerWrapper.java:158) > at > org.wicketstuff.htmlvalidator.xml.langattributes.XmlLangAttributeDroppingContentHandlerWrapper.startElement(XmlLangAttributeDroppingContentHandlerWrapper.java:149) > at > nu.validator.htmlparser.sax.SAXStreamer.elementPushed(SAXStreamer.java:141) > at > nu.validator.htmlparser.sax.SAXStreamer.elementPushed(SAXStreamer.java:35) > at > nu.validator.htmlparser.impl.TreeBuilder.push(TreeBuilder.java:3976) > at > nu.validator.htmlparser.impl.TreeBuilder.appendToCurrentNodeAndPushFormattingElementMayFoster(TreeBuilder.java:4558) > at > nu.validator.htmlparser.impl.TreeBuilder.startTag(TreeBuilder.java:1849) > at > nu.validator.htmlparser.impl.Tokenizer.emitCurrentTagToken(Tokenizer.java:1311) > at > nu.validator.htmlparser.impl.Tokenizer.stateLoop(Tokenizer.java:2152) > at > nu.validator.htmlparser.impl.Tokenizer.tokenizeBuffer(Tokenizer.java:1522) > at nu.validator.htmlparser.io.Driver.runStates(Driver.java:317) > at nu.validator.htmlparser.io.Driver.tokenize(Driver.java:217) > at > nu.validator.htmlparser.sax.HtmlParser.tokenize(HtmlParser.java:459) > at nu.validator.htmlparser.sax.HtmlParser.parse(HtmlParser.java:402) > at > org.wicketstuff.htmlvalidator.HtmlValidationResponseFilter.validateMarkup(HtmlValidationResponseFilter.java:226) > at >
wicketstuff-htmlvalidator problem
Hi, we're trying to use the Wicketstuff Html Validator (see https://github.com/dashorst/wicket-stuff-markup-validator.) with our Wicket7 project. We've built our application with the lates release of Wicket 7 (7.4.0) and with the latest release of wicketstuff-htmlvalidator (1.11). By the way, our generated Html markup is not valid, but we get all the time if we're using the validator the following IllegalStateException. Any idea how to solve the problem? ERROR [ValidationReport] Line 6 contains error at 81: value of attribute "http-equiv" is invalid; must be equal to "content-type", "default-style" or "refresh" ERROR [ValidationReport] Line 7 contains error at 73: value of attribute "http-equiv" is invalid; must be equal to "content-type", "default-style" or "refresh" ERROR [ValidationReport] Line 8 contains error at 50: value of attribute "http-equiv" is invalid; must be equal to "content-type", "default-style" or "refresh" ERROR [ValidationReport] Line 9 contains error at 45: value of attribute "http-equiv" is invalid; must be equal to "content-type", "default-style" or "refresh" ERROR [ValidationReport] Line 10 contains error at 51: value of attribute "http-equiv" is invalid; must be equal to "content-type", "default-style" or "refresh" ERROR [ValidationReport] Line 11 contains error at 91: value of attribute "http-equiv" is invalid; must be equal to "content-type", "default-style" or "refresh" ERROR [ValidationReport] Line 12 contains error at 46: value of attribute "http-equiv" is invalid; must be equal to "content-type", "default-style" or "refresh" ERROR [ValidationReport] Line 13 contains error at 68: value of attribute "http-equiv" is invalid; must be equal to "content-type", "default-style" or "refresh" ERROR [ValidationReport] Line 14 contains error at 74: value of attribute "http-equiv" is invalid; must be equal to "content-type", "default-style" or "refresh" ERROR [ValidationReport] Line -1 contains error at -1: report: Using the ômetaö element to specify the document-wide default language is obsolete. Consider specifying the language on the root element instead. ERROR [HtmlValidationResponseFilter] java.lang.IllegalStateException: Calling Context.exit without previous Context.enter java.lang.IllegalStateException: Calling Context.exit without previous Context.enter at org.mozilla.javascript.Context.exit(Unknown Source) at org.mozilla.javascript.Context.exit(Unknown Source) at org.whattf.datatype.FunctionBody.checkValid(FunctionBody.java:59) at org.whattf.datatype.AbstractDatatype.checkValid(AbstractDatatype.java:75) at com.thaiopensource.relaxng.pattern.DataDataDerivType.dataDeriv(DataDataDerivType.java:25) at com.thaiopensource.relaxng.pattern.PatternMemo.dataDeriv(PatternMemo.java:191) at com.thaiopensource.relaxng.pattern.PatternMatcher.matchAttributeValue(PatternMatcher.java:161) at com.thaiopensource.relaxng.sax.PatternValidator.startElement(PatternValidator.java:38) at com.thaiopensource.xml.sax.ForkContentHandler.startElement(ForkContentHandler.java:43) at org.wicketstuff.htmlvalidator.xml.dataattributes.DataAttributeDroppingContentHandlerWrapper.startElement(DataAttributeDroppingContentHandlerWrapper.java:158) at org.wicketstuff.htmlvalidator.xml.langattributes.XmlLangAttributeDroppingContentHandlerWrapper.startElement(XmlLangAttributeDroppingContentHandlerWrapper.java:149) at nu.validator.htmlparser.sax.SAXStreamer.elementPushed(SAXStreamer.java:141) at nu.validator.htmlparser.sax.SAXStreamer.elementPushed(SAXStreamer.java:35) at nu.validator.htmlparser.impl.TreeBuilder.push(TreeBuilder.java:3976) at nu.validator.htmlparser.impl.TreeBuilder.appendToCurrentNodeAndPushFormattingElementMayFoster(TreeBuilder.java:4558) at nu.validator.htmlparser.impl.TreeBuilder.startTag(TreeBuilder.java:1849) at nu.validator.htmlparser.impl.Tokenizer.emitCurrentTagToken(Tokenizer.java:1311) at nu.validator.htmlparser.impl.Tokenizer.stateLoop(Tokenizer.java:2152) at nu.validator.htmlparser.impl.Tokenizer.tokenizeBuffer(Tokenizer.java:1522) at nu.validator.htmlparser.io.Driver.runStates(Driver.java:317) at nu.validator.htmlparser.io.Driver.tokenize(Driver.java:217) at nu.validator.htmlparser.sax.HtmlParser.tokenize(HtmlParser.java:459) at nu.validator.htmlparser.sax.HtmlParser.parse(HtmlParser.java:402) at org.wicketstuff.htmlvalidator.HtmlValidationResponseFilter.validateMarkup(HtmlValidationResponseFilter.java:226) at org.wicketstuff.htmlvalidator.HtmlValidationResponseFilter.filter(HtmlValidationResponseFilter.java:195) at org.apache.wicket.protocol.http.BufferedWebResponse$WriteCharSequenceAction.invoke(BufferedWebResponse.java:168) at org.apache.wicket.protocol.http.BufferedWebResponse.writeTo(BufferedWebResponse.java:602) at