Examples of ToolBarItem


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

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

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

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

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

        Integer currentUserId = authorizedUserService.getCurrentUserId();
        User resourceOwner = resource.getOwner();
        if(tender.getAcceptDate() == null &&
                resourceOwner != null && currentUserId != null && currentUserId.equals(resourceOwner.getId())
                && !resourceInformant.isAcceptedTendersCountExceeded(resource, tender.getClass())) {
            toolbarActions.add(new ToolbarItem() {
                private static final long serialVersionUID = 1L;

                @Override
                public Component getComponent(String componentId) {
                    return new LinkPanel(componentId,
                            new ResourceModel(MKEY_ACCEPT_TENDER)) {
                        private static final long serialVersionUID = 1L;
                        @Override
                        protected void onClick() {
                            if(getTenderType() == TenderType.NEED) {
                                needManager.acceptTender((Need) tender);
                            } else {
                                supplyManager.acceptTender((Supply) tender);
                            }
                            eventsDispatcher.publishEvent(new TenderChanged(
                                    tender.getResource().getContract(), tender, TenderOperation.ACCEPTED));
                            goBack();
                        }
                    };
                }
               
            });
        }
       
        //'Decline' action
        if(contractPermissionsInformant.isTenderDeclineEnabled(tender)) {
            toolbarActions.add(new ToolbarItem() {
                private static final long serialVersionUID = 1L;

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

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


    @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 LinkPanel(toolbarItemId, new ResourceModel(MKEY_BACK)) {
View Full Code Here

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

        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));
            }
           
        };
       
        toolbarContainer = new MarkupContainer(CKEY_TOOLBAR_CONTAINER) {
View Full Code Here

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

       
        //'Invite participants' item
        Contract persistedContract = contractReader.getContract(contract.getId());
        if(contract.getStatus() == ContractStatus.UNCOMPLETED &&
                contractInformant.isUserEffective(persistedContract, currentUserId)) {
            toolbarActions.add(new ToolbarItem() {
                private static final long serialVersionUID = 1L;

                @Override
                public Component getComponent(String componentId) {
                    return new PageLinkPanel(componentId, UserSelection.class, new ResourceModel(MKEY_INVITE),
View Full Code Here

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

     * {@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(toolbarItemId, EditSkill.class, new ResourceModel(MKEY_ADD_SKILL));
View Full Code Here

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

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

    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

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

    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

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

     * {@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
TOP
Copyright © 2018 www.massapi.com. 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.