Flex With Domino - Solving Caching Issues
A couple of people have asked me about caching and Flex. Once or twice about the datagrid and a couple of times about the session object not accepting that the user was logged-in in the simple demo.
To get round this you can add an extra parameter to the HTTPService to add anti-caching to it, like so:
Each time the service requests the session.object form it adds a different ending to the URL, such as:
/apps/flex.nsf/flex/session.object?ReadForm&nocache=1234476539548
Problem solved.
Note also that you can pass the parameters to the HTTPService via (Action)Script rather than by nesting them in an <mx:request> object, with a function like this:
private function requestSessionData():void{ var params:Object = new Object(); params.nocache = new Date().getTime(); httpSession.send(params); }
Which you use is down to both personal preference and, to a degree, circumstance. With the latter method you get the choice of which parameters you do or don't want to send. Not so with the request object.
The link to "simple demo" is broken. Should probably be apps, rather than aaps.
Cheers!
Deciding which approach brings components to mind. Since you can have a component completely made up of MXML -or- ActionScript, it's good to have two ways to tackle this.
Thx Jake, this helps me greatly.