Ambrose Chapel wrote:
> say I have an implementation which goes like this:
>
>     Artists > The Beatles > Abbey Road > [non-iUI page]
>
> Where my non-iUI page is dynamically created from a CGI script
> accessing a database, say, UGC, like reviews of Abbey Road. Content
> which can't be pre-loaded anyway.
>   

One solution is to have the dynamic CGI script create a page fragment 
(e.g. a <div> or <ul>) and load that dynamically.  iUI 'page' (aka views 
or fragments) can be dynamically created and loaded via AJAX.

> When I'm on that last, outside page, there's no way to go back to the
> "Abbey Road" page, because once I've left iUI, no matter what URL I
> dynamically construct for "back", going back takes me to the iUI home
> "page".
>   

There is a "fix" for this in iUI 0.30 which is currently available in an 
alpha version.  (A beta should be available shortly.   I'm also going to 
propose that we postpone unimplemented 0.30 features to 0.40 and try to 
release 0.30 before iPhoneDevCamp)

To download the alpha look here: http://code.google.com/p/iui/downloads/list

The fix has two limitations:
1) The "page" you want to go to must be preloaded (i.e. contained in 
initial DOM)
2) If the page is two steps  down the hierarchy it will work, but a 
press of the back button
    will take  you all the way back to home.

By extending the function getPageFromLoc() you may be able to create 
more sophisticated behavior,
but the code in 0.30 is a good start.

Also see Issue #82 in the Issues DB:
http://code.google.com/p/iui/issues/detail?id=82

I'm open for suggestions and/or patches on this issue.

> And if the answer is that I should always stay inside iUI to preserve
> the history, hierarchy etc of the interface, how do other people do
> dynamic content? If I load a large iUI "page" at that point using
> AJAX, then my user goes back, and down another path to another Album,
> then another, eventually the amount of HTML loaded into the iUI file
> will get very large, right? Do people load it, then delete it again
> when users go back?
>   

If you use the same 'id' attribute for the dynamic page/fragment the old 
version will be replaced with the new when the new one is loaded via Ajax.
 From your e-mail, I would think the best solution would be to try to 
dynamically generate a page fragment with a deterministic id and keep it 
within the same HTML page.  If for some reason you can't do that, take a 
look at iUI 0.30.


-- Sean


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to iphonewebdev@googlegroups.com
To unsubscribe from this group, send email to 
iphonewebdev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to