Hi,

What I would do is the following:
// create the button element
Element button = DOM.createButton();
// set the inner html of the button
button.setInnerHTML("<button type=\"button\">Click Me!</button>");
// add it to the safehtmlbuilder
sb.appendHtmlConstant(button.getInnerHTML());

Cheers,
Lin


On Wed, Apr 11, 2012 at 12:39 PM, Ahmed Abida <[email protected]>wrote:

> I've created a thread in stackoverflow 
> site<http://stackoverflow.com/questions/10103998/add-navigation-buttons-to-an-abstractcell>where
>  I saied:
>
> I've created an AbstractCell<String> to create the header that says
> "welcome to your mobile..." and I would like to add two buttons in this
> AbstractCell: the fist to return to the previous page, and the second to
> return to the welcome page. I've used to create the header element a class
> that extendsAbstractCell<String> using this code:
>
> public class HeaderCell extends AbstractCell<String> {
>
>     interface Templates extends SafeHtmlTemplates {
>
>         String style = "HeaderPanel";
>
>         @SafeHtmlTemplates.Template("<div class=\""+style+"\">{0}</div>")
>         SafeHtml cell(SafeHtml value);
>     }
>
>     private Templates templates = GWT.create(Templates.class);
>
>     interface templateWithButton extends SafeHtmlTemplates {
>
>     }
>     @Override
>     public void render(com.google.gwt.cell.client.Cell.Context context,
>             String value, SafeHtmlBuilder sb) {
>         SafeHtml safeValue = SafeHtmlUtils.fromString(value);
>
>         SafeHtml rendered = templates.cell(safeValue);
>
>         sb.append(rendered);
>     }
>
> }
>
> *So please if you have any answer, please post it.
> Thanks*
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/Xn1rTF7wu4IJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to