Re: File Upload and DynaActionForm?
I don't believe that DynaActionForm supports the org.apache.struts.upload.FormFile type. See: http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_action_form_classes -Rob Carl-Eric Menzel wrote: Hello, I'm having trouble getting file upload working when using a DynaAction form. Here are the relevant parts: ...and in the tile: It worked before, only without the file upload stuff - that is a new addition. Now that I added this FormFile property, I get the following from the tile: [ServletException in:/pages/editor/editPoll.jsp] No getter method for property tickets of bean org.apache.struts.taglib.html.BEAN' Any ideas on what I might be doing wrong? Thanks Carl-Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File Upload and DynaActionForm? - Bug in DynaActionForm?
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: 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File Upload and DynaActionForm?
Hello Carl-Eric, What browser you used for testing? Opera have bug when upload field in form is null. Wednesday, February 18, 2004, 5:45:24 AM, you wrote: CEM> Hello, CEM> I'm having trouble getting file upload working when using a DynaAction CEM> form. Here are the relevant parts: CEM> name="pollForm" CEM> type="org.apache.struts.action.DynaActionForm" CEM> > CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> CEM> type="org.apache.struts.upload.FormFile"/> CEM> CEM> ...and in the tile: CEM> It worked before, only without the file upload stuff - that is a new CEM> addition. Now that I added this FormFile property, I get the following CEM> from the tile: CEM> [ServletException in:/pages/editor/editPoll.jsp] No getter CEM> method for property tickets of bean CEM> org.apache.struts.taglib.html.BEAN' CEM> Any ideas on what I might be doing wrong? CEM> Thanks CEM> Carl-Eric -- Best regards, A3Tmailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File Upload and DynaActionForm?
Did you change the form definition to enctype="multipart/form-data" yet? --- Carl-Eric Menzel <[EMAIL PROTECTED]> wrote: > > Hello, > > I'm having trouble getting file upload working when using a DynaAction > form. Here are the relevant parts: > > name="pollForm" > type="org.apache.struts.action.DynaActionForm" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > type="java.lang.String"/> > > type="org.apache.struts.upload.FormFile"/> > > > ...and in the tile: > > It worked before, only without the file upload stuff - that is a new > addition. Now that I added this FormFile property, I get the following > from the tile: > [ServletException in:/pages/editor/editPoll.jsp] No getter method for > property tickets of bean org.apache.struts.taglib.html.BEAN' > > Any ideas on what I might be doing wrong? > > Thanks > Carl-Eric > -- > Carl-Eric Menzel * OpenPGP KeyID 808F4A8E * Encrypted Messages Preferred > | "Of course, on the system *I* administrate, vi is symlinked to | > | ed. Emacs has been replaced by a shell script which 1) Generates a | > | syslogmessage at level LOG_EMERG; 2) reduces the user's disk quota | > | by 100K; and 3) RUNS ED!" - Patrick J. LoPresti | > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]