Package org.apache.wicket.extensions.ajax.markup.html.repeater.data.table

Examples of org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable


    columns.add(new PropertyColumn(new Model("First Name"), "firstName", "firstName"));
    columns.add(new PropertyColumn(new Model("Last Name"), "lastName", "lastName"));
    columns.add(new PropertyColumn(new Model("Home Phone"), "homePhone"));
    columns.add(new PropertyColumn(new Model("Cell Phone"), "cellPhone"));

    add(new AjaxFallbackDefaultDataTable("table", columns, new SortableContactDataProvider(), 8));
  }
View Full Code Here


    columns.add(new PropertyColumn(new Model("First Name"), "firstName", "firstName"));
    columns.add(new PropertyColumn(new Model("Last Name"), "lastName", "lastName"));
    columns.add(new PropertyColumn(new Model("Home Phone"), "homePhone"));
    columns.add(new PropertyColumn(new Model("Cell Phone"), "cellPhone"));

    add(new AjaxFallbackDefaultDataTable("table", columns, new SortableContactDataProvider(), 8));
  }
View Full Code Here

                cellItem.add(panel);
            }
        });

        final AjaxFallbackDefaultDataTable table = new AjaxFallbackDefaultDataTable("datatable", columns,
                new PolicyDataProvider(), paginatorRows);

        container.add(table);

        final AjaxLink createButton = new ClearIndicatingAjaxLink("createLink", pageRef) {

            private static final long serialVersionUID = -7978723352517770644L;

            @Override
            protected void onClickInternal(final AjaxRequestTarget target) {
                mwindow.setPageCreator(new ModalWindow.PageCreator() {

                    private static final long serialVersionUID = -7834632442532690940L;

                    @Override
                    public Page createPage() {
                        return new PolicyModalPage(mwindow, getPolicyTOInstance(policyType));
                    }
                });

                mwindow.show(target);
            }
        };

        add(createButton);

        MetaDataRoleAuthorizationStrategy.authorize(createButton, ENABLE, xmlRolesReader.getAllAllowedRoles("Policies",
                "create"));

        final Form paginatorForm = new Form("PaginatorForm");

        final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this, "paginatorRows"),
                prefMan.getPaginatorChoices());

        rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
                prefMan.set(getWebRequest(), (WebResponse) getResponse(), Constants.PREF_POLICY_PAGINATOR_ROWS, String
                        .valueOf(paginatorRows));
                table.setItemsPerPage(paginatorRows);

                target.add(container);
            }
        });
View Full Code Here

                return panel;
            }
        });

        final AjaxFallbackDefaultDataTable reportTable =
                new AjaxFallbackDefaultDataTable("reportTable", columns, new ReportProvider(), paginatorRows);

        reportContainer.add(reportTable);
        reportContainer.setOutputMarkupId(true);

        add(reportContainer);

        Form paginatorForm = new Form("paginatorForm");

        MetaDataRoleAuthorizationStrategy.authorize(paginatorForm, RENDER, xmlRolesReader.getAllAllowedRoles("Reports",
                "list"));

        final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this, "paginatorRows"),
                prefMan.getPaginatorChoices());

        rowsChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
                prefMan.set(getRequest(), getResponse(), Constants.PREF_REPORT_PAGINATOR_ROWS,
                        String.valueOf(paginatorRows));
                reportTable.setItemsPerPage(paginatorRows);

                target.add(reportContainer);
            }
        });
View Full Code Here

                cellItem.add(panel);
            }
        });

        final AjaxFallbackDefaultDataTable approvalTable = new AjaxFallbackDefaultDataTable("approvalTable", columns,
                new ApprovalProvider(), approvalPaginatorRows);

        approvalContainer.add(approvalTable);
        approvalContainer.setOutputMarkupId(true);

        add(approvalContainer);

        Form approvalPaginatorForm = new Form("approvalPaginatorForm");

        MetaDataRoleAuthorizationStrategy.authorize(approvalPaginatorForm, RENDER, xmlRolesReader.getAllAllowedRoles(
                "Approval", "list"));

        final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this,
                "approvalPaginatorRows"), prefMan.getPaginatorChoices());

        rowsChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
                prefMan.set(getRequest(), getResponse(), Constants.PREF_APPROVAL_PAGINATOR_ROWS, String.valueOf(
                        approvalPaginatorRows));
                approvalTable.setItemsPerPage(approvalPaginatorRows);

                target.add(approvalContainer);
            }
        });
