*/
public Object render(GWTJahiaWorkflowHistoryItem model, String property, ColumnData config,
int rowIndex, int colIndex,
ListStore<GWTJahiaWorkflowHistoryItem> gwtJahiaWorkflowHistoryItemListStore,
Grid<GWTJahiaWorkflowHistoryItem> gwtJahiaWorkflowHistoryItemGrid) {
final GWTJahiaNode wrapper = (GWTJahiaNode) model.getProperties().get("nodeWrapper");
if (wrapper != null) {
return new Label(wrapper.getDisplayName() + " (" + wrapper.getPath() + ")");
}
List<GWTJahiaWorkflowHistoryItem> models = gwtJahiaWorkflowHistoryItemListStore.getModels();
for (final GWTJahiaWorkflowHistoryItem historyItem : models) {
final GWTJahiaNode nodewrapper = (GWTJahiaNode) historyItem.getProperties().get("nodeWrapper");
if (nodewrapper!=null && historyItem.getProcessId().equals(model.getProcessId()) &&
historyItem instanceof GWTJahiaWorkflowHistoryProcess) {
Button button = new Button(Messages.get("label.preview"));
button.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
String path = nodewrapper.getPath();
String locale = JahiaGWTParameters.getLanguage();
JahiaContentManagementService.App.getInstance().getNodeURL("render", path, null, null,
"default", locale, new BaseAsyncCallback<String>() {
public void onSuccess(String url) {
Window window = new Window();