flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Javier Guerrero GarcĂ­a <javi...@gmail.com>
Subject Re: Filtering the response from a CallResponder object
Date Tue, 25 Mar 2014 23:56:53 GMT
Just my opinion, I would get the responses from your webservices in XML
(pretty straightforward), and just filter the dataprovider in the datagrid
using ecmascript (E4X) in realtime (or even binding):
dataprovider="{modulesService.lastResult.(@moduleID!=whatever)}"

1. Set your httpservices type to XML, and get rid of all your parsing
functions :)
2. Adjust your webservices :)
3. Get familiar with E4X syntax (if you're not), trying with a couple of
datagrids
4. And you're done just like that ;)


On Tue, Mar 25, 2014 at 6:05 PM, SmileySnr <liam.odonnell@dit.ie> wrote:

>  0 down vote favorite
>
>
> I have a table called Studentmodules (SMID,StudentID, ModuleID) , which is
> realy a view into two other tables Students (StudentID, Name), and Modules
> (ModuleID,name)
>
> I have a as3 module called studentmodulesService.as used to retrieve a list
> of student modules among other calls.
>
> The following call successfully returns every line of the StudentModules
> Table.
>
> var smResult:CallResponder = new CallResponder();
> smResult.token =  studentmodulesService.getAllStudentmodules().
>
> This result is attached to a datagrid which display the contents of the
> studnetmodules Table. So far so good.
>
> I have a data entry portion which uses the first dropdownlist to pick up
> the
> student, then presents the second which displays the modules to be added to
> the set of modules for that student.
>
> The list displayed is a complete list of modules available. What I want to
> display is a filtered list of modules, where the modules displayed are
> those
> the student does not have yet in their list yet.
>
> This is how I would like this to work ... Or if you have a better way which
> may have worked for you ... that would be good too.
>
> public function filerModulesByStudentID(ModulesResult.lastResult,
> StudentID):Array
> {
>     /*
>      This is what I would like to achieve
>      get list of modules (already have this above) from Modules Table
> (list1)
>
>      These next two I need help with ...
>
>      get list of modules by studentID from StudentModules table. (list2)
> ...
>      list3 = list1 - list2
>
>      return list3 ... this is then bound to the dropdownlist for modules
>    */
>
>    }
>
> Any help would be appreciated
>
> SmilySnr
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Filtering-the-response-from-a-CallResponder-object-tp5697.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message