Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes OO, Patterns, UML and Refactoring and the fly likes bean:write property Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "bean:write property " Watch "bean:write property " New topic
Author

bean:write property

Rafa Barcel� Bauz�
Greenhorn

Joined: Aug 09, 2006
Posts: 22
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

Joined: Aug 09, 2006
Posts: 22
sorry!!! fail saloon!!!
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Any responses should be posted to this topic
 
jQuery in Action, 2nd edition
 
subject: bean:write property