Custom CellRenderer class

I have a qnx.ui.listClasses.List with a custom made cell that contains a check box as in the example "Creating a custom list" here:

http://docs.BlackBerry.com/en/developers/deliverables/23959/Creating_a_custom_list_1446778_11.jsp

After setting the skin with:

myList.setSkin(MyCustomCellRenderer);

Is there anyway to access the checkbox to select or deselect without actually clicking on the check itself? When a control is clicked, it sends an event through specific cell renderer.

The closest I found is List.firstVisibleItem and List.lastVisibleItem but these are not constant during execution.

What I want to do is to loop over a list that contains boxes check after loading the xml data and select or deselect the item in the list.

Any help would be greatly appreciated.

Too bad. I thought about it. You can override the data function defined as follows.

override public function set data(data:Object):void{    super.data = data;    check.selected = MyObject( data ).Selected;}

Tags: BlackBerry Developers

Similar Questions

  • Nasty problem with resizing a list and a class custom CellRenderer

    Create a list (_myList) in a class with a custom CellRenderer class. In the custom CellRenderer class, I draw a rectangle with a gradient in the data() function:

    override public function set data (value:Object) : void
    {
        super.data = value;
    
        var tab_color:Array = this.data.rowColor;
        ...
        _matrix.createGradientBox(this.width, this.height, 90/180*Math.PI);
    
        with (_sprTab.graphics)
        {
            clear();
            beginGradientFill(GradientType.LINEAR, [tab_color[0], tab_color[1], tab_color[2]], [alpha,alpha,alpha], [0,127,255], _matrix);
            drawRoundRectComplex(0, 0, this.width, this.height, 15, 0, 15, 0);
            endFill();
        }
        ...
    }
    

    When policy changes I want to resize the list. Therefore, in a function in the class in which the list is created, I resize the list:

    public function setListSize (w:Number, h:Number) : void
    {
        _myList.setSize(w, h);
    }
    

    And this function is called with the new dimensions on the change of orientation in the main class.

    However, this.width in the custom CellRenderer class does not get the new width of list a reason any.

    No idea why?

    You must refresh the visible items in the list. You can loop through the list and replaceItem (...) of the call and who should do it. You can check that it would work by scrolling through the list of invisible items and they should have picked up the new width.

  • Class custom CellRenderer?

    I tried to implement a cellrenderer class customized to my list in AS3 component in Flash CS3.

    Here's what I have in the FLA.

    import flash.display.MovieClip;
    Import fl.controls.List;

    Stop();

    var cr:customRenderer = new customRenderer();

    lstTest.setStyle ("cellRenderer", RC);

    lstTest.addItem({label:"Jeff"});)

    lstTest.addItem ({label: "Ben"})

    Where lstTest if the instance of the component list on the stage.

    Here's my customRenderer class.

    package

    {

    Import fl.controls.listClasses.CellRenderer;

    import flash.text.TextFormat;

    public class customRenderer extends CellRenderer

    {

    public void customRenderer()

    {

    var newFormat:TextFormat = new TextFormat ("Arial", 12, 0x00FF00);

    setStyle ("textFormat", newFormat);

    }

    }

    }

    When the custom converter is applied to the list item the single cell that is rendered with the new new font and color is the last one added to the component. The other is appear not at all. If I click on the cell showing that I get and error of the list item.

    Can you see what I'm doing wrong with this custom cellrenderer class?

    use:

    Stop();

    lstTest.setStyle ("cellRenderer", customRenderer);

    lstTest.addItem({label:"Jeff"});)

    lstTest.addItem ({label: "Ben"})

  • TileList only keeping not with class data order custom CellRenderer

    Hi all

    I was hoping that you guys could help me with this, I did a search and nobody seems to know the same problem.  So first the installer: I have a TileList component set in place with a line in.  The TileList component using a custom class that extends the CellRenderer class to view its data. The problem is that if I scroll so the first element is not visible, in addition, its value is replaced by another item in my dataProvider.

    Here is my code for the CellRenderer class (where I am assuming that the problem):

       public class MyRenderer extends CellRenderer
        {
            private var renderer:MyDataDisplay = new MyDataDisplay();
            public function MyRenderer()
            {
                super();
            }
    
            override protected function onAdded():void{
                super.onAdded();
                addChild(renderer);
            }
    
            override protected function onRemoved():void{
                super.onRemoved();
                removeChild(renderer);
            }
    
            override protected function drawLabel():void{
                super.drawLabel();
                if(data){
                    renderer.title.text= data.name as String;
                    renderer.date.text = data.date as String;
                }
            }
    

    Help?

    Hey cyangreen,

    lists and cell renderers are the heels of achilie of the QNX API when it comes for them to find haha. and once you think u he descended, something unexpected happens and you have to change once again lol.

    I met problems here and there, and usually when you define the data and what not, I substitute the public data() setter. like this I get accurate results. the list and CellRenderer do things funky sometiems and get weird to read outs. so try to do this and see if it changes anything. So instead of override the drawLabel() method, replace the set data() accessor:

    override public function set data(data:Object):void
    {
        super.data = data;
    
        if (data.name && data.data)
        {
            renderer.title.text= data.name as String;
            renderer.date.text = data.date as String;
        }
    }
    

    Let me know how that turns out. If it doesn't work, let's try something else. Good luck!

  • Extend the CellRenderer class

    I tried to extend the CellRenderer existing lightly change the behavior. However, I am having a very difficult time to do without actually looking at the CellRenderer class code. Its quite difficult to understand what methods override and what are the variables containing the required data. Is it possible to access the code? I do not use FlashBuilder.

    Thank you.

    Hey,.

    I wrote a sampling program that does what you need except im trying to figure out how to make the box event listeners. working on that now, but it's the code that should go you. I have class one main and one cell renderer. You got the general idea. I think the only thing that you missed the width and the implementation of the check box. When you use the this reference, you are referring to the cell itself and not the box. I think you might have mixed up who. This reference is to the current class as a whole and not only control access. Here is the code:

    ListTests.as

    package
    {
        import flash.display.Sprite;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.events.MouseEvent;
        import flash.text.TextFieldAutoSize;
    
        import qnx.ui.buttons.LabelButton;
        import qnx.ui.data.DataProvider;
        import qnx.ui.events.DataProviderEvent;
        import qnx.ui.listClasses.List;
        import qnx.ui.text.Label;
    
        [SWF(width="1024",height="600",backgroundColor="#CCCCCC",frameRate="30")]
        public class ListTests extends Sprite
        {
            private var myList:List;
            private var myDataProvider:DataProvider;
            private var myArray:Array;
    
            public function ListTests()
            {
                super();
    
                // support autoOrients
                stage.align = StageAlign.TOP_LEFT;
                stage.scaleMode = StageScaleMode.NO_SCALE;
    
                myList = new List();
                myArray = new Array();
    
                for (var i:int = 0; i < 10; i++)
                {
                    myArray.push({label: "Some extremely long text. - " + i});
                }
    
                myDataProvider = new DataProvider(myArray);
    
                myList.dataProvider = myDataProvider;
    
                myList.width = 500;
                myList.height = 600;
                myList.scrollable = true;
                myList.setSkin(MyCustomCellRenderer);
    
                addChild(myList);
    
                var newLabel:Label = new Label();
                newLabel.text = "Changes Here";
                newLabel.autoSize = TextFieldAutoSize.LEFT;
                newLabel.setPosition(600,0);
    
                addChild(newLabel);
    
            }
        }
    }
    

    MyCustomCellRenderer.as

    package
    {
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.text.TextFieldAutoSize;
    
        import qnx.ui.buttons.CheckBox;
        import qnx.ui.buttons.LabelPlacement;
        import qnx.ui.listClasses.AlternatingCellRenderer;
        import qnx.ui.listClasses.List;
        import qnx.ui.text.Label;
    
        public class MyCustomCellRenderer extends AlternatingCellRenderer
        {
            /*
            * Place the object out here so that other methods can
            * access it
            */
            private var newCheckBox:CheckBox;
    
            public function MyCustomCellRenderer()
            {
                super();
    
                /*
                 * Add the checkbox here so we dont keep re-adding a check box
                 * whenever the onAdded method is called. other wise there
                 * would be a lot of objects for checkbox
                */
                newCheckBox = new CheckBox();
            }
            override protected function onAdded():void
            {
                super.onAdded();
    
                /*
                 * Do not want to use the label object at all. we want
                 * to fully customize our cell renderer. for some reason
                 * the label object is not considered a child object
                 * when the drawLabel method is called so we must
                 * removed it in this method where it is considered a
                 * child object
                */
                removeChild(label);
            }
            override protected function drawLabel():void
            {
                if (this.data)
                {
                    /*
                     * Sometimes this function is called prematurely when there
                     * is no data object available and it is null so we only
                     * do our custom label when there is a data object available
                    */
                    newCheckBox.width = 500;
                    newCheckBox.label = this.data.label;
                    newCheckBox.labelPadding = 10;
                    newCheckBox.labelPlacement = LabelPlacement.RIGHT;
                    newCheckBox.setPosition(10,10);
    
                    addChild(newCheckBox);
                }
            }
            override protected function onRemoved():void
            {
                super.onRemoved();
    
                /*
                * Remember to remove the checkbox object
                */
                removeChild(newCheckBox);
    
            }
        }
    }
    

    I will inform you of the event listener. I hope this helps!


    Update #1: Fixed several errors in the MyCustomCellRenderer.as file. Thank you ryantan for bring it to my attention!

  • Question about the use of the custom component class define what declarative component

    12.1.3 jdev

    I'm trying to define a declarative component with my custom component class.

    This is the code for my component jsf declarative. I'm trying to use the label on selectManyListbox attribute to pass queryClass for my component class name. It does not work. I also try to use f: attribute to my component class. It does not work too. Question 1: how to move my declarative component attribute to my class of component?

    < af:panelLabelAndMessage label = "#{attrs.displayLabel}" id = "dc_plam1" > "

    < af:switcher id = "dc_s1" defaultFacet = "a lot" facetName = "#{attrs.single eq 'true'?' unique ': 'a lot'}" >

    < f: facet name = "a lot" >

    < af:selectManyListbox id = "namingp1" simple = "true" label = "#{attrs.queryClass}" "

    ' autoSubmit Binding = "#{dropListComp.selectManyListBox}" = "true" valueChangeListener = "#{dropListComp.selectManyValueChange}" >

    < f: attribute name = "queryClass" value = "#{attrs.queryClass}" / >

    < / af:selectManyListbox >

    < / f: facet >

    < f: facet "single" = name >

    < af:selectOneListbox id = "sl_2" simple = "true" label = "#{attrs.queryClass} '"

    autoSubmit Binding = "#{dropListComp.selectOneListBox}" = "true" valueChangeListener = "#{dropListComp.selectOneValueChange}" > "

    < / af:selectOneListbox >

    < / f: facet >

    < / af:switcher >

    < / af:panelLabelAndMessage >

    That's how I try to retrieve the label or f: attribute queryClass in my component class. I get null for both directions.

    {} public void setSelectManyListBox (RichSelectManyListbox selectManyListBox)
    this.selectManyListBox = selectManyListBox;
    If (this.selectManyListBox.getChildCount () == 0) {}
    queryClass = (String) this.selectManyListBox.getLabel ();
    System.out.println (".. queryClass of the label..." + queryClass);
    If (queryClass is nothing)
    {
    queryClass = (String) this.selectManyListBox.getAttributes () .get ("queryClass");
    System.out.println (".. queryClass of attr..." + queryClass);
    }
    If (queryClass is nothing)
    queryClass = "glog.server.query.powerdata.InvolvedPartyQualQuery";
    this.selectManyListBox.getChildren () .addAll (buildDropListSelectItems (queryClass));
    }
    }

    Thank you.

    Hello

    If your declarative component has a defined class of request attribute then #{attrs.name_of_attribute} called from Java should be able to solve

    Frank

  • Display different data in datagrid using a cellrenderer class cells?

    Gidday guys

    I fill a DataGrid using SQLite. Some SQL columns contain 1 or 0 as Boolean values, and I want to display this as a bullet point in my datagrid.

    Currently I have a conditional that checks a 1, and if there is, shows the point. I tell myself that there must be a better way, but I'm not sure how to do this with cellrenderers. I get how to add components using cellrenderers, but is there a way to replace the display of cells with another character (without actually modifying the dataprovider data)?

    Bravo to take a look.

    It would be best to draw a simple shape and not with a single character in a TextField. To do this, Yes, you will need to replace the CellRenderer. I often choose this one, but use generally focus on the GPU of the components such as the FeathersUI components.

    If you have too much data or are on a device and want to do this because you get mediocre performance, it's a good use of your time. Also if you just learn to do it just to do so, it is can also be a good use, if you finish your work on time. However if it is for the office and/or data are fairly minimal (a few dozen ranks up to a hundred or so, with a nominal amount of columns), it probably isn't worth your time.

    I'm sure you have this link but:

    http://help.Adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d1 18a9c65b32 - 7fd4.html

    All cellrenderers components tend to be the same (because more large components use smaller components and architecture aligns). The difference is ensuring that your rendering engine supports data, it is provided. If you only need a TextField or a bullet, it's fairly easy. Most of the components (such as lists) support icons and you will need to make sure that you provide the full implementation of all the scenarios of data in your cellrenderer class.

    Pay attention to the technical dequeue cells on certain components. If all cells have usually only text, the cells are not destroyed and re-created as the list scrolls. The data is returned to the cell and the cell has a chance to simply update itself rather than to recreate from scratch. This offers an increase in performance of not having big does not destroy and recreate unnecessarily. It can also really confuse people when the cells begin to appear blank when you scroll (because the methods of construction of cells are not executed).

  • Create the custom handler class touch

    Hi all! I have a problem that seems easy enough to fix, but I'm doing it with reusable code, which is to do something I do not understand yet. I googled this continually and read dozens of articles and I'm still just as lost than when I started. I hope that human life can help me to make sense.

    I have a clip on the stage. When you press this clip, I want to play a certain slice of another clip for as long it is being touched. (This is a map of the United States, that display the name of each State that he's in a hurry).

    I COULD write 50 different functions, each to call a different image of the film displayName, or I could write my own custom event which would be able to receive every key event a string variable and then say displayName that frame to play.

    So basically, I have, for example:

    alaskaMovieClip

    displayNameMovieClip

    When you press alaskaMovieClip, I want to address to the string of the 'Alaska' variable to a touch custom event class, which will then a bunch of stuff as well execute displayNameMovieClip.gotoAndStop ('Alaska').

    1 is it possible?

    2. how? I'm if confused about how custom touch events are created and executed, I've read dozens of articles, and they have just the code that I do not understand. This tutorial should I be looking for that could help me?

    Thank you!!!
    Amber

    One way is to store a public var (say var state = "AZ"; for example) in your puzzleAZ. So you'd just:

    puzzleAZ.addEventListener(TouchEvent.TOUCH_BEGIN, unitTapHandler);
    
    function unitTapHandler (e:TouchEvent): void {
        e.target.gotoAndStop("Over");
        nameDisplay.gotoAndStop(e.target.state); // e.target.state is "AZ"
    }
    

    The other way is to let your MovieClip to send a custom event (which holds the 'State' var) Touch to start the event. Then the mother (or the main timeline or the document class) listen to the custom of your MovieClip event.

    // custom event
    package {
        import flash.events.Event;
    
        public class UnitTapEvent extends Event {
    
            public static const TAPPED:String = "tapped";
            public var state:String;
    
            public function UnitTapEvent(type:String, state:String):void {
                super(type);
                this.state = state;
            }
    
        }
    }
    
  • Custom button class WordWrap

    Someone knows how to make text wrap to a custom button class? I tried everything (as you can see below)! I even tried the Flexlib CanvasButton class, but not really sure how to apply only to one class custom. BTW, these buttons are inside a TileList component if that makes a difference... I love Flex but sometimes its really simple things that you SHOULD be able to easily do that just drive me NUTS!

    Thanks in advance!

    -Mike

    package action.button
    {
    import flash.display. *;
    import flash.events. *;

    Import mx.controls.Button;
    Import mx.controls.listClasses.BaseListData;
    Import mx.controls.listClasses.ListData;
    Import action.button.NoTruncationUITextField;
    Import mx.core.UITextField;
    Import flexlib.controls.CanvasButton;

    SerializableAttribute public class ButtonCatSearch extends button
    {
    private var _baseListData:BaseListData;
    private var _listData:ListData;
    private var _label:String ="";

    public void ButtonCatSearch()
    {
    Super();
    the cursor always behave as if it were a button
    mouseChildren = false;
    buttonMode = true;
    useHandCursor = true;
    height = 150;
    width = 20;
    setStyle ("paddingLeft", 50);
    setStyle ("paddingRight", 50);
    setStyle ("paddingTop", 50);
    setStyle ("paddingBottom", 50);

    setStyle("horizontalGap",100);
    setStyle ("wordWrap", true);

    wordWrap = true;

    addEventListener (MouseEvent.MOUSE_DOWN, onButtonClick);

    }
    public void onButtonClick(e:Event):void
    {
    _label = e.target.label;

    }
    //----------------
    to return to the line
    for button
    override protected function createChildren() (): void
    {
    Create a UITextField to display the label.
    If (! textField)
    {
    textField = new UITextField();
    textField.styleName = this;
    addChild (DisplayObject (textField));
    }
    super.createChildren ();
    textField.multiline = true;
    textField.wordWrap = true;

    super.createChildren ();
    }
    //-----------------
    override public function get listData (): BaseListData
    {
    Return _baseListData;

    }

    /**
    * @private
    */
    override public function set listData(value:BaseListData):void
    {
    super.listData = value;
    _baseListData = value;
    _listData = _baseListData as ListData;
    }
    //-----------------
    override public function set data(value:Object):void
    {
    / * If {(_listData)
    If {(_listData.icon)
    this.setStyle ("icon", _listData.icon);
    }
    }
    */

    Super.Data = value;
    setStyle ("wordWrap", true);
    }
    //-------------------------
    override the updateDisplayList(unscaledWidth:Number,_unscaledHeight:Number):void function
    {
    super.updateDisplayList (unscaledWidth, unscaledHeight);


    this.textField.multiline = true;
    this.textField.wordWrap = true;

    [email protected] < = 0)? NEGATIVE_COLOR: POSITIVE_COLOR);
    }
    }
    }

    You need to replace [] Measure to get the correct behavior. By default, the button sets the width of the TextField child. What you want is for the width of the TextField to be limited by the width of the button and the button height to vary the height measured from the TextField object.

    I had a quick go at below, but it will probably need more work. I used the example of radio button Alex Harui multiline as a starting point:

    http://blogs.Adobe.com/aharui/2007/04/multiline_buttons.html

    ------------------------------------------------

    package
    {
    import flash.display.DisplayObject;
       
    Import mx.controls.Button;
    Import mx.core.IUITextField;

    SerializableAttribute public class WordWrapButton extends button
    {
    Protected Overrides function createChildren() (): void
    {
    If (! textField)
    {
    textField = IUITextField (createInFontContext (UITextFieldNoTruncation));
    textField.styleName = this;
    addChild (DisplayObject (textField));
    }
               
    super.createChildren ();
               
    textField.multiline = true;
    textField.wordWrap = true;
    }
           
    Override protected function [] Measure: void
    {
    If (isNaN (explicitWidth) is false)
    {
    textField.text = label;
                   
    textField.width =
    explicitWidth-
    Value ("paddingLeft")-
    Value ("paddingRight");
                       
    measuredHeight =
    textField.getExplicitOrMeasuredHeight () +.
    Value ("paddingTop") +.
    Value ("paddingBottom");
    }
    on the other
    {
    Super.Measure ();
    }
    }
           
    override protected function updateDisplayList)
    unscaledWidth: unscaledHeight, number: number): void
    {
    super.updateDisplayList (unscaledWidth, unscaledHeight);
               
    () textField.setActualSize
    textField.width,
    textField.getExplicitOrMeasuredHeight ());
               
    textField.move (textField.x, value ("paddingTop"));
    }
    }
    }

    ------------------------------

    package
    {
    import flash.text.TextFormat;
    import flash.text.TextFormatAlign;
       
    Import mx.core.UITextField;

    SerializableAttribute public class UITextFieldNoTruncation extends UITextField
    {
    Public Overrides function truncateToFit (truncationIndicator: String = null): Boolean
    {
    Returns false;
    }
    }
    }

    ------------------------------


    <>
    "xmlns:MX ="http://www.adobe.com/2006/mxml"
    Layout = "vertical".
    "xmlns:local =" * ">
       
        <>
    Width = "50".
    label = "A very long label I want the button to encapsulate" / >

    <>
    Width = "100".
    label = "A very long label I want the button to encapsulate" / >

    <>
    Width = "200".
    label = "A very long label I want the button to encapsulate" / >

    <>
    Width = "300".
    label = "A very long label I want the button to encapsulate" / >

    <>
    Width = "400".
    label = "A very long label I want the button to encapsulate" / >

  • get the index in the cellrenderer class

    How do you get the index, the rowindex or the cellindex in a datagrid from a cellRenderer class using a component or a movieclip?

    For example: if I use a button in a cellRenderer class... when it is selected, which is the index of this cell or a current line?
    If I said to access the data grid itself to recover the index... It does not get in the current index as the cell was not animated until the button is. So if no cell (or line) has been selected yet... the button returns - 1.

    It must be a simple way to get the index... but I can't seem to find the answer. Anyone?
    Must be AS3!

    Have not tried this, but the ListData class has row and column properties. Then
    This might work:

    trace (this.listData.row, this.listData.column)

  • Implemented MDS without security, deliver to get custom UserCC class user

    Hi all

    I put implement MDS in my application. We have no security is enabled in our application.  That's why I created a custom class to get the authenticated user name. I added this class to adf - config.xml and activated MDS to the proposed notice. When I deploy my application I got below error

    [15: 10:44] weblogic.application.WrappedDeploymentException: MDS-00035: cannot load the class: view.common.ui.customcustomization.CustomUserCC.

    | Search the web about this error and got the solution suggested by Frank here

    https://community.Oracle.com/thread/2136869?TSTART=0

    I have included my CustomUserCC class as a library in my instance of weblogic with this change, I was able to deploy my application. Now when I run my application, I try to get the unique username of SessionMap but FacesContext ctx = FacesContext.getCurrentInstance () always returns the null value and I'm not able to access ctx.getExternalContext () .getSessionMap ();

    Any suggestion? I stuck my class customCC below.

    SerializableAttribute public class CustomUserCC extends CustomizationClass {}

    private static final String DEFAULT_LAYER_NAME = "user";

    private String mLayerName;

    public CustomUserCC () {}

    mLayerName = 'user ';

    }

    public CacheHint getCacheHint() {}

    Return CacheHint.USER;

    }

    public String getName() {}

    Return mLayerName;

    }

    public String [] {getValue (sess RestrictedSession, MetadataObject MB)

    User String = null;

    FacesContext ctx = FacesContext.getCurrentInstance ();  CTX is always NULL

    If (ctx! = null) {}

    SessionState map = ctx.getExternalContext () .getSessionMap ();

    user = (String) sessionState.get ("UserName");

    System.out.println ("user customization" + user);

    }

    System.out.println ("user" + user);

    return new String() {user};

    }

    }

    Hello

    because the SDM is configured as part of a request for the ADF (a web valid query JSf), the FacesContext should be available. Try

    HashMap session is ADFContext.getCurrent () .getSessionScope ();.

    If this does not work then your configuration does not install SDM correctly

    Frank

  • Ask by writing a Custom Event class

    Hello

    I'm working with events for pratic epurposes, when I copy, paste the web tutorilas code they work Flory, but whne I try myself that they do not work.

    Please help me

    It's my Custom Event.

    I want to pass the VO object by event. If please see this code below and let me know that where I am doing wrong.


    package events
    {
    import flash.events.Event;

    import Vos. User;
    SerializableAttribute public class LoginEvent extends Event
    {
    public static const = "LoginEvent"; LOGIN_EVENT:String
    public var user: user;

    public void LoginEvent(type:String,user:User)
    {
    Super (type, User);
    This.User = user;
    }
    }
    }

    Please let me know

    What are the parameters to be passed within the constructor of the event class and the parameters inside the super()

    Waiting for your answers.

    When you call super(type,user), you pass an object of type User to the event class where its actually expects a Boolean value for the value of bubbles.

    Just call super (type), if you do not cancel/bubble

  • How to declare an instance of custom actionscript classes, extending a component Flex

    SOLVED.  Failed to add the '. '. ' * ' after the name of the directory.

    You can instance in two ways

    (1) as mxml tag

    If you want to use as an mxml tag, you must specify the namespace in the Application tag

    http://www.Adobe.com/2006/mxml" xmlns:custom =" "com.myComponents. *" layout = "absolute" / > "

    xmlns:custom = "" com.myComponents. * "/ / components created in the myComponents directory will be included in the application"

    the custom is the namespace and MyText is the class that you have declared in the myComponents and the name of the instance is txt

    (2) as actionscript object

        
    import com.myComponents. *.
          
    public var txt:MyText;   Declaration of instance of the MyText (custom component)
    ]]>
            
    If this post answered your question of aid, please mark it as such.

  • Pots in the path of a custom component class

    I use the dom4j - 1.6.1.jar in a custom component library, but my JBoss server has dom4j.jar in jboss\server\all\lib.  My custom component is throwing the following error message:

    DefFoundError message: org/dom4j/xpath/DefaultXPath during the call to service XmlToCsvService and convert operation and no way fault proved be configured.

    This makes me suspect that the Dom4J version in the server lib directory is takes precedence over that of my component.  Any suggestions for how to manage this?  Thank you.

    Jared Langdon

    Even the suggestion of Marcel does not always work, but it is certainly worth a quick try.  I remember nothing but try and find one of LiveCycle EAR files has a version of dom4j buried in it (I don't remember which version of LC it was).

    Of course change an Adobe provided EAR is not recommended and can break your support agreement. There is an alternative, however; If you change the JBoss lib folder does not work.  To avoid conflict, you can use Victor to rename the package within the DOM4J class and deploy the jar in your component to avoid the conflict.

    http://code.Google.com/p/jarjar/

    You would then use the classes renamed in your component:

    Import org.mypackage.dom4j.Document;

    Import org.mypackage.dom4j.DocumentException;

    Import org.mypackage.dom4j.DocumentHelper;

    Import org.mypackage.dom4j.Element;

    Import org.mypackage.dom4j.Node;

    Import org.mypackage.dom4j.io.DOMReader;

    Import org.mypackage.dom4j.io.DOMWriter;

  • The custom ToolTip class

    Hi all

    I'm trying to follow the instructions here http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=tooltips_6.html to create a class for the custom ToolTip.

    I get an error on the line that says:

    var g:Graphics = graphics;

    "type was not found or was not a compilation constant: graphics.

    Well, this is part of the original class file - that works of course very well.

    Seems that I can not find the correct import statement.

    Any ideas?

    see you soon

    It lacks an import in your CustomToolTipBorder.as, you must add this import too:

    import flash.display.Graphics
    

Maybe you are looking for

  • El Capitan and folders without title

    Upgrade to El Capitan 10.11.6. When I create a folder without a title on the desktop, it includes also all items on the desktop. If I try and trash the items in the folder, it deletes these items on my desktop. Solutions, all

  • I want to download El Capitan, but KEEP the installer

    I want to download El Capitan, but KEEP the installation program. I have a partitioned hard drive, (I need to keep old versions of Mac OS because I do video editing). How can I keep El Capitan Installer?   As many know, in the world of the downloaded

  • Camileo SX900 photo very noisy

    Hello I just buyed a SX900 camcorder. All right, next to the fact of the camera specifications seems very noisy even in daylight on a room lit not so high... I'we used both level ISO Auto or manual (like 800) with or without LED activated. Is it norm

  • Pages Web looks very bad. Please help me!

    Whenever I go to sites, pages look terribly bad, sometimes it's just text, sometimes it's the text and images but other things are lacking. Everything worked very well last night, no to not install something again. The only site I see a working prope

  • HP ENVY m4-1015dx Notebook PC: hp envy m4 battery not charging but fresh when the laptop is turned off

    Hello! I was with my hp envy m4 core i7 for quite a while now... recently, I formatted and installed windows 8.1 64-bit installed. I decided to download some drivers from the hp site and I realized I needed to provide my model of laptop model number