Which ones? RequestCycle.get() and Session.get()? Don't you dare to hide those! :-)
-Matej Johan Compagner wrote: > ohh forgot to mention. I don't like static access methods. Those if > needed (for threadlocals) > should be hidden as possible. > > johan > > > On 8/20/06, * Johan Compagner* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > No we should hide the thread local access. That is prefectly fine. > > It is much more clear that all the things you do you do not on the > component but on the request cycle. > It just makes much more sense. > > just some setResponsePage() somewhere in the code in a component. > What is that > why call that on the component? what has that to do with the > component you are in > Completely nothing, It just looks like some static import that you > can call. > > The problem also now is that we must have all those methods in sync. > So add one in request cycle > and we also have to delegate it again in the component. That is in > my eyes not needed. > > This one is the only one that i think should stay: > public final CharSequence urlFor(final RequestListenerInterface > listener) > > because for that you really ask the url of this component for that > listener interface the component has. > So that one should stay because you really ask something from that > component. > > johan > > > > On 8/20/06, *Martijn Dashorst* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > I think that Delegate is an appropiate pattern here, which is > used in > much of the convenience methods. One of the biggest problems Java is > facing is the verbosity of the language. Removing these delegating > methods will make reading the application methods a lot less clear. > > I don't 'get' what someone will possibly understand better from > having > getRequestCycle() everywhere in the Java class. If it is a > problem of > understanding, then we need some serious extra documentation. > > And while you're at it, why not remove getRequestCycle() and > getSession() also? RequestCycle.get() and Session.get() are just one > extra character, and communicate intent even better? > > If we're going to move responsibilities to their respective > classes, > then why not move the 'convenience methods' to their classes: > > public static final void RequestCycle.setResponsePage(Page page) { > RequestCycle.get().setResponsePage(page); > } > > This way you can do: > > public void onSubmit() { > RequestCycle.setResponsePage(new MyPage()); > } > > Martijn > > On 8/19/06, Johan Compagner < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > yes if i have to clean up component, then i am really going to > clean it up!! > > Then i will remove pretty much all those silly "redirect" > methods.. > > > > I personally never liked them from day one. > > Developers need to understand what exactly happen. > > > > just calling in a onSubmit() setResponsePage(new MyPage()) out > of the blue > > is a bit strange because what does that have to do with the > > component/innerclass > > you are currently on? Developers don't learn anything if you > ask me. > > getRequestCycle().setResponsePage(xxx) is maybe a bit more > > verbose > > but it makes things really clear.. > > > > Those methods are in my eyes something like Static imports > (the feature of > > java 5 i really don't like) > > > > johan > > > > > > > > On 8/19/06, Martijn Dashorst <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > +1 and this can get on the list for 1.3 as well IMO, or will > this > > > become a big api change? > > > > > > Martijn > > > > > > On 8/18/06, Igor Vaynberg <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > > is there any reason why urlfor calls are not synchronized > between > > > > requestcycle and component? i know component had some > urlfor that were > > > > conviniences and basically passed in "this" for some > params - but what > > about > > > > requestcycle.urlfor(page) - should that not also be in > component? > > > > > > > > i think it was a mistake to start with to pollute > component with urlfor > > - > > > > its too late to do anything now but maybe in 2.0 we can > get rid of them? > > > > there is nothing wrong with getRequestCycle().urlFor() > syntax imho > > > > > > > > -Igor > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > Using Tomcat but need to do more? Need to support web > services, > > security? > > > > Get stuff done quickly with pre-integrated technology to > make your job > > > > easier > > > > Download IBM WebSphere Application Server v.1.0.1 based on > Apache > > Geronimo > > > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > > > > > > > > _______________________________________________ > > > > Wicket-develop mailing list > > > > Wicket-develop@lists.sourceforge.net > <mailto:Wicket-develop@lists.sourceforge.net> > > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > <https://lists.sourceforge.net/lists/listinfo/wicket-develop> > > > > > > > > > > > > > > > > > > > > > -- > > > Download Wicket 1.2.1 now! Embed Wicket components in your > portals! > > > -- http://wicketframework.org > > > > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web > services, security? > > > Get stuff done quickly with pre-integrated technology to > make your job > > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on > Apache Geronimo > > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > > > _______________________________________________ > > > Wicket-develop mailing list > > > Wicket-develop@lists.sourceforge.net > <mailto:Wicket-develop@lists.sourceforge.net> > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web > services, security? > > Get stuff done quickly with pre-integrated technology to make > your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on > Apache Geronimo > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > > > > > _______________________________________________ > > Wicket-develop mailing list > > Wicket-develop@lists.sourceforge.net > <mailto:Wicket-develop@lists.sourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > > > > > -- > Download Wicket 1.2.1 now! Embed Wicket components in your portals! > -- http://wicketframework.org <http://wicketframework.org> > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make > your job easier > Download IBM WebSphere Application Server v.1.0.1 based on > Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > _______________________________________________ > Wicket-develop mailing list > Wicket-develop@lists.sourceforge.net > <mailto:Wicket-develop@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Wicket-develop mailing list > Wicket-develop@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-develop ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-develop mailing list Wicket-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-develop