public void load( String cellId, Object data, ITableColumn col, IContext ctx, int idxRow, int idxCol) { String value = PropertyAccessor.retrieveString(data, col.getProperty()); ctx.innerHtml(cellId + DOT_SPAN, value); if (StringUtils.isNotEmpty(propertyName)) { String tooltip = PropertyAccessor.retrieveString(data, propertyName); ctx.setAttribute(cellId, "title", tooltip); Tooltip tip = new Tooltip(tooltip); if (StringUtils.isNotEmpty(lineSeperator)) { tip.setShowBody(lineSeperator); } col.setTooltip(tip); tip.setTrackMouseMovement(true); String js = "jQuery(" + JSUtil.jQuery(cellId) + ").tooltip(" + tip.getJQueryParameter() + ");"; ctx.sendJavaScript(cellId, js); } }
public String generateHTML(ITableColumn col, String cellId, int idxRow, int idxCol) { IContext ctx = col.getPage().getContext(); String title = ctx.processValue(cellId + DOT_SPAN + ".title"); String value = ctx.processValue(cellId + DOT_SPAN); String shortValue = ctx.processValue(cellId + DOT_SPAN); return "<span " + JSUtil.atId(cellId + DOT_SPAN) + " title=\"" + title + "\">" + value + "</span>"; }