struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Miller" ...@howardmiller.co.uk>
Subject RE: (sigh!) another pre-populate question
Date Tue, 15 Oct 2002 20:57:06 GMT
Ahead of you, got it and using it.... 

Still in Blighty (Scotland in fact), just working far too late!!

HM

On 15 Oct 2002 at 15:53, Chappell, Simon P wrote:

> Howard,
> 
> Keep asking questions, you'll get there. :-)
> 
> Which part of the homeland do you live in? I was raised mostly in Cornwall, graduated
from Plymouth University and lived for a few years in Wiltshire before crossing the pond and
marrying one of the few Yanks with a sense of humour. :-)
> 
> The first thing that you need to do is NOT edit your struts-config.xml file by hand when
there are magnificent tools like the Struts Console available from James Holmes. Run, don't
walk to http://www.jamesholmes.com/struts/console/ download it and start working with it.
This will make life much 
easier. I'll save further advice until you've followed this advice first. :-)
> 
> Simon
> 
> -----------------------------------------------------------------
> Simon P. Chappell                     simon.chappell@landsend.com
> Java Programming Specialist                      www.landsend.com
> Lands' End, Inc.                                   (608) 935-4526
> 
> 
> >-----Original Message-----
> >From: Howard Miller [mailto:me@howardmiller.co.uk]
> >Sent: Tuesday, October 15, 2002 3:44 PM
> >To: struts-user@jakarta.apache.org
> >Subject: RE: (sigh!) another pre-populate question
> >
> >
> >Simon (we meet again)..
> >
> >Sounds very interesting, but I'm not quite there: 
> >Firstly I'm not entirely sure what you mean by separating view 
> >and edit pages. I'm 
> >actually trying to write what I think of as an edit page (it 
> >basically is setting up some 
> >parameters for a graph). But I need to load default parameters 
> >(well its worse than 
> >that I actually load an existing "user" session bean as the 
> >page parameter, as this 
> >contains all the stuff I need).
> >
> >Secondly, I do see what you mean by having a PreAction and a 
> >PostAction, but I 
> >don't see how I would set that up in the struts-config. Can 
> >you hold my hand a bit 
> >here, as it where?
> >
> >One more thing... how does the PreAction actually call the 
> >associated JSP. I seem to 
> >have a problem with this!
> >
> >Cheers... Howard
> >
> >On 15 Oct 2002 at 15:35, Chappell, Simon P wrote:
> >
> >> Howard,
> >> 
> >> Remember what I said about Scriptlets? Well, calling an 
> >action with a mode is worse and you'll be forced to watch 
> >Emmerdale farm until the cows come home as punishment! (Gotta 
> >give these folks some humour, even if they won't understand it :-)
> >> 
> >> Here's what I do, for what it's worth:
> >> 
> >> When I have view and edit pages, I separate them. Better to 
> >have two pages that don't have a bunch of <logic:equal> tags 
> >in them IMNSHO. e.g. fooDisplay.jsp and fooEdit.jsp
> >> 
> >> When I have a page foo.jsp, I create two actions: 
> >fooPreAction and fooPostAction. The fooPreAction does whatever 
> >it takes to setup for the foo.jsp (mostly sticking data into 
> >fooForm) and the fooPostAction does the actual processing. In 
> >our recent project we observed this pattern and naming 
> >convention and it worked quite well for us.
> >> 
> >> Simon
> >> 
> >> -----------------------------------------------------------------
> >> Simon P. Chappell                     simon.chappell@landsend.com
> >> Java Programming Specialist                      www.landsend.com
> >> Lands' End, Inc.                                   (608) 935-4526
> >> 
> >> 
> >> 
> >> >-----Original Message-----
> >> >From: Howard Miller [mailto:me@howardmiller.co.uk]
> >> >Sent: Tuesday, October 15, 2002 3:27 PM
> >> >To: struts-user@jakarta.apache.org
> >> >Subject: (sigh!) another pre-populate question
> >> >
> >> >
> >> >Sorry if I keep asking variatons on the same question.
> >> >
> >> >I have a JSP called "dosomething" and an associated action 
> >> >called "dosomething 
> >> >Action".
> >> >
> >> >I want to pre-load the form, but this page can be called from 
> >> >all over the place, so my 
> >> >previous page calls the action for the "dosomething" page 
> >> >directly, having a link that 
> >> >looks like "/dosomething.do?action=new". The action creates 
> >> >and pre-populates the 
> >> >bean for the form. 
> >> >
> >> >Question: (a) is this a sensible way to proceed (as far as I 
> >> >can tell it is similar to the 
> >> >method in the struts-example). and (b) How do I correctly call 
> >> >the "dosomething.jsp" 
> >> >page from the "dosomethingAction"??
> >> >
> >> >Problem is I am using "mapping.getInput()" and all I get is an 
> >> >empty page with just 
> >> >headers - no errors - weird! 
> >> >
> >> >HM
> >> >
> >> >--
> >> >To unsubscribe, e-mail:   
> >> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> >> For additional commands, e-mail: 
> <mailto:struts-user-help@jakarta.apache.org>
> > 
> > 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
> 
> 



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


Mime
View raw message