Package wicket.markup.html.link

Examples of wicket.markup.html.link.IPageLink


      }

      final ViewContext entityDisplayPageViewContext = new ViewContext(
          viewContext);
      entityDisplayPageViewContext.setUpdate(false);
      Link displayLink = new PageLink("display", new IPageLink() {
        static final long serialVersionUID = 200531L;

        public Page getPage() {
          return app.getViewMeta().getPage("EntityDisplayPage",
              entityModelContext, entityDisplayPageViewContext);
View Full Code Here


  }

  public static PageLink link(final String id,
      final PrincipalContentContainer.ContentType principalContent)
  {
    final PageLink link = new PageLink(id, new IPageLink()
    {
      private static final long serialVersionUID = -5317100125057792793L;

      public Page getPage()
      {
View Full Code Here

  }

  public static PageLink link(final String id,
      final Class<? extends BasePanel> panelClass, final Map parameters)
  {
    final PageLink link = new PageLink(id, new IPageLink()
    {

      /**
       *
       */
 
View Full Code Here

          neighborModelContext.setEntities(neighborEntities);

          final ViewContext neighborViewContext = new ViewContext(
              viewContext);

          neighborLink = new PageLink("neighbor", new IPageLink() {
            static final long serialVersionUID = 200471L;

            WebPage neighborPage;

            public Page getPage() {
View Full Code Here

   *            view context
   */
  public static PageLink link(final ModelContext modelContext,
      final ViewContext viewContext) {
    PageLink link = new PageLink(viewContext.getWicketId(),
        new IPageLink() {
          static final long serialVersionUID = 200701L;
          public Page getPage() {
            return new EntityEditFormPage(modelContext, viewContext);
          }

View Full Code Here

   *            view context
   */
  public static PageLink link(final ModelContext modelContext,
      final ViewContext viewContext) {
    PageLink link = new PageLink(viewContext.getWicketId(),
        new IPageLink() {
          static final long serialVersionUID = 200751L;
          public Page getPage() {
            return new EntityUpdateTablePage(modelContext,
                viewContext);
          }
View Full Code Here

      item.add(copyLink);

      final ViewContext entityUpdatePageContext = new ViewContext(
          viewContext);
      entityUpdatePageContext.setPageBlock(currentPageBlock);
      Link editLink = new PageLink("edit", new IPageLink() {
        static final long serialVersionUID = 200742L;

        public Page getPage() {
          return app.getViewMeta().getPage("EntityEditFormPage",
              entityModelContext, entityUpdatePageContext);
        }

        public Class getPageIdentity() {
          return app.getViewMeta().getPageClass("EntityEditFormPage",
              entityModelContext, entityUpdatePageContext);
        }
      });
      item.add(editLink);

      final ViewContext entityRemovePageContext = new ViewContext(
          viewContext);
      entityRemovePageContext.setPageBlock(currentPageBlock);
      item.add(new Link("remove") {
        static final long serialVersionUID = 200743L;

        public void onClick() {
          try {
            if (app.isConceptUpdateAllowed(
                getAppSession(), conceptConfig, entity, "remove")) {
              entities.getErrors().empty();
              if (app.getModelConfig().isConfirmRemove()) {
                setResponsePage(app.getViewMeta().getPage(
                    "EntityConfirmRemovePage",
                    entityModelContext,
                    entityRemovePageContext));
              } else if (entities.remove(entity)) {
                setResponsePage(app.getViewMeta().getPage(
                    "EntityUpdateTablePage",
                    entityModelContext,
                    entityRemovePageContext));
              } else {
                addDmLiteErrorKeys(entities);
              }
            } else {
              String error = getLocalizer().getString(
                  "entities.config.remove", this);
              error(error);
            }
          } catch (DmException e) {
            log.error("Error in EntityUpdateTableListView: "
                + modelContext.getEntitiesCode() + " - "
                + e.getMessage());
          }
        }
      });

      // Neighbor update links
      List<NeighborNameLabelLinkPair> neighborNameLabelLinkPairs = new ArrayList<NeighborNameLabelLinkPair>();
      NeighborsConfig neighborsConfig = conceptConfig
          .getNeighborsConfig();
      for (IEntity neighborConfigEntity : neighborsConfig) {
        NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
        if (neighborConfig.getType().equals("child")
            && neighborConfig.isInternal()) {
          NeighborNameLabelLinkPair neighborNameLabelLinkPair = new NeighborNameLabelLinkPair();
          String conceptCode = conceptConfig.getCode();
          String neighborKey = conceptCode + "."
              + neighborConfig.getCode();
          String neighborName = getLocalizer().getString(neighborKey,
              this);
          Label neighborNameLabel = new Label("neighborName",
              neighborName);
          neighborNameLabelLinkPair
              .setNeighborNameLabel(neighborNameLabel);
          Link neighborLink = null;
          IDomainModel domainModel = app.getDomainModel();
          final IOrderedEntities neighborEntities = (IOrderedEntities) domainModel
              .getModelMeta().getNeighborEntities(entity,
                  neighborConfig.getCode());

          final ModelContext neighborModelContext = new ModelContext(
              modelContext);
          neighborModelContext.setContextEntities(entities);
          neighborModelContext.setContextEntity(entity);
          neighborModelContext.setEntities(neighborEntities);
          final ViewContext neighborViewContext = new ViewContext(
              viewContext);
          neighborViewContext.setPageBlock(new Integer(0));

          neighborLink = new PageLink("neighbor", new IPageLink() {
            static final long serialVersionUID = 200744L;

            public Page getPage() {
              return app.getViewMeta().getPage(
                  "EntityUpdateTablePage",
View Full Code Here

   *            view context
   */
  public static PageLink link(final ModelContext modelContext,
      final ViewContext viewContext) {
    PageLink link = new PageLink(viewContext.getWicketId(),
        new IPageLink() {
          static final long serialVersionUID = 200651L;
          public Page getPage() {
            return new EntityAddFormPage(modelContext, viewContext);
          }

View Full Code Here

TOP

Related Classes of wicket.markup.html.link.IPageLink

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.