Search in sources :

Example 6 with Page

use of com.willshex.blogwt.shared.api.datatype.Page in project blogwt by billy1380.

the class GetPageRequest method fromJson.

@Override
public void fromJson(JsonObject jsonObject) {
    super.fromJson(jsonObject);
    if (jsonObject.has("page")) {
        JsonElement jsonPage = jsonObject.get("page");
        if (jsonPage != null) {
            page = new Page();
            page.fromJson(jsonPage.getAsJsonObject());
        }
    }
    if (jsonObject.has("includePosts")) {
        JsonElement jsonIncludePosts = jsonObject.get("includePosts");
        if (jsonIncludePosts != null) {
            includePosts = Boolean.valueOf(jsonIncludePosts.getAsBoolean());
        }
    }
}
Also used : JsonElement(com.google.gson.JsonElement) Page(com.willshex.blogwt.shared.api.datatype.Page)

Example 7 with Page

use of com.willshex.blogwt.shared.api.datatype.Page in project blogwt by billy1380.

the class UpdatePageResponse method fromJson.

@Override
public void fromJson(JsonObject jsonObject) {
    super.fromJson(jsonObject);
    if (jsonObject.has("page")) {
        JsonElement jsonPage = jsonObject.get("page");
        if (jsonPage != null) {
            page = new Page();
            page.fromJson(jsonPage.getAsJsonObject());
        }
    }
}
Also used : JsonElement(com.google.gson.JsonElement) Page(com.willshex.blogwt.shared.api.datatype.Page)

Example 8 with Page

use of com.willshex.blogwt.shared.api.datatype.Page in project blogwt by billy1380.

the class CreatePageRequest method fromJson.

@Override
public void fromJson(JsonObject jsonObject) {
    super.fromJson(jsonObject);
    if (jsonObject.has("page")) {
        JsonElement jsonPage = jsonObject.get("page");
        if (jsonPage != null) {
            page = new Page();
            page.fromJson(jsonPage.getAsJsonObject());
        }
    }
}
Also used : JsonElement(com.google.gson.JsonElement) Page(com.willshex.blogwt.shared.api.datatype.Page)

Example 9 with Page

use of com.willshex.blogwt.shared.api.datatype.Page in project blogwt by billy1380.

the class CreatePageResponse method fromJson.

@Override
public void fromJson(JsonObject jsonObject) {
    super.fromJson(jsonObject);
    if (jsonObject.has("page")) {
        JsonElement jsonPage = jsonObject.get("page");
        if (jsonPage != null) {
            page = new Page();
            page.fromJson(jsonPage.getAsJsonObject());
        }
    }
}
Also used : JsonElement(com.google.gson.JsonElement) Page(com.willshex.blogwt.shared.api.datatype.Page)

Example 10 with Page

use of com.willshex.blogwt.shared.api.datatype.Page in project blogwt by billy1380.

the class DeletePageRequest method fromJson.

@Override
public void fromJson(JsonObject jsonObject) {
    super.fromJson(jsonObject);
    if (jsonObject.has("page")) {
        JsonElement jsonPage = jsonObject.get("page");
        if (jsonPage != null) {
            page = new Page();
            page.fromJson(jsonPage.getAsJsonObject());
        }
    }
}
Also used : JsonElement(com.google.gson.JsonElement) Page(com.willshex.blogwt.shared.api.datatype.Page)

Aggregations

Page (com.willshex.blogwt.shared.api.datatype.Page)28 JsonElement (com.google.gson.JsonElement)10 Post (com.willshex.blogwt.shared.api.datatype.Post)9 ArrayList (java.util.ArrayList)6 User (com.willshex.blogwt.shared.api.datatype.User)4 HashMap (java.util.HashMap)4 Pager (com.willshex.blogwt.shared.api.Pager)3 GetPageRequest (com.willshex.blogwt.shared.api.page.call.GetPageRequest)3 GWT (com.google.gwt.core.client.GWT)2 Element (com.google.gwt.dom.client.Element)2 Key (com.googlecode.objectify.Key)2 DefaultEventBus (com.willshex.blogwt.client.DefaultEventBus)2 GetPageEventHandler (com.willshex.blogwt.client.api.page.event.GetPageEventHandler)2 NavigationController (com.willshex.blogwt.client.controller.NavigationController)2 PageController (com.willshex.blogwt.client.controller.PageController)2 NavigationChangedEventHandler (com.willshex.blogwt.client.event.NavigationChangedEventHandler)2 PageTypeHelper (com.willshex.blogwt.client.helper.PageTypeHelper)2 WizardDialogPage (com.willshex.blogwt.client.page.wizard.WizardDialogPage)2 WizardPage (com.willshex.blogwt.client.wizard.WizardPage)2 InputValidationException (com.willshex.gson.web.service.server.InputValidationException)2