Hi all,

 

I'm having trouble with BlazeDS and a particular VO that lives inside
another VO. The parent VO translates just fine, but I can't cast the
ArrayCollection of VOs inside that for the LIFE of me. 

Actually the smaller one is a List in Java, so I am trying to cast it to
ArrayCollection.

 

I get the error: (And I know it to be from the below
ArrayCollection/list:-)

TypeError: Error #1034: Type Coercion failed: cannot convert
[EMAIL PROTECTED] to mx.collections.ArrayCollection.

 

This occurs when I try and iterate through the list of urlButtonVOs.
I've tried casting it to an ArrayCollection with NO luck.

Charles Web Debugging proxy tags it as an "External Object" and
recognizes it's Java class name. Every other object is an Object in
Charles. What makes this one special? It's an AC of a custom Object,
which has a definition and RemoteClass tag on the Flex side to match.

 

On the Java side I have:

public class CatalogItemVOX implements Serializable {

 

......
protected List urlButtons;

.....

}

 

And urlButtons happens to be a List of a class called UrlButtonVO. It
won't translate to an ArrayCol

 

On the ActionScript side I have:

 
[RemoteClass(alias="com.plateausystems.elms.client.struts.learner.catalo
g.CatalogItemVOX")]

      public class CatalogItemVOX {

            ...



            public ArrayCollection urlButtons;

            ...

      }

 

 

I'm TOTALLY stuck. The info shows up in Charles, but I can't get it to
be recognized as an AC of that object type. Here's where the exception
is thrown: (The for each) casting data.urlButtons to an AC doesn't work
either. BTW: It's inside an item renderer)

 

                  public function onCreationComplete(): void 

                  {

                              var buttonID: int=0;

                              for each(var button: UrlButtonVO in
data.urlButtons) {

                                    var newButton: URLButton= new
URLButton();

 
newButton.id=String("button"+String(buttonID));

                                    newButton.label= button.label;

                                    newButton.URL= button.url;    

 
newButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);


                                    

                                    this.addChildAt(newButton,
buttonID);

                                    buttonID++;

                              }

                  }

 

Thanks in advance to anyone that can help!

______________________________

-Alan Prather


.
The information contained in this e-mail message is intended only for the 
personal 
and confidential use of the recipient(s) named above. This message is 
privileged 
and confidential. If the reader of this message is not the intended recipient 
or an
agent responsible for delivering it to the intended recipient, you are hereby 
notified 
that you have received this document in error and that any review, 
dissemination, 
distribution, or copying of this message is strictly prohibited.

Reply via email to