Complex Array/Objects in Datagrid

Hi,
I'm a complete noob to all this but I have a somewhat complex
array.....and I know my arrays will only get more complex.
I can get a single row by putting this as the data provider:
{dataProvider[0]['Time']}
Or, this: {dataProvider[1]['Time']}
BUT... I want multiple rows in my data grid. I can't seem to
figure out how to achieve this.
Simply putting {dataProvider} returns [object Object] ...
putting in {dataProvider[1]} will also return [object Object] ....
this is provided my dataFields are specified correctly of course
for each level.
Flash sees these as Objects, it barks at me for trying to
convert them to ArrayCollection or anything else.
I try to make a new array even of just the
dataProvider[0]['Time'] entries by specifying newArray[0] =
dataProvider[0]['Time'] ... etc. or by trying
newArray.push(dataProvider[0]['Article']) ... but this is inside a
function (for my remote connection) and I can't get the array back
to the public space for use in my data grid... or I'll get an error
about not being able to make an object into an array.
Any clues?? This sounds like such a simple thing ... and of
course I found out you can't simply put a statement to loop inside
the dataprovider... which would make it super easy.... so what's
up?
Thanks.
Here's the structure of my array by the way (returned with
amfphp) .. which will probably not be indented, sorry.
Array
[0] => Array
[Time] => Array
[id] => 1
[created] => 2007-02-25
[time] => 10
[notes] => hours (10)
[project_id] => 1
[user_id] => 1
[Project] => Array
[id] => 1
[name] => Test Project #1
[created] => 2007-02-25
[due] => 2007-02-28
[User] => Array
[id] => 1
[username] => admin
[1] => Array
[Time] => Array
[id] => 2
[created] => 2007-03-04
[time] => 4
[notes] => setup initial layout
[project_id] => 1
[user_id] => 1
[Project] => Array
[id] => 1
[name] => Test Project #1
[created] => 2007-02-25
[due] => 2007-02-28
[User] => Array
[id] => 2
[username] => tom

