Retrieve data from the datagrid control

Hi people,

Currently I'm trying to create a datagrid control that allows the user to see the view of all data. And allow the user to click the data grid and a popup displays a more detailed information data

But I have some problem to retrieve the id of the data first. I managed to create a click event to allow the user to click a specific popup data and shows.

I need help regarding this. Thank you

-ExpertDiscoverySystem.mxml-

[Bindable]
public var dataid:String;
private void onItemClick (e:ListEvent): void {}
currentState = "SearchName;
Add here the popup, then try to transfer a certain area to display all necessary data
titleWindow = PopUpManager.createPopUp (Thi, component. DataDetail, true) as TitleWindow;
PopUpManager.bringToFront (titleWindow);
var dataid:String = e.currentTarget.selectedTarget.id;
}

< mx:Panel put width = "1169" height = "558" layout = "absolute" title = "Datagrid" x = "48.7" y = '171.65' includeIn 'SearchResult' = >
< mx:Label horizontalCenter = "0" y = "1" text = 'results '.
fontSize = "16" fontWeight = "bold" / >
< mx:DataGrid id = "dgPeeps" width = '1141' height = '487' selectedIndex = '0' showHeaders = 'false' "16.6" = x y = '24' creationComplete = "dgPeeps_creationCompleteHandler (event)" itemClick = "onItemClick (event); "dataProvider ="{getContentForAllResult.lastResult}">
< mx:columns >
< mx:DataGridColumn dataField = "img" itemRenderer = "component.image" / >
< mx:DataGridColumn headerText = "name" dataField = "name" / >
< mx:DataGridColumn headerText = "Department" dataField = "department" / >
< mx:DataGridColumn headerText = "expert" dataField = "expert" / >
< mx:DataGridColumn headerText = "project" dataField = "project" / >
< mx:DataGridColumn dataField = "id" / >
< / mx:columns >
< / mx:DataGrid >
< / mx:Panel >

-DataDetail.mxml - the popup component

<? XML version = "1.0" encoding = "utf-8"? >
" < = xmlns:fx s:TitleWindow ' http://ns.Adobe.com/MXML/2009 "
xmlns:s = "library://ns.adobe.com/flex/spark".
xmlns:MX = "library://ns.adobe.com/flex/mx" width = "700" height = "600" backgroundColor = "#000000" backgroundAlpha = '0,70' close = "titleWindow_close (event)" xmlns:services = "*" services > "
< fx:Declarations >
< s:CallResponder id = "getSpecificResultResult" / >
< services: ExpertSearchManager id = "expertSearchManager" fault = "Alert.show (event.fault.faultString +"\n"+ event.fault.faultDetail)" showBusyCursor = "true" / > "
<! - Place non-visual elements (e.g., services, items of value) here - >
< / fx:Declarations >

< fx:Script >
<! [CDATA]
Import mx.controls.Alert;
Import mx.core.FlexGlobals;
Import mx.events.CloseEvent;
Import mx.events.FlexEvent;
Import mx.managers.PopUpManager;

[Bindable]

private void titleWindow_close(evt:CloseEvent):void {}
PopUpManager.removePopUp (this)
}

protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
{
change below with Dynamics
var dataid:String;
dataID = FlexGlobals.topLevelApplication.id;
getSpecificResultResult.token = expertSearchManager.getSpecificResult (dataid);
}

[]] >
< / fx:Script >