View Full Code Here

                cellItem.add(panel);
            }
        });

        final AjaxFallbackDefaultDataTable userRequestTable = new AjaxFallbackDefaultDataTable("userRequestTable",
                columns, new UserRequestProvider(), userRequestPaginatorRows);

        userRequestContainer.add(userRequestTable);
        userRequestContainer.setOutputMarkupId(true);

        add(userRequestContainer);

        Form userRequestPaginatorForm = new Form("userRequestPaginatorForm");

        MetaDataRoleAuthorizationStrategy.authorize(userRequestPaginatorForm, RENDER, xmlRolesReader.getAllAllowedRoles(
                "UserRequest", "list"));

        final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this,
                "userRequestPaginatorRows"), prefMan.getPaginatorChoices());

        rowsChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
                prefMan.set(getRequest(), getResponse(), Constants.PREF_USER_REQUEST_PAGINATOR_ROWS, String.valueOf(
                        userRequestPaginatorRows));
                userRequestTable.setItemsPerPage(userRequestPaginatorRows);

                target.add(userRequestContainer);
            }
        });
View Full Code Here

        List<IColumn> rolesColumns = getColumnsForSchema(roleSchemasContainer, editRoleSchemaWin,
                AttributableType.ROLE, SchemaModalPageFactory.SchemaType.NORMAL, Constants.SCHEMA_FIELDS,
                allowedReadRoles, allowedCreateRoles);

        final AjaxFallbackDefaultDataTable tableRoles = new AjaxFallbackDefaultDataTable("datatable", rolesColumns,
                new SchemaProvider(SchemaType.RoleSchema), rolePageRows);

        add(getPaginatorForm(roleSchemasContainer, tableRoles, "RolesPaginatorForm", "rolePageRows",
                Constants.PREF_ROLE_SCHEMA_PAGINATOR_ROWS));

        List<IColumn> columnsRolesDer = getColumnsForSchema(roleDerivedSchemasContainer, editRoleDerivedSchemaWin,
                AttributableType.ROLE, SchemaModalPageFactory.SchemaType.DERIVED, Constants.DERIVED_SCHEMA_FIELDS,
                allowedReadRoles, allowedDeleteRoles);

        final AjaxFallbackDefaultDataTable tableRolesDer = new AjaxFallbackDefaultDataTable("datatable",
                columnsRolesDer, new DerivedSchemaProvider(SchemaDerivedType.RoleDerivedSchema), roleDerPageRows);

        add(getPaginatorForm(roleDerivedSchemasContainer, tableRolesDer, "RolesDerPaginatorForm", "roleDerPageRows",
                Constants.PREF_ROLE_DER_SCHEMA_PAGINATOR_ROWS));

        List<IColumn> columnsRolesVir = getColumnsForSchema(roleVirtualSchemasContainer, editRoleVirtualSchemaWin,
                AttributableType.ROLE, SchemaModalPageFactory.SchemaType.VIRTUAL, Constants.VIRTUAL_SCHEMA_FIELDS,
                allowedReadRoles, allowedDeleteRoles);

        final AjaxFallbackDefaultDataTable tableRolesVir = new AjaxFallbackDefaultDataTable("datatable",
                columnsRolesVir, new VirtualSchemaProvider(SchemaVirtualType.RoleVirtualSchema), roleVirPageRows);

        add(getPaginatorForm(roleVirtualSchemasContainer, tableRolesVir, "RolesVirPaginatorForm", "roleVirPageRows",
                Constants.PREF_ROLE_VIR_SCHEMA_PAGINATOR_ROWS));

        List<IColumn> userColumns = getColumnsForSchema(userSchemasContainer, editUserSchemaWin, AttributableType.USER,
                SchemaModalPageFactory.SchemaType.NORMAL, Constants.SCHEMA_FIELDS, allowedReadRoles, allowedCreateRoles);

        final AjaxFallbackDefaultDataTable tableUsers = new AjaxFallbackDefaultDataTable("datatable", userColumns,
                new SchemaProvider(SchemaType.UserSchema), userSchemaPageRows);

        tableUsers.setMarkupId("tableUsers");

        add(getPaginatorForm(userSchemasContainer, tableUsers, "UsersPaginatorForm", "userSchemaPageRows",
                Constants.PREF_USER_SCHEMA_PAGINATOR_ROWS));

        List<IColumn> columnsUsersDer = getColumnsForSchema(userDerivedSchemasContainer, editUserDerivedSchemaWin,
                AttributableType.USER, SchemaModalPageFactory.SchemaType.DERIVED, Constants.DERIVED_SCHEMA_FIELDS,
                allowedReadRoles, allowedDeleteRoles);

        final AjaxFallbackDefaultDataTable tableUsersDer = new AjaxFallbackDefaultDataTable("datatable",
                columnsUsersDer, new DerivedSchemaProvider(SchemaDerivedType.UserDerivedSchema), userDerSchemaPageRows);

        add(getPaginatorForm(userDerivedSchemasContainer, tableUsersDer, "UsersDerPaginatorForm",
                "userDerSchemaPageRows", Constants.PREF_USER_DER_SCHEMA_PAGINATOR_ROWS));

        List<IColumn> columnsUsersVir = getColumnsForSchema(userVirtualSchemasContainer, editUserVirtualSchemaWin,
                AttributableType.USER, SchemaModalPageFactory.SchemaType.VIRTUAL, Constants.VIRTUAL_SCHEMA_FIELDS,
                allowedReadRoles, allowedDeleteRoles);

        final AjaxFallbackDefaultDataTable tableUsersVir = new AjaxFallbackDefaultDataTable("datatable",
                columnsUsersVir, new VirtualSchemaProvider(SchemaVirtualType.UserVirtualSchema), userVirSchemaPageRows);

        add(getPaginatorForm(userVirtualSchemasContainer, tableUsersVir, "UsersVirPaginatorForm",
                "userVirSchemaPageRows", Constants.PREF_USER_VIR_SCHEMA_PAGINATOR_ROWS));

        List<IColumn> membershipsColumns = getColumnsForSchema(membershipSchemaContainer, editMembershipSchemaWin,
                AttributableType.MEMBERSHIP, SchemaModalPageFactory.SchemaType.NORMAL, Constants.SCHEMA_FIELDS,
                allowedReadRoles, allowedCreateRoles);

        final AjaxFallbackDefaultDataTable tableMemberships = new AjaxFallbackDefaultDataTable("datatable",
                membershipsColumns, new SchemaProvider(SchemaType.MembershipSchema), membershipPageRows);

        add(getPaginatorForm(membershipSchemaContainer, tableMemberships, "MembershipPaginatorForm",
                "membershipPageRows", Constants.PREF_MEMBERSHIP_SCHEMA_PAGINATOR_ROWS));

        List<IColumn> columnsMembershipsDer = getColumnsForSchema(membershipDerivedSchemaContainer,
                editMembershipDerivedSchemaWin, AttributableType.MEMBERSHIP, SchemaModalPageFactory.SchemaType.DERIVED,
                Constants.DERIVED_SCHEMA_FIELDS, allowedReadRoles, allowedDeleteRoles);

        final AjaxFallbackDefaultDataTable tableMembershipsDer = new AjaxFallbackDefaultDataTable("datatable",
                columnsMembershipsDer, new DerivedSchemaProvider(SchemaDerivedType.MembershipDerivedSchema),
                membershipDerPageRows);

        add(getPaginatorForm(membershipDerivedSchemaContainer, tableMembershipsDer, "MembershipDerPaginatorForm",
                "membershipDerPageRows", Constants.PREF_MEMBERSHIP_DER_SCHEMA_PAGINATOR_ROWS));

        List<IColumn> columnsMembershipsVir = getColumnsForSchema(membershipVirtualSchemaContainer,
                editMembershipVirtualSchemaWin, AttributableType.MEMBERSHIP, SchemaModalPageFactory.SchemaType.VIRTUAL,
                Constants.VIRTUAL_SCHEMA_FIELDS, allowedReadRoles, allowedDeleteRoles);

        final AjaxFallbackDefaultDataTable tableMembershipsVir = new AjaxFallbackDefaultDataTable("datatable",
                columnsMembershipsVir, new VirtualSchemaProvider(SchemaVirtualType.MembershipVirtualSchema),
                membershipVirPageRows);

        add(getPaginatorForm(membershipVirtualSchemaContainer, tableMembershipsVir, "MembershipVirPaginatorForm",
                "membershipVirPageRows", Constants.PREF_MEMBERSHIP_VIR_SCHEMA_PAGINATOR_ROWS));
