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

Similar Messages

  • 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...

  • Passing function to a custom component

    Hey so I have button that is in a custom component, say:
    <mx:HBox width="200" height="72" xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Button width="72" height="72"  styleName="{buttonStyleName}"/>              
        <mx:Text text="{description}" width="100%" height="100%" textAlign="justify"/>
    </mx:HBox>
    And on another file i use it simply like this:
    <local:LabelComponent buttonStyleName="componentRssButton"  />                          
    However, I want the button on my custom component draggable, so I would like to pass a mouseMove handler but i could not find  a way to do that. Of course that easiest way is to have my whole custom component draggable like so:
    <local:LabelComponent mouseMove="componentRssButton"  />                
    but i want the button in the custom component the only one draggable.
    Thanks.

    it's wired to pass a function.
    EventListener should be the way to go.
    give your button an id, say btn1
    <mx:Button id='btn1' width="72" height="72"  styleName="{buttonStyleName}"/>
    and in your code
    <local:LabelComponent id='myComp' creationComplete='makeButtonDraggable()' buttonStyleName="componentRssButton"  />  
    <script>
    function makeButtonDraggable():vd
         myComp.btn1.addEventListener(mouseMove, componentRssButton);

  • Passing a reference / variable to a Custom Component

    Hi, I was wondering if someone could help me.
    It seems like a very simple problem but I cant for the life
    of me seem to work out a solution.
    I have created a Custom Component that extends from the
    UIComponent that consists of a “rev counter” style
    clock face etc….
    I want to use this component multiple times within my
    application – however feed it different data so for example
    each “rev counter” on the page will be displaying
    different data etc…..
    I want to be able to reuse my component and not have to
    create a new component every time I add a “rev counter”
    to my application, therefore I need some way of passing a reference
    / variable to the component (maybe from the <mx /> tag where
    I declare it in the MXML code ??? )
    <mx:Application ….
    xmlns:comps="components.*" …..>
    <comps:RevCounterComp id=”” (add something
    here to reference???) />
    </ mx:Application>
    Doing this will allow me to reuse my ONE custom component
    MANY times feeding it different data (different data provaiders for
    each instance of the single component)
    Hope this makes sense???
    Any help / advice is much appreciated,
    Thanks,
    Jon.

    Jon,
    jmryan's suggestion is the preferred way to go. This way you
    can use the simple MXML syntax that you described in your post.
    If your custom component is defined in ActionScript, you can
    use setters or the creationComplete event to update the component
    when the values are passed in from the tag (they are set *after*
    your constructor runs).
    Even easier, if your component is defined in MXML, you can
    add [Bindable] to your public field and then bind directly to it in
    the custom component's MXML code.
    - Peter

  • Passing arguments to a custom component in the constructor

    I would like to know if it is possible to pass arguments to a
    custom component in the constructor when I'm instantiating it
    within Actionscript. I've not seen anyone do this, so at the moment
    I have a couple of public properties defined on the custom
    component and then do the following:
    var myComponent:TestComponent = new TestComponent();
    myComponent.propertyOne = true;
    myComponent.propertyTwo = 12;
    etc.
    Whereas I'd like to do something like:
    var myComponent:TestComponent = new TestComponent( true, 12
    Any ideas if this is possible?

    Another approach as opposed to creating init function is to link symbol with autogenerated class (just assign it a class but do not create *.as file for it) and use it just as graphical view with no functionality (well only MovieClip's functionality).
    ViewClip.as
    public class ViewClip extends MovieClip {
        public var view:MovieClip;
        public function ViewClip(){
            this.view = instantiateView();
            this.addChild(view);
        protected function instantiateView():MovieClip {
            return new MovieClip();
    Circle.as
    public class Circle extends ViewClip {
        public function Circle(scaleX:Number, scaleY:Number) {
            super();
        override protected function instantiateView():MovieClip {
            return new ClassView();

  • 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

  • Pass a parameter to custom component -  get null

    Main MXML (part of code):
    <s:Application
    xmlns:ns1="*"
    creationComplete="init();>
    import MyComponent;
    private function init():void {
    var myArray:Array=["FFF","TTT","RRR"];
    myComp.width=200;
    myComp.height=200;
    myComp.getArray = myArray;
    myContainer.rawChildren.addChild(myComp);
    <fx:Declarations>
    <ns1:MyComponent id="myComp" x="0" y="0" />
    </fx:Declarations>
    custom component:
    package
              public var getArray:Array;
    public class MyComponent extends Sprite { trace (getArray);//trace null

    What is myContainer?
    I have a working version with my container as UICOmponent inside main.
    public class MyComp extends Sprite
            private var _getArray:Array;
            public function MyComp()
            public function get getArray():Array
                return _getArray;
            public function set getArray(value:Array):void
                trace("setter ", value);
                _getArray = value;
    <?xml version="1.0" encoding="utf-8"?>
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   xmlns:ns1="*"
                   minWidth="955" minHeight="600"
                   creationComplete="init();">
        <fx:Script>
            <![CDATA[
                private function init():void {
                    var myArray:Array=["FFF","TTT","RRR"];
                    myComp.width=200;
                    myComp.height=200;
                    myComp.getArray = myArray;
                    myContainer.addChild(myComp);
            ]]>
        </fx:Script>
        <fx:Declarations>
            <ns1:MyComp id="myComp"/>
        </fx:Declarations>
        <mx:UIComponent id="myContainer"/>
    </s:Application>
    Not sure this is what you after though but it traces:
    setter  FFF,TTT,RRR
    Why do you add to rawChildren?
    C

  • Advice on creating a tricky custom component

    Hi,
    I'm working on creating a custom component which displays a image at the top of the canvas, and loops through a passed array collection, displaying each row of the array collection in a item renderer. So the component should look like this (see attached image).
    As you can see from this image the header is a image itself, this will differ every instance of the panel, there should be 3 of these panels on the page. Then each row of data is a item renderer displaying the data provided from a array collection of value object. If there are 4 items in this array collection then the panel should show 4 rows, if there are 2 row in the array then the panel will display 2 rows. Also the height of the panel will dynamically change depending on the number of rows to show.
    I was thinking of extending a Canvas component, and then passing in the image URL and trying to load and draw the image dynamically, then I was thinking of using the Drawing API to create the rectangle shape using the drawRoundRectComplex() of the graphics class.
    The problems I see with this is that I don't think the drawn rectangle shape can re-draw itself to show the change in height when more or less row of data need to be be displayed.
    Another option I have been thinking about is extending the Panel class to create my component, this may be better for handling the height resizing, but I'm not sure it can support the look of this component (the header image and the three rounded corners).
    Could anyone give me some advice on what would be the better option for creating this component.
    Thanks
    Stephen

  • Dynamic datatable in custom component

    hi all,
    i'm working on a custom jsf component and this component will create a datatable dynamically. (you can see component details from http://www.jroller.com/page/hasant?entry=creating_dynamic_datatable_inside_of AND http://www.jroller.com/page/hasant?entry=jsf_question_for_community_what)
    the question is; when i want to add a selection column(dynamically), how can i handle its selected values?
    i mean, if i have created this datatable in a page with designer, i would bind an Integer[] to that selection column's checkboxes. But i have to add this selection column dynamically from my component. So, how can i GET and SET the selection columns values. Since this is a custom component, there is no backing bean for value binding to this component.
    when i resolve the request param string to get the selected rows, it's working(=i can see the selected rows somehow..) but, i can not set that values again while encoding that column after a submit.
    here is my row selection column encoding code;
         private void addSelectionColumnToTable(FacesContext context, UIData table) {
              UIColumn column = new UIColumn();
              HtmlInputRowSelect rowSelect = new HtmlInputRowSelect();
              rowSelect.setId("rowSelect1");
              rowSelect.setStyleClass("inputRowSelect");
              rowSelect.setValue(m_selectedRows);
              column.getChildren().add(rowSelect);
              table.getChildren().add(column);
         }In the code above, rowSelect.setValue(m_selectedRows); part not effecting anyhing. m_selectedRows variable includes row numbers(in an Integer array) that i want to see as selected.
    any solution/recommendation?

    Well if you are still interested in using a text component
    instead of a Button the way you would go about this is using
    textWidth. Here's how I've done it before using a text / label
    whatever you want that shows text.
    // => Set our text we got from database
    myText.text = "This is the text I got from the DB";
    // => Validate it so that way we make sure we get right
    numbers
    myText.validateNow();
    // => Find out how wide our text really is.
    var textWidth:Number = myText.textWidth
    // => Reset the width of our text component and add 20 for
    a little buffer
    myText.width = textWidth + 20;
    Now my suggestion is if your going to be dynamically creating
    these on the fly from a database call you throw it into a method /
    class and have that do all the work for you so all you have to do
    is pass the text to it and it resizes itself based on the example
    above.

  • Custom component problem

    I wrote a custom component:
    Here is the code for the UIComponent:
    package customcomponents;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import java.util.Vector;
    import jsf.*;
    public class UIEventsTable extends UIComponentBase {
         public String getFamily() {
              return "EventsTable";
         public void encodeEnd( FacesContext context ) throws java.io.IOException {
              Vector<Event> events = (Vector<Event>) this.getAttributes().get("events");
              ResponseWriter writer = context.getResponseWriter();
              writer.startElement("table" , this );
              for( int i = 0 ; i < events.size() ; ++i ) {
                   writer.startElement("tr",this);
                        writer.startElement("td",this);
                             writer.write( events.elementAt(i).getEvent_description() );
                        writer.endElement("td");
                   writer.endElement("tr");
              writer.endElement("table");
    }This is the tag class
    package customcomponents;
    import javax.faces.webapp.*;
    import javax.faces.component.*;
    import java.util.*;
    import jsf.*;
    public class EventsTableTag extends UIComponentTag {
         Vector<Event> events = null;
         public String getRendererType() {
              return null;
         public String getComponentType() {
              return "EventsTable";
         public void release() {
              super.release();
              events = null;
         protected void setProperties( UIComponent component ){
              super.setProperties( component );
              if( events != null )
                   component.getAttributes().put( "events" , events );
         public Vector<Event> getEvents() {
              return events;
         public void setEvents(Vector<Event> events) {
              this.events = events;
    }Taglib descriptor:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
         <tlib-version>1.0</tlib-version>
        <jsp-version>1.2</jsp-version>
        <short-name>d</short-name>
         <uri>http://eventsTable.com/</uri>
        <tag>
             <name>EventsTable</name>
               <tag-class>customcomponents.EventsTableTag</tag-class>
               <body-content>JSP</body-content>
             <attribute>
                  <name>events</name>
             </attribute>
             <attribute>
                  <name>id</name>
             </attribute>
             <attribute>
                   <name>rendered</name>
              </attribute>
              <attribute>
                   <name>binding</name>
              </attribute>
        </tag>
    </taglib>And finally how I invoke the tag
    <d:EventsTable events="#{location.events}" />
    ...Now location.events is a java.util.Vector with the events. But when I use this tag I get following error message:
    Servlet.service() for servlet Faces Servlet threw exception
    org.apache.jasper.JasperException: Unable to convert string "#{location.events}" to class "java.util.Vector" for attribute "events": Property Editor not registered with the PropertyEditorManagerI do not understand why this doesn't work. Because in a "h:dataTable" I can tell the component to use an array as an input. Even more I don't know what a PropertyEditorManager is.
    So how can I pass the vector object to this custom component?

    I have tried with tomcat-6.0.14 and RI 1.2_06-b02-FCS
    <?xml version="1.0" encoding="UTF-8"?>
    <taglib xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
       http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
       version="2.1">
       <tlib-version>1.1</tlib-version>
        <short-name>d</short-name>
         <uri>http://eventsTable.com/</uri>
        <tag>
             <name>EventsTable</name>
               <tag-class>customcomponents.EventsTableTag</tag-class>
           <attribute>
               <name>events</name>
             <deferred-value>
                <type>java.util.Vector</type>
             </deferred-value>        
          </attribute>
        </tag>
    </taglib>
    package customcomponents;
    import javax.el.ValueExpression;
    import javax.faces.webapp.*;
    import javax.faces.component.*;
    public class EventsTableTag extends UIComponentELTag {
         private ValueExpression events = null;
         public String getRendererType() {
              return null;
         public String getComponentType() {
              return "EventsTable";
         public void release() {
              super.release();
              events = null;
         protected void setProperties( UIComponent component ){
              super.setProperties( component );
              component.setValueExpression("events", events);
         public void setEvents(ValueExpression events){
              this.events = events;
    }

  • Adding Visual custom component in spark DataGrid

    I am working with flex 4.5. I want to create Gauge component Datagrid.
    I am using open source com.betterthantomorrow.components. I have created custom components like this
        <?xml version="1.0" encoding="utf-8"?>
        <s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                   xmlns:s="library://ns.adobe.com/flex/spark"
                                                   xmlns:mx="library://ns.adobe.com/flex/mx"
                                                   xmlns:bttc="com.betterthantomorrow.components.*"
                                                   xmlns:gauge="com.betterthantomorrow.components.gauge.*"
                                                   xmlns:objects="tekhnia.com.tekhniag.objects.*"
                                                   width="30%" height="65" backgroundColor="black" borderColor="black"
                                                   creationComplete="init(event)">
                  <fx:Declarations>
                            <mx:NumberFormatter precision="1" id="formatter" rounding="nearest" />
                  </fx:Declarations>
                  <fx:Script>
                            <![CDATA[
                                      import mx.events.FlexEvent;
                                      import mx.messaging.channels.StreamingAMFChannel;
                                      [Bindable]
                                      public var cpuValue:Number;
                                      [Bindable]
                                      public var memoryValue:Number;
                                      [Bindable]
                                      public var diskValue:Number;
                                      [Bindable]
                                      public var mycomp:String;
                                      [Bindable]
                                      public var serverName:String;
                                      [Bindable]
                                      public var statusImage:String;
                                      protected function init(event:FlexEvent):void
                                                var strValues:String;
                                                var strColors:String;
                                                var strAlphas:String;
                                                strColors="0x009900,0xFFFF00,0xDD0000";
                                                strValues="0,50,70,100";
                                                strAlphas=".8,.8,.8"
                                                var values:Array=strValues.split(",");
                                                var colors:Array=strColors.split(",");
                                                var alphas:Array=strAlphas.split(",");
                                                gauge1.setStyle("alertValues",values);
                                                gauge1.setStyle("alertColors",colors);
                                                gauge1.setStyle("alertAlphas",alphas);
                                                gauge2.setStyle("alertValues",values);
                                                gauge2.setStyle("alertColors",colors);
                                                gauge2.setStyle("alertAlphas",alphas);
                                                gauge.setStyle("alertValues",values);
                                                gauge.setStyle("alertColors",colors);
                                                gauge.setStyle("alertAlphas",alphas);
                                                gauge.invalidateDisplayList();
                                                gauge1.invalidateDisplayList();
                                                gauge2.invalidateDisplayList();
                            ]]>
                  </fx:Script>
                  <s:layout>
                            <s:HorizontalLayout/>
                  </s:layout>
                  <s:TileGroup width="101" paddingLeft="20" paddingRight="2">
                            <bttc:Gauge id="gauge"
                                                          diameter="50" width="50"
                                                          verticalCenter="0" horizontalCenter="-111"
                                                          minValue="1"  maxValue="10" value="{cpuValue}"  valueFormatter="{formatter}"
                                                          bigTicks="9" smallTicks="45" showMinMax="false" showValue="false" pointerColor="white"/>
                  </s:TileGroup>
                  <s:TileGroup width="101" paddingLeft="20" paddingRight="2">
                            <bttc:Gauge id="gauge1"
                                                          diameter="50" width="50"
                                                          verticalCenter="0" horizontalCenter="-111"
                                                          minValue="1"  maxValue="10" value="{memoryValue}"  valueFormatter="{formatter}"
                                                          bigTicks="9" smallTicks="45" showMinMax="false" showValue="false" pointerColor="white" automationName="T"/>
                  </s:TileGroup>
                  <s:TileGroup width="101" paddingLeft="20" paddingRight="2">
                            <bttc:Gauge id="gauge2"
                                                          diameter="50" width="50"
                                                          verticalCenter="0" horizontalCenter="-111"
                                                          minValue="1"  maxValue="10" value="{diskValue}"  valueFormatter="{formatter}"
                                                          bigTicks="9" smallTicks="45" showMinMax="false" showValue="false" pointerColor="white"/>
                  </s:TileGroup>
                  <s:TileGroup width="40" paddingTop="3">
                            <s:Image source="assets/led/big/{statusImage}" />
                            <s:Label  color="white" text="{serverName}" textAlign="center"/>
                  </s:TileGroup>
        </s:BorderContainer>
    I want to add this component in Datagrid. I have tried a lot on net. I didn't find any help. I read books as well.
    Please help me. I found somewhere on the site one liner answer : write grid renderer. I don't how to write grid renderer and pass the data values to it.
    I will be more thank full someone gives me pointer to sample grid renderer or code.

    What's the flow here?
    Do you want to pop-up a JSP in a window to prompt the user for extra information before submitting the check-in form? If so, you need a custom component to override the resource that draws the "submit" button on the form.
    Or, do you want to execute something like a web service during the check-in process? If so, do a validateStandard filter. See the 'DynamicPrefix' comonent in the howtocomponents:
    http://www.oracle.com/technetwork/middleware/content-management/index-092832.html

  • Validation Error - JSF Custom Component

    I am trying to create a Custom Component. It is a pre-populated list of selection items. So all that the page author would have to do is use a tag like
    <jsfcust:mySelectOneComponent  value="#{requestScope.selectedItem}/>and this should display a drop-down list from which only one item can be selected. I got this working except for the final stretch.
    I created the following...
    1. tag in the .tld file
    2. CustSelectOneTag.java (set the value as a ValueBinding in setProperties() method)
    3. CustSelectComponent.java
    4. CustSelectRenderer.java (In the decode() method, called setSubmittedValue(value) on the component)
    5. updated the faces-config.xml file
    The display seems to be working fine. The problem is when I click on a Submit button and go to the next page where I want to display the selected value. It shows up as null. All that I want to do is be able to select an item from the custom drop down and display it in the next page after hitting submit.
    What is the proper way to send the value back in the response? In my case, I was merely trying to pass the value so that the next page can access it from the request scope and display it.
    I was not sure if I had to implement the getConvertedValue() method in my renderer. Can someone help?
    Thanks,
    JM

    Thanks for your reply! Your answer fixed my problems, so definitely thanks! I need to use escaped values for things like "<,&,#, etc", like the pound "amp" semicolon stuff. If I try to type out strings like these the forum unescapes them - fun part of posting forum questions about HTML escaping on HTML-based forums! :) I didn't realize an escaped querystring would still work as expected in a <a href ... />. You actually fixed both of my problems, and I... I do feel appropriately foolish now :) Had a feeling this might be a slaps forehead one. Thanks for the quick answer!,
    Jim

  • Best strategy for variable aggregate custom component in dataTable

    Hey group, I've got a question.
    I'd like to write a custom component to display a series of editable Things in a datatable, but the structure of each Thing will vary depending on what type of Thing it is. So, some Things will display radio button groups (with each radio button selecting a small set of additional input elements, so we have a vertical array radio buttons and beside each radio button, a small number of additional input elements), some will display text-entry fields, and so on.
    I'm wondering what the best strategy for tackling this sort of thing is. I'm sort of thinking I'll need to do something like dynamically add to the component tree in my custom component's encodeBegin(), and purge the extra (sub-) components in encodeEnd().
    Decoding will be a bit of a challenge, maybe.
    Or do I simply instantiate (via constructor calls, not createComponent()) the components I want and explicitly call their encode*() and decode() methods, without adding them to the view tree?
    To add to the fun of all this, I'm only just learning Faces (having gone through the Dudney book, Mastering JSF, and writing some simpler custom components) and I don't have experience with anything other than plain vanilla JSP. (No EJB, no Struts, no Tapestry, no spiffy VisualDevStudioWysiwyg++ [bah humbug, I'm an emacs user]). I'm using JSP 2.0, JSF 1.1_01, JBoss 4.0.1 and JDK 1.4.2. No, I won't upgrade to 1.5 (yet).
    Any hints, pointers to good sample code? I've looked at some of the sample code that came with the RI and I've tried to navigate the JSF Blueprints stuff, but I haven't really found anything on aggregating components into a custom component. Did I miss something obvious?
    If this isn't a good question, please let me know how I can sharpen it up a bit.
    Thanks.
    John.

    Hi,
    We're doing something very similar. I had a look at the Tomahawk Date component, and it seems to dynamically created InputText components in the encodeEnd(). However, it doesn't decode this directly (it only expects a single textual value). I expect you may have to check the request yourself in decode().
    Other ideas would be appreciated, though - I'm still new to JSF.

  • Custom component and non-primitive types of attributes

    Dear programmers
    I try to develope a custom UI component that one of its attribute is an ArrayList. For example:
    <productFile:Matrix images="#{MyBean.imagesArray}"/>Unfortuanetly I get the following exception:
    [Unable to convert string &#39;#{MyBean.imagesArray}&#39; to class java.util.ArrayList for attribute images: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager]: org.apache.jasper.JasperException: Unable to convert string '#{MyBean.imagesArray}' to class java.util.ArrayList for attribute images: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
    The attribute images is an ArrayList in the custom component.
    I have also specifieded it as an ArrayList in the tld file:
    <tag>
           <name>Matrix</name>
           <tag-class>org.sii.productfilejsf.tags.MatrixTag</tag-class>
           <body-content>JSP</body-content>
           <attribute>
                <name>images</name>
                <required>false</required>
                <rtexprvalue>false</rtexprvalue>
                <type>java.util.ArrayList</type>
           </attribute>
      </tag>Does anyone has an idea what can be the problem?
    How can I convert the expression?

    so how will I be able to convert it?Only your converter knows it.
    By the way, is your Matrix component fully completed including its children components?
    If yes, you should know how to implement a converter, or its equivalent code for them.
    For example, in the <h:dataTable> component, if its value attribute points an array of object,
    then it is automatically converted to an appropriate DataModel used by its column children.
    We may need to see your MyBean bean and related code set, if we have enough time.

  • How a custom component is called when we install a custom component in UCM.

    How a custom component is called when we install a custom component in UCM.
    On what event the component services will be activated and called.
    Suppose i create a Custom service name MULTIPLECHECKIN then this service will be called on what event and where it will be defined to call.

    Saurabh,
    the code is packed in the component (see component\Security Filter\java\Security Filter\ModifyAttributesFilter.java - the first Security Filter is the component name, the other Security Filter is the Java package name).
    What is important:
    - your class must implement the FilterImplementor interface (you will need UCM standard classes - server.zip in your classpath) and its doFilter method
    How the filter is executed?
    - actually, in this case you don't need any new service - you can use the standard 'hook', which is provided by standard checkin services
    - in Component Wizard create a new component, add your compiled class to it (make sure you follow the rules not to end up in classpath issues)
    - in Component Wizard click the 'Java Code' tab. Here you can add a Custom filter called validateCheckinData, which is executed by standard checkin services. If you parametrize the filter to call your class created above, you are done.
    'Working with Content Components' manual (e.g. here: http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/developer/using_components_10en.pdf) can give you a basic picture. A better resource is Bex Huff's book - I would recommend you to get it, because it has a step-by-step HelloWorld example which can guide you through Component Wizard. I could also send you my own component (send me an email at [email protected]) which implements a filter for user quotas, so you just need to "replace classes".
    As for the other half of your task, searching for the file in the database server will work only if you use database as your storage (ie. install and configure File Store Provider component accordingly). Of course, you could do a search for file in this case - just consider that you will be comparing two BLOBs rather than two relatively short check-sums (most likely strings or arrays of bytes). Besides, it will not work if you use filesystem as your storage.
    Jiri

Maybe you are looking for

  • Creation of Multi language Hot links in OracleAS Portal 10g

    Hi, Will Oracle App Server + OracleASPortal 10.1.4 will support multil language Hotlinks creations?. multi-lang capability(something like www.domain.com/test?lang=CN) Usually under htdocs folder we can create one folder ie as test and include .htm fi

  • Delimiter for the Spreadsheet string to array

    Hello,    I would like to use the Spreadsheet string to array function to process the data obtained from reading a text file that has 2 columns separated by at least one space character. Can the spreadsheet string to array have delimiters other than

  • Sync problems w Mac & Curve (deletion of contacts)

    Continued from BlackBerryHelp on Twitter: I have a Curve 8520 software v 5.0.0.900 & a Mac (with Leopard). I've had the phone a little over a year now and been successfully syncing to iCal and to Apple Address Book v4.1.2(702) (lately via BlackBerry

  • My Zen V Plus has totally crashe

    I need help majorly. This morning my Zen crashed, but I managed to reset it after an hour or so :| ... Then before, I took it from the computer (it needed recharging as the freezing caused it to lose alot of it's power) but when I tried to turn it on

  • Hiding second page in adobe forms

    hi all,         I have a adobe form with 2 pages. My first page needs to be displayed always whereas the second page needs to be displayed only for certain conditions. Please let me how this can be done asap.  Thanks in advance. Regards, Vinod.