Similar problem with different data structure
My data looks like this
<employee >
<shift id="1">
<date>Sun 3-25</date>
<in0 id="122" >8:00am</in0>
<in1 id="333" >12:40</in1>
<out1 id="1234">5:40</out1>
<total>8.02</total>
</shift>
The datagrid displays the time in the <in1> tag just
fine, but when the user clicks on this cell, I need to be able to
get the "id" attribute in order to update the DB.
I'm a newbie and am trying to redo a dojo project in flex.
I'm not locked in to the xml pattern shown above. Otherwise my
datagrid is working well. snippet below...
<mx:DataGrid id="punchdetail"
itemClick="punchSelected(event);"
itemRenderer="BackgroundColorRenderer"
dataProvider="{DetailDS.lastResult.employee.shift}"
change="editPunch(event);"
sortableColumns="true">
<mx:columns>
<mx:DataGridColumn dataField="id" visible="false" />
<mx:DataGridColumn dataField="date" headerText="Date"/>
<mx:DataGridColumn dataField="in0" width="50"
headerText="In" />
<mx:DataGridColumn dataField="out0" width="50"
headerText="Out"/>
<mx:DataGridColumn dataField="total" />
</mx:columns>
</mx:DataGrid>
private function punchSelected(event:ListEvent):void {
var col:DataGridColumn =
punchdetail.columns[event.columnIndex];
Alert.show ( " "+punchdetail.selectedItem.col.dataField);
//Alert.show ( " "+col.dataField);
//Alert.show ( " "+punchdetail.selectedItem.valueOf());
Text
Text

Similar Messages

  • Complex JSON structure to Datagrid

    Hello,
    I have this app where I'm trying to parse this seemingly
    "complex" JSON object to an Arraycollection. The object returned
    from the http service request looks like this...
    "COLUMNS":[
    "COUNTRY_ID","STATE_ID","COUNTRY_NAME","STATE_NAME","COUNTRY_DEFAULT_COUNTRY_ID"
    "DATA":[
    [1,1,"United States","Alabama",1],
    [1,2,"United States","Alaska",1],
    [1,3,"United States","Arizona",1],
    [1,4,"United States","Arkansas",1],
    [1,5,"United States","California",1],
    [1,6,"United States","Colorado",1],
    [1,7,"United States","Connecticut",1],
    [1,8,"United States","Delaware",1]
    The simple app that I am having the trouble with looks like
    this...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*" layout="absolute"
    creationComplete="service.send();">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    import com.adobe.serialization.json.JSON;
    import mx.controls.Alert;
    import mx.utils.ObjectUtil;
    private function onJSONLoad(event:ResultEvent):void{
    var rawData:String = String(event.result.data);
    var arr:Array = (JSON.decode(rawData) as Array);
    var dp:ArrayCollection = new ArrayCollection(arr.data);
    grid.dataProvider = dp;
    ]]>
    </mx:Script>
    <mx:HTTPService id="service" resultFormat="text"
    url="
    http://xxx.xxx.xxx.xxx/this.json"
    result="onJSONLoad(event)" />
    <mx:DataGrid id="grid" right="10" left="10" top="10"
    bottom="10"/>
    </mx:Application>
    Any help would be greatly appreciated.

    AS3 is case sensitive, so the event.result.data should
    probably be event.result.DATA. Also check that you really do have
    an Array before casting with the "as" operator (as this will just
    return null if the value is not really an Array).

  • Complex arrays for DLLs

    I have spent a lot of time trying to pass arrays of complex numbers between LabVIEW and a DLL I have written in C++, but with no success. The data types I wish to interface with in the C++ are things like std::vector<std::complex<float> > and std::vector<std::complex<int16_t> > (or just the basic arrays they contain). However, I would be willing to use any sensible data representation (i.e. such that I don't need to shift it around in memory unnecessarily).
    I have gone through all the DLL examples in LabVIEW 2013, which include complex numbers and arrays, but not arrays of complex numbers. I tried using the typedef struct approach for handling complex numbers (suggested in one example). This works fine within my C++ code: I can reinterpret_cast<...>(...) to get back to arrays of std::complex. However, every attempt at interfacing this with LabVIEW has failed in a variety of ways. At best, I managed to get some garbled numbers passing back and forth.
    So, does anyone know where I can find a (very) basic example/step-by-step guide to passing complex arrays between LabVIEW and DLLs? Given that this is trivial in C++, I imagine there must be a straightforward solution out there somewhere.
    Many thanks!

    A LabVIEW complex number is simply a structure with the imaginary and real value both represented as a floating point number. As such there is very little you can do on the LabVIEW side to change that. C++ object pointers are compiler specific and often even dependent on the version of the template library that was used to compile them. As such there is absolutely NO way to use them in any code that needs to be called from code that was not compiled with the same C++ compiler and the same compile settings. You can bend in circles and jump through hoops but there is simply no way to get around that.
    The only C++ object oriented framework that I know and avoids this limitation for the most part is the COM/DCOM standard which imposes certain limits on object interfaces so that you can get around the compiler specific ABI conventions, but only if you are very careful about how you invoke the compiler. With a bit of macro magic that can be enabled in the IDL precompiler you can even call COM/DCOM objects from standard C. Also COM/DCOM definitely will not work wth C++ template libraries and the like.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to create an collection/array/object/thingy from a bunch of objects for eventual export to CSV.

    This is a follow-up to an earlier post (How
    to output a bunch of variables into a table.) Now that I can ouput data for a single computer I need to to do the same for a list of computers into a CSV. In more general terms how do I get a bunch of $Computer objects into a single collection/array/object/thingy
    with a clever name like $Computers?
    # http://ss64.com/ps/get-wmiobject-win32.html
    # http://social.technet.microsoft.com/Forums/en-US/da54b6ab-6941-4e45-8697-1d3236ba2154/powershell-number-of-cpu-sockets-wmi-query?forum=winserverpowershell
    # http://serverfault.com/questions/10328/determine-cpu-processors-vs-sockets-though-wmi
    # http://social.technet.microsoft.com/Forums/windowsserver/en-US/8443fcfd-5a0b-4c3d-bda7-26df83d2ee92/how-to-output-a-bunch-of-variables-into-a-table?forum=winserverpowershell
    Param(
    [Parameter(Mandatory=$false,ValueFromPipeline=$true)]
    [string]$ComputerName = $env:COMPUTERNAME,
    [Parameter(Mandatory=$false,ValueFromPipeline=$false)]
    [ValidateScript(
    If ( $_ -ne $null ) { Test-Path $_ }
    [String]$ComputerListFile
    Function Get-Computer
    Param(
    [string]$ComputerName
    $Win32_PingStatus = $null
    $Win32_PingStatus_Result = $null
    $Win32_OperatingSystem = $null
    $Win32_Processor = $null
    $Win32_PhysicalMemory = $null
    $Win32_ComputerSystem = $null
    $Win32_BIOS = $null
    $Computer = $null
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerName ping succeeded."
    $Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
    If ( $Win32_OperatingSystem -eq $null)
    "$ComputerName WMI failed."
    } Else {
    "$ComputerName WMI succeeded."
    $Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
    $Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
    $Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
    $Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
    $Computer = New-Object -Type PSObject -Property @{
    Name = $Win32_OperatingSystem.CSName
    Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
    Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
    Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
    #Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
    #Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
    Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
    Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
    Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
    Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
    #Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
    #Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
    Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
    Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
    Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
    Win32_Processor_Count = [int]$Win32_Processor.Count
    Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
    Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
    #Win32_Processor_Description = [string]$Win32_Processor[0].Description
    Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
    Win32_Processor_Name = [string]$Win32_Processor[0].Name
    } ## end new-object
    $Computer
    } Else {
    "$ComputerName ping failed."
    $ComputerNameMgmt = $ComputerName + "-mgmt"
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerNameMgmt'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerNameMgmt ping succeded."
    } Else {
    "$ComputerNameMgmt ping failed."
    "$(Get-Date -Format o) Starting script $($MyInvocation.MyCommand.Name)"
    If ( $ComputerListFile -eq $null -or $ComputerListFile.Length -eq 0 )
    "Processing computer $ComputerName"
    Get-Computer( $ComputerName )
    } Else {
    "Processing computer list $ComputerList"
    $ComputerList = Get-Content $ComputerListFile
    $Computers = @{}
    $Results = @()
    ForEach( $ComputerListMember in $ComputerList )
    "$(Get-Date -Format o) $ComputerListMember"
    # Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
    # http://social.technet.microsoft.com/Forums/windowsserver/en-US/e7d602a9-a808-4bbc-b6d6-dc78079aafc9/powershell-to-ping-computers
    # $Compuers += New-Object PSObject -Property $Props
    # $Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
    Get-Computer( $ComputerListMember )
    "$(Get-Date -Format o) Ending script $($MyInvocation.MyCommand.Name)"
    If I try something like this:
    Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
    I get the following, even though $_.Name is not null.
    Add-Member : Cannot bind argument to parameter 'Name' because it is null.
    At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:111 char:107
    + Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name <<<< $_
    + CategoryInfo : InvalidData: (:) [Add-Member], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCommand
    Or if I try this:
    $Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
    I get this:
    New-Object : Cannot bind parameter 'Property'. Cannot convert the "Get-Computer" value of type "System.String" to type "System.Collections.Hashtable".
    At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:114 char:47
    + $Computers += New-Object PSObject -Property <<<< Get-Computer( $ComputerListMember )
    + CategoryInfo : InvalidArgument: (:) [New-Object], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.NewObjectCommand

    Hi Aenagy,
    If you want to combine all the computers' information to a single array, and add the property computername in the output, please also try the script below, which I make a little modification of the function Get-Computer, pleaese make sure the account running
    the script has the admin permission of the remote computers, or you need to privide cridentials in get-wmiobject, also note I haven't tested:
    $output = @()#to output information of the all the computers
    ForEach( $ComputerName in $ComputerList ){#loop all the computers
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerName ping succeeded."
    $Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
    If ( $Win32_OperatingSystem -eq $null)
    "$ComputerName WMI failed."
    Else {
    "$ComputerName WMI succeeded."
    $Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
    $Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
    $Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
    $Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
    $Computer = New-Object -Type PSObject -Property @{
    Computername = $ComputerName #add the property computername
    Name = $Win32_OperatingSystem.CSName
    Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
    Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
    Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
    #Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
    #Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
    Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
    Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
    Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
    Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
    #Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
    #Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
    Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
    Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
    Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
    Win32_Processor_Count = [int]$Win32_Processor.Count
    Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
    Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
    #Win32_Processor_Description = [string]$Win32_Processor[0].Description
    Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
    Win32_Processor_Name = [string]$Win32_Processor[0].Name
    } ## end new-object
    $output+=$Computer #combine all the "$computer" to "$output"
    Else {
    "$ComputerName ping failed."
    $output
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna
    TechNet Community Support

  • How do I fix my PDF so I don't get the error message: "expected an array object"?

    When I try to delete certain pages from my PDF file (which is larger than 3,000 pages), I get an error message that states "expected an array object." I am unable to delete these pages. How can I fix this problem?

    It looks like the original PDF file is damaged in some ways.  Have you tried creating a new file from the existing file to see if it works? The quickest way to create a new file is to print the existing file to a PDF file.  OK you lose some quality but this is just a test to see if there is anything else wrong with the Acrobat setup or with the document itself.

  • Converting Array Objects into ArrayCollections

    Hi,
    I am facing problem with converting Array Objects into ArrayCollections. How can i convert Array Objects into ArrayCollections. If any one knows how can we do that Pl reply.
    Thanks in advance to all
    Regards
    subbareddy.p

    Hi Bhasker,
    thanks for u r reply. Here i attached screen shot of my server "data.result".
    My proxy varaible contains
    My object varaible "obj" contains
    After parsing the result my arraycollection contains, (i mean after converting Object to Array to ArrayCollection) the below information. For information Pl find the attached arraycollection.png image. In the attached image my arraycollection name is "users".
    Here i pasted the code that i used  to convert  "ObjectProxy" to "ArrayCollection"
    var proxy:ObjectProxy = ObjectProxy(data.result);
                var obj:Object = proxy.object_proxy::object;
                var arrycoll:Array = ArrayUtil.toArray(obj); 
                model.users = new ArrayCollection(arrycoll);
    Regards
    sss

  • VBA Call WebServices: How to handle a returned empty complex array?

    Hi,
        These days I got a task to call a web service by VBA in Excel, but faced the following two problems about empty complex array.
    <b>1. When the returned value of a web service contains empty array, it crashed with "SoapMapper: array dimensions do not match definition"</b>
        Another guy faced the same question with me, detail at http://www.topxml.com/SOAPToolkit/rn-246726_SoapMapper-array-dimensions-do-not-match-definition.aspx
    <b>2. When the input parameter contains empty array, it crashed with "Operation Not Supported"</b>
    Dim arrayStudent() As Student
    Call webservice.DoThings( arrayStudent )

    Hello,
    we have faced the same Problem in our PHP / Typo3 solution. We used this switch:
    $object_array = array();
    if (is_object($salesorders->SALES_ORDERS_HEAD->item)) {
         $object_array[] = $salesorders->SALES_ORDERS_HEAD->item;
    } else {
         $object_array = $salesorders->SALES_ORDERS_HEAD->item;
    Best regards
    Gregor

  • Manipulating java array object in an oracle procedure

    hi there,
    i have a java store procedure that returns an array of filenames, and i have an oracle stored procedure that will for each filename returned in the java array object, open that file do some processing and load the data into database tables, now my question is, would an oracle 9i varray object be compatible with a java array, or should i pass in a pl/sql table to store the filnames returned?
    i really am stuck at this point and need help !!!!
    Thanx

    Wole,
    Have you searched the code samples available at the Technet Web site? Could you not find a relevant one?
    Have you tried searching the Ask Tom Web site?
    Good Luck,
    Avi.

  • Trying to pass Oracle array/object type to Java

    I have a Java class with two inner classes that are loaded into Oracle:
    public class PDFJ
        public static class TextObject
            public String font_name;
            public int font_size;
            public String font_style;
            public String text_string;
        public static class ColumnObject
            public int left_pos;
            public int right_pos;
            public int top_pos;
            public int bottom_pos;
            public int leading;
            public TextObject[] column_texts;
    }I have object types in Oracle as such that bind to the Java classes:
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT" AS OBJECT
    EXTERNAL NAME 'PDFJ$TextObject'
    LANGUAGE JAVA
    USING SQLData(
      "FONT_NAME" VARCHAR2(25) EXTERNAL NAME 'font_name',
      "FONT_SIZE" NUMBER EXTERNAL NAME 'font_size',
      "FONT_STYLE" VARCHAR2(1) EXTERNAL NAME 'font_style',
      "TEXT_STRING" VARCHAR2(4000) EXTERNAL NAME 'text_string'
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT_ARRAY" AS
      TABLE OF "PROGRAMMER"."PDFJ_TEXT";
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN" AS OBJECT
    EXTERNAL NAME 'PDFJ$ColumnObject'
    LANGUAGE JAVA
    USING SQLData(
      "LEFT_POS" NUMBER EXTERNAL NAME 'left_pos',
      "RIGHT_POS" NUMBER EXTERNAL NAME 'right_pos',
      "TOP_POS" NUMBER EXTERNAL NAME 'top_pos',
      "BOTTOM_POS" NUMBER EXTERNAL NAME 'bottom_pos',
      "LEADING" NUMBER EXTERNAL NAME 'leading',
      "COLUMN_TEXTS" "PROGRAMMER"."PDFJ_TEXT_ARRAY" EXTERNAL NAME 'column_texts'
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN_ARRAY" AS
        TABLE OF "PROGRAMMER"."PDFJ_COLUMN";
    /I successfully (as far as I know) build a PDFJ_COLUMN_ARRAY object in a PL/SQL procedure. The PDFJ_COLUMN_ARRAY contains PDFJ_COLUMN objects; each of those objects contains a PDFJ_TEXT_ARRAY of PDFJ_TEXT objects (Example: pdf_column_array(i).pdf_text_array(i).text_string := 'something';). In this procedure, I pass this PDFJ_COLUMN_ARRAY as a parameter to a Java function. I assume the Java function parameter is supposed to be a oracle.sql.ARRAY object.
    I cannot figure out how to decompose this generic ARRAY object into a ColumnObject[] array. I also tried Googling and searching the forums, but I can't figure out matching search criteria. I was wondering if anyone here knows anything about passing user-defined Oracle type objects to a Java function and retrieving the user-defined Java class equivalents that they are supposedly mapped to--especially a user-defined array type of user-defined object types containing another user-defined array type of user-defined object types.

    Ok. I will try asking on the JDBC forum. So, don't
    flame me for cross-posting. :PWe won't, if over there you just post basically a
    link to this one.
    sigh Guess what, he did it the flame-deserving way. It's crossposted at:
    http://forum.java.sun.com/thread.jspa?threadID=602805
    <flame level="mild">Never ceases to amaze me how people don't think that posting a duplicate rather than a simple link isn't wasteful, as people could end up answering in both of them, not seeing each other's answers</flame>

  • Transparency and complex 3D object

    Hello,
    My application builds a complex 3D object.
    With huge data (coordinates and points connections) the application generates a shape based
    on the TriangleStripArray primitive. (minimum 15000 triangles)
    The problem is that when I enable the transparency mode, the rendering isn't correct.
    That's not really a surprise unfortunately...
    Any idea on how to fix this ???
    Is there a way to render transparency correctly on a such object, independantly from the view point ?
    Thx in advance

    Imagine rendering a human brain on screen, it's quite a complex 3d object because of
    the internal structures like encephal for example.
    All the mesh is based on little triangles which compose the TriangleStripArray object.
    Each face is visible from it's two sides: Im using front and back culling.
    The blending fonction I'm using is the default one.
    Depending on the view point, some internal parts disappear : I can see the background
    through some triangle faces.. It whould be better to see triangles faces which are behind.
    I tried some tricks I've found on J3D.org but.. no success: other problems appears.
    Unfortunately it's impossible to give you a screenshot, that's not for public domain.
    Thanx in advance for any idea or solution

  • Complex type objects

    hi i'm newbie. can somebody let me know some good tutorials and samples on complex type objects.
    regards.
    ushan

    following are my classes which i have created ....
    customer.java :
    package org.ushan.wssample.ws;
    public class Customer {
         private String cid;
         private String name;
         private int phone;
         private int home;
         private String street;
         private String town;
         private int age;
         private double balance;
         public Customer(String cid, String name, int phone, int home, String street, String town, int age, double balance){
              this.cid = cid;
              this.name = name;
              this.phone = phone;
              this.home = home;
              this.street = street;
              this.town = town;
              this.age = age;
              this.balance = balance;
         public String getCid() {
              return cid;
         public void setCid(String cid) {
              this.cid = cid;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public int getPhone() {
              return phone;
         public void setPhone(int phone) {
              this.phone = phone;
         public int getHome() {
              return home;
         public void setHome(int home) {
              this.home = home;
         public String getStreet() {
              return street;
         public void setStreet(String street) {
              this.street = street;
         public String getTown() {
              return town;
         public void setTown(String town) {
              this.town = town;
         public int getAge() {
              return age;
         public void setAge(int age) {
              this.age = age;
         public double getBalance() {
              return balance;
         public void setBalance(double balance) {
              this.balance = balance;
    }CustomerDatabase.java :
    package org.ushan.wssample.ws;
    import java.util.*;
    public class CustomerDatabase {
         private static List<Customer> customers;
         public static List<Customer> list(){
              return customers;
         public static Customer getCustomer(String cid){
              Iterator<Customer> iterator = customers.iterator();
              while (iterator.hasNext()){
                   Customer customer = iterator.next();
                   if (customer.getCid().equals(cid)){
                        return customer;
              return null;
         static {
              initCustomers();
         static void initCustomers(){
              customers = new ArrayList<Customer>();
              customers.add(new Customer("AAA", "Ushan", 239875456, "Kandy", 25, 25000.00));
              customers.add(new Customer("BBB", "Gayan", 567567787, "Colombo", 26, 35000.00));
              customers.add(new Customer("CCC", "Kasun", 345689745, "Galle", 24, 15000.00));
    }CustomerService.java :
    package org.ushan.wssample.ws;
    import java.util.List;
    public class CustomerService {
        public String getNameForCustomer(String cid){
            return CustomerDatabase.getCustomer(cid).getName();
        public int getPhoneForCustomer(String cid){
            return CustomerDatabase.getCustomer(cid).getPhone();
        public String getAddressForCustomer(String cid){
            return CustomerDatabase.getCustomer(cid).getAddress();
        public int getAgeForCustomer(String cid){
            return CustomerDatabase.getCustomer(cid).getAge();
        public double getBalanceForCustomer(String cid){
            return CustomerDatabase.getCustomer(cid).getBalance();
        public String listAllCustomers(){
            List<Customer> customers = CustomerDatabase.list();
            StringBuilder result = new StringBuilder();
            for(Customer customer : customers){
                result.append(customer.getCid() + " ");
            return result.toString();
    }i hav done up to here.i don't know how to include the address object in this.

  • Passing Arrays to the DataGrid Component

    How's it going my peoples? I'm having some difficulties
    passing Arrays into a DataGrid Component. It just doesnt seem to
    work for me. Anyone have any ideas on the best way of doing this?
    Thank you in advance.

    We have Our site build using odp.net but suddenly it stoped working on the production server. MS Provider is working fine in that case. so we want to have one copy of solution with MS provider as backup copy so in future if any failure occurs to odp.net we can use this copy. So for that I need to know how to pass arrays to oracle using MS Provider.
    Regards,
    Suresh

  • Causes for the "Expected an array object" error

    I'm using Acrobat Pro X and am getting the "Expected an array object" error recently when inserting a PDF that was created by inserting a smaller collection of other PDF documents, if that makes sense.
    Oddly, or maybe not, I can build the second level PDF by inserting all of the individual PDFs one at a time. The error only occurs when I try to "build up" the larger document.
    My searches come up empty as far as revealing what causes this error.
    Anyone know what causes it?
    Thank you.

    How are you creating the pdf. Your comment about putting a publication together gives us nothing to go on.

  • Split commas delimited into 1D complex array

    I have comma delimited string in this format
    [0.866405665874481,0.127425819635391,0.983153462409973,-0.0711551383137703,0.955700755119324,-0.27884304523468,0.787182509899139,-0.501964211463928,0.512355387210846,-0.687117278575897,0.177220240235329,-0.777789652347565,-0.0876994803547859,-0.792799115180969,-0.324512422084808,-0.736825287342072,-0.517065346240997,-0.627932071685791,-0.666604995727539,-0.471743047237396,-0.767350137233734,-0.287838608026505,-0.819185018539429,-0.0853987112641335,-0.81872695684433,0.123056441545486,-0.761552691459656]
    The data contains pairs of complex numbers.  The first 2 numbers is one pair, next 2 numbers one pair, next pairs.....
    How can I extract the pairs of number and make it into a 1D complex array?
    This is the expected output:
    (0.866405665874481,0.127425819635391),(0.983153462409973,-0.0711551383137703),(0.955700755119324,-0.27884304523468),(0.787182509899139,-0.501964211463928),(0.512355387210846,-0.687117278575897),(0.177220240235329,-0.777789652347565),(-0.0876994803547859,-0.792799115180969),(-0.324512422084808,-0.736825287342072),(-0.517065346240997,-0.627932071685791),(-0.666604995727539,-0.471743047237396),(-0.767350137233734,-0.287838608026505),(-0.819185018539429,-0.0853987112641335),(-0.81872695684433),(0.123056441545486,-0.761552691459656)
    Any gurus pls advise
    Thanks and great day
    Solved!
    Go to Solution.

    I used the Spreadsheet String to Array, Decimate Array, and then Re/Im to Complex.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Delimited String to Complex Number Array.png ‏13 KB

  • Writing DLL operating on complex arrays

    Hello,
    I'm writing Dynamic Library (DLL) which should operate on complex matrix, and I have a problem with function parameters.
    My target is DLL which uses FFTW libraries for calculating Fast Fourrier Transformate on complex signals given by matrix.
    How should I define function? I make it on many ways,
    extern "C" __declspec(dllexport) int fast_fourrier(fftw_complex * in, fftw_complex * out, int size)
    extern "C" __declspec(dllexport) int fast_fourrier2(complex * in, complex * out, int size)
    extern "C" __declspec(dllexport) int fast_fourrier3(TD1Hdl input, TD1Hdl output);
    where TD1Hdl is
    typedef struct {
     long dimSize;
     complex elt[1]; (or cmplx128 elt[1]; )
     } TD1;
    typedef TD1 **TD1Hdl;
    There's only one method which works:
    extern "C" __declspec(dllexport) int function(double * re, double * im, double * re_out, double * im_out, int size);
    But it's very time-consuming, because I must build another dynamic matrix and write into data from re and im. After calculating FFTW I must separate data onto re_out and im_out. But I think must be easier way to do this, but I'm don't now how to do this.
    I'm don't know how to get into the data elt in structure TD1Hdl whitch is used by LabView when calling function on array 1D, type double 8-bytes by Array Handle. I can easily read the dimSize when we connecting to Call Library Function an array, but any modification on substructure elt crashes LabView. I think, that elt is pointer for first element of the matrix but maybe I'm wrong.
    I show, that we can also pass a parameters by something like "Adapt to type", which is prototyped by function (void * arg1) and I have absolutely no idea what can I do with this param.
    Maybe anybody has writed a external DLL operating on complex array and can help. I'll be grateful for any advices.
    Best regards,
    Darek

    OK, Something has moved forward.
    I used this declaration:
    extern "C" __declspec(dllexport) int fast_fourrier(TD1Hdl in)
    where TD1Hdl is previously used structure. Similar code was generated when I tried "Create .c file" in LabView on Call Library Function Node set for Adapt to type.
    LabView correctly passes array size, I have access to fields Im and Re of structure complex, I can write and read them but something is wrong with value conversion between LabView and DLL.
    It looks like somewhere was difference in pointers, and pointer on first field of matrix wasn't it, but moved some bytes in any direction. I think that, because when I'm write to array in re and im fields the same value - for example 0.5 in LabView I get that there's about 2.5 E-234.
    In next try I filled this matrix with sine function values in loop:
    re = sin(2*i), im = sin(2*i+1). In worst way I should get set of values from range [-1,1] on the graph, but I get 0 or value which exceed 1.0E+100.
    Could it be caused by compilator version? I'm using Borland C++ Builder 6.
    I'm very thankful for interesting of this problem.
    Darek

Maybe you are looking for

  • Loading 0IC_C02 infocube -- some clarifications

    Hi BW experts, I have loaded data into 0IC_C02(matreials movements) infocube using the datasource 2lis_03_s195. It is an initialization load. The data has been successfully loaded. Now my point is, as this cube is related to inventory management is t

  • How is width measured for shapes and strokes converted?

    How is width and height calculated in the transform panel for an object? Does it use an average? An example can be seen in the first image. The lines are not a uniformed width. Also, how are strokes converted from pts to pxls? For instance, if I make

  • Restricting material group- vendor combination for Purchase requisitions

    Hi , The requirement is : While creating a PR for a material with only short text(no material master record), we have to enter the material group also. If the material group is not supplied by the vendor then the system should give an error and not a

  • Sort array(list) of files on filename

    Hey all, Is there a way to sort an array(list) of files on the names of those files. (the files are not in same directory) Thanks

  • Does not import ORF raw files

    Photo's does not support Olympus ORF raw files. At least not the latest M5 MkII camera raw files. Its a brand new program why is it not up to date with Oly raw files.