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 8755595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:53:15+00:00 2026-06-13T13:53:15+00:00

On the code below I am injecting a PlaceManager on the 4th line, and

  • 0

On the code below I am injecting a PlaceManager on the 4th line, and trying to use the placeManager.revealPlace() on the last line. However, at that moment I get a null exception.

Furthermore, if I add a if(placeManager==null){ Window.alert("Hello"); } before that line, the alert is displayed.

Any ideas why is this happening? Perhaps because it is executed inside a FieldUpdater handler?

THANKS

public class CellTableManager {

private final DialectiveRequestFactory requestFactory = GWT.create(DialectiveRequestFactory.class);
private EventBus eventBus;
@Inject PlaceManager placeManager;

public CellTableManager (final CellTable<Diagram> cellTable, SimplePager pager) {
    DiagramDatabase.get().getDiagramProvider().addDataDisplay(cellTable);
    ListHandler<Diagram> sortHandler = new ListHandler<Diagram>(
        DiagramDatabase.get().getDiagramProvider().getList());
    cellTable.addColumnSortHandler(sortHandler);
    this.eventBus = new SimpleEventBus();
    requestFactory.initialize(eventBus);
    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true);
    pager.setDisplay(cellTable);

    final SelectionModel<Diagram> selectionModel = initSelectionMode(cellTable);

    initTableColumns(cellTable, selectionModel, sortHandler);

    DiagramRequest diagramRequest = requestFactory.diagramRequest();
    diagramRequest.listAll().fire(new Receiver<List<DiagramProxy>>() {
        public void onSuccess(List<DiagramProxy> response) {
            for (int i=0;i<response.size();i++) {
                insertEmptyRow(cellTable, response.get(i));
            }
        }
    });
}

private void initTableColumns(final CellTable<Diagram> cellTable,
            final SelectionModel<Diagram> selectionModel, ListHandler<Diagram> sortHandler) {
        Column<Diagram, String> titleColumn = new Column<Diagram, String>(
            new TextCell()) {
          @Override
          public String getValue(Diagram object) {
            return object.getTitle();
          }
        };
        titleColumn.setSortable(true);
        sortHandler.setComparator(titleColumn, new Comparator<Diagram>() {
            @Override
            public int compare(Diagram o1, Diagram o2) {
                return o1.getTitle().compareTo(o2.getTitle());
            }
        });

        cellTable.addColumn(titleColumn, BasicConstants.editTableText[0]);
        cellTable.setColumnWidth(titleColumn, 20, Unit.PCT);

        Column<Diagram, String> descriptionColumn = new Column<Diagram, String>(
            new TextCell()) {
          @Override
          public String getValue(Diagram object) {
            return object.getDescription();
          }
        };

        descriptionColumn.setSortable(true);
        sortHandler.setComparator(descriptionColumn, new Comparator<Diagram>() {
            @Override
            public int compare(Diagram o1, Diagram o2) {
                return o1.getDescription().compareTo(o2.getDescription());
            }
        });

        cellTable.addColumn(descriptionColumn, BasicConstants.editTableText[1], "");
        cellTable.setColumnWidth(descriptionColumn, 50, Unit.PCT);

        Column<Diagram, String> editColumn = new Column<Diagram, String>(
                new ButtonCell()) {
              @Override
              public String getValue(Diagram object) {
                return "edit";
              }
            };

        cellTable.addColumn(editColumn, "");
        editColumn.setFieldUpdater(new FieldUpdater<Diagram, String>() {
              @Override
              public void update(int index, Diagram object, String value) {
                  String diagramCode = object.getDiagramId(); 
                  ClientState.setCurrentDiagramId(diagramCode);
                  PlaceRequest request = new PlaceRequest(NameTokens.e).with("id", diagramCode);
                  placeManager.revealPlace(request);
              }
        });
}
  • 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-13T13:53:16+00:00Added an answer on June 13, 2026 at 1:53 pm

    Did you bind(...) your PlaceManager to an implementation in your ClientModule (and can we see the latter?)

    Have you checked and verified your GinModules/Ginjector (assuming you’re using gin)?

    Cheers,

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

Sidebar

Related Questions

The code below simply didn't work. document.getElementById('files').addEventListener('change', handleFileSelect, false); reported by firebug that this
The code below fails on the line: Class.forName(oracle.jdbc.driver.OracleDriver); with the error: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver The
We use the code below to inject Spring beans with properties from a properties
I have a problem with the code below. I can't get it to popup
I got a sample code from net for inserting: In the line below, should
note that the code below is obtained from Matlab documentation except for the bottom
I am using the code below that uploads a file and inserts data into
I'm trying to use m2eclipse api to import projects by archetype. my code is
I am using the code below that uploads a file and inserts data into
I decided to use PDO after recommends here and i found this code below.

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.