Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 80311 invoked from network); 19 Apr 2004 10:45:29 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 19 Apr 2004 10:45:29 -0000 Received: (qmail 46035 invoked by uid 500); 19 Apr 2004 10:45:09 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 45908 invoked by uid 500); 19 Apr 2004 10:45:09 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 45881 invoked from network); 19 Apr 2004 10:45:08 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.186) by daedalus.apache.org with SMTP; 19 Apr 2004 10:45:08 -0000 Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BFWGx-0003U3-00 for user@struts.apache.org; Mon, 19 Apr 2004 12:45:07 +0200 Received: from [84.128.54.137] (helo=cyberspaceroad.com) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1BFWGx-0006IO-00 for user@struts.apache.org; Mon, 19 Apr 2004 12:45:07 +0200 Message-ID: <4083AD44.2040801@cyberspaceroad.com> Date: Mon, 19 Apr 2004 12:43:16 +0200 From: Adam Hardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031021 X-Accept-Language: de MIME-Version: 1.0 To: Struts Users Mailing List Subject: Re: DispatchAction / DynaValidatorForm / Upload best practice References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:7be52423742ce504c1b541fa1f258887 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Stephane, it's not exactly clear what you are trying to achieve or what the problem is (apart from ugly code). Why do you have to fill the id field manually in the JSP via EL? It should be automatic from the form bean. Perhaps you haven't linked up the formbean and the action mapping in struts-config properly. Also, what is the html:img 'select' dispatch? Does this somehow display the image on the page? It looks recursive / infinite loop-like. Adam On 04/18/2004 10:45 PM Stephane Bailliez wrote: > I'm fighting to find a clean solution to the following problem and hope that > the experts out there can provide > > Context: > > - File upload size limit set via the struts controller > - DynaValidatorForm with properties (id, dispatch, file) > - CRUD action create/read/update/delete via DispatchAction > - create/update obviouslly use the form properties > - read/delete only need a query parameter id > - object.jsp retrieve the current value (read) of the object and propose the > form to create/update the object > - validation xml set 'file' to requiredwhen dispatch == select and dispatch > == create > > object.jsp is something like this: > > ----------------- object.jsp -------------- > > > > > > > > > > > > > > > > Not that in case of create/update success, it is forwarded to this page > again. > > I imagine it is not correct at all considering my zero experience with > Struts, but I'd be glad if someone could give me an idea of how to do > something cleaner than this absoltely ugly code. My problem is mostly to > deal with the fact that I need to retrieve the id both in the request and > the form, but I'm not satisfied with the above. > > Thanks a lot for any help. > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > -- struts 1.2 + tomcat 5.0.19 + java 1.4.2 Linux 2.4.20 Debian --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org