• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
DirectAction pages with Ajax calls inside
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DirectAction pages with Ajax calls inside


  • Subject: DirectAction pages with Ajax calls inside
  • From: Amedeo Mantica <email@hidden>
  • Date: Fri, 14 Jan 2011 22:17:02 +0100

Hello all,

Sometime ago I was on the hotnews page of apple website

http://www.apple.com/hotnews/

and I noticed that if you click on the page selection numbers a javascript actually change tha page but is also added a fragment identifier to the page, so if you copy/paste the url or hit refresh you are still in the correct page


now, if we have a direct action page that we have called with some parameters, for example:

/wa/showProducts?category=Cables

and we have inside that page some Ajax popup buttons or other Ajax elements that can change category or page, when we hit realod we lose any choice made.


based on apple hotnews and thank to Mike for some explanations page I made a solution that I would like to share with you

When you need to an ajax call ( via AjaxUpdateLink, an AjaxObserveField etc... ) you need to update the url using a js window.location=...

then the url become

/wa/showProducts?category=Cables&page=2#&category=Video

when an user hit refresh or the url is pasted in a new page I made a javascript that take care of combining/updating the left side (and discard the rightside)


this is the js source code if you would like to check

http://www.confindustria.chieti.it/WebObjects/ConfindustriaNet.woa/Contents/WebServerResources/ajaxToDirectActions.js

if you would like to try go to this website

http://www.confindustria.chieti.it
on the top navigation bar click on "LE AZIENDE"

then you have on the left a popupmenu called "Selezione per settore" ( actually I have enabled only on that )
change tha value then reload the page

I think that this can be made better and eventually incorporated in wonder, adding two bindings to AjaxDinamicElements ( fragmentIdentifierKey, fragmentIdentifierValue )


Any suggestion ?

Regards
Amedeo

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: DirectAction pages with Ajax calls inside
      • From: Farrukh Ijaz <email@hidden>
  • Prev by Date: Re: Hudson and frameworks reference
  • Next by Date: Re: Hudson and frameworks reference
  • Previous by thread: Re: non-existent target of existing key in relationship
  • Next by thread: Re: DirectAction pages with Ajax calls inside
  • Index(es):
    • Date
    • Thread