struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Lipscombe <adam.lipsco...@qucs.co.uk>
Subject Passing user data via bean:message
Date Mon, 08 Sep 2008 13:43:18 GMT
Folks


Our app uses "<bean:messsage key="xxx"/>" extensively to access database backed application

resources. This works well, but as you would expect the message that is retrieved for any
given key 
is constant.


We want to extend this so that users in different business units are shown different messages.

e.g.  Users who are part of the "Accounts" business unit see message A, while users in the
"Sales" 
business unit see message B.  AFAICS this involves passing application specific data via the

<bean:message> tag somehow.

How can I do this?


One thing that did occur to me was to use <bean:message name="<beanName>" property="propName"/>
to 
access a bean that holds all the resources for that users business unit.
But one issue is that AFAICS the bean will have a fixed set of properties that tag can reference
via 
the "property" attrib. If we have to add a new property to the resource database (which is
fairly 
frequent) I don't want to have to re-code the backing bean.


Any ideas? Canonical solutions?


TIA - Adam
-- 
Adam Lipscombe

T: 01872 575083
M: 07957 548686
E: adam.lipscombe@qucs.co.uk

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


Mime
View raw message