struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl-Eric Menzel <cm-strutsuserl...@bitforce.com>
Subject Re: File Upload and DynaActionForm? - Bug in DynaActionForm?
Date Wed, 18 Feb 2004 17:36:53 GMT

An update on this: I tried listing all the DynaProperties in my form
like this:

DynaProperty[] dprops = dform.getDynaClass().getDynaProperties();
for (int i = 0; i < dprops.length; i++)
{
    log.debug("" + dprops[i].getName() + ": " + dprops[i].getType());
}

This is what I get:

18:29:01,963 DEBUG EditPollAction:86 - ticketRequired: class java.lang.Boolean
18:29:01,966 DEBUG EditPollAction:86 - owner: class java.lang.String
18:29:01,969 DEBUG EditPollAction:86 - ownerId: class java.lang.Long
18:29:01,972 DEBUG EditPollAction:86 - command: class java.lang.String
18:29:01,974 DEBUG EditPollAction:86 - fieldZip: class java.lang.Integer
18:29:01,977 DEBUG EditPollAction:86 - introText: class java.lang.String
18:29:01,980 DEBUG EditPollAction:86 - version: class java.lang.Integer
18:29:01,983 DEBUG EditPollAction:86 - fieldCell: class java.lang.Integer
18:29:01,986 DEBUG EditPollAction:86 - active: class java.lang.Boolean
18:29:01,989 DEBUG EditPollAction:86 - fieldEmail: class java.lang.Integer
18:29:01,991 DEBUG EditPollAction:86 - destinationPgId: class java.lang.Long
18:29:01,994 DEBUG EditPollAction:86 - newEditorId: class java.lang.Long
18:29:01,997 DEBUG EditPollAction:86 - endText: class java.lang.String
18:29:02,000 DEBUG EditPollAction:86 - addressText: class java.lang.String
18:29:02,029 DEBUG EditPollAction:86 - editorsToRemove: class [Ljava.lang.Long;
18:29:02,031 DEBUG EditPollAction:86 - fieldLast: class java.lang.Integer
18:29:02,034 DEBUG EditPollAction:86 - fieldAddress2: class java.lang.Integer
18:29:02,037 DEBUG EditPollAction:86 - pollid: class java.lang.Long
18:29:02,039 DEBUG EditPollAction:86 - fieldCountry: class java.lang.Integer
18:29:02,042 DEBUG EditPollAction:86 - fieldAddress1: class java.lang.Integer
18:29:02,045 DEBUG EditPollAction:86 - locale: class java.lang.String
18:29:02,047 DEBUG EditPollAction:86 - theme: class java.lang.String
18:29:02,050 DEBUG EditPollAction:86 - fieldState: class java.lang.Integer
18:29:02,052 DEBUG EditPollAction:86 - fieldCity: class java.lang.Integer
18:29:02,055 DEBUG EditPollAction:86 - futureContactText: class java.lang.String
18:29:02,058 DEBUG EditPollAction:86 - fieldPhone: class java.lang.Integer
18:29:02,060 DEBUG EditPollAction:86 - fieldFirst: class java.lang.Integer
18:29:02,063 DEBUG EditPollAction:86 - commandParam: class java.lang.String
18:29:02,065 DEBUG EditPollAction:86 - name: class java.lang.String

...which is correct, except that the tickets field is missing, even
though it is properly declared in struts-config.xml:

        <form-bean
                name="pollForm"
                type="org.apache.struts.action.DynaActionForm"
            >
            <form-property name="active" type="java.lang.Boolean"/>
            <form-property name="name" type="java.lang.String"/>
            <form-property name="version" type="java.lang.Integer"/>
            <form-property name="pollid" type="java.lang.Long"/>
            <form-property name="owner" type="java.lang.String"/>
            <form-property name="ownerId" type="java.lang.Long"/>
            <form-property name="editorsToRemove" type="java.lang.Long[]"/>
            <form-property name="newEditorId" type="java.lang.Long"/>
            <form-property name="addressText" type="java.lang.String"/>
            <form-property name="introText" type="java.lang.String"/>
            <form-property name="endText" type="java.lang.String"/>
            <form-property name="fieldAddress1" type="java.lang.Integer"/>
            <form-property name="fieldAddress2" type="java.lang.Integer"/>
            <form-property name="fieldCell" type="java.lang.Integer"/>
            <form-property name="fieldCity" type="java.lang.Integer"/>
            <form-property name="fieldCountry" type="java.lang.Integer"/>
            <form-property name="fieldEmail" type="java.lang.Integer"/>
            <form-property name="fieldFirst" type="java.lang.Integer"/>
            <form-property name="fieldLast" type="java.lang.Integer"/>
            <form-property name="fieldPhone" type="java.lang.Integer"/>
            <form-property name="fieldState" type="java.lang.Integer"/>
            <form-property name="fieldZip" type="java.lang.Integer"/>
            <form-property name="destinationPgId" type="java.lang.Long"/>
            <form-property name="command" type="java.lang.String"/>
            <form-property name="commandParam" type="java.lang.String"/>
            <form-property name="locale" type="java.lang.String"/>
            <form-property name="theme" type="java.lang.String"/>
            <form-property name="futureContactText" type="java.lang.String"/>
            <form-property name="ticketRequired" type="java.lang.Boolean"/>
            <form-property name="tickets" type="org.apache.struts.upload.FormFile"/>
        </form-bean>

What's going wrong here - why isn't it picking up that field?

Thanks
Carl-Eric
-- 
Carl-Eric Menzel * OpenPGP KeyID 808F4A8E * Encrypted Messages Preferred
| "Political language... is designed to make lies sound truthful and   |
|  murder respectable, and to give an appearance of solidity to pure   |
|  wind.                                               - George Orwell |


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message