Package org.jboss.as.console.client.widgets.tables

Source Code of org.jboss.as.console.client.widgets.tables.TextLinkCell

package org.jboss.as.console.client.widgets.tables;

import com.google.gwt.cell.client.ActionCell;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;

/**
* @author Heiko Braun
* @date 10/25/11
*/
public class TextLinkCell<T> extends ActionCell<T> {

    private String title;

    public TextLinkCell(String title, Delegate<T> delegate) {
        super(title, delegate);
        this.title = title;
    }

    @Override
    public void render(Context context, T value, SafeHtmlBuilder sb) {
        SafeHtml html = new SafeHtmlBuilder()
                .appendHtmlConstant("<a href='javascript:void(0)' tabindex=\"-1\">")
                .appendHtmlConstant(title)
                .appendHtmlConstant("</a>")
                .toSafeHtml();

        sb.append(html);
    }

}
TOP

Related Classes of org.jboss.as.console.client.widgets.tables.TextLinkCell

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.