Passing Complex Object into Grid Component

OK here is what i am trying to do.
I have a grid component, and I wanted to display on the grid,
a list of ship objects. Think of this like a cruise liner.
I am retrieving these objects from a java/hybernate/spring
adapter using remote object, and it works ok. I get back an
arrayCollection, then I build a new array, populatate it with
Actionscript ship objects, which has an embedded port object.
Ship has attributes like Name, id, comments etc. And it has
an embedded homeport object also.
The port, has name, country and comments too.
I can get the object to come back, and its being built
correctly. I have ship objects and each one has its own port
object, I see in the debugger the objects and thier embedded
objects and the embedded object values. So I know the constructor
is working fine. Here is the problem.
I set the dataprovider attribute to match the array of
completed ships, and I can get the grid, to display all the ship
data, but not the port data.
So Here is my code:
<mx:DataGrid id="ShipListDataGrid" width="978"
height="190" dataProvider="{initDG}"
creationComplete="loadAllShips()" selectedIndex="0" >
<mx:columns>
<mx:DataGridColumn headerText="Name"
dataField="name"/>
<mx:DataGridColumn headerText="Class"
dataField="clazz"/>
<mx:DataGridColumn headerText="Comments"
dataField="comments"/>
<mx:DataGridColumn headerText="Port Country"
dataField="port.country" />
</mx:columns>
</mx:DataGrid>
Now the colums name, clazz, comments all work perfectly, as
they are attributes of ship. However, port.country does not work,
it just shows a blank column, even though that is the correct
notation to get to that data field, for the attribute of that ships
port home country. Its just a string, so for the port called miami,
the country is "USA". This does not display.
However if I remove port.country, and only put in port, then
it shows that whats in that column displays as Object : Port.
So it seems that the grid knows theres an object in there.
But not what to do with it?
I have created a masterViewList and a masterDetails
component, and the viewList is the grid, and the details is the
details section of the ship. So there it shows a form, and the form
shows all the details of the ship selected in the list above. Heres
the interesting thing. using a label field, I can change the
selected list item on the grid, and show the ship.port.country in a
label on the bottom, so it can transverse the ship object, but just
not seemingly in the grid.
What can I do? Why does it work with a label field, and not
in the grid? Why will the grid not show an embedded string
attribute for an embedded object, but a label or text box will?
What am I doing wrong?

You will need to use a label function for this.
For example:
<mx:DataGridColumn headerText="Port Country"
dataField="{calcPortCountry}" />
private function calcPortCountry(item:Object,
col:DataGridColumn):String
return item.port.country;

