• 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

bean:write property

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.

I'm working in an application based on Struts 1.1 framework, and i'm getting an error when using bean:write tag on a getter method of a model bean who operates over a map like this.

public class MyModelClass extends Serializable {
...
...
private Map data;
...
...
public String getData() {
return data.get(DefaultValue);
}
public String getData(String s) {
return data.get(s)
}
...
...
}

after this, in the Action layer i do this

public class MyAction extends Action {
...
MyModelClass myModelClass = .....
request.setAttribute("mymodelclass", myModelClass)
...
}
then in the jsp file i try this and doesn't work...

bean:write name="mymodelclass" property="data(en)"

Someone know's how to instantiate the getData(String s) in a correct way???

Thanks!!!
 
Rafa Barcel� Bauz�
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry!!! fail saloon!!!
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any responses should be posted to this topic
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic