Examples of AbstractLink


Examples of org.apache.wicket.markup.html.link.AbstractLink

      submitForm(submitLink.getForm().getPageRelativePath());
    }
    // if the link is a normal link (or ResourceLink)
    else if (linkComponent instanceof AbstractLink)
    {
      AbstractLink link = (AbstractLink)linkComponent;

      /*
       * If the link is a bookmarkable link, then we need to transfer the parameters to the
       * next request.
       */
 
View Full Code Here

Examples of org.apache.wicket.markup.html.link.AbstractLink

      submitForm(submitLink.getForm().getPageRelativePath());
    }
    // if the link is a normal link (or ResourceLink)
    else if (linkComponent instanceof AbstractLink)
    {
      AbstractLink link = (AbstractLink)linkComponent;

      /*
       * If the link is a bookmarkable link, then we need to transfer the parameters to the
       * next request.
       */
 
View Full Code Here

Examples of org.apache.wicket.markup.html.link.AbstractLink

  {
    // Get the index of page this link shall point to
    final long pageIndex = getStartIndex() + loopItem.getIndex();

    // Add a page link pointing to the page
    final AbstractLink link = newPagingNavigationLink("pageLink", pageable, pageIndex);
    link.add(new TitleAppender(pageIndex));
    loopItem.add(link);

    // Add a page number label to the list which is enclosed by the link
    String label = "";
    if (labelProvider != null)
    {
      label = labelProvider.getPageLabel(pageIndex);
    }
    else
    {
      label = String.valueOf(pageIndex + 1).intern();
    }
    link.add(new Label("pageNumber", label));
  }
View Full Code Here

Examples of org.apache.wicket.markup.html.link.AbstractLink

      submitForm(submitLink.getForm().getPageRelativePath());
    }
    // if the link is a normal link (or ResourceLink)
    else if (linkComponent instanceof AbstractLink)
    {
      AbstractLink link = (AbstractLink)linkComponent;

      /*
       * If the link is a bookmarkable link, then we need to transfer the parameters to the
       * next request.
       */
 
View Full Code Here

Examples of org.apache.wicket.markup.html.link.AbstractLink

      submitForm(submitLink.getForm().getPageRelativePath());
    }
    // if the link is a normal link (or ResourceLink)
    else if (linkComponent instanceof AbstractLink)
    {
      AbstractLink link = (AbstractLink)linkComponent;

      /*
       * If the link is a bookmarkable link, then we need to transfer the parameters to the
       * next request.
       */
 
View Full Code Here

Examples of org.apache.wicket.markup.html.link.AbstractLink

        if (visibility.isVetoed()) {
            return null;
        }

       
        final AbstractLink link = newLink(linkId, adapter, action, actionPromptProvider);
       
        final Consent usability = action.isUsable(session, adapter, Where.OBJECT_FORMS);
        final String disabledReasonIfAny = usability.getReason();
        if(disabledReasonIfAny != null) {
            link.setEnabled(false);
        }

        return newLinkAndLabel(action, link, disabledReasonIfAny);
    }
View Full Code Here

Examples of org.apache.wicket.markup.html.link.AbstractLink

    protected WebMarkupContainer addOrReplaceLinkWrapper(final EntityModel entityModel) {
        final ObjectAdapter adapter = entityModel.getObject();

        final WebMarkupContainer entityLinkWrapper = new WebMarkupContainer(ID_ENTITY_LINK_WRAPPER);

        final AbstractLink link = createIconAndTitle(adapter);
        entityLinkWrapper.addOrReplace(link);
       
        return entityLinkWrapper;
    }
View Full Code Here

