• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean:write property

 
Rafa Barcel� Bauz�
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
sorry!!! fail saloon!!!
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any responses should be posted to this topic
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic