Custom components that accept multiple data types

The components that come with Flex, such as Datagrid, can
accept
multiple data types as a data source. For instance, you can
bind a
Datagrid to XML return from an HTTPService request or you can
build an
array and bind to that. I'd like to build my own component
that does
something similar, but I can't find any examples of this. I
don't
really even know what terms I'd search under to find it.
Can anyone out there give me any idea of how this is done?
Also, I'm a
bit hazy on how the column definitions you set up in the MXML
tag get
received inside the class. I'd appreciate any insight on how
this
works.
Thanks;
Amy

"Amy Blankenship *AdobeCommunityExpert*"
<[email protected]>
wrote in message news:[email protected]...
>
> "rvollmar" <[email protected]> wrote in
message
> news:[email protected]...
>> For the second part of your post, are you asking how
to set up columns in
>> ActionScript? e.g.
>>
>> private function setColumnConfig1(dg:DataGrid):void{
>> colArray = new Array();
>> var col1:DataGridColumn = new DataGridColumn();
>> var col2:DataGridColumn = new DataGridColumn();
>> var col3:DataGridColumn = new DataGridColumn();
>> var col4:DataGridColumn = new DataGridColumn();
>> var col5:DataGridColumn = new DataGridColumn();
>> var col6:DataGridColumn = new DataGridColumn();
>>
>> col1.dataField = "recordName";
>> col2.dataField = "image";
>> col3.dataField = "recordAmount";
>> col4.dataField = "who";
>> col5.dataField = "where";
>> col6.dataField = "when";
>>
>> col2.itemRenderer = application.ImageRenderer;
>>
>> colArray.push(col1);
>> colArray.push(col2);
>> colArray.push(col3);
>> colArray.push(col4);
>> colArray.push(col5);
>> colArray.push(col6);
>>
>> dg.columns = colArray;
>> }
>>
>> Or were you wondering, when one writes this in mxml:
>>
>> <mx:columns>
>> <mx:DataGridColumn ...>
>> ...
>> </mx:columns>
>>
>> how do you then have the control use that
information?
>
> The latter. But the fact is that I was misreading the
example I was
> looking at.
>
> <?xml version="1.0"?>
> <!-- dpcontrols/DataGridSimpleAttributes.mxml -->
> <mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
> <mx:DataGrid>
> <mx:ArrayCollection>
> <mx:Object Artist="Pavement"
> Album="Slanted and Enchanted" Price="11.99" />
> <mx:Object Artist="Pavement"
> Album="Brighten the Corners" Price="11.99" />
> </mx:ArrayCollection>
> </mx:DataGrid>
> </mx:Application>
> I was thinking the ArrayCollection was going to the
columns, but of course
> it is the dataProvider. Am I right in thinking that
internally the
> control has a defaultProperty metatag that enables the
contents of the
> parent DataGrid tag to just come in and populate the
dataProvider through
> PFM?Thanks;Amy
OK, I have looked at the source file, and it looks like the
[DefaultProperty] metatdata tag is at least not used in the
ListBase.as
class. So I am guessing it is either higher or lower in the
heirarchy...?
-Amy

