Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4111438
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:03:58+00:00 2026-05-20T22:03:58+00:00

* Newbie Alert * I have an AdvancedDataGrid with 5 columns. The second column,

  • 0

* Newbie Alert *

I have an AdvancedDataGrid with 5 columns. The second column, with header Labels, needs to be able to contain multiple lines in each cell.

Initially, my grid’s dataprovider was defined as follows:

[Bindable]
public var mappedTagsArray:ArrayCollection = new ArrayCollection( [ 
    { name: "garbage-garbage", semanticTags: "garbage-flirt\ngarbage-garbage\ngarbage-noise\ngarbage-profanity", exitStrategy: "Fallback", confirmationMode: "IF NECESSARY", confirmationPromptlet: "cp5" }, 
    { name: "report-sim", semanticTags: "enquire-sim\nreport-sim", exitStrategy: "Direct", confirmationMode: "NEVER", confirmationPromptlet: "cp6" }
] );

The Columns label was defined as follows, with an inlined TextArea component to handle the multiple lines in one cell:

<mx:AdvancedDataGridColumn id="semanticTags" headerText="Labels" dataField="semanticTags" editable="false">
    <mx:itemRenderer>
        <fx:Component>
            <mx:HBox horizontalScrollPolicy="off" verticalScrollPolicy="off"
                                             top="0" bottom="0" right="0" left="0">
                <fx:Script>
                    <![CDATA[
                        import com.nuance.csportal.mw_api.CallerIntent;
                        public function get value() : String
                        {
                            return ta_labels.text;
                        }
                        override public function set data(value:Object):void
                        {
                            super.data = value;
                            ta_labels.text = value.semanticTags;
                        }
                    ]]>
                </fx:Script>
                <!-- BUG: Scroll bar is fixed in one location; does not move with resizing of cell -->
                <s:TextArea id="ta_labels" heightInLines="2" editable="false" borderVisible="false"
                                                    horizontalScrollPolicy="auto" verticalScrollPolicy="auto" contentBackgroundAlpha="0"
                                                    top="0" bottom="0" right="0" left="0"/>
            </mx:HBox>                                      
        </fx:Component>
    </mx:itemRenderer>
</mx:AdvancedDataGridColumn>

In this scenario, the semanticTags multiple lines are displayed in the Labels column’s cell.


Now I’ve created a custom ActionScript class called CallerIntent:

package com.nuance.csportal.mw_api
{
    import mx.controls.List;

    public class CallerIntent
    {
        public function CallerIntent( id:int, name:String, semanticTags:Array, exitStrategy:String, confirmationMode:String, confirmationPromptlet:String )
        {
            this.id = id;
            this.name = name;
            this.semanticTags = semanticTags;
            this.exitStrategy = exitStrategy;
            this.confirmationMode = confirmationMode;
            this.confirmationPromptlet = confirmationPromptlet;
        }

        public var id:int;
        public var name:String;
        public var semanticTags:Array;
        public var exitStrategy:String;
        public var confirmationMode:String;
        public var confirmationPromptlet:String;
    }
}

And in my init() method which is called upon creationComplete of my form, I populate my grid’s dataprovider:

public function init( event:Event ):void
{
    var st1:Array = new Array( "garbage-flirt", "garbage-garbage", "garbage-noise", "garbage-profanity" );
    var st2:Array = new Array( "enquire-sim", "report-sim" );
    var ci1:CallerIntent = new CallerIntent( 1, "garbage-garbage", st1, "Fallback", "IF NECESSARY", "cp1" );
    var ci2:CallerIntent = new CallerIntent( 2, "report-sim", st2, "Direct", "NEVER", "cp2" );

    mappedTagsArray.addItem( ci1 );
    mappedTagsArray.addItem( ci2 );
}

In this scenario, my app crashes in the override set data method at
ta_labels.text = value.semanticTags;
with
Cannot access a property or method of a null object reference.

This is true – value remains null when I’m using an ArrayCollection of CallerIntent objects as opposed to the ArrayCollection of unnamed objects (in this case, value will hold the unnamed Object).

I tried changing the function’s signature to
override public function set data(value:CallerIntent):void
and got Incompatible Override.

Any ideas? Thanks!
Bonnie

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:03:59+00:00Added an answer on May 20, 2026 at 10:03 pm

    I’ve fixed my problem.
    My grid’s dataprovider is getting populated AFTER the overridden set data method is first called.
    Hence I just had to put

     if ( value != null )
    

    around this code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Newbie DBUnit question Alert!) It appears that DBUnit for each table 'deletes all the
.NET newbie alert Using Visual C# 2008 Express Edition I have accidentally created a
Newbie alert! OK, I have a working central Mercurial repository that I've been working
NEWBIE ALERT! background: For the first time, I am writing a model that needs
I am a jquery newbie and have been adding alert timestamps into my html
WARNING: Complete newbie to RoR and Ruby alert! * I have a login method
ruby newbie alert! (hey that rhymes :)) I have read the official definition but
(MSSQL newbie alert) I have a number of databases on my machine, some were
NEWBIE ALERT! Here's the situation. I've got an Android ListActivity class (AppWindow) that contains
[Android Newbie alert] I need to capture the contents of a WebView in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.