Package org.zeroexchange.web.components.toolbar

Examples of org.zeroexchange.web.components.toolbar.ToolbarItem


        final Resource resource = getResourceModel().getObject();

        //'Unbound' action
        if(resource.getId() != null && isResourceEditAllowed()) {
            items.add(new ToolbarItem()  {
                private static final long serialVersionUID = 1L;
   
                @Override
                public Component getComponent(String componentId) {
                    return new AjaxLinkPanel(componentId, new ResourceModel(MKEY_RESOURCE_UNBOUND)) {
View Full Code Here


    protected List<ToolbarItem> getToolbarItems() {
        //Toolbar actions
        final List<ToolbarItem> toolbarActions = super.getToolbarItems();
       
        //'Save Contract' item
        toolbarActions.add(new ToolbarItem() {
            private static final long serialVersionUID = 1L;

            @Override
            public Component getComponent(String componentId) {
                return new SubmitLinkPanel(componentId,
View Full Code Here

    protected List<ToolbarItem> getToolbarItems() {
        //Toolbar actions
        final List<ToolbarItem> toolbarActions = super.getToolbarItems();
       
        //'Save Contract' item
        toolbarActions.add(new ToolbarItem() {
            private static final long serialVersionUID = 1L;

            @Override
            public Component getComponent(String componentId) {
                return new SubmitLinkPanel(componentId,
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected List<ToolbarItem> getToolbarItems() {
        List<ToolbarItem> items = super.getToolbarItems();
        items.add(new ToolbarItem() {
            private static final long serialVersionUID = 1L;

            @Override
            public Component getComponent(String toolbarItemId) {
                return new PageLinkPanel(
View Full Code Here

    @Override
    protected List<ToolbarItem> getToolbarItems() {
        List<ToolbarItem> items = super.getToolbarItems();
       
        // 'Create message' action
        items.add(new ToolbarItem() {
            private static final long serialVersionUID = 1L;

            @Override
            public Component getComponent(String componentId) {
                return new PageLinkPanel(
                        componentId, CreateMessage.class, new ResourceModel(MKEY_CREATE_MESSAGE), null);
            }
        });
       
        // 'Delete message' action
        items.add(new ToolbarItem() {
            private static final long serialVersionUID = 1L;

            @Override
            public Component getComponent(String componentId) {
                return new AjaxLinkPanel(
View Full Code Here

    protected List<ToolbarItem> getToolbarItems() {
        List<ToolbarItem>  items = super.getToolbarItems();
       
        // "Add contract" action
        if(authorizedUserService.isUserLogged()) {
            items.add(new ToolbarItem() {
                private static final long serialVersionUID = 1L;

                @Override
                public Component getComponent(String toolbarItemId) {
                    return new LinkPanel(toolbarItemId, new ResourceModel(MKEY_ADD_CONTRACT)) {
View Full Code Here

    @Override
    protected List<ToolbarItem> getToolbarItems() {
        List<ToolbarItem> items = super.getToolbarItems();

        //'Ok'
        items.add(new ToolbarItem() {
            private static final long serialVersionUID = 1L;

            @Override
            public Component getComponent(String toolbarItemId) {
                return new LinkPanel(toolbarItemId, new ResourceModel(MKEY_OK)) {
View Full Code Here

            @Override
            public List<ToolbarItem> getObject() {
                List<ToolbarItem> items = getToolbarItems();
                if(addStretch() && items != null && !items.isEmpty()) {
                    items.add(new ToolbarItem(LAST_ITEM_IDX) {
                        private static final long serialVersionUID = 1L;

                        @Override
                        public void onAttach(ListItem<ToolbarItem> item) {
                            item.add(new AttributeAppender("class", " stretchCell"));
                        }

                        @Override
                        public Component getComponent(String toolbarItemId) {
                            return new EmptyPanel(toolbarItemId);
                        }
                       
                    });
                }
                Collections.sort(items);
               
                return items;
            }

            @Override
            public void setObject(List<ToolbarItem> object) {}
        };
        toolbar = new ListView<ToolbarItem>(CKEY_TOOLBAR_GROUPS, itemsModel) {
            private static final long serialVersionUID = 1L;

            @Override
            protected void populateItem(ListItem<ToolbarItem> item) {
                ToolbarItem toolbarItem = item.getModelObject();
                toolbarItem.onAttach(item);
                item.add(toolbarItem.getComponent(CKEY_TOOLBAR_ITEM));
            }
           
        };
        toolbar.setOutputMarkupId(true);
        toolbarContainer = new MarkupContainer(CKEY_TOOLBAR_CONTAINER) {
View Full Code Here

TOP

Related Classes of org.zeroexchange.web.components.toolbar.ToolbarItem

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.