AM Customer Interface + method with a variable number of parameters

Hello

I use JDev11 & ADF. I have an App Module exteding, an application custom module (ApplicationModuleImpl) class. I created a few methods and expose them in the Client Interface. I read that I can only use the return types and methods of simple or serialized attributes in the Client Interface of AM. I need to create a method with the variable number and type of parameters, something like "Createwithparams", something like:
    public void Method(String[] FieldNames, Object[] FieldValues)
Is there a way to do it?

TKS.

You just did it. It should work as far as I know.
If you can not make available the method try list instead of normal array.

Timo

Tags: Java

Similar Questions

  • With a variable number of input ports on a Subvi

    How can I have a Subvi with a variable number of input ports that can be changed in the other VI that uses the Subvi?

    You can't actually do what you trying to do, how LabVIEW is implemented does not screw created by the user with arbitrary entries.  And to be honest, there is probably a better way to do whatever it is you want to do.

    If you really really want to do that, but... you can come kind of close.

    1. create a new VI

    2. change its connector to the one with the inputs and outputs pane more possible (terminals 8-6-6-8, 28)

    3 create controls/indicators for any desired input/output of not scaling can connect the (i.e. the error in / error, son of reference, etc.)

    4. hang them until the connector pane

    5 count how many entries are left and create a control for each entry and their son all

    6 drop your VI on the block diagram of the VI one another as a Subvi

    7. Note that when you mouseover, it looks like a Pincushion

    8. right click the VI and uncheck the "display as icon".

    9. you can now "slide down" at the bottom of the VI

    The terminals in the section "slide down" are as a package by name or node property that you can click on them to reallocate them to what it is not already selected.  The default is to make all the entries in alphabetical order, then all the outputs in alphabetical order.  If you rename the terminals that allows you to make appear in the order that you prefer is up to you.

    As all terminals, for the best that you can do to detect if they are wired is to define a default value that should never be used.  If she is floating points, you can use 'NaN' or 'Inf '.  If this is a cluster that you did, add an item more boolean which is true in the default values for this entry VI.

    Then just wire up all the identical terminals together in a table, filter the items which appear to be unwired and make all your treatment on the rest.

  • PL/SQL-function with variable number of parameters

    Hello

    I want to write an INLIKE function that combines the functions of the po and AS operator.
    I want to call it that:

    SELECT 1 in the table where INLIKE (column, Motif1, pattern2,...) with a variable count of bosses.

    Is there a possibility the java selection button (String... stringArray) to declare or to make, I have to define a function with multiple parameters and default values?

    With greetings

    Florian

    You don't need to write a function no., you can use regular expressions REGEXP_LIKE...

    for example to find all the rows that have % ED % or % LY in them...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 'FRED IS SCARED' as txt from dual union all
      2             select 'EDWARD IS HAPPY' from dual union all
      3             select 'BOB AND TIM ARE ASLEEP' from dual union all
      4             select 'JIM AND SALLY DO NOT CARE' from dual)
      5  --
      6  -- END OF TEST DATA
      7  --
      8  select *
      9  from t
     10* where regexp_like(txt, '(ED|LY)')
    SQL> /
    
    TXT
    -------------------------
    FRED IS SCARED
    EDWARD IS HAPPY
    JIM AND SALLY DO NOT CARE
    
  • function with a variable number of cubic curves

    Hello

    I have a set of data : a set representing the independent variable and a set representing the dependent variable. I need to find the minimum number of cubic curves (find their coefficients) that reduce the average quadratic error less than a given tolerance. If the tolerance is higher than 17 particular segments, so I need to raise an error.

    You have an idea what function blocks, I need to?

    I could use general polynomial Fit VI with order 3 and its default method to check the residue. If the residue is greater than the given tolerance, so I could try to use two cubic curves and test them on different starting and ending points until the residue is less than the given tolerance. If tolerance is not guaranteed, I add another curve and I test again the Assembly as shown above. By iteration until the residue is less than the given tolerance, or until I would need to add 18th cubic curve.

    If there was something ready, I would be grateful.

    Thank you.

    Fabiobonelli wrote:

    Please, you can test your VI adding another point to four present?

    X =-6453

    Y =-266

    Check the residue.

    Thank you.

    Did you even read my response? You have a serious air conditioning problem because the data is on a narrow Beach far from zero. By example-6500 ^ 3 is smaller that - 2E11, i.e. a value that many (many!) is orders of magnitude different from that of the constant term (1). The linear algebra problem that results is very ill, conditioned and just blindly Ford over the accelerator pedal are bad advice here.

    This isn't a problem with the implementation of LabVIEW, but a fundamental vice that you encouter also (or worse) If you would do your own math. No way around it. (See also)

    My recommendation is to delete the X offset and add it later again. Now things work correctly. (Note that a second order polynomial fitting still works without twist it).

    Try the and see for yourself.

  • Procedure with a variable number of columns

    Hi, I have a procedure that looks like this:

    PROCEDURE PROC (p_cursor sys_refcursor OUTPUT)

    In the procedure, I build query dynamically and the number of columns varies during execution.

    In the end I do

    OPEN for REQUEST P_cursor


    Then I do call it,.

    call PROC (?)

    My question is, how could I go on the running query of this procedure, and then adding lines or by modifying the existing results, then return the changed data?

    I want to do is add a new rank based on a condition, so I still need to return any number of columns, but I need to modify the results before I return them.

    Is it possible to do? I need to do some calculations on columns (variable columns), create a new line, insert in the result set and return this new set of results.

    A sys_refcursor is ideal to return to a front end gui such as .NET or Java, which can then use this cursor to retrieve data.

    In PL/SQL, there is no point in using a sys_refcursor unless you know, at the time of the design/build the columns returned are going to be.

    If the columns resulting are dynamic, so you have no choice but to use the package DBMS_SQL, where you can analyze and run any SQL statement you like and then use the package DBMS_SQL to describe what are the columns that result and how they are. From this, you can reference the columns by position, rather than by name.

    for example

    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2) IS
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_rowcount  NUMBER := 0;
    BEGIN
      -- create a cursor
      c := DBMS_SQL.OPEN_CURSOR;
      -- parse the SQL statement into the cursor
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      -- execute the cursor
      d := DBMS_SQL.EXECUTE(c);
      --
      -- Describe the columns returned by the SQL statement
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      --
      -- Bind local return variables to the various columns based on their types
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); -- Varchar2
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);      -- Number
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);     -- Date
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);  -- Any other type return as varchar2
        END CASE;
      END LOOP;
      --
      -- Display what columns are being returned...
      DBMS_OUTPUT.PUT_LINE('-- Columns --');
      FOR j in 1..col_cnt
      LOOP
        DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' - '||case rec_tab(j).col_type when 1 then 'VARCHAR2'
                                                                                  when 2 then 'NUMBER'
                                                                                  when 12 then 'DATE'
                                                         else 'Other' end);
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('-------------');
      --
      -- This part outputs the DATA
      LOOP
        -- Fetch a row of data through the cursor
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        -- Exit when no more rows
        EXIT WHEN v_ret = 0;
        v_rowcount := v_rowcount + 1;
        DBMS_OUTPUT.PUT_LINE('Row: '||v_rowcount);
        DBMS_OUTPUT.PUT_LINE('--------------');
        -- Fetch the value of each column from the row
        FOR j in 1..col_cnt
        LOOP
          -- Fetch each column into the correct data type based on the description of the column
          CASE rec_tab(j).col_type
            WHEN 1  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
            WHEN 2  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_n_val);
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'));
          ELSE
            DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
            DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
          END CASE;
        END LOOP;
        DBMS_OUTPUT.PUT_LINE('--------------');
      END LOOP;
      --
      -- Close the cursor now we have finished with it
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    /
    
    SQL> exec run_query('select empno, ename, deptno, sal from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    DEPTNO - NUMBER
    SAL - NUMBER
    -------------
    Row: 1
    --------------
    EMPNO : 7782
    ENAME : CLARK
    DEPTNO : 10
    SAL : 2450
    --------------
    Row: 2
    --------------
    EMPNO : 7839
    ENAME : KING
    DEPTNO : 10
    SAL : 5000
    --------------
    Row: 3
    --------------
    EMPNO : 7934
    ENAME : MILLER
    DEPTNO : 10
    SAL : 1300
    --------------
    
    PL/SQL procedure successfully completed.
    
    SQL> exec run_query('select * from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    JOB - VARCHAR2
    MGR - NUMBER
    HIREDATE - DATE
    SAL - NUMBER
    COMM - NUMBER
    DEPTNO - NUMBER
    -------------
    Row: 1
    --------------
    EMPNO : 7782
    ENAME : CLARK
    JOB : MANAGER
    MGR : 7839
    HIREDATE : 09/06/1981 00:00:00
    SAL : 2450
    COMM :
    DEPTNO : 10
    --------------
    Row: 2
    --------------
    EMPNO : 7839
    ENAME : KING
    JOB : PRESIDENT
    MGR :
    HIREDATE : 17/11/1981 00:00:00
    SAL : 5000
    COMM :
    DEPTNO : 10
    --------------
    Row: 3
    --------------
    EMPNO : 7934
    ENAME : MILLER
    JOB : CLERK
    MGR : 7782
    HIREDATE : 23/01/1982 00:00:00
    SAL : 1300
    COMM :
    DEPTNO : 10
    --------------
    
    PL/SQL procedure successfully completed.
    
    SQL> exec run_query('select * from dept where deptno = 10');
    -- Columns --
    DEPTNO - NUMBER
    DNAME - VARCHAR2
    LOC - VARCHAR2
    -------------
    Row: 1
    --------------
    DEPTNO : 10
    DNAME : ACCOUNTING
    LOC : NEW YORK
    --------------
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    11 g, you can create a sys_refcursor and the DBMS_SQL package then allows you to convert this refcursor in a DBMS_SQL cursor so that you can get the description of results and do the same thing. It is not available before 11 g well.

    However_ before any of this, you should really ask yourself if there is a real need to create queries dynamically. There is rarely a need to do and if you find that it is common in your application, then it is often a sign of poor design or bad defined the needs of the business (leaving the technical side to try to be 'flexible' and hence leading to unmaintainable code etc..).

  • Reading the file in spreadsheet with a variable number of delimiters

    Dear Forum,

    I would like to read a file in spreadsheet (text) generated by a 3rd party program. It turns out that, while the program generates columns separated by spaces, the number of spaces between the columns varies in a way that I still have to sort out. This isn't a problem if I want to

    to read in the file in excel (or equivalent) - but the functions of 'chain of worksheet to the table' LabView does not seem to be able to deal with him - if I get home 'space' as a separator it only accepts one * only * space... is possible to indicate "zero or more" spaces to this function? [I know I can do a lot of loops and read the elements of a number at a time, but it is very slow, so I'd rather avoid it]

    Thank you

    Niels

    Hello Marshall,.

    The string of worksheet to the table can actually accept an array of delimiters, so you can wire a table 1 d that contains the delimiters you want to watch for--one, two, or three spaces, etc.

    To do this, simply create an array of strings 1 d containing delimiters and son in the entry delimiter in the upper part of the primitive.  Like most primitives, function is polymorphic.

    If the program that generates this file does not limit the spaces he inserts somehow or uses spaces elsewhere in the data, you might encounter problems, but for most cases, I think that should suffice.

    Best regards

  • Is it possible to create a PDF with a variable number of lines?

    I am a very new adobe user, but before my company invests in software need to know if this is possible.  The general idea is that we need to be able to create a form in adobe/livecycle, that people who use the drive can be filled.  The problem is that whenever this form is completed, it will have a different number of lines.  Is it possible to create a form that whenever a row is filled (with a description and a price) which will be generated a new line with the same fields to serve?  Create lines on the form is not an option, because the range can be up to several hundred or beyond in some cases and it is not realistic for us to have several pages of lines to be used when the majority of the time, that only the first page will be used, then when the form is printed additional empty pages is printed.  Currently, we use an excel form to accommodate our needs with the only downfall being that all users of the form have to buy microsoft office.  Any help?

    Hello

    Yes it is possible, but you should ensure that you follow a few best practices to ensure that the form with several rows of hundred become slow or unstable.

    There are a few examples of dynamic tables here, which at least should give you an idea of what is possible. Open in Acrobat/Reader to see user experience, you can also open in the designer to see how the form is built.

    Index: http://assure.ly/lwQHm7.

    Sections and tables: http://assure.ly/fItII5.

    It's more detailed / teaching and shows how to place the form of dynamic behavior: http://assure.ly/gk8Q7a.

    Hope that helps,

    Niall

  • Megasign for the Document with a variable number of signatories

    I can't seem to find any documentation on this and would appreciate any support that the community could provide.

    Here is the example:

    I have a CSV document that contains information specific to each child enrolled in a program, including parents or guardians names and e-mail addresses.

    I would like to send a waiver for every registered child who meets the relevant information about the child (allergies, registration dates, age, etc.) - and requires that all the signatures of parents and guardians on the same document before the respective instructor opposites.

    * Waiver of the child a required 5 signatures (mother, father, mother-in-law, Nanny, brother), while another waiver of the child could require only 1 signature (parent).

    Because I have 350 of them to issue, it is possible to use Megasign to send these waivers signed by the guardians respective all at once? If so, any guidance would be greatly appreciated.

    Hello

    Please refer to the links below: -.

    Public Knowledge Base

    Public Knowledge Base

    https://Adobe.echosign.com/doc/MegaSignTutorial.PDF

    Let me know if it helps.

    Kind regards

    Mohamed

  • How to display a folder db with a variable number of attached documents

    I am building a website for a show air http://www.hollisterairshow.com and the organizer would like to put a list of things he needs for the show and have people to respond via the website. For example, it will take 20 tents, and potentially up to 20 people could answer, each offering a tent, or fewer people may each offer several tents. I would like to create a view showing the necessary point and below a line for every offer he receives. I already have a couple of tables defined, one called "needs" and the other called 'offer', the 'offers' table contains a column called 'needId' that is the index of the table needs.

    So far, I created a recordset to join the tables but each line contains the need and supply, so I see the need repeated on each line and I want only to see once. Here's the SQL code generated by DW CS4

    SELECT needs.needId, needs.title, needs. "description', needs.quantity, needs.needMet, offers.needId, offers.offerId, offers.name, offers.email, offers.phone, offers.quantity, offers"comment. "
    Needs, offers
    WHERE needs.needId = offers.needId
    ORDER BY needs.title

    I'm sure there must be a simple solution for this, but I am unable to understand. I am new to SQL and this as a volunteer for the aerospace industry.

    Thank you

    Tony

    > Is it possible to do this? I would like to

    > need a different set of records or am, I still

    > looking at a layout problem?

    You don't need a different set of records. It is only a slight modification. For each record, test if the ID has changed. If so, print the header, a line break, and then the details of the line. If this isn't the case, print only the details of the line.

  • Please help with these variables

    Thanks LucD and RvdNieuwendijk for helping me with the first part of my script, now I'm stuck again.  In most cases, the script works fine, the commented sections (1-3) are what I want to do in the script.  Even if I had two beautiful solutions for my first problem, which was to record the name of the virtual machine and a custom attribute named "assignee" to a variable, I went with the response as provided LucD.  Now, here's my problem.

    I want to save the new variables and then turn around and create a virtual machine with the same name as the variable $_. Name and then complete the custom attribute "assignee" with the variable recorded for the assignee.  What I've done so far was to save the $_.name in a text file, which will then create a virtual machine with the same name as that deleted line 10

    Line 11, I chose to use Stop-VM because the virtual machine will get deleted, so no need to a gradual stop.

    For line 9, I did that just to make me see the name on the screen, which will be removed

    Given that the new variables will have to name the virtual computer, the 10 online list will help me to keep track of all those and then deploy.

    I'll change the script to get data warehouses that have a certain amount of disk space, and I will choose random data warehouses and hosts ESXi Get-random, I'm just trying to get the core of the script works now.

    Sorry, I'm getting long-winded, all I want now is to save the new variables of lines 4-6 in a big variable, or arrray or something and then I want to create a virtual machine with the same name VM and the custom attribute filled with what "assignee".  Thanks for any help.

    # 1. Get the name of the virtual machine and the assignee of the virtual machines to deploy and save those as a variable
    # 2. Remove the existing VM with the same name
    # 3. Use saved data to deploy a new virtual machine with the same name and the assignee who has been registered
    1. $AllVMs = @)
    2 get-file TestDeploy | Get - VM | {foreach}
    3. $assignee = Get-Annotation-entity $_ - CustomAttribute "Assignee" - ErrorAction SilentlyContinue
    4 new-Variable - force - ErrorAction SilentlyContinue-name $_. Name - value (New-Object PSObject-property @ {}
    5 VM = $_.name
    6. the assignee = $assignee. Value
    7. })
    8. $AllVMs += $_. Name
    9 write $_. Name
    10. $AllVMs | Out-file c:\psresults\NewDeploy.txt
    11 if ($_.powerstate - eq "receptor") {stop-VM - VM $_}
    12 if ($_.powerstate - eq "Receptor") {Start-Sleep-3 seconds}
    13 remove-VM - VM $_ - DeletePermanently
    14.}
    15. (type c:\psresults\NewDeploy.txt). Foreach {new-VM-model (Get-"TemplateName") - name $_-location (Get-folder 'TestDeploy')'}
    16 - data store (data center, Get Data Center |) Get - Datastore 'Datastore') Spec - OSCustomizationSpec - VMHost (Get-VMHost 'MyHost')
    17.}

    I found the problem, the script was pouring out the complete variable instead of just the value.

    The line should be like this

      $AllVMs += (Get-Variable -Name $_.Name | Select -ExpandProperty Value)
    

    I've updated the two script above.

  • find the number of parameters in a procedure

    Hello

    I have a package_test package

    It contains a few procedures, one is "procedure_test (number, number b, c number).

    I am oracle 11g 2.0 version of work and SQL * more.

    whenever I am trying to execute the procedure with a correct number of parameters it gives me the error:
    PLS-00306: wrong number or types of arguments in the call to 'PROCEDURE_TEST '.

    Question is how we can know the number of the parameter set for this object.

    as

    Select * from user_procedures where procedure-name = "PROCEDURE_TEST";

    Please suggest me

    Thank you

    Sorry I misread the question.

    Use $user_arguments

    Published by: Oracle_Monkey on January 10, 2013 03:42

  • Insert with bind variables

    I will execute bind_test.sql with the following parameters to sql-plus. The script runs without error. However, it does not insert a row in the table.


    bind_test. 20100912 1 1001 SQL;


    bind_test. SQL
    ----------------------------------------------------------
    Set serveroutput on

    declare

    X VARCHAR2 (31);
    NUMBER OF Y;
    NUMBER OF Z;

    Start

    dbms_output. Enable (10000);
    X: = "& 1";
    Y: = & 2;
    Z: = & 3;

    Insert in the test
    values (TO_DATE (X, 'YYYYMMDD'), Y, Z, null, null, null);


    commit;


    dbms_output.put_line ('var1 = "|") X | "var2 =" | THERE | "var3 = ' |" (Z);

    end;
    /

    ----------------------------------
    Output:
    10 old: X: = "& 1";
    10 new: X: = '20100912';
    old 11: Y: = & 2;
    11 new: Y: = 1;
    12 old: Z: = & 3;
    12 News: Z: = 1001;
    var1 = 20100912 var2 = 1 var3 = 1001

    PL/SQL procedure successfully completed.
    ---------------------------------------

    Select * from test;

    no selected line


    Why it is not insert a line? What could be the reason?

    Thanks in advance.
    Amit

    user5922214 wrote:

    I have a big script with multiple INSERT and DELETE statements. I have been asked by DBA to use bind variables rather than direct assignment parameter values in which the condition.

    Impossible.

    Use of variable bind from a client means:
    (1) customer create a unique SQL cursor with bind variable, for example INSERT INTO FOOTABLE VALUES (: 1,: 2: 3)
    (2) customer from a loop of data read
    2.1) reading the customer data (from file, network, device, whatever)
    customer liaison variables 2.2) cursor (assigning values to 1 to 3 SQL cursor variables)
    2.3) client running the cursor
    line insertions 2.4) database
    loop repetitions of 2.5) client for all data
    (3) customer closed the SQL cursor

    This can be done using a SQL script - as a SQL script is not a loop where a single insertion cursor is used. It's a unique script with 100 or 1000 of SQL insert statements. Where each insert statement will result in a cursor SQL must be created.

    SQL * also does not support the approach of customer liaison above variable. It is a command line interface very PRIMITIVE and unsuitable for running scripts from loading/data entry.

    In your case - the right approach would be to have the data into a CSV file, and then load this file using SQL * Loader... where this software will use customer approach above (in fact he still does better because it uses in bulk link and link not row as described above).

  • Error 74 to unflatten string in a device helping custom interface hardware Inline

    Hello

    I am creating a custom device Interface material Inline to communicate on a bus series to Veristand. I want only to communicate via RS232 veristand channel values, I use flatten/unflatten to chain to transfer my data. I choose what it because VISA Write/Read uses strings, and he would always use the same size of string (channels Veristand = 64-bit double-online 8 character string).

    But when it comes to try it with veristand, I have error 74: corrupt memory or data structure. I noticed this error came from the "string unflatten".

    So I plugged in a "clear error" vi just after "unflatten to channel" works, for my custom device runs but gives me wrong results. Then I used the tool NI OF Trace to see what I was writing to the RS232 bus. You can find the result of this. When we take a glance on the viWriteasync functions, we can see that the data written on the bus will already '?... " W.... M' which translates as 0,000232195, although the value that I have passed to the bus was greater than 1.

    I plugged the constant 'false' by 'add array or string of size' 'flatten in string' and 'unflattend to the string' functions.

    Does anyone have an idea what's wrong?

    Kind regards

    Maxim

    Is your session series Visa implemented to put an end to strings with the null character? It's been a while since I worked with serial number, but I remember this could be the case. So then you'd have trouble sending binary data flattened since it would have a lot of characters in it null. Another solution would be to format doubles as text with a specified number of digits of precision, although this will be less accurate and can take more bytes to transfer.

  • Problem with the variable moveIntoFolder_Task

    Hello

    I spend a lot of time already trying to find how I can put VM I found in moveIntoFolder_Task.

    What I'm doing:

    1 create a folder

    2. find a virtual machine provided in the text field

    3. move this virtual machine in the target folder.

    try {newFolder = parentFolder.createFolder ("test1") ;}

    {catch (Err)}

    findVM (vmname);

    function findVM (vmname) {}

    allVms = System.getModule("com.vmware.library.vc.folder").getAllVirtualMachinesByFolder (parentFolder);

    RET = null;  for (var i in allVms) {}

    If (allVms [i] .name == vmname) {ret = allVms [i];  break;  }} return ret;

    }



    var vms1 = new Array();

    vms1 = [];

    vms1 = vms1.push (ret);

    task = newFolder.moveIntoFolder_Task (vms1);

    var actionResult is System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd (task, progress, pollRate);.


    vms1 is VC:VirtualMachine type - but when I select this variable manually as an attribute - it works fine, I can't cmove VM in the target folder.

    When I find this virtual machine by using the function {} findVM I get following error:

    State: 'impossible', State of the business: "null" exception: ' cannot convert 1.0 [com.vmware.vmo.plugin.vi4.model.VimManagedEntity]


    Do you know how I can convert VM to data type VimManagedEntity?

    Hello

    You have no need to convert the VM VimManagedEntity.

    The problem is the next part of your code:

    vms1 = vms1.push(ret);
    task = newFolder.moveIntoFolder_Task(vms1);
    

    It seems that you expect the first line to push the object ret at vms1 table and return the array object, which then you pass as an argument to the method moveIntoFolder_Task().

    The problem is that the push() method will not return the table object, but the length of the array. So in fact you call moveIntoFolder_Task() method with the type argument number instead of argument array of virtual machines, and that's why you get this exception "cannot convert...". »

    So the solution is to replace:

    vms1 = vms1.push(ret);
    

    with a little (no assignment)

    vms1.push(ret);
    
  • Cannot return the custom object method in the module of the application

    Hi all

    I use Jdeveloper 11 g R2 (11.1.2.3) & Weblogic 10.3.5.0

    I need to add a method with a custom object as return in my application module sometingh like this:

    public MyObject-myMethod (line myRow) {}
    my code...
    }

    After add request module is not displayed in the Client interface, so I'm not able to expose to view projects

    But if I change it to:

    public Long myMethod (line myRow) {}
    my code...
    }

    so it's OK

    Can someone tell me I expect much? or a bad thing?
    Is that more than a service of class of the interface?

    Thank you
    Mohsen

    Your custom class must be serialized, otherwise it will not be displayed as a client method.

    Timo

