Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Link with html:param retrieved from localized properties

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm using Struts 1.3.8 and I'm having a problem creating a localized link.

I'm using LookupDispatchAction as follows:

Then in my code I have the following:

My config:

My Properties:

Now everything works ok in english, because the link will be created with parameter "step=Search" and it will match the localized value retrieved in "getKeyMethodMap" method of the action.

Now if I change language to ES, I have a problem ... the link will still be generated as "step=Search" (it's hardcoded) but the "getKeyMethodMap" method of the action will retrieve "Busca", and so when I click, I receive an error 500:

Error 500: Action[/ScreenSearch] missing resource in key method map

So my question is, how can I use html:param with a value retrieved from localized resource properties of struts?

I mean, something like:

<html:param name="step" value="<bean:message key='jsp.screen_search.submit' />" />

So that it generates:

At this time, language ES will generate html like:

And I need something like:

Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic