struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Husted <hus...@apache.org>
Subject Re: Struts action populate a list then display the jsp
Date Mon, 01 Oct 2001 16:20:21 GMT
The best thing is to link only to ActionMappings and never to JSPs. Then
they can only bookmark the mapping. If anything is missing, it is much
easier to handle that from an Action than from a JSP.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/


Peter Pilgrim wrote:
> 
> Chicken and the egg
> 
> I have a data source and bean with a list of items
> One JSP view that list the content of the data source.
> I have one action.
> 
> I want to allow the user to choose an element from the data source.
> My action populates the bean with the items, then go to the view.
> The problem is that the user bookmarks the view and of course
> there is no data in the bean. How do you populate the bean
> without going into the action first?
> 
> What is the best practice of populating an a bean from the data
> source?
> 
> Can you inside a JSP get a reference to an action or ask
> Struts to create it if it has not done it yet? If you can do
> that then you could call the action by pseudo action
> to populate the bean?
> 
> Can you call an action without an action form?
> 
> --
> Peter Pilgrim          |  |        ++44 (0)207-545-9923
>             .... \  \  ___   /  / ... .
>             -   ----  ( * )  ---   --
> _____________________________Cafe_Savannah,_San Antonio,Ibiza__
> 
> --
> 
> This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender immediately
and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.

Mime
View raw message