ha, i glanced over that page but didnt get to this part. this works, but its quiete a hack. i tried to do this with wicket to see what it would be like a while back and i think janne even checked something like this into the core at one point - default headers of the page would set it as expired immediately. when you clicked the back button it would cause a round trip to the server, and pressing it quickly multiple times caused all kinds of weird things to happen in different browsers. but at least wo tries to deal with the problem unlike tapestry.

i think wicket's versioning approach is better here for a few reasons: it supports browser's cache, and it only stores undo history which is typically much much less then storing the state of the entire page. the downside being sometimes you have to track the changes yourself by calling addstatechange().

-Igor


On 8/30/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
Backtracking Cache

WebObjects supports the use of a web browser's Back button by keeping
a cache of recently viewed pages on the server. This process is called
backtracking. By default, a cache is configured to hold 30 pages per
session, but you can customize it to meet your needs. To change the
default size of the cache, add code to the Application class's
constructor. For example, to change the page cache size to 45 pages,
you add this code line:

setPageCacheSize(45);
When a response page is generated, it and its state information are
added to the cache. That way, when the user clicks the browser's Back
button, WebObjects can retrieve the correct web component and its
state.

For backtracking to work properly with dynamic data, a web browser's
own cache must be disabled, so that all page requests go to the web
server and, therefore, your application. You can do this by adding
this code to the Application class's constructor method:

setPageRefreshOnBacktrackEnabled(true);
When the cache becomes full, the oldest page in it is discarded to
make room to store a new page. When the user backtracks past the
oldest page in the cache, WebObjects alerts the user with a special
webpage.

For more information on backtracking, read "Backtracking and Cache Management".

http://developer.apple.com/documentation/WebObjects/Web_Applications/Articles/8_Backtracking.html#//apple_ref/doc/uid/TP40003273-SW1

On 8/30/06, Igor Vaynberg <[EMAIL PROTECTED] > wrote:
> I guess i would be interested in knowing how web objects stores state and
> how the back button is handled.
>
> is the state stored like tapestry - disjointed from the components?
>
> do components have to be beans?
>
> does it store undo history to handle the back button somewhere when the
> state is stored serverside in session and not in urls?
>
> what drew me to wicket and away from tapestry were the following things:
>
> in wicket i could have very dynamic component hierarchies. i can take any
> panel and switch it with any other panel, move components around, etc. in
> tapestry the hierarchy is pretty much fixed from the creation of the page
> because of how it defines, pools, and handles state.
>
> in wicket i can use good citizen pattern with constructors and have
> private/protected final variables because wicket is unmanaged and so
> components dont have to be beans. in tapestry components have to be beans so
> none of these are possible. also to have your state persisted you have to
> have your getters/setters abstract and declared (at least as of a late 3.x).
>
> wicket keeps undo history so it can restore the proper state when the back
> button is used. when you use tapestry you are pretty much on your own when
> you use session scope.
>
> i tried to look for this stuff in wo docs but couldnt really find anything
> useful.
>
> -Igor
>
>
>
> On 8/30/06, Anders Peterson <[EMAIL PROTECTED] > wrote:
> > Frank Silbermann wrote:
> >
> > > Just glancing at your link for a few seconds, and reading the earlier
> > > comment that it looks like ASP.NET with VS.NET, I would guess that Web
> > > Objects provides a library of components that you can paint onto your
> > > pages, automatically generating the custom tags in your HTML file.
> >
> > Yes, but you don't have to do it that way.
> >
> > > Suppose you are customizing a component by setting many properties, and
> > > using it with those settings on fifty different webpages.  In Wicket, I
> > > can create a method which instantiates a web display object, sets its
> > > properties and returns it.  I can then call that method every time I
> > > want to instantiate a web object with those settings.
> >
> > You can, of course, do that with WO as well.
> >
> > > What facility does Web Objects provide that lets you avoid having to
> > > re-set those properties fifty times?
> >
> > ... and however you choose to construct your "web display object" it is
> > (naturally) also a component that can be used as a building block for
> > other "web display objects".
> >
> > > (Isn't the inconvenience of adding slightly-customized variations of
> > > components to the toolset the reason most Swing GUI programmers end up
> > > building their GUI in code instead of using some IDE's graphical
> > > GUI-painter?)
> >
> > Most people just don't want to change their way of doing things (and
> > some graphical GUI-painters are not very good).
> >
> > You seem to think there is only a fixed and limited set of components to
> > work with - why assume something like that?
> >
> > /Anders
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] ] On
> Behalf Of Anders
> > > Peterson
> > > Sent: Tuesday, August 29, 2006 12:51 PM
> > > To: wicket-user@lists.sourceforge.net
> > > Subject: Re: [Wicket-user] WebObjects open source?
> > >
> > > Not sure what to say... it makes me productive...
> > >
> > > It's not really fair to compare Wicket and WebObjects (WO). WO is a
> > > whole package of frameworks and tools that function well together (but
> > > can be used independently). Wicket needs team mates to replace WO
> > > entirely.
> > >
> > > With Wicket any html and java editors will do just fine. This is
> > > generally a good thing (I think) but it's also a restriction. With
> > > WebObjects the tools are part of what makes the package great:
> > >
> > > Start up the WOBuilder tool, create a WODisplayGroup instance and start
> > > (visually) combining WOComponents and binding them to data. It's fast
> > > and intuitive...
> > >
> > > /Anders
> > >
> > >
> http://developer.apple.com/documentation/WebObjects/Conceptual/WO53_WOBu
> > > ilderGuide/
> > >
> > >
> http://developer.apple.com/documentation/webobjects/Reference/API/com/we
> > > bobjects/appserver/WODisplayGroup.html
> > >
> http://developer.apple.com/documentation/Webobjects/Reference/API/com/we
> > > bobjects/appserver/WOComponent.html
> > >
> > > Eelco Hillenius wrote:
> > >> :) It's one of my favorite parts of Wicket, so sure.
> > >>
> > >> What about the strong points of WebObjects, what are the things you
> > >> really like about that?
> > >>
> > >> Eelco
> > >>
> > >> On 8/29/06, Anders Peterson <[EMAIL PROTECTED] > wrote:
> > >>> Sure, if it has to be just like Wicket to compete; you win. ;-)
> >
> >
> -------------------------------------------------------------------------
> > 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-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -------------------------------------------------------------------------
> 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-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>


--
Download Wicket 1.2.2 now! New Ajax components: Tree, TreeTable and ModalWindow
-- 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
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
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-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to