< mx:Image x = "10" y = "10" width = "67" height = "67" / >
< s:Label = "85" x = "10" text = "Label" color = "#FFFFFF" / >
< s:Label = "125" x = "10" text = "Label" color = "#FFFFFF" / >
< s:Label = "85" x y = "30" text = "Age" color = "#FFFFFF" / >
< s:Label = "114" x y = "30" text = "Label" color = "#FFFFFF" / >
< mx:HRule x = "0" y = "109" width = "697" / >
< mx:HRule x = "0" y = "256" width = "698" / >
< mx:VRule = "256" x = "114" height = "141" / >
< s:Label x = "10" y = "119" text = "Social Networking" color = "#FFFFFF" fontWeight = "bold" fontSize = "14" / >
< s:Label x = "10" y = "270" text = "Relationship" color = "#FFFFFF" fontWeight = "bold" fontSize = "14" / >
< s:Label = "270" x = "119" text = 'Skills' color = "#FFFFFF" fontWeight = "bold" fontSize = "14" / >
< mx:Image = "4" x = "151" source = "images/twitter.gif" width = "85" height = "21" / > "
< mx:Image = "6" x = "199" source = "images/facebook.jpg" width = "85" height = "21" / > "
< s:Label = "99" x = "160" text = "Label" color = "#FFFFFF" / >
< s:Label = "99" x = "208" text = "Label" color = "#FFFFFF" / >
< mx:DataGrid = "283" x = "376" id = "dataGrid" creationComplete = "dataGrid_creationCompleteHandler (event)" dataProvider = "{getSpecificResultResult.lastResult}" > "
< mx:columns >
< mx:DataGridColumn headerText = "id" dataField = "id" / >
< mx:DataGridColumn headerText = "expert" dataField = "expert" / >
< mx:DataGridColumn headerText = "project" dataField = "project" / >
< mx:DataGridColumn headerText = "searchTerm" dataField = "searchTerm" / >
< mx:DataGridColumn headerText = "searchCriteria" dataField = "searchCriteria" / >
< mx:DataGridColumn headerText = "Department" dataField = "department" / >
< mx:DataGridColumn headerText = "name" dataField = "name" / >
< mx:DataGridColumn headerText = "img" dataField = "img" / >
< / mx:columns >
< / mx:DataGrid >

< / s:TitleWindow >

It should work fine if you did changes properly. You will see directly the _dataid of the property which you type titleWindow. through code intellisense.

As because you stated a public variable it must defenitely be accessible for the titleWindow instance. Please cross-check you do not have something wrong.

Thank you

Jean Claude

Tags: Flex