Maybe you are looking for

  • How can I reset the permissions of folder to Yosemite?

    Well, I have a mac mini 2014 with Yosemite.  I changed the permissions in the folder my documents and apply to the elements included as another admin had read/write access to all items inside.  I did it just to test it to see how to work the reset da

  • Satellite A200 - 170 PSAE6: the sound does not work after upgrade from Vista to XP

    Hello I have a little problem with my laptop Toshiba A200-170Modelnummer: PSAE6 I changed my system from Windows Vista to Windows XP. Everything but the sound at all to install worked at best does not. The driver runs up to the end, but after the res

  • How can I SNYC my hotmail account on my motorola droid 2 to my main account

    Recently upgraded to a Motorola Droid 2 phone.  Was no expensive motorola phone before then (not smartphone).  biggest problem isn't in harmony with my main account.  Indidvidually enter a lot of contacts but then they go goodbye after a while and th

  • Dell Optiplex 780 memory update does not

    I have purchase Dell Optiplex 780 supplied with memory DDR3 8 GB (4x2Go). I wanted to update so I bought 4 GB RAM (4x1Go) and tried to install it today. The diagnostic lights Dell on 3 and 4, which means that the memory is detected, but at fault. Now

  • Was not asking for window pop up with error message

    As for the other Unasked for Popup window question, my error message is a little different. (I tried, also, to solve the problem using the suggestions appear on the Web site.) I also get the rectangular black box with the title of "tasking.exe", with