Similar Messages

  • Passing complex object from bpel process to web service

    I have deployed my web service on apache axis.The wsdl file looks like as follows,
    <?xml version="1.0" encoding="UTF-8" ?>
    - <wsdl:definitions targetNamespace="http://bpel.jmetro.actiontech.com" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://bpel.jmetro.actiontech.com" xmlns:intf="http://bpel.jmetro.actiontech.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <wsdl:types>
    - <schema targetNamespace="http://bpel.jmetro.actiontech.com" xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
    - <complexType name="ADLevelBpelWS">
    - <sequence>
    <element name="adLevelStr" nillable="true" type="xsd:string" />
    <element name="id" type="xsd:int" />
    </sequence>
    </complexType>
    - <complexType name="TransResultWS">
    - <sequence>
    <element name="description" nillable="true" type="xsd:string" />
    <element name="id" type="xsd:long" />
    <element name="responseType" type="xsd:int" />
    <element name="status" type="xsd:boolean" />
    </sequence>
    </complexType>
    - <complexType name="NamespaceDataImplBpelWS">
    - <sequence>
    <element name="ADLevel" nillable="true" type="impl:ADLevelBpelWS" />
    <element name="appdataDef" nillable="true" type="apachesoap:Map" />
    <element name="description" nillable="true" type="xsd:string" />
    <element name="name" nillable="true" type="xsd:string" />
    </sequence>
    </complexType>
    - <complexType name="CreateSharedNamespaceBpelWS">
    - <sequence>
    <element name="actor" nillable="true" type="xsd:string" />
    <element name="comment" nillable="true" type="xsd:string" />
    <element name="from" nillable="true" type="xsd:string" />
    <element name="namespaceData" nillable="true" type="impl:NamespaceDataImplBpelWS" />
    <element name="priority" type="xsd:int" />
    <element name="processAtTime" nillable="true" type="xsd:dateTime" />
    <element name="replyTo" nillable="true" type="xsd:string" />
    <element name="responseRequired" type="xsd:boolean" />
    </sequence>
    </complexType>
    </schema>
    - <schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
    - <complexType name="mapItem">
    - <sequence>
    <element name="key" nillable="true" type="xsd:string" />
    <element name="value" nillable="true" type="xsd:string" />
    </sequence>
    </complexType>
    - <complexType name="Map">
    - <sequence>
    <element maxOccurs="unbounded" minOccurs="0" name="item" type="apachesoap:mapItem" />
    </sequence>
    </complexType>
    </schema>
    </wsdl:types>
    + <wsdl:message name="createNamespaceRequest">
    <wsdl:part name="createNs" type="impl:CreateSharedNamespaceBpelWS" />
    </wsdl:message>
    - <wsdl:message name="createNamespaceResponse">
    <wsdl:part name="createNamespaceReturn" type="impl:TransResultWS" />
    </wsdl:message>
    - <wsdl:portType name="JMetroWebService">
    - <wsdl:operation name="createNamespace" parameterOrder="createNs">
    <wsdl:input message="impl:createNamespaceRequest" name="createNamespaceRequest" />
    <wsdl:output message="impl:createNamespaceResponse" name="createNamespaceResponse" />
    </wsdl:operation>
    </wsdl:portType>
    - <wsdl:binding name="NAMESPACEWITHMAPSoapBinding" type="impl:JMetroWebService">
    <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="createNamespace">
    <wsdlsoap:operation soapAction="" />
    - <wsdl:input name="createNamespaceRequest">
    <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://bpel.jmetro.actiontech.com" use="encoded" />
    </wsdl:input>
    - <wsdl:output name="createNamespaceResponse">
    <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://bpel.jmetro.actiontech.com" use="encoded" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    - <wsdl:service name="JMetroWebServiceService">
    - <wsdl:port binding="impl:NAMESPACEWITHMAPSoapBinding" name="NAMESPACEWITHMAP">
    <wsdlsoap:address location="http://localhost:7001/axis/services/NAMESPACEWITHMAP" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    My NamespaceDataObjectImplBpelWS object contains element appDataDef which is of type java.util.Map.My bpel wsdl file is as below,
    <?xml version="1.0"?>
    <definitions name="NsWithMap"
    targetNamespace="http://bpel.jmetro.actiontech.com"
    xmlns:tns="http://bpel.jmetro.actiontech.com"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:apachesoap="http://xml.apache.org/xml-soap"
    >
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    TYPE DEFINITION - List of services participating in this BPEL process
    The default output of the BPEL designer uses strings as input and
    output to the BPEL Process. But you can define or import any XML
    Schema type and us them as part of the message types.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <types>
         <schema targetNamespace="http://bpel.jmetro.actiontech.com" xmlns="http://www.w3.org/2001/XMLSchema">
         <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
              <element name="createNamespace" type="tns:CreateSharedNamespaceBpelWS"/>
              <element name="transResult" type="tns:TransResultWS"/>
              <complexType name="TransResultWS">
                   <sequence>
                        <element name="description" type="string" />
                        <element name="id" type="long" />
                        <element name="responseType" type="int" />
                        <element name="status" type="boolean" />
              </sequence>
              </complexType>
              <complexType name="ADLevelBpelWS">
                   <sequence>
                        <element name="adLevelStr" type="string" />
                        <element name="id" type="int" />
                   </sequence>
              </complexType>
              <complexType name="NamespaceDataImplBpelWS">
                   <sequence>
                        <element name="ADLevel" type="tns:ADLevelBpelWS" />
                        <element name="description" type="string" />
                        <element name="name" type="string" />
                        <element name="appdataDef" type="apachesoap:Map" />
                   </sequence>
              </complexType>
              <complexType name="CreateSharedNamespaceBpelWS">
                   <sequence>
                        <element name="namespaceData" type="tns:NamespaceDataImplBpelWS" />
              </sequence>
              </complexType>
         <element name="desc" type="string"/>
         </schema>
         <schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema">
                   <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
                        <complexType name="mapItem">
                             <sequence>
                                  <element name="key" type="string" />
                                  <element name="value" type="string" />
                        </sequence>
                        </complexType>
                        <complexType name="Map">
                             <sequence>
                             <element maxOccurs="unbounded" minOccurs="0" name="item" type="apachesoap:mapItem" />
                             </sequence>
                        </complexType>
              </schema>
    </types>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    MESSAGE TYPE DEFINITION - Definition of the message types used as
    part of the port type defintions
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <message name="NsWithMapRequestMessage">
    <part name="payload" element="tns:createNamespace"/>
    </message>
    <message name="NsWithMapResponseMessage">
    <part name="payload" element="tns:transResult"/>
    </message>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PORT TYPE DEFINITION - A port type groups a set of operations into
    a logical service unit.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- portType implemented by the NsWithMap BPEL process -->
    <portType name="NsWithMap">
    <operation name="initiate">
    <input message="tns:NsWithMapRequestMessage"/>
    </operation>
    </portType>
    <!-- portType implemented by the requester of NsWithMap BPEL process
    for asynchronous callback purposes
    -->
    <portType name="NsWithMapCallback">
    <operation name="onResult">
    <input message="tns:NsWithMapResponseMessage"/>
    </operation>
    </portType>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PARTNER LINK TYPE DEFINITION
    the NsWithMap partnerLinkType binds the provider and
    requester portType into an asynchronous conversation.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <plnk:partnerLinkType name="NsWithMap">
    <plnk:role name="NsWithMapProvider">
    <plnk:portType name="tns:NsWithMap"/>
    </plnk:role>
    <plnk:role name="NsWithMapRequester">
    <plnk:portType name="tns:NsWithMapCallback"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>
    I am trying to set this map data using java code ,
         HashMap procADMap1 = new HashMap(5);
                   PropertyTypeWS pType = new PropertyTypeWS();
                   pType.setTypeIndex(2);     
              AppdataDefImplWS appData1 = new AppdataDefImplWS();
              appData1.setName("Project");
              appData1.setType(pType);
              appData1.setMaxSize(400);
              appData1.setLOB(false);
         appData1.setDefaultValue("Project Default value");
              procADMap1.put(appData1.getName(), appData1);
              setVariableData("request","createNs","/createNs/namespaceData/appdataDef",procADMap1);     
    Then I am passing request object to the method which I want to invoke from bpel process.
    I am able to deploy the application but when I do post message I am getting following exception,
    NamespaceWithMap (createNamespace) (faulted)
    [2004/09/09 18:35:54] "{http://schemas.oracle.com/bpel/extension}bindingFault" has been thrown. Less
    faultName: {{http://schemas.oracle.com/bpel/extension}bindingFault}
    messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
    code: {Server.userException}
    summary: {org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.}
    detail: {null}
    Is there any other way to handle Map type in bpel process?
    Thanks in advance,
    Sanjay

    Thanks for the quick reply.Actually the web service is already deployed on the server.What I want to do is use existing wsdl file of the deployed web service and invoke the method of the same using oracle PM.
    If I remove element which uses apachesoap:Map type it just works fine also I am getting the complex object returned by the web service method.But when I try to set appDataDef which is of type apachesoap:Map(Axis conversion for java.util.Map and it uses namespace xmlns:apachesoap="http://xml.apache.org/xml-soap") I am getting the error.
    Can you give me some direction to use this exising wsdl file to set map object or it is not possible.

  • Passing complex object from JavaScript to Flex

    Is it possible to call a Flex function (defined with ExternalInterface.addCallback) and pass a complex object from Javascript?  The properties of the object are all simple types, but the object itself is an array of objects.  For example:
    <script type="text/javascript">
    var arrayOfObj = [ { one: "one", two: 2, three: "blah" }, { one: "xyz", two: "abc", three: 3.141 } ];
    callSomeFunctionInFlex(arrayOfObj);
    </script>
    What would I do on the Flex side to make this happen?

    Complex object passing works as expected in Blazeds. 
    There are certain cases where you need to write custom bean proxy classes to marshall an object, but your case is very simple and will not require it.
    Make sure that you set the full java package and class name in your remote alias statement on your client value object.  The class has to be fully qualified.  The AS value object also needs the correct import of the nested value object or you will get a compile error.
    Make sure that the blazeds server has the full class path set to your java objects.
    To debug, you can turn on Blazeds logging in the services-config.xml file like this:
       <logging>
            <!-- You may also use flex.messaging.log.ServletLogTarget -->
            <target class="flex.messaging.log.ConsoleTarget" level="DEBUG">
                <properties>
                    <prefix>[BlazeDS]</prefix>
                    <includeDate>false</includeDate>
                    <includeTime>false</includeTime>
                    <includeLevel>true</includeLevel>
                    <includeCategory>false</includeCategory>
                </properties>
            </target>
        </logging>

  • How do u pass an object into a method

    I want to create a method getData that takes an object of type Helper and returns an object of the same type.
    how do u pass objects into a method and how do u get objects as returns im a bit confused

    That will just allow you to pass a parameter. If you want to return a helper object
    Helper paramHelper = new Helper();
    Helper someHelper = callMethod(paramHelper);
    public Helper callMethod(Helper hobj) {
        //<some code>
        Helper retHelper = new Helper();
        //<blah, blah>
        return retHelper;

  • Passing an object into a tag

    Hello
    I have a tag file called foo.tag
    <%@tag description="some tag" pageEncoding="UTF-8"%>
    <%@tag import="java.util.*"%>
    <%@attribute name="list" type="java.util.List" required="true"%>
    <h4>I am a list</h4>
    <p>Class: <%=list.getClass()%></p>And in my index.jsp I do:
    <%@ taglib prefix="jc" tagdir="/WEB-INF/tags" %>
    <%
          List bar = new ArrayList();
          bar.add("test");
    %>
    <jc:foo list="<%=bar%>"/>..in order to pass the reference of bar in my tag. That works, but I know that it's "bad" practice to have <%= %> inside your JSPs. How could I improve the parameter passing? If I say <jc:foo list="bar"/> then I only get a "bar" String on the tag file.
    thanks

    Thanks for your reply.
    But is there a better way of doing this? Yeah, there is a slightly better way if you are using JSP 2.0 (properly configured). Then you can do:
    <% List bar = new ArrayList();
       bar.add("foo");
       request.setAttribute("bar", bar);
    %>
    <jc:foo list="${bar}"/>
        public void setList(List theList) { ... }
    Can't I just
    feed the object into the tag as an object?Not directly. The List you create in the scriptlet has a limited scope, just inside the _jspService method.  This scope isn't really available to things like tags and EL, so you have to put it in a scope where it can be found - something like the request, or page scopes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • HTTP Status Code 500 Internal server error while passing complex object

    Hi
    When I am passing values through complex input parameter, I am getting "*HTTP Status Code 500 Internal server error: The server encountered an unexpected condition which prevented it from fulfilling the request*". Why I am getting this error? Any idea
    Regards
    Raj

    Raj,
    Can you elaborate on what exactly are you trying to do? Are you saying that same use case works when you pass simple parameters?
    JC

  • JAVA&SOAP:how to return a complex object( the object has an object within)

    Lets say my Complex object is :
    public class PersonWithAddress {
    private String name;
    private int ssn ;
    private Address add;
    PersonWithAddress() {
    name="Gagan Tandon" ;
    ssn =1111;
    add = new Address("1113","WestPlum Street");
    public String getName() {
    return name;
    public int getSSN() {
    return ssn;
    public Address getAddress() {
    return add;
    This complex object has Address object embedded in it.
    public class Address {
    private String house;
    private String street;
    public Address (String myHouse,String myStreet) {
    house = myHouse;
    street = myStreet;
    public String getHouse() {
    return house;
    public String getStreet() {
    return street;
    My deployment Descriptor is as following: check the mappings part.
    <isd:service xmlns:isd=
    "http://xml.apache.org/xml-soap/deployment"
    id="urn:xml-soap-person-demo">
    <isd:provider type="java"
    scope="Application"
    methods="getPersonWithAddress">
    <isd:java class="PersonServer"/>
    </isd:provider>
    <isd:faultListener>
    org.apache.soap.server.DOMFaultListener
    </isd:faultListener>
    <isd:mappings>
    <isd:map
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:x="urn:xml-soap-person-demo" qname="x:PersonWithAddress"
    javaType="PersonWithAddress"
    java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
    xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
    <isd:map
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:x="urn:xml-soap-person-demo" qname="x:Address"
    javaType="Address"
    java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
    xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
    </isd:mappings>
    </isd:service>
    And in my SOAPRPC code at client end calls the following: check the mappingregistry code...
    String serverHost = "http://localhost:8082/soap/servlet/rpcrouter";
    SOAPMappingRegistry smr = new SOAPMappingRegistry();
    Parameter p= null;
    try {
    System.out.println("here 0");
    Response r=null;
    Call c=new Call();
    Vector parameters = new Vector();
    System.out.println("here 1");
    c.setTargetObjectURI ("urn:xml-soap-person-demo");
    c.setMethodName ("getPersonWithAddress");
    System.out.println("here 3");
    c.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    // parameters.addElement (new Parameter("name", String.class, "Web Services Client", null));
    // c.setParams (parameters);
    c.setSOAPMappingRegistry(smr);
    BeanSerializer beanSer = new BeanSerializer();
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new QName("urn:xml-soap-person-demo","Address"),Address.class,beanSer,beanSer);
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new QName("urn:xml-soap-person-demo","PersonWithAddress"),PersonWithAddress.class,beanSer,beanSer);
    try
    System.out.println("here 4");
    r = c.invoke ( new URL(serverHost), "" );
    // org.apache.soap.SOAPException can be thrown
    catch ( Exception e )
    e.printStackTrace();
    // Check the response.
    if (r.generatedFault ()) {
    Fault f = r.getFault();
    System.out.println ("Error Occurred: ");
    System.out.println (" Fault Code = " + f.getFaultCode());
    System.out.println (" Fault String = " + f.getFaultString());
    // return f.getFaultString();
    // return new String("gagan");
    return null;
    else {
    System.out.println("here 5");
    p = r.getReturnValue();
    System.out.println("here 6");
    // System.out.println( (String)greeting.getValue() );
    System.out.println("SSN: " + ((PersonWithAddress)p.getValue()).getSSN());
    return (PersonWithAddress) p.getValue();
    catch( Exception e ){
    e.printStackTrace();
    // finally {
    // return null;// String("not OK");
    if (p==null)
    return null;
    else
    return (PersonWithAddress) p.getValue();
    When running this code..
    The following error is thrown.
    System.out.println("here 4") is printed.
    [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to instantiate 'PersonWithAddress': Class org.apache.soap.encoding.soapenc.BeanSerializer can not access a member of class PersonWithAddress with modifiers ""; targetException=java.lang.IllegalArgumentException: Unable to instantiate 'PersonWithAddress': Class org.apache.soap.encoding.soapenc.BeanSerializer can not access a member of class PersonWithAddress with modifiers ""]
    at org.apache.soap.rpc.Call.invoke(Call.java:294)
    at PersonClient.getPersonWithAddress(PersonClient.java:92)
    at PersonClient.<init>(PersonClient.java:11)
    at PersonClient.main(PersonClient.java:20)
    java.lang.NullPointerException
    at PersonClient.getPersonWithAddress(PersonClient.java:96)
    at PersonClient.<init>(PersonClient.java:11)
    at PersonClient.main(PersonClient.java:20)
    I am here 1
    Exception in thread "main" java.lang.NullPointerException
    at PersonClient.<init>(PersonClient.java:13)
    at PersonClient.main(PersonClient.java:20)
    What could be the problem..? Is there any info on net how could i pass complex objects of this type in Java through SOAP RPC.
    GAGAN

    Have you managed to sole the problem ? I have got similar one...
    [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to instantiate 'auction.common.Property': auction/common/Property]
         at proxy.soap.AuctionHistoryProxy.addAuctionProperty(AuctionHistoryProxy.java:515)
         at java.lang.reflect.Method.invoke(Native Method)
    (...)

  • Passing user info into precompiled flex2 .swf

    Hello all,
    Using flex builder to precompile my .swf how do I then pass
    client info to the SWF when a user accesses it? I have information
    like profile_id and user_id that need to accompany all of my remote
    calls, so how do I get them loaded into the swf if it is
    precompiled? We are running CF 7.02. I thought maybe URLLoader to
    hit a .cfm page, but I am wondering if the request would carry any
    header info...no header means I could not identify who made the
    request and then I am back where I started.
    Thanks for any Help.
    -Mark

    Thanks inlineblue. that is exactly what i was looking for.
    Although now am curious if there is any way to pass an object into
    the swf. My guess is no...not on the init, but if anyone knows how
    to, that would be great.
    I know how to pass objects through remoting, just not on the
    init. I could loop over the struct (it is really a named array) and
    create name value pairs, but I was hoping to avoid that.

  • Pass JTextArea objects

    All,
    I have a tabbed pane application, in one of the tabs I have a logging JTextArea that I would like to be able to externalize through a non-modal JDialog. However, when I pass the object into the JDialog, the object goes grey in my JTabbedPane. Is there anyway to create a copy of the JTextArea and push logging results to both the JDialog and JTabbedPane at the same time or do I have to maintain two different JTextAreas for this type of application?
    Thanks.

    Swing components can only be added to a single container. However you can share the model:
    JTextArea textArea1 = new JTextArea();
    JTextArea textArea2 = new JtextArea();
    textArea2.setDocument( textArea1.getDocument() );

  • Using oracle.sql.STRUCT to pass in a COMPLEX OBJECT

    I need to pass in a complex object (object with nested array of objects) into a oracle stored procedure.
    We are using JDBC 9.2.0.1 drivers...
    Note i am able to retrieve a complex object successfully using an oracle struct however i am not able to pass in the struct.
    I do not want to use JPublisher as we are not using SQLJ.
    I have looked through the documentation on using default structs and am getting an error when i try and create the struct...
    I have created an array of objects with a sub array
    and i create a struct descriptor however when i create the actual oracle struct
    like
    oracle.sql.Struct = new oracle.sql.Struct( structDesc,conn,complexobject)
    I get a "java.sql.SQLException: Internal Error: Unable to resolve name"
    Do i have to create STRUCTS for the nested object first ?
    And then nest that STRUCT within the PARENT STRUCT to pass in complex objects ???
    Any help would be much appreciated...
    Gurinder
    email [email protected]

    Thanks Konstantin Goryachev!
    I'm using Oracle JDBC 9.2.0.3 drivers using a SQLData implementation.
    Unfortunately i have something very similar to your code and i still get the following error
    EXC: testPolicyRate(): java.sql.SQLException: Internal Error: Inconsistent catalog view
    java.sql.SQLException: Internal Error: Inconsistent catalog view
         void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
              DBError.java:187
         void oracle.jdbc.dbaccess.DBError.throwSqlException(int, java.lang.Object)
              DBError.java:229
         void oracle.sql.StructDescriptor.initMetaData1_9_0()
              StructDescriptor.java:897
         void oracle.sql.StructDescriptor.initMetaData1()
              StructDescriptor.java:864
         boolean oracle.sql.StructDescriptor.isInstantiable()
              StructDescriptor.java:508
         void oracle.sql.STRUCT.<init>(oracle.sql.StructDescriptor, java.sql.Connection, java.lang.Object[])
              STRUCT.java:107
         oracle.sql.STRUCT oracle.sql.OracleSQLOutput.getSTRUCT()
              OracleSQLOutput.java:96
         oracle.sql.STRUCT oracle.sql.STRUCT.toSTRUCT(java.lang.Object, oracle.jdbc.OracleConnection)
              STRUCT.java:408
         oracle.sql.Datum oracle.jdbc.oracore.OracleTypeADT.toDatum(java.lang.Object, oracle.jdbc.driver.OracleConnection)
              OracleTypeADT.java:284
         oracle.sql.Datum[] oracle.jdbc.oracore.OracleTypeADT.toDatumArray(java.lang.Object, oracle.jdbc.driver.OracleConnection, long, int)
              OracleTypeADT.java:327
         oracle.sql.Datum[] oracle.jdbc.oracore.OracleTypeUPT.toDatumArray(java.lang.Object, oracle.jdbc.driver.OracleConnection, long, int)
              OracleTypeUPT.java:143
         oracle.sql.Datum[] oracle.sql.ArrayDescriptor.toOracleArray(java.lang.Object, long, int)
              ArrayDescriptor.java:771
         void oracle.sql.ARRAY.<init>(oracle.sql.ArrayDescriptor, java.sql.Connection, java.lang.Object)
              ARRAY.java:118
         void com.tu.lib.busobject.PolicyRate.main(java.lang.String[])
              PolicyRate.java:198
    Process exited with exit code 0.
    Here's my code
    * Main Method
    public static void main(String[] args)
    throws SQLException, IOException
    Connection conn = null;
    OracleCallableStatement cstmt = null;
    try {
    /* Setup connection */
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection("jdbc:oracle:thin:@neptune:1521:tu_test", "OPS$WWW", "welcome1");
    conn.setAutoCommit(false);
    System.out.println("conn is open = " + !conn.isClosed());
    /* Setup map */
    System.out.println("Creating type maps...");
    java.util.Map typeMap = conn.getTypeMap();
    typeMap.put(_SQL_NAME,PolicyRate.class);
    typeMap.put(CoverageRate._SQL_NAME, CoverageRate.class);
    typeMap.put(CoverageRate._SQL_ARRAY_NAME,CoverageRate[].class);
    conn.setTypeMap(typeMap);
    /* Create a coverage rate object to be inserted into array of policy rate object */
    CoverageRate covrObj = new CoverageRate(1,
    "HMS",
    30,
    5,
    new BigDecimal(0),
    null,
    null,
    new BigDecimal(0),
    new BigDecimal(0),
    0,
    0);
    /* Create an array */
    System.out.println("Creating descriptor...");
    ArrayDescriptor adesc = new ArrayDescriptor(CoverageRate._SQL_ARRAY_NAME,conn);
    System.out.println("Created descriptor!");
    Object [] covrArray = new Object[1];
    covrArray[0] = covrObj;
    System.out.println("Creating oracle array..");
    ARRAY arr = new ARRAY(adesc,conn,covrArray);
    System.out.println("Created array!!");
    /* Create policy rate object */
    PolicyRate prate = new PolicyRate ("TESTTRA",
    "TRS",
    TUDate.convertToSql("2003","08","27"),
    TUDate.convertToSql("2004","06","25"),
    TUDate.convertToSql("2004","06","29"),
    "NEW",
    1,
    new BigDecimal(0),
    new BigDecimal(0),
    null);
    /* Add coverage rate object to array -- assume array only has one element for timebeing */
    System.out.println("Setting arr in policyrate...");
    prate.setRates(arr);
    System.out.println("Creating array.sql.ARRAY for covrObj..");
    prate.setRates(new oracle.sql.ARRAY(adesc,conn,covrObj));
    System.out.println("Created array.sql.ARRAY for covrObj..");
    /* Setup statemenet object */
    cstmt = (OracleCallableStatement) conn.prepareCall("{call dbpckg_rate_obj.p_rate_obj_calc_rate(?)}");
    /* Bind variables to statement */
    System.out.println("Setting policyrate object...");
    cstmt.setObject(1,prate,OracleTypes.STRUCT);
    System.out.println("Registering out object...");
    cstmt.registerOutParameter(1,oracle.jdbc.OracleTypes.STRUCT,PolicyRate._SQL_NAME);
    cstmt.execute();
    /* Retrieve the object back */
    System.out.println("Getting policy rate object back...");
    prate = (PolicyRate) cstmt.getObject(1);
    System.out.println("Object Retrieved " + prate.getProductcode() + " " + prate.getAgentcode());
    /* Close database connection */
    conn.close();
    catch (Exception exc) {
    System.out.println("EXC: testPolicyRate(): " + exc);
    exc.printStackTrace();
    if (conn != null)
    conn.close();
    finally {     
    if (conn != null)
    conn.close();
    I've opened up a tar through metalink hopefully they can help get past this error...:)
    Gurinder

  • How to pass a locale object into another function?

    Greetings,
    i like to pass a locale object into another function. These are my code below
    import java.util.*;
    public class Locales{
         public static void main(String[] args){
              Locale locale= new Locale("EN", "US");
              convert(locale);
    public void convert(Locale convert)
         String language = convert.getDisplayLanguage();
         System.out.println(language);          
    }I got this error:
    Locales.java:6: non-static method convert(java.util.Locale) cannot be referenced from a static content
                    convert(locale);
                    ^How do i correct it?
    Thanks

    Did you bother to do a search?
    Did you bother to read any of the material that the search would have linked you to?
    If you had then you would be able to understand where you are going wrong and how to fix it yourself. Instead of being spoonfed by us.

  • Passing objects into a class constructor

    I've created a frame for inputting a patient's medical results. There are lots of buttons for temperature, blood pressure, etc. I've created a separate, inner class that creates a NumberPad frame to enter the patient's results. Press the "Temp." button, for example, a NumberPad appears, you enter the temperature, press the "Enter" button on the NumberPad and the number appears in a Label next to the "Temp." button.
    The problem is that I've written the constructor of the NumberPad with a label parameter so that the right label gets updated. e.g.
    class NumberPad extends Frame implements ActionListener
    public NumberPad(Label aLabel)
    However, because I've implemented ActionListener, I've had to override the actionPerformed method and I don't know how to pass the aLabel object that I give to the NumberPad constructor into the actionPerformed method so that, for example
    public actionPerformed(ActionEvent evt)
    String s = evt.getActionCommand
    if (s.equals("ENTER")
    aLabel.setText(display of numberpad);
    How do I transfer the aLabel object into the actionPerformed method so that the correct label gets updated?

    Store the label as an instance variable.
    class NumberPad extends Frame implements ActionListener {
        private Label aLabel;
        public NumberPad(Label aLabel) {
            this.aLabel = aLabel;
        public actionPerformed(ActionEvent evt) {
            String s = evt.getActionCommand;
            if (s.equals("ENTER") {
                aLabel.setText(display of numberpad);
    }[/code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to pass any type of objects into Portal's rules engine?

    Is that possible to pass any type of objects into Portal's rules engine? Or BEA's Portal service rules engine can only allow to pass a limited number of objects?
    Are there any information about BEA's rules engine? and Can we use its rules engine without using its Portal service?
    Thank you.

    I worked on BEA rules engine 4 months back. I'm sure you can pass any JAVA object to it's working meomory. I am giving my sample rules here, hope it will be helpful for you.
    I just replace pcakage name, other than that everything is from wroking project. Open in xml spy, it should be clear from the desc. If you have any questions post back.
    <cr:rule-set is-complete="true" xmlns="http://www.bea.com/servers/p13n/xsd/expression/expressions/2.1.1" xmlns:cr="http://www.bea.com/servers/p13n/xsd/rules/core/2.1.1" xmlns:literal="http://www.bea.com/servers/p13n/xsd/expression/literal/1.0.1" xmlns:string="http://www.bea.com/servers/p13n/xsd/expression/string/1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/servers/p13n/xsd/rules/core/2.1.1 rules-core-2_1_1.xsd">
         <cr:rule is-complete="true">
              <cr:name>TaxForm1040</cr:name>
              <cr:description>If salary is 70,000 then this rule makes 1040 as required form</cr:description>
              <cr:conditions>
                   <multi-and>
                        <multi-and>
                             <equal-to>
    <instance-method>
    <variable>
    <name>SalaryField</name>
    <type-alias>com.blah.field.REInputObject</type-alias>
    </variable>
    <name>getKey</name>
    </instance-method>
    <literal:string>Salary</literal:string>
    </equal-to>
    <equal-to>
    <instance-method>
    <variable>
    <name>SalaryField</name>
    <type-alias>com.blah.field.REInputObject</type-alias>
    </variable>
    <name>getValue</name>
    </instance-method>
    <literal:integer>70000</literal:integer>
    </equal-to>
                        </multi-and>
                   </multi-and>
              </cr:conditions>
              <cr:actions>
                   <new-instance>
                        <type-alias>com.blah.field.RequiredField</type-alias>
                        <arguments>
                             <literal:string>1040</literal:string>
                        </arguments>
                   </new-instance>
              </cr:actions>
         </cr:rule>
    </cr:rule-set>

  • Passing Business Object(Complex Type) as argument using PAPI-WS

    Hi All,
    Is it possible to pass Business Object or Complex Type as argument to process instance through PAPI-WS?
    As am getting error when am trying to pass business object in place of primitive type.. It would be great help any of you can provide example; if it is possible.
    Thanks & Regards,
    Ankur

    Hi Alexander,
    You are now able to create the Structure and set the cardinality also in NetWeaver CE.  I thin the following steps will be helpful for you.
    1. Create a CAF project called firstcaf.
    2.Create an entity service within the project called Customer.
    3. Now expand modeled.
    4. Then right click on Data Types. Here you will get the option "New Structure".
    5.Now select New Structure, One popup will appear then enter the Structure name called Address and click ok.
    6. Now You will get your Address structure under Complex Types.
    7.Double Click on Address. In right hand side you will get the Address structure for editing.
    8.Now from left hand side(Existing Type) expand caf.core and add your required attribute. In right hand side (structure Field) you can edit the name of attribute. suppose for Address structure I have added two field phone and mobile (both are short text ). save it.
    9. Now switch to Composite Application Explorer and expand Business Objects ->Customer -> Customer->Customer. and double click on it (Customer).
    10. In right hand side expand project firstcaf ->modeled. Now you will get your structure here, In my case I will get Address structure. Now select your structure and  click Add button. Structure will go to right hand side(Structure Fields).
    11. If you want to change the cardinality it is very simple. Select The Structure from right hand side(Structure Fields) and in bottom side click on property. Now you will get the Cardinality field. you can change it as you like.
    Thanks and Regards
    Chandan

  • Passing object into form

    I have a workflow where I check out a configuration object and I need to pass it to a form for updating, then check it back in at the workflow level. Does anyone have a snippet of code where they have successfully passed the object to the form and back again? I know I'm getting the components of the object correctly, it's just not passing up to the form.
    Thanks in advance for any help.
    -T-

    Now I'm getting " com.waveset.util.WavesetException: Suspended case with no WorkItems!"
    Here is the workflow minus start and end: (Remember, the object displays fine on the form)
    <Activity id='1' name='Checkout Object'>
    <Action id='0' application='com.waveset.session.WorkflowServices'>
    <Argument name='op' value='checkoutObject'/>
    <Argument name='type' value='Configuration'/>
    <Argument name='name' value='ADServerLookupTable'/>
    <Argument name='authorized' value='true'/>
    <Variable name='object'/>
    <Return from='object' to='ADobject'/>
    </Action>
    <Transition to='Show Form'/>
    <WorkflowEditor x='215' y='59'/>
    </Activity>
    <Activity id='2' name='Show Form'>
    <Action id='0' name='Clear Form Button'>
    <expression>
    <set name='formButton'>
    <null/>
    </set>
    </expression>
    </Action>
    <ManualAction id='1' name='Show ADconfigMgmt Form' syncExec='true'>
    <Owner name='$(WF_CASE_OWNER)'/>
    <FormRef>
    <ObjectRef type='UserForm' id='#ID#UserForm:ADconfigMgmt' name=' UserForm AD Configuration Mgmt'/>
    </FormRef>
    <Return from='ADobject' to='ADobject'/>
    <ExposedVariables>
    <List>
    <String>ADobject</String>
    </List>
    </ExposedVariables>
    <EditableVariables>
    <List>
    <String>ADobject</String>
    </List>
    </EditableVariables>
    </ManualAction>
    <Transition to='Checkin Object'>
    <eq>
    <ref>formButton</ref>
    <s>Save</s>
    </eq>
    </Transition>
    <Transition to='Unlock Object'>
    <eq>
    <ref>formButton</ref>
    <s>Cancel</s>
    </eq>
    </Transition>
    <Transition to='Unlock Object'>
    <ref>WF_ACTION_TIMEOUT</ref>
    </Transition>
    <WorkflowEditor x='301' y='59'/>
    </Activity>
    <Activity id='3' name='Checkin Object'>
    <Action id='0' application='com.waveset.session.WorkflowServices'>
    <Argument name='op' value='checkinObject'/>
    <Argument name='object' value='$(ADobject)'/>
    <Argument name='authorized' value='true'/>
    </Action>
    <Transition to='end'/>
    <WorkflowEditor x='59' y='10'/>
    </Activity>
    <Activity id='4' name='Unlock Object'>
    <Action id='0' application='com.waveset.session.WorkflowServices'>
    <Argument name='op' value='unlockObject'/>
    <Argument name='object' value='$(ADobject)'/>
    <Argument name='authorized' value='true'/>
    </Action>
    <Transition to='end'/>
    </Activity>
    Edited by: TD_ROC on May 6, 2008 12:03 PM

Maybe you are looking for

  • My ipad 3 sounds are not working please help

    Hi I have an ipad 3G wifi IOS version 5.1.1(9B206) modem firmware 1.0.11..once i plug my headset sounds work perfect but without the headset sounds doesnt work..not in you tube not in music nothing..but when i increase the ringing volume in settings

  • Photosmart 7520 Horrible Print Quality

    I have purchased HP printers for years and have always considered them excellent and reliable products. About a year ago I purchased a Photosmart 7520. This has turned out to be the worst printer I have ever owned.The print quality is terrible and un

  • Photobook: Way too dark sRGB/Adobe RGB

    I've just received my third photobook. We make one each year and the previous ones have been great. I already found out that it's advised to use only sRGB images. Since there are no warnings when importing with another profile or any profile-conversi

  • How to do calculation to a variable in Sapscript form

    Hi experts, My question looks simple but I failed to solve it. Supposed in the Sapscript form there are two variables: &it_tab-qty1&, &it_tab-qty2&. I need to add the first variable's value to the second one, I tried as below in Sapscript form editor

  • Need to get display only mode in ess

    Hello experts, What settings should I use so that on the ESS Personal Profile the users get a display only profile with a details button on the right as shown in the image. Currently the details only show up when somebody is maintaining the PERNR fro