• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

set value for a hidden field

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to fill a hidden field with a value from the resource file. But it doesn't work.
I get always a runtime error for the JSP File.

<html:hidden property="filenamesave" value="<bean:message key="path.pictures"/>" />

It this possible ? Or is there another way to set the value at runtime ?

Thanks
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem is with placing one struts tag inside another. You can't do that.

Here's the good news: since you are setting the value of the hidden field yourself, you do not need the html:hidden tag because its only added value is in prepopulation... which you're doing yourself.

You can instead use:
<input type="hidden" name="filenamesave" value='<bean:message key="path.pictures"/>'/>

This will accomplish the equivalent of what you were attempting.
 
Georg Joo
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I didn't knew that I can not use a struts tag inside another.

Thanks a lot for the information and help

Georg
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic