How to pass attribute of type java.util.ArrayList Property to a Tag

How do I pass an attribute of type, java.util.ArrayList<my.entity.Property> to a Tag implementation class?
Please advise!
Thanks,
Joe
package my.tags;
import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.jsp.tagext.SimpleTagSupport;
import javax.servlet.jsp.JspException;
import my.entity.Property;
public class PropertiesTag extends SimpleTagSupport {
    private ArrayList<Property> properties;
    public void setProperties(ArrayList<Property> properties) {
          this.properties = properties;
     public void doTag() throws JspException, IOException {
<?xml version="1.0" encoding="utf-8" ?>
<taglib ...>
     <tag>
          <name>propertiesTag</name>
          <tag-class>my.tags.PropertiesTag</tag-class>
          <body-content>empty</body-content>
          <description>Displays the product selection left menu</description>
          <attribute>
               <name>properties</name>
               <required>true</required>
               <rtexprvalue>true</rtexprvalue>
               <type>java.util.ArrayList<my.entity.Property></type>
          </attribute>
     </tag>
</taglib>Here's the error message:
org.xml.sax.SAXParseException: The element type "my.entity.Property" must be terminated by the matching end-tag "</my.entity.Property>".

802826 wrote:
How do I pass an attribute of type, java.util.ArrayList<my.entity.Property> to a Tag implementation class?
Please advise!
As already pointed out, there is no way to specify a generic type in a tag library descriptor. You may however specify an Object type in your tld and still have the variable in your tag as a parameterized generic type.
In your tld change the type to Object.
<type>java.lang.Object</type>.
The properties tag itself needs no change and can continue to use parameterized types.
cheers,
ram.

Similar Messages

  • Cannot send a null Map key for type 'java.util.HashMap'

    Hi All,
      I am haing an issue with sending data from Server to the client using the AMF Channel.
      Most of the method invocations on the RemoteObject are throwing the following Exception.
    [CODE]
    (mx.rpc.events::FaultEvent)#0
      bubbles = false
      cancelable = true
      currentTarget = (null)
      eventPhase = 2
      fault = (mx.rpc::Fault)#1
        content = (null)
        errorID = 0
        faultCode = "Server.Processing"
        faultDetail = (null)
        faultString = "Cannot send a null Map key for type 'java.util.HashMap'."
        message = "faultCode:Server.Processing faultString:'Cannot send a null Map key for type 'java.util.HashMap'.' faultDetail:'null'"
        name = "Error"
        rootCause = (null)
      headers = (null)
      message = (mx.messaging.messages::ErrorMessage)#2
        body = (null)
        clientId = "22E55FB1-910E-312F-E37A-ED5167139CB0"
        correlationId = "4DB54224-662A-C596-D165-F7C3EBB64DB8"
        destination = "TimeMap"
        extendedData = (null)
        faultCode = "Server.Processing"
        faultDetail = (null)
        faultString = "Cannot send a null Map key for type 'java.util.HashMap'."
        headers = (Object)#3
        messageId = "22E56255-D62F-2ACF-4DA5-CF1E4D6353BB"
        rootCause = (null)
        timestamp = 1266877198902
        timeToLive = 0
      messageId = "22E56255-D62F-2ACF-4DA5-CF1E4D6353BB"
      statusCode = 0
      target = (null)
      token = (mx.rpc::AsyncToken)#4
        message = (mx.messaging.messages::RemotingMessage)#5
          body = (Array)#6
          clientId = (null)
          destination = "TimeMap"
          headers = (Object)#7
            DSEndpoint = "my-amf"
            DSId = "22E53936-7E0E-B21C-C936-EF1078000306"
          messageId = "4DB54224-662A-C596-D165-F7C3EBB64DB8"
          operation = "getMapKey"
          source = (null)
          timestamp = 0
          timeToLive = 0
        responders = (Array)#8
          [0] (com.universalmind.cairngorm.events::Callbacks)#9
            conflictHandler = (null)
            faultHandler = (function)
            priority = 0
            resultHandler = (function)
        result = (null)
      type = "fault"
    [CODE]
    The Spring bean which is exposed as a Remote Object has the following method signature..
    [CODE]
    public String getMapKey() {
            return mapKey;
    [/CODE]
    I am unable to understand why AMF Channel or Blaze DS is treating the String as HashMap !!!
    This was working pefectly fine till yesterday !!
    The version of the BlazeDS i am using is : blazeds_turnkey_3-0-0-544
    and the Flex SDK Version is : flex_sdk_3.5.0.12683
    We recently upgraded to Flex 3.5.0 version earlier we were using 3.3 version
    Thanks
    mars

    Hi All,
    I chcked my server side java beans ( which are managed by Spring) and they are all returning the data property and none of the Keys in the returned hashmaps are null.
    Not sure why this is happening.
    Thanks
    kumars

  • Error(86,88): incompatible types; found: java.util.ArrayList

    Hi,
    I'm getting following error :
    Error(86,88): incompatible types; found: java.util.ArrayList, required: com.sun.java.util.collections.ArrayList
    The line JDev is complaining about contains the following code :
    com.sun.java.util.collections.ArrayList runtimeErrors = container.getExceptionsList();
    I really don't have a clue where this error comes from. If I right-click on ArrayList it brings me to the correct declaration.
    Does somebody know what I'm doing wrong?
    Thanks in advance for you help!
    Kris

    Kris,
    try changing the code to :
    java.util.ArrayList runtimeErrors = container.getExceptionsList();apparently container.getExceptionsList() returns a java.util.Arraylist not a com.sun.java.util.collections.ArrayList
    HTH,
    John

  • Question on import java.util.ArrayList, etc.

    Hi,
    I was wondering what the following meant and what the differences were. When would I have to use these:
    import java.util.ArrayList;
    import java.util.Collections; <--I especially don't understand what this means
    import java.util.Comparator; <---same for this (can I consolidate these into the bottom two?)
    import java.io.*;
    import java.util.*;

    MAresJonson wrote:
    Also, what does this mean:
    return foo == f.getFoo() ? true : false;
    (more specifically...what does the "? true : false" mean and is there another way to code that?)It's called the ternary operator. For your specific example, you could just do:
    return foo == f.getFoo();But, more generally,
      return foo == f.getFoo() ? "equal" : "Not equal";means:
    if (foo == f.getFoo()) {
       return "equal";
    else {
       return "Not equal";
    }As everyone else said at the same time...

  • Newbie help with collection java.util.ArrayList

    Hi,
    the documentation for the class ArrayList is given as
    public class ArrayList<E>
    extends AbstractList<E>
    what is that <E> over there ? Similarly, what is the <T> in an iterator ? Exact problem along with code is at the end of the post.
    I am a C++ programmer and am very comfortable with the STL, but that approach i.e. ArrayList<Job> does not work over here :(
    PLease help.
    TIA,
    Madhu.
    Code Details:
    I have a class (Job) which I wish to add to the list using the add method. Obviously, it gives an error.
    Code goes as
    class MyQueue extends java.lang.Object
    private java.util.ArrayList jobsList=new java.util.ArrayList(100);
    public void addtoMyQueueatIndex(Job newJob,int Index)
    jobsList.add((java.lang.Object)newJob,Index);
    Error is :
    MyQueue.java:96: cannot find symbol
    symbol : method addtoMyQueueatIndex((java.lang.Object,int)
    location: class java.util.ArrayList
    jobsList.add((java.lang.Object)newJob,Index);

    Are you using J2SDK 1.5.0 beta 1 or J2SDK 1.4.2? Are you using the docs from 1.5 and the compiler from 1.4.2?
    private java.util.ArrayList jobsList=new java.util.ArrayList(100); //-- 1.4.2 code
    private java.util.List<Job> jobsList = new java.util.ArrayList<Job> (100); //-- 1.5.0 code (preferred style)
    private java.util.ArrayList<Job> jobsList = new java.util.ArrayList<Job> (100); //-- 1.5.0 codeAs a matter of style, use the interface and not the real class when declaring a variable like the jobsList above whenever possible or applicable.
    You do not need to cast the object newJob to Object. And you have inverted the positions of the parameters.
    void add(int index, E element)
    Inserts the specified element at the specified position in this list (optional operation).
    jobsList.add(Index, newJob);

  • Java.io.IOException: Deserialization failed, format CollectionFormat(public java.util.ArrayList())

    I am trying to retrieve a list from coherence cache and when I try to test my cache I get the following exception
    Exception in thread "main" (Wrapped) java.io.IOException: Deserialization failed, format CollectionFormat(public java.util.ArrayList())
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ConverterFromBinary.convert(PartitionedCache.CDB:4)
      at com.tangosol.util.ConverterCollections$ConverterMap.get(ConverterCollections.java:1655)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.get(PartitionedCache.CDB:1)
      at com.tangosol.coherence.component.util.SafeNamedCache.get(SafeNamedCache.CDB:1)
      at com.sesco.cohc.cohc_RegionalForecastedGen.getLatestDataForDataSource(cohc_RegionalForecastedGen.java:32)
      at com.sesco.cohc.cohc_RegionalForecastedGen.main(cohc_RegionalForecastedGen.java:172)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
    Caused by: java.io.IOException: Deserialization failed, format CollectionFormat(public java.util.ArrayList())
      at org.gridkit.coherence.utils.pof.ReflectionPofSerializer.internalDeserialize(ReflectionPofSerializer.java:105)
      at org.gridkit.coherence.utils.pof.ReflectionPofSerializer.deserialize(ReflectionPofSerializer.java:92)
      at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3316)
      at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2604)
      at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:368)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2746)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:262)
      ... 11 more
    Caused by: java.io.IOException: Failed to deserialize java.util.ArrayList instance
      at org.gridkit.coherence.utils.pof.ReflectionPofSerializer$CollectionSerializer.deserialize(ReflectionPofSerializer.java:317)
      at org.gridkit.coherence.utils.pof.ReflectionPofSerializer.internalDeserialize(ReflectionPofSerializer.java:101)
      ... 17 more
    Caused by: java.io.EOFException
      at com.tangosol.io.AbstractByteArrayReadBuffer$ByteArrayBufferInput.readPackedInt(AbstractByteArrayReadBuffer.java:430)
      at com.tangosol.io.pof.PofBufferReader$UserTypeReader.complete(PofBufferReader.java:3819)
      at com.tangosol.io.pof.PofBufferReader.readCollection(PofBufferReader.java:2452)
      at org.gridkit.coherence.utils.pof.ReflectionPofSerializer$CollectionSerializer.deserialize(ReflectionPofSerializer.java:306)
      ... 18 more
    I am not sure why I am getting the error. Any help would be appreciated

    You were using the ReflectionPofSerializer coded by Alexey.   If you are pretty sure that the object you retrieved was stored using the same serializer, might want to contact Alexey to see if he can help you out.
    ReflectionPofSerializer - gridkit - ReflectionPofSerializer project page - A home for code misc usefull code related …

  • How  to Pass String array from Java to PL/SQL  and this use in CURSOR

    hi,
    I cant understand how to pass Array String as Input Parameter to the Procedure and this array use in Cursor for where condition like where SYMPTOM in( ** Array String **).
    This array containing like (SYMPTOM ) to be returned from the java to the
    pl/sql (I am not querying the database to retrieve the information).
    I cannot find an example on this. I will give the PL/SQL block
    create or replace procedure DISEASE_DTL<*** String Array ***> as
    v_SYMPTOM number(5);
    CURSOR C1 is
    select distinct a.DISEASE_NAME from SYMPTOM_DISEASE_RD a
    where ltrim(rtrim(a.SYMPTOM)) in ('Fever','COUGH','Headache','Rash') ------- ***** Here use this array element(like n1,n2,n3,n4,n5..) ******
    group by a.DISEASE_NAME having count(a.DISEASE_NAME) > 3 ----------- ***** 3 is no of array element - 1 (i.e( n - 1))*****
    order by a.DISEASE_NAME ;
    begin
    for C1rec IN C1 loop
    select count(distinct(A.SYMPTOM)) into v_SYMPTOM from SYMPTOM_DISEASE_RD a where A.DISEASE_NAME = C1rec.DISEASE_NAME;
    insert into TEMP_DISEASE_DTLS_SYMPTOM_RD
    values (SL_ID_SEQ.nextval,
    C1rec.DISEASE_NAME,
    (4/v_SYMPTOM), --------**** 4 is no of array element (n)************
    (1-(4/v_SYMPTOM)));
    end loop;
    commit;
    end DISEASE_DTL;
    Please give the proper solution and step ..
    Thanking you,
    Asish

    I've haven't properly read through your code but here's an artificial example based on a sql collection of object types - you don't need that, you just need a type table of varchar2 rather than a type table of oracle object type:
    http://orastory.wordpress.com/2007/05/01/upscaling-your-jdbc-app/

  • How to display the contents of java.util.list in a frame???

    i should use awt only not applet...
    i need to display the contents of java.util.list in a frame...
    the contents contains rows queried from a oracle database.....
    the contents should be displayed similar to how a lable is displayed..
    please help me out..
    thanks
    dinesh

    Of course there is something in AWT:
    http://java.sun.com/j2se/1.5.0/docs/api/java/awt/List.
    htmlagain, if you carefully read the question, he needs a
    table to display a JDBC result set. There is no
    pre-made table component in AWT.Well, I read that he filled the data into a java.util.List and now wants to display this list. So a List-component should be sufficient. But I might be wrong...
    -Puce

  • How to pass attribute values through variables in JSP  Custom TagLib

    Hi,
    Can anybody help me how to pass values through varuables in the jsp custom tag.
    i am using JSP custom tag. I am unable to pass attribute values through variables.
    <invitation:invdetails invid="<%=invid%>"/> The value is passing as <%=invid%> ,not value of the invid.
    But i am getting throuh the fllowing
    <invitation:invdetails invid='1' />
    Please anybody suggest me how to pass value by using the variable.

    Hi,
    It sounds like you need to set the <rtexprvalue> tag to true in the TLD for your tag. If you do this the tag will read in the value you are trying to pass to it.
    dapanther...

  • How to pass native struct to java

    Hey guys,
    I've got a legacy C++ prog that outputs structs to a binary file & I've got a header file defining that struct.
    I want to read the file and get the structs via java but I've never used any interface between the languages.
    All I've managed to come up in my searches is "how to pass java objects to c", well how do I do the opposite?
    Help appreciated

    I hear you calling me :)
    If this interests you I'll explain the problem from the beginning-
    I already have a C prog which outputs a HUGE binary file (therefore text is probably not a good idea),
    this file consists of a header followed by some number (defined in the header) of a certain struct (consisting of ~20 fields ints, longs, strings...)
    Another C program exists that reads this file. I am currently building some sort of visual interpretation of the data using java.
    As all C code is quite heavy duty [and works like it should :)], and a few other reasons, I do not want to change it.
    That leaves me with an existing file containing binary data I need to read into the Java UI.
    sztejkat > Why use native code?
    I would have really wished I could do this entirely in Java, as for portability - it doesn't have much consideration, just in terms of "clean" programming.
    As you said struct packing is something unpredictable, therefore I do not see a way of reading one without using C.
    bschauwejava > I suggest you try to be less vague about the results you are getting.
    Sorry :)
    This is the structure: File (package) -> File.java, InsInfo.java (classes)
    I'm using "javac File.java"
    And I'm getting:
    File.java:3: cannot resolve symbol
    symbol : class InsInfo
    location: package File
    import File.InsInfo;
    ^
    File.java:20: cannot resolve symbol
    symbol : class InsInfo
    location: class File.File
    public native InsInfo readIns();
    ^
    2 errors
    (the arrows actually point to the first letter in the class name)
    If I use "Object" instead of "InsInfo" javac compiles the .class without problems.
    I'm using Jbuilder and inside it the import is OK. When I compile it with Jbuilder everything is OK.
    I actually haven't thought of this until now, I'll try to use the .class Jbuilder produces to generate the header.
    btw- Thanks for getting so involved!!

  • How to create a node in java.util.prefs.Preferences  -- Need Help !!

    Hi All
    I want to know the way of implementing a Node using java.util.prefs.Preferences , and need to store a value.
    Your Help wil be greatly appreciated
    best Regards
    Madumm

    http://java.sun.com/j2se/1.5.0/docs/api/java/util/prefs/Preferences.html

  • How to create attribute & set types with customer namespace COMM_ATTRSET?

    Hi CRM Gurus,
    I want to create some attributes and set types on CRM system with
    `/FITGL/` namespace but system is not allowed to create objects
    according. After debugging derives that SAP standart coding given below
    on LCOM_ATTRIBUTE_NEWF19 include.
    IF ( lv_systemname <> gc_sap_system ) AND
           ( iv_object_name(1) <> 'Y' AND iv_object_name(1) <> 'Z' ).
    Should we make an enhancement on this include? Is there any side
    efffects of this enhancement creating attribute & set types on CRM
    system during the packaging in terms of related with other attribute & set types objects?
    Kind Regards,
    Fahrettin

    Hi CRM Gurus,
    I want to create some attributes and set types on CRM system with
    `/FITGL/` namespace but system is not allowed to create objects
    according. After debugging derives that SAP standart coding given below
    on LCOM_ATTRIBUTE_NEWF19 include.
    IF ( lv_systemname <> gc_sap_system ) AND
           ( iv_object_name(1) <> 'Y' AND iv_object_name(1) <> 'Z' ).
    Should we make an enhancement on this include? Is there any side
    efffects of this enhancement creating attribute & set types on CRM
    system during the packaging in terms of related with other attribute & set types objects?
    Kind Regards,
    Fahrettin

  • How to pass a complex type as input for a Java class in Oracle 11g?

    Hi All,
    This is my Parent Class..
    package ADFapplnPackage.model;
    public class ParentClass {
    String Name;
    int age;
    public ParentClass() {
    super();
    This is my ChildClass :
    package ADFapplnPackage.model;
    public class ChildClass {
    public ChildClass() {
    super();
    public ParentClass display() {
    ParentClass obj=new ParentClass();
    obj.age=20;
    obj.Name="Sabari";
    return obj;
    I have exposed both of them as webservices.
    When I call the display object in the parent class,
    I am getting 'parent' as the response.. I mean that ,only the word 'parent' is at the response. I couldnt find any elements (i mean the age and name) in the output.
    if my function 'display' in the child class is like
    public String display() {
    return "hello";
    then it is working fine. I am getting "hello" in the response. Why is the webservice supporting only standard datatypes.. and not Class datatypes.
    Kindly help me!!
    Thanks ,
    Sabarisri. N

    Hi,
    You can't do that with OLEDB. None of OLEDB providers has such a feature.
    Yuancai (Charlie) Ye
    Use of free SocketPro package for creating super client and server application,
    See 30 well-tested and real OLEDB examples
    at http://www.udaparts.com

  • How to pass RECORD input type to stored procedure from JDBC?

    Hi,
    We have stored procedure which takes RECORD as input .
    We could execute the below script from oracle client tool and get the response.
    declare
    l_record app.batch_update.add_record;
    l_id number;
    begin
    -- memberNumber
    l_record.no := '123456700';
    -- Policy Number
    l_record.pno := '1234567'
    -- Status. This will always be NEW.
    -- Call to API to add record
    app.batch_update.add_request
    (p_record => l_record,
    p_id => l_id,
    end;
    We have requirement to construct RECORD input from Java application and pass it to callable statement.
    We have tried to construct it via STRUCT and pass it to callable statement but it didn't work.
    We have constructed it like the following but not sure whether it is correct. It was throwing error "java.sql.SQLException: invalid name pattern: app.batch_update.add_record
    StructDescriptor structdesc = StructDescriptor.createDescriptor
    ("app.batch_update.add_record", delConn);
    Object[] p1obj = {' 12345','124050'};
    STRUCT p1struct = new STRUCT(structdesc, delConn, p1obj);
    Not sure whether I am doing the logic correctly.
    Please point me to the correct approach.
    Thanks in Advice
    Thanks

    Wrap the method using a record-type parameter in PL/SQL; a simplified example follows. Add exception handling, translation of types etc. as needed.
    CREATE OR REPLACE PROCEDURE prc_wrap_prc_using_rec
    pv_my_field_01 IN VARCHAR2,
    pv_my_field_02 IN VARCHAR2,
    pv_my_field_99 IN VARCHAR2,
    pv_err_msg OUT VARCHAR2
    ) AS
    -- Non-scalar parameter
    pr_my_record user.pkg_rec_declarations.wr_a_record_decl;
    BEGIN
    -- Load the work record
    pr_my_record.pv_field_01 := pv_my_field_1;
    pr_my_record.pv_field_02 := pv_my_field_2;
    pr_my_record.pv_field_99 := pv_my_field_99;
    -- Call the procedure
    pkg_std_routines.prc_do_sumfin(pr_my_record, pv_err_msg);
    END;

  • How to pass complex data type structure to WebService under mx:request?

    From my Flex client, I need to pass data to a web service whose operation expects a complex data type with multiple layers of nesting structure. How can I populate the <mx:request> for the <mx:WebServices>? Any examples?
    A couple of approaches come to my mind:
    (1) construct ActionScript object to mimic the datatype expected by web service, and pass an instance of the AS object to mx:request; or
    (2) construct an entire SOAP request body in XML and pass it into mx:request.
    Does any of these (or both) work? If both work, which is the better way?
    Thanks in advance for your input!
    -William

    Thanks a lot for the rapid response, Marcel.
    For further details on the maping between WS complexType structure and AS object, is there any specific requirement? such as naming, binding, structure of nesting, etc.
    William

Maybe you are looking for

  • Line item needs to be dispalyed for varient values

    Hi The requirement of the customer is to get the varient values as line item in sales order with main item. Thanks Rambabu

  • How to assign a default value on a Tabular Report?

    version 3.2.1 I have a column in a Tabular Report (SQL Query (updateable report) ) that I would like to default to a value every time that the Add Rows button is clicked. This column needs to have the same value for every row. How do I set a default

  • Problems with gettting priority-header

    Hi! Why do I get a NullpointerException when I'm trying to get the X-Priority-Header? I use the following code: String s[] = messages.getHeader("X-Priority") ; String sPriority = s[0]; if (sPriority == null) System.out.println("NULL!"); else System.o

  • Netweaver mobile 7.1 download path in market place

    hi all where can i  download  the  the newly released netweaver mobile 7.1. is it available for download or we need to only order from sap? thanks santosh

  • Ipad2 not charging or syncing

    I got an ipad2 for christmas, has been fantastic.  It now has decided not to charge either on the computer or the power.  Occasionally it will partially charge on power if it is turned off.  When connected to my computer, it doesnt register with itun