Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 73195 invoked from network); 13 Jun 2003 13:02:59 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 13 Jun 2003 13:02:59 -0000 Received: (qmail 28201 invoked by uid 97); 13 Jun 2003 13:05:16 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@nagoya.betaversion.org Received: (qmail 28193 invoked from network); 13 Jun 2003 13:05:15 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 13 Jun 2003 13:05:15 -0000 Received: (qmail 71307 invoked by uid 500); 13 Jun 2003 13:02:35 -0000 Mailing-List: contact struts-user-help@jakarta.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 struts-user@jakarta.apache.org Received: (qmail 71280 invoked from network); 13 Jun 2003 13:02:34 -0000 Received: from rapier.b-i.co.za (HELO ctmail.b-i.co.za) (66.8.25.34) by daedalus.apache.org with SMTP; 13 Jun 2003 13:02:34 -0000 Received: (qmail 9538 invoked from network); 13 Jun 2003 13:02:30 -0000 Received: from unknown (HELO alen) (66.8.87.58) by 0 with SMTP; 13 Jun 2003 13:02:30 -0000 Message-ID: <047201c331ac$06bb73f0$021b0a0a@home.fuzzylogic.co.za> From: "Alen Ribic" To: "Struts Users Mailing List" References: <99E5EB82CE45D511845F00508BE95B4C9F3742@CTPNT002> Subject: Re: Get request property value into Hidden field? Date: Fri, 13 Jun 2003 15:02:19 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ----- Original Message ----- From: "Krishnakumar N" To: "Struts Users Mailing List" Sent: Friday, June 13, 2003 2:12 PM Subject: RE: Get request property value into Hidden field? > Its considered "best practice" to always route the requests thru an action > mapping which can be just an empty forward as follows: > > will this automatically create a "deleteForm" bean with my "id" parameter and store it as an request/session attribute? then I understand how the will get populated. --Alen > > Coz then you are able to add processing logic later (if the need arises) by > changing the action mapping without touching the pages which have the link. > > In your case, this mechanism would help populate the action form > (deleteform) with the id value. > > Cheers, > Krishna > > > -----Original Message----- > > From: Alen Ribic [mailto:alenr@mweb.co.za] > > Sent: Friday, June 13, 2003 4:35 PM > > To: Struts Users Mailing List > > Subject: Re: Get request property value into Hidden field? > > > > > > why do I need to go the action before I have given the user a > > e.g. delete > > "yes/no" option? > > my deleteItem.jsp?id=20 gives them the ui yes/no options. > > is this because I would need to set the form bean as a > > attribute there or? > > something like this in action method... > > request.setAttribute("deleteForm", new > > Item().setId(request.getParameter("id"))); > > then forward to the deleteItem.jsp page? > > is this necessary? > > because after that I need to post again to delete the actual > > object from > > persistence storage. > > > > I know what the "id" is and that's the only info I need, and > > I just wish to > > grab into hidden field and post it to the delete action. > > > > --Alen > > > > > > > > ----- Original Message ----- > > From: "Krishnakumar N" > > To: "Struts Users Mailing List" > > Sent: Friday, June 13, 2003 1:03 PM > > Subject: RE: Get request property value into Hidden field? > > > > > > > > -----Original Message----- > > > > From: Alen Ribic [mailto:alenr@mweb.co.za] > > > > Sent: Friday, June 13, 2003 4:05 PM > > > > To: Struts Users Mailing List > > > > Subject: Re: Get request property value into Hidden field? > > > > > > > > > > > > oops. > > > > thanks. > > > > I mean getParameter() of course. > > > > > > > > It's just simply an Id that gets passed as a parameter that I > > > > will need to > > > > store in hidden field and then post of to another action method. > > > > > > > > So, it's like this. > > > > > > > > > listItems.jsp > > > > ------------------------------- > > > > ... > > > > href="./deleteItem.jsp?id=20" > > > > > > Link to a deleteItem.do, the action mapping of which has > > the same action > > > form as for the delete.do. The action can be an empty > > forward to the jsp. > > > > > > > ... > > > > ------------------------------- > > > > > > > > > deleteItem.jsp?id=20 > > > > --------------------------------- > > > > > > > > > > > > ... > > > > > > > > > > > > --------------------------------- > > > > > > > > When Struts renders the html, in browser / view source, > > > > tag > > > > doesn't store the "id" parameter value. > > > > > > > > should of course be > > > > > > > > > > > > Does this make sense? :) > > > > If not, I'll need to look into the issue a bit more myself > > > > with regards to > > > > the design. > > > > > > > > Thanks > > > > --Alen > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Krishnakumar N" > > > > To: "Struts Users Mailing List" > > > > Sent: Friday, June 13, 2003 12:27 PM > > > > Subject: RE: Get request property value into Hidden field? > > > > > > > > > > > > > request does not have a getProperty as far as I can see, so > > > > do you mean > > > > > getParameter()? > > > > > > > > > > In that case, the easy way to handle this is to get the > > > > value into the > > > > > action form (which happens automatically if the action form > > > > has a matching > > > > > property) and then populate the html:hidden from the action > > > > form (which is > > > > > also automatic, if you are on the same form). > > > > > > > > > > > > > > > > > > > > Cheers, > > > > > Krishna > > > > > > > > > > > -----Original Message----- > > > > > > From: Alen Ribic [mailto:alenr@mweb.co.za] > > > > > > Sent: Friday, June 13, 2003 1:14 PM > > > > > > To: Struts Users Mailing List > > > > > > Subject: Get request property value into Hidden field? > > > > > > > > > > > > > > > > > > Hi Everyone, > > > > > > > > > > > > How do I get a request property value into Hidden field > > > > > > without writing any > > > > > > java code. > > > > > > (no <%=request.getProperty("Id")%>) > > > > > > I tried using with combination of > > > > > > with no > > > > > > success. (maybe I was doing it wrong or something) > > > > > > > > > > > > How do I accomplish this task? > > > > > > > > > > > > Thanks > > > > > > --Alen > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: > > struts-user-unsubscribe@jakarta.apache.org > > > > > > For additional commands, e-mail: > > > > struts-user-help@jakarta.apache.org > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: > > struts-user-unsubscribe@jakarta.apache.org > > > > > For additional commands, e-mail: > > struts-user-help@jakarta.apache.org > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org > > > > For additional commands, e-mail: > > struts-user-help@jakarta.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail: struts-user-help@jakarta.apache.org > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: struts-user-help@jakarta.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: struts-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org