struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <maili...@matthias-wessendorf.de>
Subject RE: Resources from ActionForm
Date Wed, 07 Jan 2004 14:49:50 GMT
hi,

in an actionForm.validate():

MessageResources res =
(MessageResources) request.getAttribute(GLOBALS.MESSAGES_KEY); //thats
default-key

String foo = res.getMessage("my_Key_In_bundle");
//get an message

greetings


-----Original Message-----
From: e-denton Java Programmer [mailto:java-programmer@e-denton.com] 
Sent: Wednesday, January 07, 2004 3:42 PM
To: Struts Users Mailing List
Subject: Resources from ActionForm


Hi,

I want to access a resource bundle (key=PORTAL_RESOURCES) from an
ActionForm to pull out display names for error messages (ActionError). I
can't see how to access the resource bundle and pull out the strings I
want.

Thanks for your help.

Will


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


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


Mime
View raw message