>From: Matthias Wessendorf <[EMAIL PROTECTED]>
>
> Hi
>
> > Now, what do I want to be able to see in my history or to bookmark? I
> > want to bookmark simple pages, where state is not so important at all.
> > Or only a small portion of the state is important...
>
> > Those simple pages I usually refer to with an "action" attribute that
> > is put (as a string) directly on the or
> > tag, right?
>
> right, since no *complicated* calculation for action outcome is needed.
>
> > Why not render out this action attribute as a parameter to the URL of
> > the link optionally, not submitting a form and loosing all JSF state,
> > but having a bookmarkable link?
>
> a feature like this makes it more easier to implement systems like ebay,
> where bookmarkable URLs are a must!
>
This is something that I've been thinking about also.  Craig has a remoting
solution in Shale that allows you to invoke an "action" method on a backing
bean.  Its purpose is for AJAX calls but I'm thinking that it might also be a
way to implement bookmarkable URLs. 
 
The basic idea creates a convention in the url for invoking the method.
contextroot/dynamic/remoting$business/cityAndStateForZip.faces?zip=80124
 
A phase listener intercepts "dynamic" folder as the special identifier. 
Next comes the managed bean name and then the method.
 
His solution completes the response returning markup but I wonder
if you could somehow add the target view id and create the view. 
 
Now the Shale view controller would give you processing hooks
but what if you wanted to create a custom component that needed
to be script less.   

Gary

 

> >
> > The developer can decide then:
> > - do I need this link to be bookmarked
> > - do I want this link to use the plain old JSF posting system with
> > state-saving.
>
> ok
>
> >
> > Enhancement: we could additionally render out params to this link as -
> > yes, right, params to the URL. So people can optionally build there
> > web-apps just like they were used to when JSF wasn't around.
>
> so something like
>
> host/app/foo.faces?param1=foo¶m2=bar
>
> >
> > Good idea - bad idea - better idea ;) ?
>
> Why not rendering a link to a NonFacesRequestServlet ?
> (like the tobago stuff)
>
> For links like
> foo.faces?param1=foo¶m2=bar
>
> your backing bean construktor (or init() of ViewController) needs to
> perform some lookups.
> That could be easily done by that mentioned servlet, without doing
> that parameter catching stuff inside of your backing bean.
>
> @Manfred: I guess I saw a ticket in RI stuff for this. What's the EGs
> plan for enabling bookmarkable URLs ?
>
> -Matthias
>
> > regards,
> >
> > Martin
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>
> --
> Matthias Wessendorf
> Zülpicher Wall 12, 239
> 50674 Köln
> http://www.wessendorf.net
> mwessendorf-at-gmail-dot-com

Reply via email to