Thanks Cristi Manole, ya your ideas is great, this open my mind to the unlimited possibilities in Wicket :)
and as Igor said, how we know the javascript support when rendering the first page? Do you have alternative solution for this ? --- On Fri, 5/29/09, Igor Vaynberg <igor.vaynb...@gmail.com> wrote: > From: Igor Vaynberg <igor.vaynb...@gmail.com> > Subject: Re: AjaxLazyLoadPanel fallback version? > To: users@wicket.apache.org > Date: Friday, May 29, 2009, 2:05 PM > and what if you need to know > javascript support when rendering the > first page as you often do? > > the solution we have is generic and works well. it may not > be optimal > for everyone, so of course you are welcome to roll your > own. > > -igor > > On Fri, May 29, 2009 at 10:56 AM, Cristi Manole <cristiman...@gmail.com> > wrote: > > I don't remember now exactly so i'm just typing > whatever i think it's ok, > > but on some project we checked some javascript related > stuff using something > > like the following > > > > on html > > <script type="text/javascript" > > > function callWicket() { > > wicketAjaxGet(callback + '¶meter=value', > function() {}, function() > > {}); > > } > > </script> > > > > where callback is an extends > AbstractDefaultAjaxBehaviour that if it gets > > called, you have js, > > > > dummyDiv.add(new > AjaxSelfUpdatingTimerBehavior(Duration.seconds(whatever)) { > > �...@override > > protected void > onPostProcessTarget(AjaxRequestTarget target) { > > target.appendJavascript("callWicket();"); > > } > > }); > > dummyDiv.add(behavior); > > > > We got rid of the div through ajax after being used. > if js is not enabled, I > > wouldn't have the self updating timer doing anything > in the first place. > > > > Maybe it's stupid, maybe it's too much but it worked > for us, without any > > redirect, without showing anything to the user. And > once you have it in a > > component, I don't care about it, just dumb it to the > page. > > > > Cristi Manole > > > > On Fri, May 29, 2009 at 2:39 PM, Igor Vaynberg > > <igor.vaynb...@gmail.com>wrote: > > > >> thats exactly what the redirect page does.... > >> > >> you can of course implement the check yourself but > you need to know > >> that on server side so it has to be submitted > somehow. > >> > >> -igor > >> > >> On Fri, May 29, 2009 at 10:36 AM, Cristi Manole > <cristiman...@gmail.com> > >> wrote: > >> > In order to have something like that, I have > to specifically mention > >> > something in my WebApplication class, right > (if i remember correctly) ? > >> And > >> > I think the way wicket works for browser > extend is to redirect to some > >> page > >> > where it reads this info. I think it's too > much just to see the support > >> for > >> > js. > >> > > >> > Why not go the easy way and have some kind of > html tag that holds a value > >> > like x. Through javascript I change that > value like y. I tie that with a > >> > wicket:id to read it. If it's x, I have js. > >> > > >> > Or what i'm saying is not valid? > >> > > >> > Cristi Manole > >> > > >> > On Fri, May 29, 2009 at 1:14 PM, Igor > Vaynberg <igor.vaynb...@gmail.com > >> >wrote: > >> > > >> >> you can ask wicket to figure out if the > browser supports javascript or > >> not, > >> >> see > >> >> > >> >> > >> > getApplication().getRequestCycleSettings().setGatherExtendedBrowserInfo() > >> >> > >> >> the way the fallback button works is that > it is a regular button and > >> >> we use javascript to override the default > behavior - thus if no > >> >> javascript is there then nothing is > overridden and the button works > >> >> like a regular button instead of ajax. > >> >> > >> >> -igor > >> >> > >> >> On Fri, May 29, 2009 at 4:51 AM, yong > mook kim <mkyong2...@yahoo.com> > >> >> wrote: > >> >> > > >> >> > hi, > >> >> > > >> >> > Thanks, i agree with your point. > However what i want is a browser's > >> >> javascript detect function, if > isJavascriptEnable() then load the > >> >> LazyLoadPanel else fall back to normal > panel behaviour. > >> >> > > >> >> > something like below > >> >> > > >> >> > Page start.... > >> >> > > >> >> > if(isJavascriptEnable()){ > >> >> > add(new > AjaxLazyLoadPanel('123')... > >> >> > }else{ > >> >> > add(new ABCPanel('123').... > >> >> > } > >> >> > > >> >> > Page end.... > >> >> > > >> >> > I wonder how Wicket > AjaxFallBackButton work........? > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > --- On Fri, 5/29/09, Martijn > Dashorst <martijn.dasho...@gmail.com> > >> >> wrote: > >> >> > > >> >> >> From: Martijn Dashorst <martijn.dasho...@gmail.com> > >> >> >> Subject: Re: AjaxLazyLoadPanel > fallback version? > >> >> >> To: users@wicket.apache.org > >> >> >> Date: Friday, May 29, 2009, 7:26 > AM > >> >> >> It's called Panel. Either your > users > >> >> >> have to have javascript enabled > >> >> >> and you can use LazyLoadPanel, > or you have to use direct > >> >> >> Panel's. > >> >> >> > >> >> >> There is no way to lazy load > anything without having to > >> >> >> resort to > >> >> >> JavaScript. Think about it. How > could you instruct the > >> >> >> browser to > >> >> >> retrieve and replace a part of > your page after a given > >> >> >> time? > >> >> >> > >> >> >> The only thing that comes to > mind is using iframes. > >> >> >> > >> >> >> Martijn > >> >> >> > >> >> >> On Fri, May 29, 2009 at 12:09 > PM, yong mook kim < > >> mkyong2...@yahoo.com> > >> >> >> wrote: > >> >> >> > > >> >> >> > Hi, > >> >> >> > > >> >> >> > When browser's Javascript > is disabled, > >> >> >> AjaxLazyLoadPanel's image > (wicket ajax deafult image) will > >> >> >> keep loading forever, page will > not return. Is there a > >> >> >> AjaxLazyLoadPanel fallback > version which will delegate to > >> >> >> normal request if javascript is > disabled? > >> >> >> > > >> >> >> > I wonder how Wicket detect > the browser's javascript is > >> >> >> disabled? Thanks > >> >> >> > > >> >> >> > regards > >> >> >> > yong > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > --------------------------------------------------------------------- > >> >> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> >> >> > For additional commands, > e-mail: users-h...@wicket.apache.org > >> >> >> > > >> >> >> > > >> >> >> > >> >> >> > >> >> >> > >> >> >> -- > >> >> >> Become a Wicket expert, learn > from the best: > >> http://wicketinaction.com > >> >> >> Apache Wicket 1.3.5 is released > >> >> >> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. > >> >> >> > >> >> >> > --------------------------------------------------------------------- > >> >> >> 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 > >> >> > >> >> > >> > > >> > > >> > -- > >> > Cristi Manole > >> > > >> > Nova Creator Software > >> > www.novacreator.com > >> > > >> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > > > > > > -- > > Cristi Manole > > > > Nova Creator Software > > www.novacreator.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