cancel
Showing results for 
Search instead for 
Did you mean: 

flex sdk

darksonic
Champ in-the-making
Champ in-the-making
hi,
I am speaking to you has requested your help
I have a draft study that is a thing as "myspaces" but with the functions established working groups, the  versionning and include a tab "search"
I told myself that the flex will make a good method
so I realize my webscript but I did not sue them into flex
of course I read : http://wiki.alfresco.com/wiki/Flex_SDK_Developer_Guide
but I did not quite understand
hence be nice if one of you can give me an example "execution of a webscript with flex"

thank you


ps: I come not a recovering sources flexspace I use "Tortoise"as svn
and sorry for my bad english "i am frenshi Smiley Tongue"
5 REPLIES 5

stevereiner
Champ in-the-making
Champ in-the-making
darksonic,

The alfresco ACE module in svn has some example Flex code for search, login, logout using  alfresco's small flex framework and web scripts.

I should have the next release of  FlexSpaces done in next couple of days (and include the actionscript/flex source of FlexSpaces  for the first time in this release)

Alfresco flex framework and ACE sample
http://forums.alfresco.com/viewtopic.php?f=36&t=12318
http://forums.alfresco.com/viewtopic.php?f=36&t=12132

FlexSpaces
http://forums.alfresco.com/viewtopic.php?f=36&t=11876
http://forge.alfresco.com/projects/flexspaces/

Steve Reiner
http://www.integratedsemantics.org
http://www.integratedsemantics.com

darksonic
Champ in-the-making
Champ in-the-making
thanks steve for quickly response
i juste discover now the ace module  Smiley Surprised
it's really interesting, it's much help for me
thank you and soon

darksonic
Champ in-the-making
Champ in-the-making
hi steve
sorry but i need your help again
if i tried the ace module i got this error : "configuration variable 'compiler.library-path' value contains unknown token 'ALF_MODULES'"
and another question : i developed a small search module but the problem is, how can  i get a result of a webscript?
i know i must use event.result but i don't know how to use it

this is my code "i would like execute my search lucene webscript and print a result in same page:



   
<mxSmiley Frustratedcript>
        <![CDATA[
            import …..
                [Bindable]
          private var searchFeed:ArrayCollection;
          
          public function rechercher():void
         {
         var urlSmiley Frustratedtring = "http://localhost:8080/alfresco/service/proinvest/search";
            var webScript:WebScriptService = new WebScriptService(url, WebScriptService.GET, onSearchSuccess);
         // Build the parameter object
         var paramsSmiley Surprisedbject = new Object();
           params.q = searchTerms.text;
         // Execute the web script
         webScript.execute(params);
         }
         
         public function onSearchSuccess(eventSmiley FrustrateduccessEvent):void
         {
         event.result.resultset as ArrayCollection ;
         }
         ]]>
    </mxSmiley Frustratedcript>


   <mx:HBox>
      <mx:Label text="Terme a rechercher:" />
      <mx:TextInput id="searchTerms"
         enter="rechercher()" />
      <mx:Button label="ok"
         click="rechercher()" />
   </mx:HBox>


   
   <mx:TileList width="100%" height="100%"
      dataProvider="{searchFeed}"
           <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
           width="125" height="125"
             horizontalAlign="center"
             horizontalScrollPolicy="off" verticalScrollPolicy="off"
            paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5">
              <mx:Text text="{data.credit}" />

   </mx:TileList>

</mx:Application>


can you help me?

thanks a lot

darksonic
Champ in-the-making
Champ in-the-making
any body else can help me please?

stevereiner
Champ in-the-making
Champ in-the-making
darksonic,
1. You need to some sort of login (see login in ace) so the WebScriptService class will add a ticket to the url
3. how to get the result: depends on the format, look at ace search for atom xml
4. In flexspaces (delayed but source release coming soon)
a. I use xml e4x result format instead of object format to make working with xml easier and use a simpler custom xml format instead of atom
(patch WebScriptService.onResultEvent to only do its check for this.resultFormat == "object" to allow e4x result format
and do webScript.resultFormat ="e4x" before call webScript.execute
b.  now result data I get back is xml:

protected var nodeCollection:ArrayCollection;
var xmlData:XML = result as XML;
var nodeXMLCollection:XMLListCollection = new XMLListCollection(xmlData.node)
nodeCollection = new ArrayCollection();
for each (var xmlNode:XML in nodeXMLCollection)
{
    var node:Node = new Node();
    node.name = xmlNode.name;
    ….
    nodeCollection.addItem(node);
}

Steve
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.