public LabelBookmarkablePageLinkPanel(final String id, final Class< ? extends WebPage> pageClass, final String label, final PageParameters params) { this(id, pageClass, params); link.add(new Label("label", label)); }
public LabelBookmarkablePageLinkPanel(final String id, final Class< ? extends WebPage> pageClass, final String label) { this(id, pageClass); link.add(new Label("label", label)); }
public ImageBookmarkablePageLinkPanel(final String id, final Class< ? extends WebPage> pageClass, final Response response, final String relativeImagePath, final String tooltip) { this(id, pageClass); link.add(new TooltipImage("image", relativeImagePath, tooltip)); }
/** * Sets a html attribute to the enclosed link. * @param attribute * @param label * @return this for chaining. */ public LabelBookmarkablePageLinkPanel addLinkAttribute(final String attribute, final String label) { link.add(AttributeModifier.replace(attribute, label)); return this; } }
public ImageBookmarkablePageLinkPanel(final String id, final Class< ? extends WebPage> pageClass, final Response response, final String relativeImagePath) { this(id, pageClass); link.add(new PresizedImage("image", relativeImagePath)); }
public ImageBookmarkablePageLinkPanel(final String id, final Class< ? extends WebPage> pageClass, final Response response, final String relativeImagePath, final IModel<String> tooltip) { this(id, pageClass); link.add(new TooltipImage("image", relativeImagePath, tooltip)); }
public <C extends Page> SimpleBookmarkableLink( String id, Class<C> pageClass, IModel<?> labelModel, PageParameters params) { super(id, labelModel); add(link = new BookmarkablePageLink<Object>("link", pageClass, params)); link.add(label = new Label("label", labelModel)); }
/** * @param pageMap * The pagemap for this link's destination * @return This */ public final BookmarkablePageLink setPageMap(final IPageMap pageMap) { if (pageMap != null) { pageMapName = pageMap.getName(); add(new AttributeModifier("target", true, new Model(pageMapName))); } return this; }
public SimpleBookmarkableLink(String id, Class pageClass, IModel labelModel, PageParameters params) { super(id, labelModel); add(link = new BookmarkablePageLink("link", pageClass, params)); link.add(label = new Label("label", labelModel)); }
/** * @param pageMap * The pagemap for this link's destination * @return This */ public final BookmarkablePageLink<T> setPageMap(final IPageMap pageMap) { if (pageMap != null) { pageMapName = pageMap.getName(); add(new AttributeModifier("target", true, new Model<String>(pageMapName))); } return this; }
@Override protected void onInitialize() { super.onInitialize(); BookmarkablePageLink<Void> link = createLink("link"); add(link); ResourceReference img = getImageResourceReference(); if (img == null) { link.add(new WebMarkupContainer("img").setVisibilityAllowed(false)); } else { link.add(new Image("img", img)); } link.add(new Label("data", getDataModel())); }
@Override protected void onInitialize() { super.onInitialize(); BookmarkablePageLink<Void> link = createLink("link"); add(link); ResourceReference img = getImageResourceReference(); if (img == null) { link.add(new WebMarkupContainer("img").setVisibilityAllowed(false)); } else { link.add(new Image("img", img)); } link.add(new Label("data", getDataModel())); }
public void populateItem(ListItem item){ MenuPageInfo info = (MenuPageInfo)item.getModelObject(); BookmarkablePageLink link = new BookmarkablePageLink("link", info.getComponentClass()); link.add(new AttributeModifier("title", true, new StringResourceModel(info.getDescriptionKey(), (Component) null, null))); link.add(new Label("link.label", new StringResourceModel(info.getTitleKey(), (Component) null, null))); item.add(link); } }
@Override protected void populateItem(ListItem<PageNumDisplay> item) { PageParameters params = new PageParameters(); params.add("status", status); params.put("pageNum", item.getModelObject().getNum()); BookmarkablePageLink pageLink = new BookmarkablePageLink("pageLink", instPage, params); pageLink.add(new Label("pageNum", String.valueOf(item .getModelObject().getNum()))); pageLink.add(new SimpleAttributeModifier("class", item .getModelObject().isCurrentPage() ? "selected" : "")); item.add(pageLink); } });
@Override protected void populateItem(ListItem<PageNumDisplay> item) { PageParameters params = new PageParameters(); params.add("name", productTypeName); params.put("pageNum", item.getModelObject().getNum()); BookmarkablePageLink pageLink = new BookmarkablePageLink("pageLink", typeBrowserPage, params); pageLink.add(new Label("pageNum", String.valueOf(item .getModelObject().getNum()))); pageLink.add(new SimpleAttributeModifier("class", item .getModelObject().isCurrentPage() ? "selected" : "")); item.add(pageLink); } });
@Override protected void populateItem(ListItem<PageNumDisplay> item) { PageParameters params = new PageParameters(); params.add("status", status); params.put("pageNum", item.getModelObject().getNum()); BookmarkablePageLink pageLink = new BookmarkablePageLink("pageLink", instPage, params); pageLink.add(new Label("pageNum", String.valueOf(item .getModelObject().getNum()))); pageLink.add(new SimpleAttributeModifier("class", item .getModelObject().isCurrentPage() ? "selected" : "")); item.add(pageLink); } });
@Override protected void populateItem(ListItem<PageNumDisplay> item) { PageParameters params = new PageParameters(); params.add("name", productTypeName); params.put("pageNum", item.getModelObject().getNum()); BookmarkablePageLink pageLink = new BookmarkablePageLink("pageLink", typeBrowserPage, params); pageLink.add(new Label("pageNum", String.valueOf(item .getModelObject().getNum()))); pageLink.add(new SimpleAttributeModifier("class", item .getModelObject().isCurrentPage() ? "selected" : "")); item.add(pageLink); } });
public void populateItem(ListItem item){ final DemoLinkInfo info = (DemoLinkInfo)item.getModelObject(); item.add(new BookmarkablePageLink("theLink", info.getComponentClass()) .add(new Label("theTitle", new StringResourceModel(info.getTitleKey(), (Component)null, null)))); item.add(new Label("theDescription", new StringResourceModel(info.getDescriptionKey(), (Component)null, null))); } });
@Override public void onClick() { Session theSession = getSession(); if (theSession instanceof AuthenticatedWebSession) { AuthenticatedWebSession session = (AuthenticatedWebSession) theSession; session.invalidate(); MarkupContainer parent = getParent(); BookmarkablePageLink<String> link = new BookmarkablePageLink<String>("link", LoginPage.class); link.add(new Label("link-label", new StringResourceModel(LoginPanel.LOGIN_KEY,this,null))); parent.addOrReplace(link); setResponsePage(WelcomePage.class); } }
@Override protected void populateItem(ListItem item) { Store store = (Store) item.getModelObject(); BookmarkablePageLink link = new BookmarkablePageLink("storeLink", store.getDestinationPage()); link.add(new Label("storeName", store.getStoreName(StoreChooserPage.this))); link.setEnabled(thereAreWorkspaces); item.add(link); item.add(new Label("storeDescription", store.getStoreDescription(StoreChooserPage.this))); Image icon = new Image("storeIcon", store.getStoreIcon()); icon.add(new AttributeModifier("alt", true, store.getStoreDescription(StoreChooserPage.this))); item.add(icon); } };