I want to set to different data,like
SoyMapData dataFormsMenu=new SoyMapData(
"class","menu horizontal",
"caption","",
"id","dfMenu",
"innerContainer","div",
"helper","span",
"items",new SoyListData(
new SoyMapData ("caption", "Manage Dataforms",
"class", "",
"link", "#"),
new SoyMapData("caption", "viewForm",
"class", "",
"link", "#")
));
SoyMapData mainMenu = new SoyMapData(
"class","menu horizontal dropdown",
"caption","",
"id","mainMenu",
"container","div",
"contClass","navigation main left",
"items",captionData);
into model object of spring,
model.addattribute("",mainmenu);
model.addattribute("",dfmenu);
how to do this in spring.
a) you are not talking about Spring, you are talking about Spring MVC, the MVC framework built upon the Spring framework. There’s a difference.
b) you need to give the model attribute a name, e.g.
Then you can access the data from a JSP (or other view) using
${main.id}or${main[id]},depending on the inner workings of
SoyMapData