Hi If any one has used the Display Tags with Spring .
Please help me ..
I am populating data in the form of HashMap as a Model.
How can I populate data in the Display Tags.
My Code for Data is :--
public class InventoryController implements Controller {
protected final Log logger=LogFactory.getLog(getClass());
private ProductManagerService productManager;
public void setProductManager(ProductManagerService productManager) {
this.productManager = productManager;
}
public ModelAndView handleRequest(HttpServletRequest Request,HttpServletResponse response)throws ServletException,IOException
{ String now=(new Date().toString());
logger.info("Returning hello view"+now);
Map myModel = new HashMap();
myModel.put("now", now);
myModel.put("products", this.productManager.getProducts());
return new ModelAndView("hello", "model", myModel);
}
}
For Displayig data i have code as :--
<h3>Products</h3>
<h2>Display Tag Start</h2>
<display:table name="products">
<display:column property="description" /><c:out value="${model.products.description}"/>
<display:column property="price"/><c:out value="${model.products.price}"/>
</display:table>
<h2>Display tag end </h2>


Reply With Quote