Package com.cedarsoft.wicket.navigation

Examples of com.cedarsoft.wicket.navigation.NavigationLinkProvider


      @Override
      protected void onComponentTag( ComponentTag tag ) {
        super.onComponentTag( tag );

        //Check whether the current link is "active"
        NavigationLinkProvider linkProvider = ( NavigationLinkProvider ) getModelObject();
        if ( linkProvider.isActive() ) {
          tag.put( WicketConstants.ID, VALUE_ID_CURRENT );
        }
      }
    };
  }
View Full Code Here


  }

  @Nonnull
  private static List<LinkProvider> getLinkProviders() {
    List<LinkProvider> providers = new ArrayList<LinkProvider>();
    providers.add( new NavigationLinkProvider() {
      @Nonnull
      public WebMarkupContainer createLink( @Nonnull @NonNls String id ) {
        return new ExternalLink( id, "http://www.heise.de" );
      }

      @Nonnull
      public WebComponent createLabel( @Nonnull @NonNls String id ) {
        return new Label( id, "heise" );
      }

      public boolean isActive() {
        return false;
      }
    } );
    providers.add( new NavigationLinkProvider() {
      @Nonnull
      public WebMarkupContainer createLink( @Nonnull @NonNls String id ) {
        return ( WebMarkupContainer ) new ExternalLink( id, "http://www.chip.de" ).setEnabled( false );
      }

      @Nonnull
      public WebComponent createLabel( @Nonnull @NonNls String id ) {
        return new Label( id, "chip" );
      }

      public boolean isActive() {
        return true;
      }
    } );
    providers.add( new NavigationLinkProvider() {
      @Nonnull
      public WebMarkupContainer createLink( @Nonnull @NonNls String id ) {
        return ( WebMarkupContainer ) new ExternalLink( id, "http://www.spiegel.de" ).setEnabled( true );
      }
View Full Code Here

      @Override
      protected void onComponentTag( ComponentTag tag ) {
        super.onComponentTag( tag );

        //Check whether the current link is "active"
        NavigationLinkProvider linkProvider = ( NavigationLinkProvider ) getModelObject();
        if ( linkProvider.isActive() ) {
          tag.put( WicketConstants.ID, VALUE_ID_CURRENT );
        }
      }
    };
  }
View Full Code Here

  }

  @NotNull
  private static List<LinkProvider> getLinkProviders() {
    List<LinkProvider> providers = new ArrayList<LinkProvider>();
    providers.add( new NavigationLinkProvider() {
      @NotNull
      public WebMarkupContainer createLink( @NotNull @NonNls String id ) {
        return new ExternalLink( id, "http://www.heise.de" );
      }

      @NotNull
      public WebComponent createLabel( @NotNull @NonNls String id ) {
        return new Label( id, "heise" );
      }

      public boolean isActive() {
        return false;
      }
    } );
    providers.add( new NavigationLinkProvider() {
      @NotNull
      public WebMarkupContainer createLink( @NotNull @NonNls String id ) {
        return ( WebMarkupContainer ) new ExternalLink( id, "http://www.chip.de" ).setEnabled( false );
      }

      @NotNull
      public WebComponent createLabel( @NotNull @NonNls String id ) {
        return new Label( id, "chip" );
      }

      public boolean isActive() {
        return true;
      }
    } );
    providers.add( new NavigationLinkProvider() {
      @NotNull
      public WebMarkupContainer createLink( @NotNull @NonNls String id ) {
        return ( WebMarkupContainer ) new ExternalLink( id, "http://www.spiegel.de" ).setEnabled( true );
      }
View Full Code Here

      @Override
      protected void onComponentTag( ComponentTag tag ) {
        super.onComponentTag( tag );

        //Check whether the current link is "active"
        NavigationLinkProvider linkProvider = ( NavigationLinkProvider ) getModelObject();
        if ( linkProvider.isActive() ) {
          tag.put( WicketConstants.ID, VALUE_ID_CURRENT );
        }
      }
    };
  }
View Full Code Here

  }

  @NotNull
  private static List<LinkProvider> getLinkProviders() {
    List<LinkProvider> providers = new ArrayList<LinkProvider>();
    providers.add( new NavigationLinkProvider() {
      @NotNull
      public WebMarkupContainer createLink( @NotNull @NonNls String id ) {
        return new ExternalLink( id, "http://www.heise.de" );
      }

      @NotNull
      public WebComponent createLabel( @NotNull @NonNls String id ) {
        return new Label( id, "heise" );
      }

      public boolean isActive() {
        return false;
      }
    } );
    providers.add( new NavigationLinkProvider() {
      @NotNull
      public WebMarkupContainer createLink( @NotNull @NonNls String id ) {
        return ( WebMarkupContainer ) new ExternalLink( id, "http://www.chip.de" ).setEnabled( false );
      }

      @NotNull
      public WebComponent createLabel( @NotNull @NonNls String id ) {
        return new Label( id, "chip" );
      }

      public boolean isActive() {
        return true;
      }
    } );
    providers.add( new NavigationLinkProvider() {
      @NotNull
      public WebMarkupContainer createLink( @NotNull @NonNls String id ) {
        return ( WebMarkupContainer ) new ExternalLink( id, "http://www.spiegel.de" ).setEnabled( true );
      }
View Full Code Here

TOP

Related Classes of com.cedarsoft.wicket.navigation.NavigationLinkProvider

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.