Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to implement server side rendering?

implement rendering server
0
Posted

How to implement server side rendering?

0

Its’ very easy. Just write HTML code rendering component on server side (it may be JSP or any templating engine) and pass generated HTML to GWT client side via GWT RPC. Now when you have the generated HTML write the following class: public class ServerSideContentRenderer extends DefaultGridRenderer { private String html;// HTML tbody content rendered on server side public ServerSideContentRenderer(EditableGrid grid, String html) { super(grid); this.html= html; } public void drawContent(GridDataModel model) { DOM.setInnerHTML(getTBodyElement(),html); } } Note if use at least one editable column you have to fill a data model with correct data, i.e. you need two copies of data: original and rendered as HTML. Now assign the new renderer to your grid using the EditableGrid.setGridRenderer() method.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123