Similar Messages

  • Custom JSTL that accepts JSTL expression

    Hi All!
    In a jsp, I have used some code like this:
    <c:out value="${myForm.myValue}"/>
    But now I want a custom tag that accepts the same JSTL EL value and manipulates the string in some way..
    I know how to write a custom tag, but how can I write a custom tag so that it accepts the result of a JSTL expression? For example:
    <myLib:changeString value="${myForm.myValue}"/>
    Any advice would be most appreciated!
    Rob
    :)

    Hi All!
    In a jsp, I have used some code like this:
    <c:out value="${myForm.myValue}"/>
    But now I want a custom tag that accepts the same
    JSTL EL value and manipulates the string in some
    way..
    I know how to write a custom tag, but how can I write
    a custom tag so that it accepts the result of a JSTL
    expression? For example:
    <myLib:changeString value="${myForm.myValue}"/>
    Any advice would be most appreciated!
    Rob
    :)In your tag class add something similar to this method:
    import org.apache.taglibs.standard.tag.common.core.NullAttributeException;
    import org.apache.taglibs.standard.tag.el.core.ExpressionUtil;
    private void evaluateExpressions() throws JspTagException
          Object value = null;
          try
             value = ExpressionUtil.evalNotNull("changeString", "myValue", target, Object.class, this, pageContext);
          } catch (NullAttributeException ex)
             // explicitly allow 'null' for value
             value = null;
          } catch (JspException ex)
             // explicitly allow 'null' for value
             value = null;
             myLogger.error("Error: ", ex);
             throw new JspTagException("Fatal IO error");
          setMyValue((String) value);
       }Then in you doStartTag, add a call to this method. Hope this helps!
    David

  • SharePoint 2013 List - Multiple Data Types in the Same List

    In the same SharePoint 2013 list in Data Sheet View, I want to have one column where my end users enter inputs for KPIs. There are 3 groups of KPIs (A, B and C) and they each have different data types (A-string, B-decimal, C-percentage) and I want to be
    able to base their input options off of the KPI type
    Does anyone have any suggestions on how I can leverage my parent-child relationships so when an end user...
    1. Picks KPI type A, they can select from a choice filed (Green, Yellow, Red)
    2. Picks KPI Type B, they can enter a decimal (-1.000 to 2.000)
    3. Picks KPI Type C, they can enter a percentage (-100.00% to 100.00%
    I'm using if I want to keep this in one list, one column and in data sheet view that the out of the box solutions won't meet my requirements. I was looking at some solutions from Bamboo (Lookup Selector Column) but don't think that applies here.
    Thanks!
    Johnny

    Hi Johnny, you can accomplish this using cascading lookups in InfoPath if that program is available to you. Otherwise, if you want a 3rd party product, we use the Kwiz cascading lookup and it's worked wonders for us:
    http://www.kwizcom.com/sharepoint-add-ons/sharepoint-cascading-lookup-plus/overview/
    Note: I have no relationship with Kwiz, just vouching for the product.
    cameron rautmann

  • Generic sort algorithim multiple data types

    How would I create a method to sort any type of data type given.
    Would I have to overload the method and rewrite the algorithim for each data type. This seems redundant. Could I use an interface somehow. I am clueless. I know you can do this in c++ using templates. How do you do it in Java?

    you can use the standard API for ideas.
    to sort objects you need to know which should come before others, and how to put them in order.
    the standard api has two ways to solve the first part: the interface java.lang.Comparable which is implemented by objects that are, well, comparable, and the interface java.util.Comparator that can compare two arbitrary objects.
    the second part is solved by implementing a method like Arrays.sort.

  • One parameter - multiple data types?

    I posted a question similar to this in my attempts to use a lexical parameter to make my ORDER BY clause dynamic, but here's a more basic version of my question.
    Is there a way to order by a column from the SELECT list, and make that column capable of having more than one different data type?
    I'm trying to make my ORDER BY dynamic, but the data element the user chooses to order by may be a character, a number, or a date; however, I'm trying to use a parameter to do this, and Reports requires that a paremeter be designated as only one data type.
    Anyone ever found a way to make their ORDER BY dynamic enough to accommodate for the possibility of ordering by just one column that may not always have a value of the same data type?

    I think i have a solution for you at last.
    Do...
    Delare 2 user parameters.
    MYPARAMETER1;
    MYPARAMETER2;
    In myparameter1. add values of your order by clause.
    like.
    COMMENT_DATE ASC
    COMMENT_DATE DESC
    AMOUNT ASC
    AMOUNT DESC
    etc
    Let your myparameter2 empty & also do not diplay that on your parameter form.
    Now open After Parameter Form Trigger under Report Triggers.
    Code it as.
    :MYPARAMETER2 := ' ORDER BY ' || ' ' || :MYPARAMETER1 ;
    RETURN TRUE;
    Then in your query in the end type
    &myparameter2;
    Hope this will work for u brice...
    Capri...

  • Sw engineering question - multiple data types

    hi all
    Im in a situation where I will have to read in data that could come in many formats, int, double, float, etc...
    The question is how do I create a "datastorage" class that has a "getdata" method that doesnt care about the type of the data it is returning? I am trying to avoid a situation where somewhere along the line someone has to write an if(int) do this and if(float) do that, but it might not be avoidable...comments on that are welcome too...
    two ideas floating around in my head are
    1) declare an abstract DS class and then have intDataStorage, doubleDatastorage, etc
    2) have on DS class that stores the data in Arrays of Integer, Double, etc
    neither of these ideas leads to a way of avoiding if statements to determine the datatype however...
    thanx in advance

    If it's all number types, then they could all be stored as a double, except maybe some extreme long values. Or strings, but you'd still have to parse them and still use ifs
    But most "formats" usually define things like the "format" of what the data will look like.

  • Multiple Display Types in a single column

    I have a situation where I have to display a bunch of attributes for a customer. Each attribute can have a different type, Text, Dropdown, Date etc and that information is stored in a table.
    I was able to use apex_item to display the different display types based on the type of attribute.
    So the layout of the form has 2 columns, column 1 is the name of the attribute and column 2 is the value of the attribute (displayed as the various types of date, text, dropdown etc) However, I am having an issue with the Date popups. When I select a date it always goes into whatever date is listed first. No sorting is going on in the select or the report.
    I'm guessing my issue has to do with displaying different display types in the same column? If that is true, how should I change my approach to this problem? I want all the attributes on a single page, so is my only option to have each attribute in a different region?
    Thanks,
    -- Johnnie

    Denes,
    OK thanks for the heads up, let me try to clarify.
    My problem is that I have multiple date popups on the same form. When I pick a date for any of the date popups, it always updates the first date popup field on the form. I stated there was no sorting at all because this thread indicated that sorting could cause this issue:
    DATE_POPUP
    Another hit for this issue was here:
    Re: HTMLDB_ITME.DATE_POPUP problems
    This suggested that having multiple data types in the same column (which is what I am doing) is not supported, but this is an old thread.
    My form will be a manual tabular form. I need to display a list of attributes, however some are freeform text, some are SQL LOV dropdowns, and some are date popups. Right now they are all displayed in the same column. Could this be causing my date popup issue? If so what alternatives do I have?
    Screenshot of my form here: http://johnniebillings.googlepages.com/outlook.jpg
    Hope that clears up the issue I am having.
    -- Johnnie

  • I have  a singleton that contains my data object. How to refresh components

    I have a singleton that contains my data object. This
    singleton data is used to populate comboboxes and datagrids across
    various custom components that are children of the main
    application. These components can manipulate the singleton. When
    these changes are made to the singleton what do I have to do to get
    this data to refresh across the componets that use its data?

    I assume that your mail app on your iPad/iPhone is Apple Mail.  You can open a MS Word/Excel document in Adobe Reader for iOS and convert it to PDF at a time.
    In Mail, long press (press & hold) an attachment icon.
    Select "Open in Adobe Reader".
    Follow the instructions shown in Adobe Reader to subscribe to a paid service called "Adobe PDF Pack" to convert the document to PDF.
    Please note that Adobe Reader for iOS itself is a free app but the subscription for the Word/Excel to PDF conversion is a paid service (i.e. not free).
    In case you have any questions about Adobe PDF Pack, here's the user forum.
    Adobe PDF Pack

  • How to change data type for a field?

    Hi Experts,
    I have one std screen having one field having numeric type. So it will accept only numeric value. Remember I am using standard transaction.
    Now my user wants to enter the special character like + or - in that field(having data type numeric).
    How i can change the data type for the particular field  so that it will also accept + or -?
    Plz reply me as earliest as possible.
    Thanks in advance.

    Hi salil ,
    u have to change / create Domain of  that Data Element.
    but u have to check the Implications. i have done the same thing , but that one is Customer defined one , i got nearly 20 short dumps while doing the TP.
    regards
    Prabhu

  • AppleScript Call Soap Data types

    I am using AppleScript to issue SOAP requests via built-in the 'call soap' function. The server to which I am connecting uses both simple and complex data types. It's pretty straight forward issuing the basic parameters for simple data types, but if the remote method requires a complex data type, such as a double set of parameters, I can't see how to get it done.
    Anyone have any experience sending SOAP requests with AppleScript that involved complex data types, which include multiple parameters, rather than just simple flat parameter lists?

    Hi,
    not exactly sure what you mean by placeholder data types?
    Surely it would be better to evaluate off a sample employee/departments or predefined database schema if you want to see what the UI / design process is like?
    The design process is very smooth and elegant in JDev 11g if you use the business components from tables wizard in the model and then design pages.
    Brenden

  • Getting Data Types of Eloqua - any REST BULK API?

    Is there an api which lists all the data types used for the fields of eloqua entities?
    From the examples that list the entity metadata I could see that there are data types like "YESNO", "Date"  and "string" for entiy's fields.
    I will need a  list of all data types that eloqua can have for any of  its fields.
    I am going to be using the BULK API to import and export eloqua elements through java.

    There is currently no endpoint for this.
    There are four data types available for contacts and accounts - Date, Large Text, Numeric (float), Text.  Custom objects can these four data types plus a fifth - Number (integer).

  • About string data type

    Hi
    Maximum number of characters that a string data type accepts in Java.
    Thanks..

    The next may give a rough test.
    public static void main(String[] args) throws Exception{
    int factor= Integer.parseInt(args[0]);
    char[] data = new char[Integer.MAX_VALUE/factor];// note: integer division
    for(int k=0;k<data.length;k++)  data[k]=(char)0x30;
    String s=new String(data);
    System.out.println(Integer.toString(s.length()));
    }

  • Problem with a data type (quantum13.3) in the mapping

    Hello all,
    i have an automated activity in my process which access to a webservice. (The Webservice returned the details of a purchase requisition) At the webservice output mapping i get this error:
    "Incompatible expression type ... Expected: com.sap.dictionary.double ... Found: quantum13.3..."
    Has anyone an idea how i could accept this data type? Has anyone ever heard of the type "quantum13.3"?
    Regards,
    Bastian

    Hi Bastian,
    This error is showing up whenever you try to map incompatible types.
    The type of the element you map to is most likely the 'com.sap.dictionary.double' whereas the service is returning an element of type 'quantum13.3'. The mapping expects that both types fit to each other, but they do not.
    Check the used service for that specific type. Perhaps it is just a restriction of a 'well-known' type or the service returns the data in another format / element as well.
    *edit'
    Looking up the type via a well-known search engine showed the following definition:
          <xsd:simpleType name="quantum13.3">
            <xsd:restriction base="xsd:decimal">
              <xsd:totalDigits value="13"/>
              <xsd:fractionDigits value="3"/>
            </xsd:restriction>
          </xsd:simpleType>
    Looks like this is a normal 'xsd:decimal' then. Try using 'xsd:decimal' instead of 'com.sap.dictionary.double' within the target element.
    Hope that helps,
    Martin
    Edited by: Martin Moeller on Apr 27, 2009 12:53 PM (type found)

  • A structure with mutiple data types or array of array

    I want to read some soft of a table from a text file and want to store in a structure (not in database) for future use. I want the structure to have rows and columns when I need to reach. Colums should store multiple data types (int and/or string). I have examined Collections that only store one data type and only one dimension. I need a structure that holds multiple datatypes and at least 2 dimension. In short I need array of array? Any example or suggestion?

    Here is the colection part. But I cound not get it finished. Stuck at getting data from collection.. How could I read from the collection
        public static Long ReadFromFile() {
            List liste = new ArrayList();
            try {
                FileReader file = new FileReader ("abc.txt");
                BufferedReader buffer = new BufferedReader (file);
                String line = "";
                int i = 0;
                while ((line = buffer.readLine())!= null) {
                    if (i>0) {
                        DataS kontrol = new DataS();
                        String [] temp = null;
                        temp = line.split("\t");
                        for (int j=0; j< temp.length; j++) {                       
                            if (j== 0 && StrUtil.ValidNumber(temp[0])>0 ) {
                                kontrol.set_C_id(temp[0]);
                            } else if (j== 1) {
                                kontrol.set_C_enabled(temp[1]);
                            } else if (j== 2) {
                                kontrol.set_C_table(temp[2]);
                            } else if (j== 3) {
                                kontrol.set_C_field(temp[3]);
                            } else if (j== 4) {
                                kontrol.set_C_xmlobjectname(temp[4]);
                            } else if (j== 5) {
                                kontrol.set_C_xmlsubobjectname(temp[5]);
                            } else if (j== 6 && StrUtil.ValidNumber(temp[6])>0 ) {
                                kontrol.set_C_controltype(temp[6]);
                            } else if (j== 7) {
                                kontrol.set_C_datatype(temp[7]);
                            } else if (j== 8 && StrUtil.ValidNumber(temp[8])>0 ) {
                                kontrol.set_C_datalength(temp[8]);
                            } else if (j== 9 && StrUtil.ValidNumber(temp[9])>0 ) {
                                kontrol.set_C_dl(temp[9]);
                            } else if (j== 10) {
                                kontrol.set_C_conditionop(temp[10]);
                            } else if (j== 11) {
                                kontrol.set_C_conditionval(temp[11]);
                        liste.add(kontrol);                   
                    i++;
                    buffer.close();
            catch (IOException e) {
                return Long.valueOf(-1);
            /*For reading test*/
            try{
                DataS stored_kontrol = new DataS();
                Iterator itr = liste.iterator();
                int i = 0 ;
                while(itr.hasNext()) {
                    //Object obj = itr.getClass();
                    // Here were I stuck... How can I read from collection which is filled with object
            } catch (Exception e) {
                return Long.valueOf(-1);
            return Long.valueOf(1);
        }

  • How to call user define data type as data type for concurrent parameter

    Hi All,
    i find some difficulty while creating the concurrent program.
    i.e.
    i have one of the parameter of table type i.e. user define data type at PLSql program
    now i need to register same PLSQL program into oracle applications as concurrent program
    but while i am creating Parameters for concurrent program
    How could i define that user define data type at database level in oracle applications using 'Value set' ?
    any one save me from this Problem
    thanks and Regards,
    sai krishna@cavaya.

    Don't think this can be done..
    One way I can think of is to wrap your PL/SQL program under another procedure/package that can accept "normal" parameter,and use/register this wrapper instead of your original pl/sql program.
    HTH

Maybe you are looking for

  • There is no iView available for system "SAP_ERP_Manufacturing"...

    Hi out there, I have imported the business packages Common Parts 1.2 and Maintenance Technician 1.2 in our portal testsystem (nw7, sps18). after setting up a system with alias SAP_ECC_MANUFACTURING and asigning the role com.sap.pct.erp.maintech.maint

  • Oracle 8.1.7.4 - restore controlfile

    Hi, I am wanting to know if you can use the following command to restore a controlfile, if you don't use an rman catalog with Oracle 8i (8.1.7.4). restore controlfile from '<dir>/cf_rman.bus' If you can't do this, then I am wanting to know alternativ

  • Need help troubleshooting issues with Adobe Reader X

    Hello, Recently our company upgraded multilpe computers to Reader X.  Initially we installed version 10.1.0.  Ever since our users on X have been experiencing problems.  We are seeing three different issues. 1) A user will fill out the PDF and click

  • I want to edit an existing .rtf file from my PC on my iPod Touch. What do I have to do?

    I have a new iPod Touch, and an existing .rtf file on my Windows 7 PC that I wish to edit when traveling. I want to be able to do this regardless of having an internet connection.  What app(s) do I need, what file type should I convert the .rtf to, a

  • Director 10.1.1

    I am trying to update to 10.1.1 from 10.1.0 in order to install swf files. With 10.1.0 I keep getting a 1 frame swf that doesn't play. Reading this forum I found that I may need 10.1.1 for Flash 8 files. This is the link I went to: 10.1.1updateAfter