struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wbchm...@Ensign-BickfordInd.com
Subject RE: Starter question
Date Thu, 13 Jun 2002 20:49:37 GMT

Oh yeah,

Another thing that helps me personally is to refactor mercilessly in the 
beginning and keep reading best practices...

I still suck, but I am getting there...



-----Original Message-----
From: tbaskan [mailto:tbaskan@superonline.com]
Sent: Thursday, June 13, 2002 4:22 PM
To: struts-user
Subject: RE: Starter question


My bad.. Without "name" property <action> does the job for me now. I
wonder what you meant by "does not necessarily cover good practices".
Would you spot on this a little?

/tb.

On Thu, 2002-06-13 at 20:51, wbchmura@Ensign-BickfordInd.com wrote:
> 
> Unless you are submitting the request from a form you do not need an 
> actionform that I know of.
> 
> If you are always displaying the same list i think you want to:
> 
> Invoke the action
> The actions perform method should get a collection of beans 
representing 
> each row in the database.  
> You then stuff the collection into an attribute in the session
> the forward action should send you to the JSP page to display it where 

> you iterate through it using the html taglib in struts...
> 
> This is in a nutshell and does not necessarily cover good practices 
but 
> it will get you working
> 
> 
> 
> 
> 
> -----Original Message-----
> From: tbaskan [mailto:tbaskan@superonline.com]
> Sent: Thursday, June 13, 2002 1:26 PM
> To: struts-user
> Subject: Starter question
> 
> 
> Hello everyone,
> 
> I'm a beginner for Struts and can't still figure out how to do simple
> things with the framework.
> 
> My difficulties are generally related with MVC, I think.
> 
> For traning, I want to accomplish probably the easiest dynamic page 
for
> a web application: a page that shows some portion of a database table.
> 
> To my understanding, I need the following:
>  1. a model object must have a static method that fetches rows 
>     from the database table and puts them in a Collection object.
>  2. a JSP page containing <logic:iterate> tags to iterate over this
>     Collection.
> 
> Now.. My real problem is how to attach these together.
> 
> I decided to do this with an Action. I mean, when user hits a page 
like
> /myapp/groupList.do, the Action's perform method gets the Collection
> from model and sets it as a PageAttribute. But failed. Every <action> 
in
> configuration file needs a "name" property, which is an ActionForm. Do 
I
> need an ActionForm in this case?
> 
> I need some enlightening.
> 
> /tb.
> 
> 
> 
> 
> 
> 
> --
> 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