>Thanks for your response Gary. Maybe I misunderstand your suggestion, but
>I think you are telling me how to get "userName". But here's my real
>question: don't you end up writing code like:
>
>String userName = getBean("sessionScope.userName");
>if (userName == null) return "loggedOff";
>
>in *every* action method in *every* backing bean of the application?
>
>So I want to know is there a good way to not have to write this so many
>times (other than by extending AbstractViewController etc. as I mentioned
>in my original note..)..? Am i not making sense..(:(
Oh, sorry. I missed the topic. A Shale "preprocess" filter command would be a
good way to implement this assuming that you're using the
ShaleApplicationFilter. The filter command is an implementation of the chain
Command interfaces. The usecase has an example of how you would register a
command.
Take a look at the WEB-INF/chain-config.xml in the usecase's.
Gary
>
>>
>> Gary
>>
>Thanks again,
>Geeta
--- Begin Message ---
[EMAIL PROTECTED] (Gary VanMatre) wrote on 09/09/2005 11:49:12 AM:
> There are several ways to handle this, maybe too many options:
>
> From a view controller:
>
> String userName = getBean("sessionScope.userName");
Thanks for your response Gary. Maybe I misunderstand your suggestion, but
I think you are telling me how to get "userName". But here's my real
question: don't you end up writing code like:
String userName = getBean("sessionScope.userName");
if (userName == null) return "loggedOff";
in *every* action method in *every* backing bean of the application?
So I want to know is there a good way to not have to write this so many
times (other than by extending AbstractViewController etc. as I mentioned
in my original note..)..? Am i not making sense..(:(
>
> Gary
>
Thanks again,
Geeta
--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]