View Full Code Here

                cellItem.add(panel);
            }
        });

        final AjaxFallbackDefaultDataTable reportTable = new AjaxFallbackDefaultDataTable("reportTable", columns,
                new ReportProvider(), paginatorRows);

        reportContainer.add(reportTable);
        reportContainer.setOutputMarkupId(true);

        add(reportContainer);

        Form paginatorForm = new Form("paginatorForm");

        MetaDataRoleAuthorizationStrategy.authorize(paginatorForm, RENDER, xmlRolesReader.getAllAllowedRoles("Reports",
                "list"));

        final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this, "paginatorRows"),
                prefMan.getPaginatorChoices());

        rowsChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
                prefMan.set(getRequest(), getResponse(), Constants.PREF_REPORT_PAGINATOR_ROWS,
                        String.valueOf(paginatorRows));
                reportTable.setItemsPerPage(paginatorRows);

                target.add(reportContainer);
            }
        });
View Full Code Here

            final List<IColumn<TaskTO>> columns,
            final TasksProvider dataProvider,
            final WebMarkupContainer container,
            final int currentPage) {

        final AjaxFallbackDefaultDataTable table = new AjaxFallbackDefaultDataTable<TaskTO>(
                "datatable", columns, dataProvider, dataProvider.paginatorRows);

        table.setCurrentPage(currentPage);
        table.setOutputMarkupId(true);

        container.addOrReplace(table);

        return table;
    }
View Full Code Here

                cellItem.add(panel);
            }
        });

        final AjaxFallbackDefaultDataTable table = new AjaxFallbackDefaultDataTable("executionsTable", columns,
                new ReportExecutionsProvider(reportTO), 10);
        executions.add(table);
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable

Copyright © 2018 www.massapicom. 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.