Mark:
Maybe you should try using the x:saveState tag. In
the Struts apps that we have at work, we have a user
object that gets created in a filter and put in to
session. Then the app accesses the user object when
it needs to. Well, I'm at home trying to mimick some
of the things that we do as a proof of concept. So I
have a login page that has a login request scope bean.
Then when the user types in a valid user id and
password it builds the user object and puts it in
session. The login page works fine if the login bean
had session scope but didn't work if it was request
scope. Following the advice from a couple of days ago
on this list I tried the x:saveState tag and poof, it
works like a champ. Here is the tag that I have for
the request scope login bean on the login page.
<x:saveState id="userBean" value="#{user}"/>
It sounds like this might be what you are looking for.
Ray
--- mfaine <[EMAIL PROTECTED]> wrote:
> On Thu, 3 Feb 2005 00:12:50 -0600, Heath Borders
> <[EMAIL PROTECTED]>
> wrote :
>
> > I think what he's saying is that if you have a
> request-scoped bean
> > that needs to reference a session scoped bean.
> You can have JSF
> > automatically set the request-scoped bean's
> property upon creation
> > with the managed-property facility.
> >
>
> Shouldn't this happen with request scope to request
> scope bean associations
> as well? If I set a parameter on a commandButton,
> shoudn't it be passed as
> a request parameter? I have not been able to get
> JSF to automatically set a
> request-scoped bean's property upon creation from a
> request parameter using
> the managed property facility.
>
> If I understand correctly this:
>
> <h:commandButton id="somebutton"
> action="#{bean.someAction}"
> actionListenter="#{bean.someActionListener}" >
> <f:param name="someParam"
> value="#{bean.someProperty}" />
> </h:commandButton>
>
> Should result in request parameter "someParam" being
> sent to the result of
> the navigation outcome of "someAction"?
>
> I've had to employ what I see as a hack. In the
> first request scope managed
> bean I set a property to a session scoped managed
> bean and save my object
> within this session scoped object. Then I have the
> managed bean facility
> set this property in the second request-scoped bean.
> I should however just
> be able to set this property using
> #{param.someParam} but it always returns
> null. This means that in addition to having an
> additional otherwise useless
> session bean hanging around, I also have to litter
> my code with lines that
> set and null the session scoped bean's property and
> that is not good.
>
>
> -Mark
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com