On Fri, Sep 27, 2013 at 11:12 AM, Hendy Irawan <he...@soluvas.com> wrote:
> On Fri, Sep 27, 2013 at 8:47 AM, Martin Grigorov-4 [via Apache Wicket] < > ml-node+s1842946n4661552...@n4.nabble.com> wrote: > > > On Thu, Sep 26, 2013 at 10:58 PM, Hendy Irawan <[hidden email]< > http://user/SendEmail.jtp?type=node&node=4661552&i=0>> > > wrote: > > > > > Good news! > > > > > > I've created a proof-of-concept project using Wicket 6.10 : > > > > > > https://github.com/ceefour/wicket-historyapi > > > > > > There are 3 approaches: > > > 1. redirect > > > 2. stateless > > > 3. history API > > > > > > (Actually there should be a stateful approach too.) > > > > > > The History API is using history.js (don't worry, HTML4 support is > > disabled > > > i.e. no hashbangs). > > > > > > > Actually this worries me. As a framework Wicket should support older > > browsers. > > At the moment we support IE8+. > > I'm not sure when we will be able to drop support for IE 8 and 9. > > > > > How to support older browsers, it's a choice. history.js has support for > HTML4 via hashbangs. > Since you said you didn't like it, and neither do I, it doesn't mean that > "Wicket won't support older browsers", > it means that the support will be in another form, i.e. not hashbang, but > can be any of: > 1. redirect (demoed) > 2. stateless (demoed) > 3. stateful (not demoed, but everybody already knows this anyway) > > > > > > > > > > What I'd like to have is a hybrid approach that combines approach #1 > > > (redirect, for non-supporting browsers e.g. IE10 & Googlebot) + #3 > > (history > > > > > > > According to http://caniuse.com/#search=history IE10 should support > > Hisotry > > API. > > > > Thanks for the rechecking! I was referring when you said "IE 8/9/10 because > these versions of IE do > not support HTML5 History API". Now that's a good news that IE 10 actually > support history ! :) > One less browser to worry about :) > > > > > > > > > API, for supporting browsers). Not sure how to do this yet.... > > > > > > As it is now, all these approaches require workarounds and non-standard > > > Wicket components, and especially the "stateless" approach aren't > > working > > > in certain situations. > > > > > > > Yes. This is the main reason why Wicket do not provide official support > > for > > them, i.e. they are not part of wicket-core. > > > > I'm hoping this can improve for Wicket 7. If not in Wicket 7 Core, then at > least Core improvements (i.e. "enablers") so that building on top of it > will feel more natural and less hacky. > > One of the foundation blocks to enable this would be Stateless support / > components: > > > https://cwiki.apache.org/confluence/display/WICKET/Ideas+for+Wicket+7.0#IdeasforWicket7.0-Betterstatelesssupport > > wicket-stateless as it stands now is already awesome. Any plans to merge > this into Wicket 7 core/extensions? > There were discussions whether to add wicket-stateless in Apache Wicket and we decided to not do it. Search in archives. > > > > > > > > > > > > > It'd be great if the combined approach would work out-of-the-box with > > > Wicket 7. > > > > > > And one more thing would be transitions and animations. This is not > > > exclusive to history API/stateless support but some support in core > > would > > > be very appreciated. e.g. an API such as this would be wonderful: > > > > > > target.add( myComponent, Animation.fadeOut(250), Animation.fadeIn(400) > > ); > > > > > > > See http://wicketinaction.com/2013/02/replace-components-with-animation/ > > and > > > > > https://github.com/martin-g/blogs/blob/master/wicket6-replace-with-effect/src/main/java/com/mycompany/HomePage.java#L36 > > . > > > > Indeed that's exactly what I used in the demo: > > https://github.com/ceefour/wicket-historyapi/blob/4529b29050ffee2becdab70c1ad9e170ef945568/src/main/java/com/hendyirawan/wickethistory/Html5HistoryPage.java > > My point was to show that although it can be done in Wicket 6, it's not > natural and not an integral part of Wicket 6. This is what I hope will be > improved in Wicket 7. > > Hendy > > > > I think it will be better if composition is used instead. For example: > > > > Effect hideEffect = new FadeOut(duration); > > Effect showEffect = new SlideIn(duration); > > Effects.replace(target, component, hideEffect, showEffect) > > > > > Awesome ! > > I'm pretty sure I won't complain much about the API.. as long as it's in > Wicket, then I'm happy ^_^ > Hendy > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Wicket7-History-API-support-for-navigable-AJAX-pages-components-tp4660502p4661555.html > Sent from the Forum for Wicket Core developers mailing list archive at > Nabble.com. >