Examples of org.apache.wicket.markup.html.link.AbstractLink

       
        return entityLinkWrapper;
    }

    private AbstractLink createIconAndTitle(final ObjectAdapter adapter) {
        final AbstractLink link = createLinkWrapper();
       
        final String title = determineTitle();

        final String iconName = adapter.getIconName();
        final CssClassFaFacet cssClassFaFacet = adapter.getSpecification().getFacet(CssClassFaFacet.class);
        if (iconName != null || cssClassFaFacet == null) {
            link.addOrReplace(this.image = newImage(ID_ENTITY_ICON, adapter));
            Components.permanentlyHide(link, ID_ENTITY_FONT_AWESOME);
        } else {
            Label dummy = new Label(ID_ENTITY_FONT_AWESOME, "");
            link.addOrReplace(dummy);
            dummy.add(new CssClassAppender(cssClassFaFacet.value() + " fa-2x"));
            Components.permanentlyHide(link, ID_ENTITY_ICON);
        }

        link.addOrReplace(this.label = newLabel(ID_ENTITY_TITLE, titleAbbreviated(title)));

        String entityTypeName = adapter.getSpecification().getSingularName();
        link.add(new AttributeModifier("title", entityTypeName + ": " + title));
       
        return link;
    }
View Full Code Here

Examples of org.apache.wicket.markup.html.link.AbstractLink

                        clearBookmarkLink.setEnabled(true);
                    }
                    item.add(clearBookmarkLink);
                   
                    PageParameters pageParameters = node.getPageParameters();
                    final AbstractLink link = Links.newBookmarkablePageLink(ID_BOOKMARKED_PAGE_LINK, pageParameters, pageClass);

                    ObjectSpecification objectSpec = null;
                    RootOid oid = node.getOidNoVer();
                    if(oid != null) {
                        ObjectSpecId objectSpecId = oid.getObjectSpecId();
                        objectSpec = getSpecificationLoader().lookupBySpecId(objectSpecId);
                    }
                    final ResourceReference imageResource = imageCache.resourceReferenceForSpec(objectSpec);
                    final Image image = new Image(ID_BOOKMARKED_PAGE_ICON, imageResource) {
                        private static final long serialVersionUID = 1L;
                        @Override
                        protected boolean shouldAddAntiCacheParameter() {
                            return false;
                        }
                    };
                    link.addOrReplace(image);

                    String title = node.getTitle();
                    final Label label = new Label(ID_BOOKMARKED_PAGE_TITLE, title);
                    link.add(label);
                    item.add(link);
                    if(bookmarkedPagesModel.isCurrent(pageParameters)) {
                        item.add(new CssClassAppender("disabled"));
                    }
                    item.add(new CssClassAppender("bookmarkDepth" + node.getDepth()));
View Full Code Here

Examples of org.apache.wicket.markup.html.link.AbstractLink

            @Override
            protected void populateItem(ListItem<LinkAndLabel> item) {
                final LinkAndLabel linkAndLabel = item.getModelObject();
               
                final AbstractLink link = linkAndLabel.getLink();

                String cssClassFa = linkAndLabel.getCssClassFa();
                if(Strings.isNullOrEmpty(cssClassFa)) {
                    Components.permanentlyHide(link, ID_ADDITIONAL_LINK_FONT_AWESOME);
                } else {
                    Label dummy = new Label(ID_ADDITIONAL_LINK_FONT_AWESOME, "");
                    link.addOrReplace(dummy);
                    dummy.add(new CssClassAppender(cssClassFa));
                }

                Label viewTitleLabel = new Label(ID_ADDITIONAL_LINK_TITLE, linkAndLabel.getLabel());
                String disabledReasonIfAny = linkAndLabel.getDisabledReasonIfAny();
                if(disabledReasonIfAny != null) {
                    viewTitleLabel.add(new AttributeAppender("title", disabledReasonIfAny));
                }
                if(linkAndLabel.isBlobOrClob()) {
                    link.add(new CssClassAppender("noVeil"));
                }
                if(linkAndLabel.isPrototype()) {
                    link.add(new CssClassAppender("prototype"));
                }
                link.add(new CssClassAppender(linkAndLabel.getActionIdentifier()));
                String cssClass = linkAndLabel.getCssClass();
                if(cssClass != null) {
                    item.add(new CssClassAppender(cssClass));
                }
                viewTitleLabel.add(new CssClassAppender(StringExtensions.asLowerDashed(linkAndLabel.getLabel())));
                link.addOrReplace(viewTitleLabel);
                item.addOrReplace(link);
            }
        };
        container.addOrReplace(listView);
    }
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.