Flex input type for c# string array: string[]

Quick question, what would the input type for Flex be if the data type on the asp.net c# web service was a string array, string[], it seems to autodetect it as an ArrayCollection but that isnt right, so I would assume array, but i would still like to confirm this.
thanks
shaine

it was actually arraycollection :\
the actual answer is:
var _compEmp:ArrayCollection = new ArrayCollection(new Array("Shaine Fisher"));
thanks

Similar Messages

  • String[] array = (String[])vector.toArray();

    Why does the last line cause a ClassCastException?:
    Vector vector = new Vector();
    vector.add("One");
    vector.add("Two");
    vector.add("Three");
    vector.add("Four");
    vector.add("Five");
    String[] array = (String[])vector.toArray();
    Thanks
    [email protected]

    Because toArray () creates an Object array. You need the toArray(Object[]):String[] array = (String[]) vector.toArray (new String[vector.size ()]);Kind regards,
      Levi

  • JSR 234 -- Media Processor Input Types for Sony Ericsson k790

    Hi,
    This method 'getSupportedMediaProcessorInputTypes()' is supposed to return a string array of all the supported media processor input types. However, on the k790, it just returns null.
    In the docs, to support JSR 234, you're required to support at least JPEG and Raw image input types, but those are not working; they throw the media exeception unable to create Media Processor for input type ...
    Any suggestions?
    Thanks

    Here is what i tried.
    import javax.microedition.media.Manager;
    import javax.microedition.amms.GlobalManager;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    public class media extends MIDlet { 
      public void startApp() {
        List list = new List("Input Content Types", Choice.IMPLICIT);
        String[] inputTypes = GlobalManager.getSupportedMediaProcessorInputTypes();
        for(int i = 0; i < inputTypes.length; ++i) {
                                                      list.append(inputTypes, null);
    Display.getDisplay(this).setCurrent(list);
    public void pauseApp() {}
    public void destroyApp(boolean unconditional) {}

  • Converting String Array -- String

    Hi All,
    I am converting String array to string using the following code:
    String[] a= ....;
    StringBuffer result = new StringBuffer();
    if (a.length > 0) {
    result.append(a[0]);
    for (int i=1; i<a.length; i++) {
    result.append(a);
    return result.toString();
    Is there is any other easy or efficient way to convert rather than the above code ?
    Thanks,
    J.Kathir

    It could have been written:
    StringBuffer result = new StringBuffer();
    for(int i=0; i<a.length; ++ i)
        result.append(a);
    return result.toString();
    Or in 1.5 lingo
    StringBuilder result = new StringBuilder(); //slightly less overhead
    for(String s : a)
        result.append(s);
    return result.toString();If you aren't picky about the format of the resulting string,
    you could use the java.utilArrays method )]toString(Object[]):
    String[] array= {"Hello", "World", "this", "is", "a", "1.5", "method"};
    String s = Arrays.toString(array); //[Hello, World, this, is, a, 1.5, method]

  • Data Type for saving Base64 image string into SQL database

    Hi Team! I have image base64 string to be save into sql database. I use Varchar(MAX) data type. The problem is there are certain image string that cannot be enter (paste) into the table (due to the size) then i need to resize the image then i can paste
    the string into the table. How to make all image string size be able to be save in the table? Or there is limit on the image size to be save into the table? I'm using mssql 2008. Thanks a lot.

    There is a limit of 2GB. Which means that the actual image size must be less, since you encode the image in Base64 for some reason.
    Now, "pasting" strings is not the normal way to store data in an SQL Server database, so the question is a little funny. Normally data is stored in a database through a program of some sort. One way is to use OPENROWSET(BULK) as HuaMin suggested.
    Here is a link to a simple example of how to do it from .NET:
    http://www.sommarskog.se/blobload.txt
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Return String array in server side

    i wrote a bean which contains a function return String array (
    String[] ). It shows no error on compile time, and also in
    generate jar file. However, when i generate it to an ear file,
    the syntax of the wsdl file is not correct so the client can't
    call this function becuase the xml can't parse the wsdl.
    When i change the return type to String, everything is ok. Does
    anybody know what's happen? I really have no idea on it, thx.

    This is why I wanted to see some code. I wanted to see how you are trying to move the array from one class to another.
    This should work... provided that the array is initialised correctly in ClassA. If you are doing it like this, please post some code and I'll help you fix it.
    class ClassA{
    public String[] getMyArray(){
    return myArray;
    class ClassB{
    public void myMethod(){
    ClassA myA = new ClassA();
    String[] newArray = myA.getMyArray();
    }

  • Adding to a string array

    hi,
    seem to be having some trouble adding to a string array of names
    im trying to take a name from a text field and add it to the array
    help would be much appreciated
    this is the string array
    String[] AuthorString =     {"John Grisham","Agatha Christie","Nick Coleman","Scott Sinclair"};which is loaded into
    public void fillArrayList(){
         for(int a=0; a<AuthorString.length; a++) {
         AuthorList.add((String)AuthorString[a]);
                         }i then try and add to this using
    public void AddMember(){
         String temp = (String)AuthorField.getSelectedItem();
         for(int a=0; a>AuthorList.size(); a++) {
         String temp = (String)AuhtorList.get(a);
              AuthorString .addItem(temp);
          }can anyone see any problem with this, or am i doing it the completely wrong way

    Also, your "for" loop's test condition is backwards. It should use "less than":
    a < AuthorList.size()

  • How to use Multimaps (Map String, ArrayList String )

    I was using an array to store player names, userIDs, uniqueIDs, and frag counts, but after reading about multimaps in the tutorials, it seems that would be much more efficient. However, I guess I don't quite understand it. Here's how I wanted things stored in my string array:
    String[] connectedUsers = {"user1_name", "user1_userid", "user1_uniqueid", "user1_frags"
                                            "user2_name"...}and here is how I'm attempting to setup and use the 'multimap':
    public class Main {
        static Map<String, ArrayList<String>> connectedUsers;
        public void updatePlayers(String name, String status) {
            String[] statusSplit = status.split(" ");
            if (connectedUsers.containsKey(name)) {
                connectedUsers.put(name, statusSplit[0]);
            else {
                connectedUsers.put(name, statusSplit[0]);
        }It's quite obvious I don't understand how this works, but should I even set this multimap up this way? Perhaps I should use a regular map with a string array for the values?

    You're cool MrOldie. Its just that alarm bells start ringing in my head when people come on and post as much as you do.
    * Created on Jul 28, 2005 by @author Tom Jacobs
    package tjacobs;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.LinkedList;
    import java.util.Map;
    import java.util.Set;
    import java.util.TreeSet;
    * ManyMap is a map that allows more than one value to be stored with any key
    * <p>
    * There are a number of methods in the class that have been deprecated because
    * the original functionality of Map has been violated to accomodate the concept
    * of the ManyMap
    public class ManyMap<T, T2> implements Map<T, T2> {
         private HashMap<T, ArrayList<T2>> mInnerMap;
         public ManyMap() {
              mInnerMap = new HashMap<T, ArrayList<T2>>();
          * @deprecated
         public T2 get(Object obj) {
              ArrayList<T2> ar = _get(obj);
              if (ar == null || ar.size() == 0) {
                   return null;
              return ar.get(0);
         public Iterator<T2> getAll(Object obj) {
              ArrayList<T2> ar = _get(obj);
              if (ar == null || ar.size() == 0) {
                   return null;
              return ar.iterator();          
         public T2 put(T obj1, T2 obj2) {
              ArrayList<T2> ar = _getNotNull(obj1);
              ar.add(obj2);
              return obj2;
         public Set<Map.Entry<T, T2>> entrySet() {
              TreeSet<Map.Entry<T, T2>> entries = new TreeSet<Map.Entry<T, T2>>();
              Iterator<T> _i = mInnerMap.keySet().iterator();
              while (_i.hasNext()) {
                   T key = _i.next();
                   Iterator<T2> vals = mInnerMap.get(key).iterator();
                   while (vals.hasNext()) {
                        Entry<T, T2> entry = new Entry<T, T2>(key, vals.next());
                        entries.add(entry);
              return entries;
         public int size() {
              return mInnerMap.size();
         public int valuesSize() {
              int vals = 0;
              Iterator<T> _i = mInnerMap.keySet().iterator();
              while (_i.hasNext()) {
                   T key = _i.next();
                   ArrayList<T2> ar = mInnerMap.get(key);
                   vals += ar.size();
              return vals;
         public void clear() {
              mInnerMap.clear();
         public void putAll(Map<? extends T, ? extends T2> map) {
              Iterator _i = map.entrySet().iterator();
              while(_i.hasNext()) {
                   Map.Entry<? extends T, ? extends T2> entry = (Map.Entry<? extends T, ? extends T2>) _i.next();
                   put(entry.getKey(), entry.getValue());
         public Collection <T2> values() {
              LinkedList ll = new LinkedList();
              Iterator<ArrayList<T2>> _i = mInnerMap.values().iterator();
              while (_i.hasNext()) {
                   ll.addAll(_i.next());
              return ll;
         public boolean containsValue(Object val) {
              Iterator<ArrayList<T2>> values = mInnerMap.values().iterator();
              while (values.hasNext()) {
                   if (values.next().contains(val)) return true;
              return false;
         public boolean containsKey(Object key) {
              return mInnerMap.containsKey(key);
         public T2 remove(Object obj) {
              Iterator<ArrayList<T2>> values = mInnerMap.values().iterator();
              boolean found = false;
              while (values.hasNext()) {
                   if (values.next().remove(obj)) {
                        found = true;
              return found ? (T2)obj : null;
         public boolean isEmpty() {
              return valuesSize() == 0;
         @SuppressWarnings("hiding")
         private class Entry<T, T2> implements Map.Entry<T, T2> {
              T key;
              T2 val;
              public Entry (T obj1, T2 obj2) {
                   key = obj1;
                   val = obj2;
              public T2 getValue() {
                   return val;
              public T getKey() {
                   return key;
              public T2 setValue(T2 obj) {
                   return val = obj;
         public Set<T> keySet() {
              return mInnerMap.keySet();
         public ArrayList<T2> _get (Object obj) {
              return mInnerMap.get(obj);
         public ArrayList<T2> _getNotNull (T obj) {
              ArrayList<T2> list = _get(obj);
              if (list == null) {
                   list = new ArrayList<T2>(1);
                   mInnerMap.put(obj, list);
              return list;
    }Edited by: tjacobs01 on Aug 19, 2008 12:28 PM

  • Is it possible to pass array of strings as input parameters for stored proc

    Dear All,
    I wrote a Stored Procedure for my crystal report. now i got a modification.
    one of the parameters 'profit_center' should be modified so that it is capable to take multiple values.
    now when i run report crystal report collects more than one values for parameter profit_center and sends it as input parameter to stored procedure all at a time.
    the only way to handle this situation is the input parameter for stored procedure 'profit_center' should be able to take array of values and i have a filter gl.anal_to = '{?profit_center}'. this filter should also be modified to be good for array of values.
    Please Help.

    Or you can use sys.ODCIVarchar2List
    SQL> create or replace procedure print_name( In_Array sys.ODCIVarchar2List)
        is
        begin
                for c in ( select * from table(In_Array) )
                loop
                        dbms_output.put_line(c.column_value);
                end loop ;
        end ;
    Procedure created.
    SQL>
    SQL> exec print_name(sys.ODCIVarchar2List('ALLEN','RICHARD','KING')) ;
    ALLEN
    RICHARD
    KING
    PL/SQL procedure successfully completed.SS

  • Pass String[] (String Array) type to a parameter in "Edit Action Binding"

    Hi
    Hope you are doing fine. This is very important to me, kindly help me in this regad.
    I have a scenario where I need to pass in a parameter of type String[] that has only one value {"Name"} to a webservice that returns some values.
    I've created a WS datacontrol, dragged and dropped the return value on to a jspx, then it asks me to give the input value
    How do I pass it to the Parameter in "Edit Action Binding"?
    When I say new String[]{"Name"}, it gives me the following error
    Cannot create an object of type:[Ljava.lang.String; from type:java.lang.String with value:new String[]{"Name"}
    Similarly, I hardcoded this value in a managedBean, added it to requestScope/applicationScope and queried it using #{applicationScope.AppCreationBean.epsName}
    But this time, it says, the value is null. I guess the value is not getting initialized properly. But if i hardcode the value in the getter method, I'm again getting the error as above.
    Would some one tell me how to pass an array of type String (ie, String[]) with a value "Name" in the "Edit Action Binding" wizard itself?
    Regards
    RaviKiran

    Hi Frank
    Thanks for the reply.
    Issue resolved by initializing it in the ManagedBean.
    For some reason, when I put it in request/application scopes, it was coming as null, but when I registered the Bean in PageFlowScope, it was working!
    Regards
    RaviKiran

  • HELP INPUT TYPE = hidden  values SEEN IN URL QUERY STRING!!!

    Trying to do session management using hidden fields.
    The fields that are suppose to be hidden show up in the query string of the URL.
    I have included the code, the output to the web page
    and the URL with the "hidden" fields please help.
    HIDDEN FIELDS IN URL QUESRY STRING
    http://localhost:8080/myApp/servlet/Servlet077?firstName=Sandra&item=Michael
    WEB PAGE OUTPUT
    Enter a name and press the button
    Name:
    Your list of names is:
    Michael
    Sandra
    JAVA SOURCE CODE
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet077 extends HttpServlet{
    public void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException{
    //An array for getting and saving the values contained
    // in the hidden fields named item.
    String[] items = req.getParameterValues("item");
    //Get the submitted name for the current GET request
    String name = req.getParameter("firstName");
    //Establish the type of output
    res.setContentType("text/html");
    //Get an output stream
    PrintWriter out = res.getWriter();
    //Construct an HTML form and send it back to the client
    out.println("<HTML>");
    out.println("<HEAD><TITLE>Servlet07</title></head>");
    out.println("<BODY>");
    //Substitute the name of your server or localhost in
    // place of baldwin in the following statement.
    out.println("<FORM METHOD=GET ACTION="
    + "\"http://localhost:8080/myApp/servlet/Servlet077\">");
    out.println("Enter a name and press the button<P>");
    out.println("Name: <INPUT TYPE=TEXT NAME="
    + "\"firstName\"><P>");
    out.println("<INPUT TYPE=submit VALUE="
    + "\"Submit Name\">");
    out.println("<BR><BR>Your list of names is:<BR>");
    if(name == null){
    out.println("Empty<BR>");
    }//end if
    if(items != null){
    for(int i = 0; i < items.length; i++){
    //Display names previously saved in hidden fields
    out.println(items[i] + "<BR>");
    //Save the names in hidden fields on form currently
    // under construction.
    out.println("<INPUT TYPE = hidden NAME=item "
    + "VALUE=" + items[i] + ">");
    }//end for loop
    }//end if
    if(name != null){
    //Display name submitted with current GET request
    out.println(name + "<BR>");
    //Save name submitted with current GET request in a
    // hidden field on the form currently under
    // construction
    out.println("<INPUT TYPE = hidden NAME=item "
    + "VALUE=" + name + ">");
    }//end if
    out.println("</body></html>");
    }//end doGet()
    }//end class Servlet07

    1. Change <form name=xxx action="your_servlet" mathod="Get"> to
    <form name=xxx action="your_servlet" mathod="POST">
    2. Add the following lines of code to your servlet.
    public void doPost(HttpServletRequest req, HttpServletResponse res)
            throws ServletException, IOException {
            doGet(req,res);
            return;
    }Sudha

  • How do you store input from keyboard into a string array

    I am trying to learn java and one of the programs I am trying to write needs to be able to accept a machine hostname at the keyboard and stuff it into a string array element. I am sure I will be using something along the lines of:
    BufferedReader in = new BufferedReader(new InputStreamReader(
                             System.in));
                   String str = "";
                   System.out.print("Enter a FQDN to look up: ");
                   str = in.readLine();
    but how do I get the input stuffed into hostname[ ].
    Any hints or assistance will be appreciated.
    Michael

    Well part of. I need to be able to take a random number of hostnames (ie. mblack.mkblack.com, fred.mblack.com, joe.mblack.com, ...) and after the user presses the enter key between each entry, the inputted information is stored in an array element. for example with the three shown above the array would look like this after the user finished.
    hostname {"mblack.mblack.com","fred.mblack.com","joe.mblack.com"};
    the algorithm would be
    Prompt for hostname
    get user input and press enter
    store hostname into array element
    prompt for next hostname or enter with no input to complete entry and execute lookup.class methods.
    I have the program written and working fine if I use a static array where I put the hostnames in the list, but cannot figure out how to get the information from the keyboard to the array element.
    Thanks for the help though, the response is very much appreciated.
    Michael

  • How to use a WebService Model with String Arrays as its input  parameter

    Hi All,
    I am facing the following scenario -
    From WebDynpro Java i need to pass 2 String Arrays to a Webservice.
    The Webservice takes in 2 input String Arrays , say, Str_Arr1[] and Str_Arr2[] and returns a string output , say Str_Return.
    I am consuming this WebService in WebDynpro Java using WEB SERVICE MODEL. (NWDS 04).
    Can you please help out in how to consume a WSModel in WD where the WS requires String Arrays?

    Hi Hajra..
    chec this link...
    http://mail-archives.apache.org/mod_mbox/beehive-commits/200507.mbox/<[email protected]>
    http://www.theserverside.com/tt/articles/article.tss?l=MonsonHaefel-Column2
    Urs GS

  • [svn:bz-trunk] 22381: Add some unit tests for the flex.messaging.client. FlexClientManager, including one for the new getFlexClient(String id, boolean createNewIfNotExist) method signature.

    Revision: 22381
    Revision: 22381
    Author:   [email protected]
    Date:     2011-09-02 05:10:41 -0700 (Fri, 02 Sep 2011)
    Log Message:
    Add some unit tests for the flex.messaging.client.FlexClientManager, including one for the new getFlexClient(String id, boolean createNewIfNotExist) method signature.
    Added Paths:
        blazeds/trunk/modules/core/test/src/flex/messaging/client/
        blazeds/trunk/modules/core/test/src/flex/messaging/client/FlexClientManagerTest.java

  • Naive Bayes Training - CLOB as output data type for JSON string?

    Hello everyone,
    My training model outputs a large JSON string that doesn't fit into one row, so the string is split across multiple rows. Default - or only possible output data type for that matter - is varchar according to the official documentation on PAL. Is there any chance I could use CLOB for the output?
    Regards
    Henry

    The property you provided is for applying an NB model, not for building one.
    For build, you should have used Sample_NaiveBayesBuild property file.
    I ran the NB apply sample program with your property, and was able to get past the point where you have problem.
    Please double check if you really used the property you provided and if it matches to the program you wanted to use.

Maybe you are looking for

  • How to insert multiple rows in the database table with the high performance

    Hello everybody, I am using the struts,jsp and spring framework. In my application there are 100s of rows i have to insert into the database 1 by 1. I am using usertransaction all other things are working right but i am not getting the real time perf

  • Music played on new nano skips

    I received a new 4G nano for xmas and for some reason it sounds as if the songs "skip" (much like a CD sounds when it skips). Some of the files even skipped when I played them from my library on iTunes. I got the files from a music CD that played won

  • About recovering my laptop

    dear sir/madam        i need help regarding my hp recovery.i made a recovery dvd but unfortunately 2nd disc is not working so i just installed a n os manually but it is not genuin as u know so is there any possibility that i get a genunity key from h

  • Black Screen when trying to watch videos

    When using iTunes on my computer, every time is try to watch a TV Show, movie or Music video all I get is a black screen. It does not matter if the video is in the 'cloud' or actually on my hard drive. Every video I try to watch is just a black scree

  • Can't Sync with any other apps

    I just got the new 3G and am trying to get my iCal and my Address Book info from my MacBook to my iPhone and I don't see any syncing options for those options. I have only found things on the net for OS X 10.5 not 10.4. I am sure its not as hard as I