Similar Questions

  • Read data in the Datagrid control

    Hi all
    I filled a Datagrid (three columns), users can drop and drag the products of this datagrid to another to remove their product. At the bottom of my first datagrid, I have a label that says how many products is classified. It is just the sum of the last column in my datagrid, but I can't seem to know how to read data from just the last column to sum up these values and update my label.

    Thanks in advance,

    Jordy

    I raise a solution to my problem.
    before, my datagrid looked this way:

    now I put it to this:

    I added a Dataprovider defect that is empty at the beginning.
    my code works now.

    Thanks for the help!

    Jordy

  • Need to retrieve data from the internal 512 GB sata drive (now removed the MB).

    MUSIC have a 512 GB mb pro with internal chips removed sata disk. I need to get information from the drive (now removed the MB). I expect to get the data via the USB port.  How to do this and with what cable. I have a MB air as replacement.

    Thanks for your help.

    Use this external case: http://eshop.macsales.com/item/OWC/MSTG800U3K/.  I replace in clone disks, data readers, testdrives for new OSXes, etc.  Any 2.5-inch drive, really.

  • SQL to retrieve data from the day before

    Hello

    I am asked to collect intelligence data and generate a daily report to determine the success rate (to do daily data that determines success rate). I have a session_time of column (with the DATE data type) that I try to do the job. I've been using:

    Select * from ABC

    where session_time > = TRUNC (SYSDATE - 2)

    Gives me data, but I get the data from 26/10/14 and 10/28/14 so when I only need data on 27-10-14 (as of the day 28/10/14). I tried a few variations and did not get the expected result. Could someone please help me understand this? Time is also displayed in my outings, maybe I shouldn't include the time?

    I use: TOAD for Oracle 11.5.1.2.

    Oracle Database 11g Enterprose 11.2.0.1.0 Edition

    Thank you in advance.

    Hello

    2632048 wrote:

    Hello

    I am asked to collect intelligence data and generate a daily report to determine the success rate (to do daily data that determines success rate). I have a session_time of column (with the DATE data type) that I try to do the job. I've been using:

    Select * from ABC

    where session_time > = TRUNC (SYSDATE - 2)

    Gives me data, but I get the data from 26/10/14 and 10/28/14 so when I only need data on 27-10-14 (as of the day 28/10/14). I tried a few variations and did not get the expected result. Could someone please help me understand this? Time is also displayed in my outings, maybe I shouldn't include the time?

    I use: TOAD for Oracle 11.5.1.2.

    Oracle Database 11g Enterprose 11.2.0.1.0 Edition

    Thank you in advance.

    Use:

    SELECT *.

    ABC

    WHERE session_time > = TRUNC (SYSDATE) - 1

    AND session_time<  trunc="">

    ;

    It's 09:15 on October 28, 2014, then TRUNC (SYSDATE - 2) is 00:00:00 October 26; The query you posted became data of October 26 and later.  (You may not all future dates in your table.)

    If it's 09:15 October 28, then TRUNC (SYSDATE) is 00:00:00 October 28 (i.e., midnight, at the beginning of October 28) and TRUNC (SYSDATE) - 1 is 00:00:00 October 27.

    Do not be tempted to use

    WHEN TRUNC (session_time) = TRUNC (SYSDATE) - 1 * INEFFECTIVE!  ***

    It will get the same results, but it is slower, you cannot use an index on session_time and requires a call to separate function for each row in the table, it is selected or not.

  • How to convert binary data from the Panel controls in ASCII values?

    Hello

    I seemed to face a roadblock with how to convert binary values in ascii.

    I created this .vi to save all control values in an .ini file and call them at that time where I will carry out the .vi as shown in the file attached. Registration key to simply save the data and Cancel button discards all current changes.

    I would like to understand how to retrieve all the values of control to ASCII, so I assign to a global variable for later use. I've looked everywhere for a good reference document, and I couldn't find one that would explain my question. I would be greatly appreciated if someone could point me in the right direction.

    Thank you

    Sam

    I tried a simple way to save control values in the front panel

    Not reinventing the wheel, when there are ready to use of solutions, for example:

    http://sine.NI.com/NIPs/CDs/view/p/lang/en/NID/209753

    Use the MGI save & restore settings VI of the palette (for example, it records all the settings that have been changed in a graph, which is very useful) and the MGI Save (restoration) Front Panel data live (to save and restore control values in the front panel).

    Here is an example:

  • Allowing my child to see its data from the parental control

    Related to: Family Safety: frequently asked Questions

    Is there a way for me to let my child see the data we collect? I can add a new adult safety for the family, but I don't see a way that my son could connect itself.

    Hello Emiliano,

    Unfortunately, there are no cases where your child can sign in on the security of family account to see family safety activity reports.

    This is possible only from an administrator account. We are unable to verify the reports with a child account.

    Hope it will be useful. Please get back to us if you need more help on this.

  • Drag and drop data from the DataGrid to textInput with flex.

    Hello

    Cay please help me on this problem...

    I have a datagid with certain values... I have a textInput on the user interface...

    There is a button '+' on the user interface... when I click on this button, it will add an additional TextInput box UI under the first TextInput... Like thiseverytime when you click on the button '+' it will add a TextInput more UI just below the other...

    Now, I want to drag the values in datagrid to Textinput boxes... User can move two or more raising each textInput on his requirement...

    How do I drag... could help me please out on the question of thi...


    I am not able to drag the TextInputs values:

    Here is my code: could someone please help me...

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"width ="100% "height ="100% "creationComplete =" init () "> "


    < mx:Script >
    <! [CDATA]
    Import mx.containers.HBox;
    Import mx.controls.Alert;
    Import mx.managers.PopUpManager;
    Import Components.testPopUpWindow;
    Import mx.core.UIComponent;
    Import mx.containers.TitleWindow;
    Import mx.core.DragSource;
    Import mx.core.IUIComponent;
    Import mx.managers.DragManager;
    Import mx.events.DragEvent;
    Import mx.controls.Alert;
    Import mx.controls.Text;
    to import flash.geom.Point;

    Import mx.collections.ArrayCollection;
    [Bindable]
    private var dpFlat:ArrayCollection = new ArrayCollection([)
    {JobName: 'A'},
    {JobName: 'B'},
    {JobName: 'C'},
    {JobName: "D"},
    {JobName: 'E'},
    {JobName: 'F'},
    ([{JobName: 'G'}]) ;

    private function box_addChild (): void
    {

    box: HBox var = new HBox();
    Box.Width = 716;
    var descriptionTextInput:TextInput = new TextInput();
    var strButton:Button = new Button();
    strButton.label = "Submit";
    descriptionTextInput.width = 174;
    descriptionTextInput.height = 58;
    box.addChild (descriptionTextInput);
    / * box.addChild (strButton); */
    strButton.addEventListener (MouseEvent.CLICK, submitButtonClicked);
    interactiveQuestionsVBoxID.addChild (box);

    }

    public void init (): void
    {

    this.addEventListener (DragEvent.DRAG_ENTER, acceptDrop);
    this.addEventListener (DragEvent.DRAG_DROP, handleDrop);

    }

    public void acceptDrop (dragEvent:DragEvent): void
    {
    If (dragEvent.dragSource.hasFormat ("items"))
    {
    DragManager.showFeedback (DragManager.COPY);
    DragManager.acceptDragDrop (TextInput (dragEvent.currentTarget));
    }
    }

    var pt:Point;
    public void handleDrop (dragEvent:DragEvent): void
    {
    var dragInitiator:UIComponent = dragEvent.dragInitiator;
    var dropTarget:UIComponent = dragEvent.currentTarget as UIComponent;
    var table: items = dragEvent.dragSource.dataForFormat("items") in the table;
    / * pt = new Point (dragEvent.localX, dragEvent.localY);
    PT = dragEvent.target.localToContent (pt);
    var img:TextInput = new TextInput();
    IMG.x = dragEvent.localX;   IMG.y = dragEvent.localY;
    IMG.x = PT.x - Number (dragEvent.dragSource.dataForFormat ("mouseX"));
    IMG.y = PT.y - Number (dragEvent.dragSource.dataForFormat ("mouseY"));
    IMG. Width = 50;
    IMG. Height = 50;
    img.setStyle("fontSize",20);     IMG.source = "' Assets / ' + user.user points [0] +".png";"
    IMG. Text = Items [0]. JobName.toString ();

    img.buttonMode = true;
    img.mouseChildren = false;

    TextInput (event.currentTarget) .text = Arrayitems .label [0];

    var itemsArray:Array = event.dragSource.dataForFormat ("items") in the table; */
    TextInput (dragEvent.currentTarget) .text = points [0] .label;
    }

    public void beginDrag (mouseEvent:MouseEvent): void
    {

    var dragInitiator:TextInput = mouseEvent.currentTarget as TextInput;
    var dragSource:DragSource = new DragSource();
    dsource.addData (this, ' node');
    dragSource.addData (this.mouseX, 'mouseX');
    dragSource.addData (this.mouseY, 'mouseY');
    parent.addChild (dragImg);
    dragSource.addData (mouseEvent.currentTarget.text, "txt");
    try {}
    var dragProxy:TextInput = new TextInput();
    dragProxy.text = mouseEvent.currentTarget.text;
    Alert.Show ("text isss" + dragProxy.text);
    dragProxy.setActualSize (mouseEvent.currentTarget.width, mouseEvent.currentTarget .height)

    ask the DragManger to start drag
    DragManager.doDrag (dragInitiator, dragSource, mouseEvent, dragProxy);
    }
    {catch (e)}

    }

    []] >
    < / mx:Script >

    < mx:Canvas id = "c1" width = "100%" height = "100%" y = "10" x = "10" >

    < mx:DataGrid id = dataProvider "d1" = "{dpFlat}" x = "10" y = "119" dragEnabled = "true" dragMoveEnabled = "true" height = "229" width = "176" / >

    <!-< mx:Label id = "lbl" text = "Task name" width = "195" height = "28" x = "0" y = "0" fontWeight = "bold" / >-->
    < mx:Box id = "questionLabelMode" direction = "horizontal" width = '270.5' height = '24' y = "76" x = "211" >

    < name mx:Label = "Response" width = "173" text = "Answer" fontWeight = "bold" / >
    < mx:Button label = '+' width = click = "box_addChild ()"70";" "fontWeight ="normal"/ >
    <!-< mx:Button label = ""» width width = "71" fontWeight = "bold" click ="box_deleteChild (); "/ >-->
    < / mx:Box >

    < mx:VBox id = "interactiveQuestionsVBoxID" y = "119" height = "100%" width = "270.5" horizontalScrollPolicy = "off" x = "211" >
    <! - < mx:Box id = 'boxID' direction = "horizontal" width = "268" height = "58" > - >
    < mx:TextInput id = "t1" width = '174' dragDrop = "handleDrop (event)" height = "58" / > "
    <!-< mx:Button label = "Submit" id = "b1" / >-->

    <!-< / mx:Box >->
    < / mx:VBox >

    < / mx:Canvas >
    < / mx:Application >

    Hi Satya,

    I did it for you... Please copy the sub set of the code and try to run the application. You can see the application works for you.

    You have made two mistakes - you added event on this object listeners... but it refers to the current object (i.e.; your main application file but not TextInput).

    You so need addEventListeners to your textinput "t1" but not this...

    If you add listeners on it then in the functions of your 'acceptDrop' and 'handleDrop' you get 'dragEvent.currentTarget' as your main application but not TextInput (given that you added listeners to "this"). If you addListeners on t1 then its okay.

    Also, you need to add the eventListeners for the newly added text boxes like I did based on 'box_addChild' to the code below.

    Also in the handleDrop function the line of code where you set the text is bad... .it takes the code below...

    TextInput (dragEvent.currentTarget) .text = stock [0]. JobName;


    http://www.Adobe.com/2006/mxml"layout ="absolute"width ="100% "height ="100% "creationComplete =" init () ">"
     
      Import mx.containers.HBox;
    Import mx.controls.Alert;
    Import mx.managers.PopUpManager;
    Import Components.testPopUpWindow;
    Import mx.core.UIComponent;
    Import mx.containers.TitleWindow;
    Import mx.core.DragSource;
    Import mx.core.IUIComponent;
    Import mx.managers.DragManager;
    Import mx.events.DragEvent;
    Import mx.controls.Alert;
    Import mx.controls.Text;
    to import flash.geom.Point;
               
                   
       
               
    Import mx.collections.ArrayCollection;
    [Bindable]
    private var dpFlat:ArrayCollection = new ArrayCollection([)
    {JobName: 'A'},
    {JobName: 'B'},
    {JobName: 'C'},
    {JobName: "D"},
    {JobName: 'E'},

    {JobName: 'F'},
    ([{JobName: 'G'}]) ;
                 
    private function box_addChild (): void
    {
    box: HBox var = new HBox();
    Box.Width = 716;
    var descriptionTextInput:TextInput = new TextInput();
    var strButton:Button = new Button();
    strButton.label = "Submit";
    descriptionTextInput.width = 174;
    descriptionTextInput.height = 58;
    descriptionTextInput.addEventListener (DragEvent.DRAG_ENTER, acceptDrop);
    descriptionTextInput.addEventListener (DragEvent.DRAG_DROP, handleDrop);
       
    box.addChild (descriptionTextInput);
    / * box.addChild (strButton); */
    strButton.addEventListener (MouseEvent.CLICK, submitButtonClicked);
    interactiveQuestionsVBoxID.addChild (box);
    }
               
    public void init (): void
    {
                  
    T1.addEventListener (DragEvent.DRAG_ENTER, acceptDrop);
    T1.addEventListener (DragEvent.DRAG_DROP, handleDrop);
           
    }
       
    public void acceptDrop (dragEvent:DragEvent): void
    {
    If (dragEvent.dragSource.hasFormat ("items"))
    {
    DragManager.showFeedback (DragManager.COPY);
    DragManager.acceptDragDrop (TextInput (dragEvent.currentTarget));
    }
    }
       
    private var pt:Point;
    public void handleDrop (dragEvent:DragEvent): void
    {
    var dragInitiator:UIComponent = dragEvent.dragInitiator;
    var dropTarget:UIComponent = dragEvent.currentTarget as UIComponent;
    var table: items = dragEvent.dragSource.dataForFormat("items") in the table;
    / * pt = new Point (dragEvent.localX, dragEvent.localY);
    PT = dragEvent.target.localToContent (pt);
    var img:TextInput = new TextInput();
    IMG.x = dragEvent.localX;   IMG.y = dragEvent.localY;
    IMG.x = PT.x - Number (dragEvent.dragSource.dataForFormat ("mouseX"));
    IMG.y = PT.y - Number (dragEvent.dragSource.dataForFormat ("mouseY"));
    IMG. Width = 50;
    IMG. Height = 50;
    img.setStyle("fontSize",20);     IMG.source = "' Assets / ' + user.user points [0] +".png";"
    IMG. Text = Items [0]. JobName.toString ();
          
    img.buttonMode = true;
    img.mouseChildren = false;
            
    TextInput (event.currentTarget) .text = Arrayitems .label [0];
            
    var itemsArray:Array = event.dragSource.dataForFormat ("items") in the table; */
    var currTarget: * = dragEvent.currentTarget;
    interactiveQuestionsVBoxID = currTarget.getChildByName ("interactiveQuestionsVBoxID");
    TextInput (dragEvent.currentTarget) .text = stock [0]. JobName;
    }
           
           
    public void beginDrag (mouseEvent:MouseEvent): void
    {
             
    var dragInitiator:TextInput = mouseEvent.currentTarget as TextInput;
    var dragSource:DragSource = new DragSource();
    dsource.addData (this, ' node');
    dragSource.addData (this.mouseX, 'mouseX');
    dragSource.addData (this.mouseY, 'mouseY');
    parent.addChild (dragImg);
    dragSource.addData (mouseEvent.currentTarget.text, "txt");
    try {}
    var dragProxy:TextInput = new TextInput();
    dragProxy.text = mouseEvent.currentTarget.text;
    Alert.Show ("text isss" + dragProxy.text);
    dragProxy.setActualSize (mouseEvent.currentTarget.width, mouseEvent.currentTarget .height)
           
    ask the DragManger to start drag
    DragManager.doDrag (dragInitiator, dragSource, mouseEvent, dragProxy);
    }
    {} catch (error)
       
    }
         
    ]]>

       
     

     
         
         
     

     
                            
     


    If this post answers your question or assistance, please mark it as such.

    Thank you

    Jean Claude Chari

  • Adding or several new rows of data to the DataGrid control

    My requirement is to provide the ability to add a new line to the data grid when the tabs off (the last cell of the last row of the data grid. I did my editable datagrid and in 'itemEditEnd' Manager I'm adding a new object (with empty values) to the data provider for the grid and setting focus to the grid and then by setting the new row index as the Index selected for the grid. None of this activation itemEditor for the first cell of the new row.

    I saw somewhere that sending the itemEditBeginning will do for me. But do not know how to proceed. Appreciate if you can point me to an example of woring sample.

    Set the editedItemPosition on the grid property. That should do it.

  • How to use a 2.0 cutting to SATA/IDE adapter to retrieve data from the old machine

    I'm hooked, HD turns, but I can not display any data.  I do not understand this horsemen thing.  I don't see.  How to change?

    Looks like you're the last bit of life out of it when you were able to view folders once.

  • How to retrieve data from the database after the removal of the lines of the VO?

    Hello
    I use Jdeveloper 11.1.2.1.0
    I have a master's degree and a child.

    So according to my use case when a value in the master t changes the corresponding child should be removed.

    but when I change it to any other value I want to cancel the delete operation and retrieve values in children.

    Is it possible to do?


    Kind regards
    Nigel.

    Edited by: Nigel Thomas March 29, 2012 05:07

    Edited by: Nigel Thomas March 29, 2012 05:09

    Check [url http://mjabr.wordpress.com/2011/05/20/perform-deleteundo-delete-without-using-rollback/] recover deleted lines without using rollback

  • How to recover data from the browser tabs?

    Hello

    I am trying to retrieve data from the Firefox browser by dragging the tabs in a Windows/Mac/Linux application. Specifically, I was hoping to capture medadata HTML and video current time (for example, 01:23 05:00) YouTube pages for storage off favorite browser and reactivation.

    I couldn't find an online help or the documentation dealing with this issue.
    Any suggestions?

    Thank you

    There is an additional command that is added at the end of the url of Youtube. You need to add & = t * m * s at the end of the url. Where the asterisks are, replace you them with numbers. For example: http://www.youtube.com/watch?v=Zb7gTeLmpHs & t = 3m24s

    The m is s for seconds and minutes.

    You can also find this information by loading a video from Youtube, by dragging the time slider to the time you want to pause the video, and then right-click on the video and choose:

    'Copy the URL of the video at the present time'.

  • With the help of the socket object to retrieve data from web application without the html files

    I tried to use the socket object to retrieve data from a web application (I just control script version vs version online). So all I want to do is access http://hyle.io/version that returns me the current version of the application (such as a simple string) in order to compare it in my script and then notifies the user accordingly. I have just a few problems using the socket object. I used this code from the Adobe Javascript Tools Guide:


    reply = "";
    conn = new Socket;
    // access Adobe’s home page
    if (conn.open ("www.adobe.com:80")) {
    // send a HTTP GET request
    conn.write ("GET /index.html HTTP/1.0\n\n");
    // and read the server’s reply
    reply = conn.read(999999);
    conn.close();
    }
    

    ... that I then adapted as:

    reply = "";
    conn = new Socket;
    if (conn.open ("hyle.io:80")) {
      conn.write ("GET /version HTTP/1.0\n\n");
      reply = conn.read(999999); 
      conn.close();
    }
    

    And here is what I get:

    HTTP/1.1 400 Bad Request
    Content-Length: 225
    Content-Type: text/html
    Server: Pagodabox-Routing-Mesh
    
    

    Bad Request

    Your browser sent a request that this server could not understand.

    Résultat : true

    I don't know a lot about HTTP requests, but I wondered if it was related to the fact that I am not pointing to a specific HTML file and the type of request was wrong or if I should rather check if there is something wrong with my host?

    The site/app is PHP and is hosted on PagodaBox if it helps.

    Thanks in advance!

    Hi Sebastien Lavoie,

    It should work

    var HTTPFile = function (url, port) {}

    If (arguments.length == 1) {}

    URL = arguments [0];

    port = 80;

    };

    This.url = url;

    This.port = port;

    this.httpPrefix = this.url.match(/http:\/\//);

    This.Domain = this.httpPrefix is nothing? This.URL.Split("/") [0] + ":" + this.port: this .url .split ("/") [2] +":" + this.port;

    This.Call = ' GET ' + (this.httpPrefix == null? ' "). " http://" (+ this.url: this.url) + "HTTP/1.0\r\nHost: ' + (this.httpPrefix is nothing? "This.URL.Split("/ ") [0]: this .url .split (" / ") [2]) +" \r\nConnection: close\r\n\r\n ";

    This.Reply = new String();

    This.Conn = new Socket();

    This.Conn.Encoding = "binary";

    HTTPFile.prototype.getFile = {function (f)}

    var typeMatch = this.url.match(/(\.) (\w{3,4}\b)/g);

    If (this.conn.open (this.domain, "binary")) {}

    This.Conn.Write (this.) Call);

    This.Reply = this.conn.read (9999999999);

    This.Conn.Close ();

    } else {}

    This.Reply = "";

    }

    (Return this.reply.substr(this.reply.indexOf("\r\n\r\n")+4);

    };

    }

    Hyle var = new HTTPFile ("http://hyle.io/version");

    Alert (hyle. GetFile());

    And by the way, I like the idea of 'http://hyle.io'. Can you give me your email address, I want to learn more about this Web site.

    Please send me an email to [email protected]

  • Retrieve the data from the old hard drive IDE

    I have an old netbook HP TC 4200. I want to retrieve data from it. So I would like to know the details of the envelope required for the hard drive.

    None of the speakers USB external hard drive on the following URL will work. The book loads are also listed.

    http://www.Newegg.com/product/ProductList.aspx?submit=Ene&N=100008040%20600006255%20600006268&IsNodeId=1&name=IDE

  • create the http client to retrieve data from web service

    Hello

    I am newbie on our webworks. I need to retrieve data from web service. How to connect to this service and analyzed. There is a tutorial that can help me get started with it.

    Can any one advice me how can I start working with webworks on blackberry 10

    Thanks for any help

    In general, you will need to use an AJAX call to the server

    It really depends on what the server returns as to how the information is easy to digest

    JQuery provides a simple interface, and returns information easy to use

    If you deal with things gets complicated XML according to namespace

    If you look at the raw XML data and it goes something like fred: name you will have questions requiring an implementation of SAX - JSON is simple if you don't get that even if (nothing too confusing here)

    If using an external data source JSON go if you have the choice

    As examples go - just look to the top of JQuery Ajax [JSON / XML] and you will get where you're going quickly

    SAX is MUCH harder because of the namespace - Dublin is the most common and same XML without namespace is not simple to handle, so avoid it if you can

  • How to join two tables to retrieve the data from the columns in table two. Tables have primary and foreign key relationships

    Hello

    I want to join the two tables to retrieve the data from the columns of the two table passing parameters to the join query. Tables have primary and foreign key relationships

    Details of the table

    Alert-1 - AlertCode (FK), AlerID (PK)

    2 AlertCode-AlertDefinition-(PK)

    Help, please


    ----------

    Hi Vincent,.

    I think that you have not worked on adf 12.1.3.  In adf 12.1.3 you don't have to explicitly create the association. When you create the EO to your table, Association xxxxFkAssoc, will be created by ADF12.1.3 for you automatically. Please try this and do not answer anything... You can also follow the links below. I solved the problem by using the following link

    Oracle ADF Guide step by step - Oracle ADF tutorial: creating a relationship of the master / detail using Oracle ADF

    ---

Maybe you are looking for