Array of UI component

I am trying to use an array of DropDown components like this jsp code (vwp project)
<ui:dropDown binding="#{scheduler.subjectDD[0]}" id="subjectDD1" items="#{scheduler.dropDown1DefaultOptions.options}"/>
the java bean contains
private DropDown subjectDD[] = new DropDown[10];
//initialized in the constructor
public DropDown getSubjectDD(int i) {
return this.subjectDD;
public void setSubjectDD(DropDown dd,int i) {
this.subjectDD[i]=dd;
I am getting this error
javax.faces.el.PropertyNotFoundException: Error getting property 'subjectDD' from bean of type secsched.scheduler
at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:127)
at com.sun.rave.web.ui.faces.UIComponentPropertyResolver.getValue(UIComponentPropertyResolver.java:84)
at com.sun.rave.web.ui.faces.DataProviderPropertyResolver.getValue(DataProviderPropertyResolver.java:150)
at com.sun.rave.faces.data.ResultSetPropertyResolver.getValue(ResultSetPropertyResolver.java:67)
seems like its execuing
public Object getValue(Object base, Object property)
when it should be executing (i think)
public Object getValue(Object base, int index)
please help

thank you for your reply. actully i used the same code u did, i just mistakenly pasted the wrong code here :( ... any ways this code gives error
i created a new project for testing ... blow is the code
[[ the idea for using index is .. as i have 20 dropdown of the same kind i dont wanna write 20 get ... i rather just loop over it and get the value ....
seems like i cant make it work ... someone please help ...
any ways here is the code ...
<ui:form binding="#{Page1.form1}" id="form1">
<ui:dropDown binding="#{Page1.dropDown[0]}" id="dropDown1" items="#{Page1.dropDown1DefaultOptions.options}" />
</ui:form>
private DropDown dropDown[] = new DropDown[10];
///initialize in the init() section
public DropDown getDropDown(int i){
return this.dropDown;
public void setDropDown(DropDown dd, int i){
this.dropDown[i]=dd;
the error i get is ... seems like
insted of executing ResultSetPropertyResolver.getValue(Object base, int index)
ResultSetPropertyResolver.getValue(Object base, Object property)
its executing
SEVERE: Servlet.service() for servlet jsp threw exception
javax.faces.el.PropertyNotFoundException: Error getting property 'dropDown' from bean of type webapplication4.Page1
at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:127)
at com.sun.rave.web.ui.faces.UIComponentPropertyResolver.getValue(UIComponentPropertyResolver.java:84)
at com.sun.rave.web.ui.faces.DataProviderPropertyResolver.getValue(DataProviderPropertyResolver.java:150)
at com.sun.rave.faces.data.ResultSetPropertyResolver.getValue(ResultSetPropertyResolver.java:67)
at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)

Similar Messages

  • Passing Array to Custom Component

    I have a custom button component that has the following setter function:
    //get title dimensions
    [Bindable]
    public function get titleDims():Array {
       return _cubeTitleArray;
    In main.mxml, the button MXML code is as follows:
    <comp:updateButton
    id="update"
    cubeName="{_cubeName}"
    viewName="{_viewName}"
    serverChartId="{_serverChartId}"
    titleDims="xxx"
    enabled="false"/>
    How do I specify an array in the titleDims property so the button can use it?
    The array would be something like:
    {Month: comboBox1.text, Year:comboBox2.text, Sales Order:comboBox3.text}
    There are spaces in the key values. I would like to know how to deal with those also.
    Thanks!

    Use associative array. Something like this
    var myArray:Array = new Array();
    myArray["Month"] = "some value";
    myArray["Sales Order"] = "some other value";
    Check this livedocs page for reference
    http://livedocs.adobe.com/flex/3/html/help.html?content=10_Lists_of_data_4.html

  • Arrays to List component

    I am fairly new AS3 coder now using Flash Builder and I can't work out how to display my data (a collection of actionscript arrays returned by a AS3 function) in a List component as a list of labels and images. My arrays look like this:
    var aNames:Array = new Array("John", "Ringo", "Paul");
    var aImages:Array = new Array("http://myserver.com/image1.jpg", "http://myserver.com/image2.jpg", "http://myserver.com/image3.jpg");
    Now I want to display them in a list component, each list item has the image on the left and then the name on the right.
    Can anyone provide an example please, I think I need to use an arraycollection and a custom item renderer inside the list and then have the lists dataprovider set to the arraycollection but have not been able to construct the code.
    Many thanks.

    You'll get better responses on the Flex general discussion forum for non-Flash Builder queries.
    -Anirudh

  • How to create an new array from dynamically discovered type

        public static Object toAdjustedArray(Object source, Object addition,
                                             int colindex, int adjust) {
            int newsize = 0;
            Class componentType = null;
            if (source.getClass().isArray()) {
                Object[] arrayIn= (Object[])source;
                componentType = arrayIn[0].getClass();
                newsize = arrayIn.length + adjust;
            else {
                System.out.println("error in ArrayUtil");
            Object[] newarray = new Object[newsize];
            copyAdjustArray(source, newarray, addition, colindex, adjust);
            return newarray;
        }This methods take an array as an input an append new value(s) to it.
    I can get the component type of the array (i.e. the class of the array's member). But how can I create a new array of this component type (i.e doing something like componentType[] newarray = new componentType[newsize])?
    CU Jerome

    I fanally found a walkaround trick for my problem.
    Their is no way to create an array of a certain type (dynamically dsicovered) in CLDC. But what you can do is to use the instanceof method to determine the type of your array and in a big if statement create the right array.
    Here is the final code:
        public static Object toAdjustedArray(Object source, Object addition,
                                             int colindex, int adjust) {
            int newsize = 0;
            if (source.getClass().isArray()){
                Object[] arrayIn= (Object[])source;
                newsize = arrayIn.length + adjust;
            Object arrayElement = null;
            if (addition.getClass().isArray()){
                Object[] temp = (Object[])addition;
                arrayElement = temp[0];
            else{
                arrayElement = addition;
            Object newarray = null;
            if (arrayElement == null){
                newarray = new Object[newsize];
            if (arrayElement instanceof org.hsqldb.Index){
                newarray = new org.hsqldb.Index[newsize];
            else {
                newarray = new Object[newsize];
            copyAdjustArray(source, newarray, addition, colindex, adjust);
            return newarray;
        }

  • 1D Array of Digital Waveform

    I have a 1D array of digital waveform and I need to work with the data from it. I can't seem to get the "numbers" from it to work with any array function or any other type of function for that matter.
    I need to be able to convert these so I can find a particular value in the array.
    Thanks.

    Have you tried separating the array into individual waveforms using Index Array VI?  You should be able to use the Get Waveform Components (Digital Waveform) VI on each wavefrom once you separate the array into its component waveforms.  Then you can convert the digital waveform into a Boolean Array using the Digital to Boolean Array VI.  You can then use boolean logic to determine when both waveforms output 1s.

  • BufferedImage to RGB Array

    I realize there's an advanced imaging forum, but this doesn't seem like it should be an advanced topic. Plus this forum has more activity =)
    I have a 2000x1312 pixel JPG that I load into a BufferedImage. I want to have three arrays: R[2000][1312], G[2000][1312], B[2000][1312] that hold values from 0-255 corresponding to the image in RGB space. My program used to do this in about 4 seconds. I didn't change any code involving this process, but for some reason, it now takes 100+ seconds to run.
    The slow line of code is:
    pixels = originalImage.getRGB (0, 0, 2000, 1312, null, 0, 2000);
    pixels is an int[2000*1312], originalImage is a bufferedImage.
    I don't have the dimensions hardcoded like this on my end, but I think you get the idea.

    A BufferedImage is basically a ColorModel plus a WritableRaster.
    A WriteableRaster is a SampleModel plus a DataBuffer.
    DataBuffer is an abstract class with concrete implementations like DataBufferByte and DataBufferInt.
    These buffer classes store data in arrays of primitive component type.
    With that in mind, try this code:
    int[] accessData(BufferedImage bi) {
        WritableRaster r = bi.getRaster();
        DataBuffer db = r.getDataBuffer();
        if (db instanceof DataBufferInt) {
            DataBufferInt dbi = (DataBufferInt) db;
            return dbi.getData();
        } else {
            System.err.println("db is of type " + db.getClass());
            return null;
    }This code does no copying of pixel data, so it should be very fast.
    Your data may be in a byte[], so you may need to adjust this code.
    Also, examine the size of the array. There may be some padding
    involved and so it may be longer than WxH.

  • How to use FlashIsland.EVENT_BEGIN_UPDATE and FlashIsland.EVENT_END_UPDATE

    Hi All,
      I am traying to get value from SAP into Flex component, i am trying to find out where exactly its filling up the array in Flex component and i am unable to figure it out. i am getting values into flex component i can see them but when i am debugging the same i am not able to find where its putting values into array in flex builder debuggin mode.
      if anybody can explain me how to use FlashIsland.EVENT_BEGIN_UPDATE and FlashIsland.EVENT_END_UPDATE . i dont know if there is any documentation on the event available for FlashIsland class.
              public function Search(): void{
                  var Objid:String = OBJID.text as String;
                   FlashIsland.fireEvent(this, "Search",{OBJECT_ID:Objid});
    will appreciate any reply.
    Mani

    I have seen that there is some bug in the early versions of the FlashIsland library where the EVENT_*_UPDATE events don't work.  I saw an internal note the other day that this was fixed in newer (and shipping) versions of the library.
    The code for the registration of the event should be:
    FlashIsland.addEventListener(FlashIsland.EVENT_END_UPDATE, handleEndUpdate);
    However I find that the better approach is to use public GET/SET functions as the bindings to the Web Dynpro Context.  This way you get Flex code that fires automatically whenever the Web Dynpro Context data changes.  This would be the prefered way of passing "events" from WD to the Flex code.

  • Removing select components from swing JPanel

    I have a JPanel that contains many different JLabels that move around to different parts of the JPanel. These components may end up occupying the same location in the JPanel.
    1. How do I determine which objects is the one visible? Is it the one most recently added to the JPanel?
    2. How do I selectively remove a certain component that may be in under one component and above 2 others...? This JLabel that I want to remove, does not have a specific name, instead it is indexed in an array.

    steeveesas wrote:
    I have a JPanel that contains many different JLabels that move around to different parts of the JPanel. These components may end up occupying the same location in the JPanel.
    1. How do I determine which objects is the one visible? Is it the one most recently added to the JPanel?I would guess that much depends on the layout manager (if any used) and how you are adding the components to the jpanel.
    2. How do I selectively remove a certain component that may be in under one component and above 2 others...? This JLabel that I want to remove, does not have a specific name, instead it is indexed in an array.call remove(component) on the JPanel followed by revalidate() and repaint().

  • Getting DataBuffer of an indexed GIF

    Hi,
    I'm trying to get a Raster's DataBuffer:
    DataBuffer db = raster.getDataBuffer();It works OK with JPEGs but with indexed GIFs the output is an 1D array where every component's value is "-1". Does anybody knows what does it mean? How can I avoid that?
    Thanks in advance.
    PS. indexed images drives me mad! :-(

    I misunderstood you. You write "indexed" for "IndexColorModel". I think all GIFs use an index color model.
    When the color model is an IndexColorModel, typically the DataBuffer is a DataBufferByte, right?
    Then the raw data is usually a single byte[] and byte values fall in the range [-128, +127], although most uses of them
    treat them as unsigned values in the range [0,255]. Your -1 vallues are really 255, if I understand you.
    Take a look at the follow example to see how to work with these bytes.
    import java.awt.image.*;
    import java.io.*;
    import java.net.*;
    import javax.imageio.*;
    public class Example {
        public static void main(String[] args) throws IOException {
            URL url = new URL("http://forum.java.sun.com/images/reply.gif");
            BufferedImage image = ImageIO.read(url);
            DataBuffer b = image.getRaster().getDataBuffer();
            if (b instanceof DataBufferByte) {
                DataBufferByte bb = (DataBufferByte) b;
                byte[] data = bb.getData();
                byte[] histo = new byte[256];
                for(int i=0; i<data.length; ++i)
                    ++histo[0xff & data];
    for(int j=0; j<histo.length; ++j)
    if (histo[j]>0)
    System.out.println("[" + j + "]=" + histo[j]);
    } else
    System.out.println("wrong guess at buffer type");

  • How to extract every component in an array?

    Hello everyone!
    Do you know how to extract every component from an array field?
    For example:
    The following is the defination of a table:
    CREATE TABLE test (
    id NUMBER PRIMARY KEY,
    name VARCHAR2(32),
    shape MDSYS.SDO_GEOMETRY
    And then I insert a new record:
    INSERT INTO test VALUES(
    1,'first',
    MDSYS.SDO_GEOMETRY(
    2003,
    NULL,
    NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),
    MDSYS.SDO_ORDINATE_ARRAY(1,1, 5,7)
    The Question is I want to read the every component (for example 1,1,5,7) in the sdo_ordinate_array one by one. Who knows how to write the SQL?
    I have tried "select a.shape.sdo_ordinates(1) from test a". But it can't work.
    Thank you very much!

    One solution is to read each ordinate from a cursor ina SQL block. Here is an example:
    set serveroutput on
    SET serveroutput on SIZE 1000000
    set concat on
    DEFINE layername = 'LAYER';
    DEFINE geomcolname = 'GEOM';
    DECLARE
    id varchar2(10);
    longitude number;
    latitude number;
    logmile number;
    i number;
    theLayer varchar2(32);
    theGeomCol varchar2(32);
    BEGIN
    FOR rec IN (SELECT ROWID, id, &geomcolname FROM &layername ) LOOP
    id := rec.id;
    i := 1;
    while i < rec.geom.sdo_ordinates.count loop
    longitude:=rec.geom.sdo_ordinates(i);
    latitude:=rec.geom.sdo_ordinates(i+1);
    logmile:=rec.geom.sdo_ordinates(i+2);
    dbms_output.put_line(id || ',' || longitude || ',' || latitude || ',' || logmile);
    i := i + 3;
    end loop;
    END LOOP;
    commit;
    END;
    Maybe that will help.
    Dave
    David R. Miller
    Michael Baker Jr., Inc.
    3601 Eisenhower Avenue
    Alexandria, VA 22314
    [email protected]
    www.mbakercorp.com

  • Set icon of component in an array

    Hello,
    i seem to have a slight problem. I hope there is someone who can help me.
    I wrote an applet with all kinds of components in it. If you click a button, the icon of the button changed. All of this worked fine until i wanted all of my components stored in an array and create my components dynamically. So, not the usual way by creating a button with:
    JButton nameofbutton = new JButton(imageicon),
    but in a function with:
    addbutton(new JButton(),"LichtVoorButton", lichtvoor,320,78,149,19, contentPane)
    This way i can't reach the button the ordinary way in the actionlistener (nameofbutton.setIcon(icon)).....
    Is there an other way?
    I've included the important parts of my source code.
    I hope there is someone who can help me.
    Thanks in advance.
    public class test extends JApplet{
    public test(){ 
         comps = new Component[0];
         contentPane = getContentPane();
         contentPane.setLayout(new BorderLayout());
         addbuttons();
    public void addComponent(Component component){
    //function to add a component to the array (works fine)
    public void addbuttons(){
    addbutton(new JButton(),"LichtVoorButton", lichtvoor,320,78,149,19, contentPane);
    public void addbutton(JButton button, String buttonnaam, ImageIcon licht, int x, int y, int width, int height, Container pane){
         button.setName(buttonnaam);
         button.setBorder(BorderFactory.createRaisedBevelBorder());
         button.setIcon(licht);
         button.setBounds(x, y, width, height);
         button.addActionListener(new ButtonEvent());
         addComponent(button);
    class ButtonEvent implements ActionListener {
    public void actionPerformed(ActionEvent e){
         Object source = e.getSource();
         for( int i=0; i<comps.length; i++ ) {
              if(comps[ i].equals(source)){
              if(comps[ i].getName().equals("LichtVoorButton")){
    /******* the line that doesn't work ********/
    comps[ i].setIcon(icon.gif);//doesn't work!
    comps[ i].revalidate();
    }

    Thanks, but i can't set the icon of the button directly like
    (JButton)e.getSource().setIcon(lichtvoor); or
    (JButton)comps.setIcon(lichtvoor).. I get the error 'not a statement'.
    is this the only way?:
    JButton tempbutton = (JButton)e.getSource();
    tempbutton.setIcon(lichtvoor);
    comps[i]=tempbutton

  • Nest array in a custom component

    Hello and thanks in advance,
    I am building a custom datagrid component name custDG. It is a canvas containing the DG and some other visuals. So the actual component is based on canvas and has a DataGrid nested.
    I have also build a custom class name config based on Array to hold the DG column information
    AND a custom object class name col to hold each column information inside the config array class...
    My question is how to make it possible for user to nest the array and columns inside the custom component when adds it to an application. For example:
    <mike:custDG... >
         <mike:config>
              <mike:col.../>
              <mike:col.../>
              <mike:col.../>
         </mike:config>
    </mike:custDG... >
    Want to make something similar to the columns-datagridcolumn thingie but with custom classes in a custom component.
    Anyone plz?
    Thanks

    I finally found how to set a default skin to a custom component so that users of my component will not have to set again the skinClass value of my component.
    You have to create a defaults.css file at the root of your library and tell the compiler to take it into account.
    The remaining problem is about the compiler. There are some steps before success and they are a bit mysterious/unclear....
    I found 2 or 3 blog articles explaining those steps but the compiler arguments to use are all differents in each article...
    Here are the links I found:
    http://www.unitedmindset.com/jonbcampos/2010/05/12/creating-custom-spark-components/
    http://www.betadesigns.co.uk/Blog/2010/05/14/default-skin-for-custom-flashbuilder-componen ts/
    http://flexdevtips.blogspot.com/2009/06/default-stylesheet-in-swc-flex-library.html
    Following the first article guidelines has been successful for me but I'm not marking this topic as Resolved because I'd like some answers about this whole thing...

  • Xcelsius component output problem (array)

    ok so basically i'm developing a non visual component ..... I have written the code and property sheet .... The problem is when i work it in excel , the destination cells don't show ..... However i checked my code with an alert command and i could see my output array that is bound to the destination property ..... i'm not using arraycollection....i could provide the code if necessary ..... also if my source cells are changed dynamically my destination cells don't change .... i tried commitprops .... pls help

    i mean work it in xcelsius*

  • Bugging Array by using COMBO BOX component !!!

    Hi,
    Today, I create a flash with Array. I did use prototype
    method to add one more fantastic function to sort the array
    randomly. But when I include one combo box component with static
    value in to the parent file, I have a big trouble. The flash file
    stop running & give the alert of endless looping. Ah ha, what a
    funny thing is happened out there?
    If you want to produce this bug, please follow me.
    Step1: Create 1 flash movie & name it "test.fla". Copy
    the code below into the first frame.
    Array.prototype.randomSort = function():Array {
    var arr1:Array = this;
    var arr2:Array = new Array();
    var rand:Number;
    while (arr1.length>0) {
    trace(arr1.length);
    rand = Math.floor(Math.random()*arr1.length);
    if (rand == 1 && arr1.length == 1) {
    rand = 0;
    arr2.push(arr1[rand]);
    arr1.splice(rand, 1);
    return arr2;
    Step2: Export the movie by Ctrl+Enter -> we will have
    test.swf huh?
    Step3: Create another flash & name it "main.fla".
    Step4: In main.fla, create an empty movieclip symbol &
    name it loader_mc. Drag it to the stage & five the instance
    name "XXXloader_mc" for example.
    Step5: In main.fla, Drag one combo box component to the stage
    & add some data to the combo
    Step6: In the first frame of main.fla, load the test movie
    into XXXloader_mc. Try this
    XXXloader_mc.loadMovie("test.swf");
    Step7: Export main.fla. Ctrl+Enter again.
    Congratulation, you are in the problem.

    both together caused the problem and i don't see a problem
    with your randomSort() method although destroying the original
    array seems like a bad idea and is one of the 2 reasons for your
    problem:
    one, the combobox is executing your method (and every other
    array prototype method that exists) every time it's clicked. that
    looks like a bug in the combobox component.
    and two, your prototype is causing a problem because it
    destroys the arrays that call your method.

  • 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

Maybe you are looking for

  • How to get the number of copy in reports

    Hi all, I am having a report of 1 page. I want 2 copies of it to printed so, I set the number of copies =2, I want some fields only to be printed on the 2nd copy. How to do it ? Thanks in advance

  • E61i Installing Applications on Start-up

    Everytime I switch off and then switch on my Nokia E61i, it will try and install applications on start-up and then display an error message saying that it can't install applications from the memory card and that I should use the application manager i

  • Installing Oracle Workflow for using OWB 11g

    Hi, I am using OWB 11g, how to install oracle work flow in that? WIll it be inbuilt with OWB 11g? Edited by: user9145626 on 23 Mar, 2010 2:42 PM

  • Custom scaling of data without MAX?

    Okay here's my problem. Hopefully you can help me or offer some helpful advice. I am creating a user interface for data acquisition (only analog inputs are used). Thermocouples (Type J and Type K) will be used, as well as factory calibrated strain ga

  • Using iMovie with external USB 2.0 drive

    I use iMovie on a 2-year old MacBook Pro. The MacBok Pro has Firewire 800 and but only USB 2.0. I've been using an external Firewire drive with it for storing my movies. Now it is full and I need to get another external drive. However all the new dri