For example you put a form in youre page.
And that form has some panels that has some input fields. Depending on some state that you give it.
Then if you had a form with a bookmarkable post url then everything really needs to be encoded in the url (/xxx/xxx/xxx)
to construct the page exactly how you made it for that form. So that every component id of the formcomponents will
match. The same goes for everything other on that page like links (none bookmarkable)
So you have to be able to exactly construct the page again that was rendered.
I think i will try something for myself . But using a hidden field where i just dump the complete page and all its components
(with detached models) But this will be to large for normal use i think.
johan
On 1/4/06, Ralf Ebert <
[EMAIL PROTECTED]> wrote:
Hi,
could you actually build something like a stateless page with links
and forms in it? (could you recover the state by hand from the request
just as Wicket would do it) I mean to have real stateless pages you
probably would want a mechanism which would get the -information
needed to recover state- in the rendered page...
Somehow I also wouldn't consider every "BookmarkablePage" to be
stateless, because the name "bookmarkable page" implies only that the
page is reachable by a bookmark, but not that every possible state of
the page could be recovered by using a bookmark / without the session.
Couldn't bookmarkable pages be just implemented by a interface which
has a method which would need to build a url for the current state of
the page. The urls are rewritten by wicket anyway. So you could just
ask the page after rendering: hey, can you give me a static url which
would recover your state? If it can, the url is used and the page
doesn't need to be stored in session. But this would give a page the
option to be stateless sometimes... And it would simplyfy bookmarkable
links because you could use a normal link component and the rendered
page would get a static link by itself. (I consider caring links about
request parameters of another page a bit bad anyway). Do I miss
something or could this probably work?
Regards,
Ralf
On 1/4/06, Johan Compagner <[EMAIL PROTECTED] > wrote:
> 'what happens if someone says isStateless == true but he does add a none
> bookmarkable link to it? Or a form?
>
> Can't we somehow know that a page is stateless? When no non bookmarkable
> links to the page itself are requested/made
> for that page a page could be stateless.
>
> I guess if Page.urlFor(final Component component, final Class
> listenerInterface) is never called for a page the page is stateless.
>
> johan
>
>
>
> On 1/1/06, Jonathan Locke <[EMAIL PROTECTED]> wrote:
> >
> > I've implemented this for now as public boolean Page.isStateless()
> > (which returns false by default). There's no good reason for an
> > interface because IPageMapEntry's that are not Pages will always be
> > stateful. This provides a really easy way to mark any page.
> >
> > We could just remove BookmarkableWebPage or we could comment on how it's
> > probably useless to most "real" applications (any application where
> > you've got your own base page, as you point out). In most cases you'll
> > probably just have to create your own such class. I've done this and it
> > works nicely. I've got VoicetribeWebPage and
> > VoicetribeBookmarkableWebPage extends VoicetribeWebPage.
> > BookmarkableWebPage is useful if you are writing something fairly
> > trivial. In all other cases, it just gets in the way. Please remove if
> > you don't like... or comment with a warning/explanation...
> >
> > jon
> >
> > Martijn Dashorst wrote:
> > > It would most certainly help the communication... I remember the
> > > discussions concerning bookmarkable pages and bookmarkable page links
> > > all too good ;-)
> > >
> > > Would this mean that in order to be bookmarkable, a page should
> > > /always/ derive from BookmarkablePage?
> > >
> > > Shouldn't an interface be a much better solution?
> > >
> > > interface IBookmarkable {
> > > public boolean isStateless();
> > > }
> > >
> > > Or a better name should be ImNotInThePageMapEver?
> > >
> > > My reluctance for introducing a base page /class/ is that it gets
> > > really ugly when implementing application wide base pages. In our
> > > current web app we have AbstractBasePage, AbstractSecureBasePage
> > > (authenticated), and when you have both stateless pages and statefull
> > > pages, you probably end up with a myriad of base page classes, not
> > > helping the maintenance. Marking pages for exclusion of the pagemap
> > > seems more flexible.
> > >
> > > Martijn
> > >
> > > On 1/1/06, SourceForge.net <[EMAIL PROTECTED]> wrote:
> > >
> > >> Bugs item #1394722, was opened at 2005-12-31 23:41
> > >> Message generated for change (Tracker Item Submitted) made by Item
> Submitter
> > >> You can respond by visiting:
> > >>
> https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1394722&group_id=119783
> > >>
> > >> Please note that this message will contain a full copy of the comment
> thread,
> > >> including the initial issue submission, for this request,
> > >> not just the latest update.
> > >> Category: core
> > >> Group: 1.2
> > >> Status: Open
> > >> Resolution: None
> > >> Priority: 9
> > >> Submitted By: Jonathan Locke (jonathanlocke)
> > >> Assigned to: Nobody/Anonymous (nobody)
> > >> Summary: BookmarkableWebPage class
> > >>
> > >> Initial Comment:
> > >> We should consider making a base class like this for
> > >> bookmarkable pages. One advantage is that we could
> > >> easily keep them out of the session entirely (since
> > >> they are stateless). We could add Page.isStateless ()
> > >> and override this is BookmarkableWebPage to return
> > >> true. Any stateless web page would not be added to
> > >> PageMap. I could do this in about 15 minutes. I'd
> > >> just like to discuss a little first. On the face of
> > >> it, it seems like a good idea.
> > >>
> > >>
> > >>
> ----------------------------------------------------------------------
> > >>
> > >> You can respond by visiting:
> > >>
> https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1394722&group_id=119783
> > >>
> > >>
> > >>
> -------------------------------------------------------
> > >> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > >> for problems? Stop! Download the new AJAX search engine that makes
> > >> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> > >>
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > >> _______________________________________________
> > >> Wicket-develop mailing list
> > >> [email protected]
> > >>
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > >>
> > >>
> > >
> > >
> > > --
> > > Living a wicket life...
> > >
> > > Martijn Dashorst - http://www.jroller.com/page/dashorst
> > >
> > > Wicket 1.1 is out:
> http://wicket.sourceforge.net/wicket-1.1
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > > for problems? Stop! Download the new AJAX search engine that makes
> > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> > > http://ads.osdn.com/?ad_idv37&alloc_id865&opÌk
> > > _______________________________________________
> > > Wicket-develop mailing list
> > > [email protected]
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > >
> > >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems? Stop! Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-develop mailing list
> > [email protected]
> >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
>
>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
