Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8220553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:33:33+00:00 2026-06-07T13:33:33+00:00

Please give me sample GWT2.5 application with all additional features in 2.5. Please give

  • 0

Please give me sample GWT2.5 application with all additional features in 2.5. Please give I’ve tried it for UiBinder Enhancements. But it is not working.

Please reply me as quick as possible. Its urgent

The following are the code,

MainEntryPoint

package com.MyApp.client;

import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.user.client.ui.RootPanel;


public class MainEntryPoint implements EntryPoint {


/** 
 * Creates a new instance of MainEntryPoint
 */
public MainEntryPoint() {
}

/** 
 * The entry point method, called automatically by loading a module
 * that declares an implementing class as an entry-point
 */
@Override
public void onModuleLoad() {
    final MainViewClass mainView = new MainViewClass();
    RootPanel.get().add(mainView);
}

}


MyActionCell

package com.Rajaa.client;

import com.google.gwt.cell.client.AbstractCell;
import com.google.gwt.cell.client.Cell.Context;
import com.google.gwt.cell.client.ValueUpdater;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.uibinder.client.UiRenderer;
import com.google.gwt.user.client.Window;


public class MyActionCell extends AbstractCell<String> {

interface MyUiRenderer extends UiRenderer {

    void render(SafeHtmlBuilder sb, String name);

    void onBrowserEvent(EmployeeMain o, NativeEvent e, Element p, String n);
}
private static MyUiRenderer renderer = GWT.create(MyUiRenderer.class);

@Override
public void render(Context context, String value, SafeHtmlBuilder builder) {
    renderer.render(builder, value);
}

@Override
public void onBrowserEvent(Context context, Element parent, String value,
        NativeEvent event, ValueUpdater<String> updater) {
    renderer.onBrowserEvent(this, event, parent, value);
}

public MyActionCell() {
    super("click");
}

@UiHandler("nameSpan")
void onNameGotPressed(ClickEvent event, Element parent, String name) {
    Window.alert(name + " was pressed!");
}

}


MyMainView

package com.MyApp.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.cellview.client.Column;
import com.google.gwt.user.cellview.client.TextColumn;
import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.Widget;
 import java.util.Arrays;
 import java.util.List;

public class MyMainView extends Composite {

@UiField
CellTable<Student> table;

private static EmployeeUiBinder uiBinder = GWT.create(EmployeeUiBinder.class);

interface EmployeeUiBinder extends UiBinder<Widget, MyMainView> {
}

public Employee() {
    super.initWidget(uiBinder.createAndBindUi(this));
    TextColumn<Student> nameColumn = new TextColumn<Student>() {

        @Override
        public String getValue(Student object) {
            return object.name;
        }
    };
    table.addColumn(nameColumn, "Name");

    final TextColumn<Student> ageColumn = new TextColumn<Student>() {

        @Override
        public String getValue(Student object) {
            return object.age;
        }
    };
    table.addColumn(ageColumn, "Age");

    final TextColumn<Student> addressColumn = new TextColumn<Student>() {

        @Override
        public String getValue(Student object) {
            return object.address;
        }
    };
    table.addColumn(addressColumn, "Address");

    Column<Student, String> editColumn = new Column<Student, String>(new MyActionCell()) {

        @Override
        public String getValue(Student object) {
            return "Edit";
        }
    };
    table.addColumn(editColumn, "Edit");

    table.setRowCount(DETAILS.size(), true);

    table.setRowData(0, DETAILS);
}

private static class Student {

    private final String name;

    private final String age;

    private final String address;

    public Student(String name, String age, String address) {
        this.name = name;
        this.age = age;
        this.address = address;
    }
}
private static final List<Student> DETAILS = Arrays.asList(
        new Student("xxx", "50", "vvvvvvvvv"),
        new Student("xxxxxx", "37", "dfdfdfdf"),
        new Student("xxxx", "52", "fvxfxcfxdf"));

@UiHandler("nameSpan")
void onNameGotPressed(ClickEvent event) {
    Window.alert("Yes!");
}

}


MyMainView.ui.xml

<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
    xmlns:h="urn:import:com.google.gwt.user.cellview.client">
        <ui:with field='name' type='java.lang.String'/>

<ui:style>

</ui:style>
<g:HTMLPanel>
    <h:CellTable ui:field="table"/>

‘

 <g:Button ui:field='nameSpan'><ui:text from='{name}'/></g:Button>.

</ui:UiBinder>

Thanks in advance,
Gnik

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:33:37+00:00Added an answer on June 7, 2026 at 1:33 pm

    The Google Web Toolkit documentation has been updated with the latest (for now, 2.5) version. As you said, UiBinder has new improvements.

    According to the Google blog post What’s new in GWT 2.5:

    GWT 2.5 adds extensions to UiBinder that allow it to support Cell rendering and event handling. In particular, this design enables UiBinder to generate a UiRenderer implementation to assist with rendering SafeHtml, and dispatching events to methods specified by @UiHandler tags. See Rendering HTML for Cells for more information.

    We’ve also introduced the IsRenderable/RenderablePanel types. When used by an application instead of HTMLPanel, they can significantly improve rendering time and reduce the latency of complex UiBinder UIs.

    The documentation shows multiple examples about that feature in 2.5. You can see the examples here: Rendering HTML for Cells.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can you please give me a sample application using Groovy which makes use of
Could anyone please give a sample or any link that describes how to spawn
Please give me help regarding the random error comes within my web application using
Could someone please give me some sample code that uses an output parameter in
Please give me sample code to generate UUID of long type in java without
How to call startActivityForResult() method in back button, and please give me sample on
Please give me a sample C program to produce the euro sysmbol. I'm using
could you please give me a sample code on how an Http Server(Java) receives
Please give me sample or links how to create sitemap in Sitefinity.
Can someone give me a simple example involving threads in this manner, please. Problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.