@Override public void onClick(AjaxRequestTarget target) { ImageAjaxLink.this.onClick(target); }
protected IAjaxCallDecorator getAjaxCallDecorator() { return ImageAjaxLink.this.getAjaxCallDecorator(); }; };
@Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); attributes .getAjaxCallListeners() .add(ImageAjaxLink.this.getAjaxCallListener()); } };
public EditButtonPanel(String id, final RuleModel ruleModel) { super(id); this.setOutputMarkupId(true); ImageAjaxLink<Object> editLink = new ImageAjaxLink<Object>( "edit", new PackageResourceReference(getClass(), "img/edit.png")) { @Override protected void onClick(AjaxRequestTarget target) { setResponsePage(new ParamsExtractorRulePage(Optional.of(ruleModel))); } }; editLink.getImage() .add( new AttributeModifier( "alt", new ParamResourceModel( "ParamsExtractorConfigPage.edit", editLink))); editLink.setOutputMarkupId(true); add(editLink); } }
Component removeLink(String id, IModel itemModel) { final LayerGroupEntry entry = (LayerGroupEntry) itemModel.getObject(); ImageAjaxLink link = new ImageAjaxLink( id, new ResourceReference( getClass(), "../../img/icons/silk/delete.png") ) { @Override protected void onClick(AjaxRequestTarget target) { items.remove( entry ); target.addComponent( layerTable ); } }; link.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("AbstractLayerGroupPage.th.remove", link))); return link; }
/** * Constructs the panel with a link containing an image and a label. */ public ImageAjaxLink( String id, ResourceReference imageRef, String label ) { super( id ); link = new AjaxLink( "link" ) { @Override public void onClick(AjaxRequestTarget target) { ImageAjaxLink.this.onClick(target); } protected IAjaxCallDecorator getAjaxCallDecorator() { return ImageAjaxLink.this.getAjaxCallDecorator(); }; }; add(link); link.add(image = new Image( "image", imageRef ) ); link.add( new Label( "label", label ) ); }
upLink.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("up", upLink))); upLink.setOutputMarkupId(true); add( upLink); downLink.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("down", downLink))); downLink.setOutputMarkupId(true); add( downLink);
Component removeLink(String id, IModel itemModel) { final RequestFilterChain chain = (RequestFilterChain) itemModel.getObject(); if (chain.canBeRemoved()==false) { ImageAjaxLink blankLink = new ImageAjaxLink( id, new ResourceReference( getClass(), "../img/icons/blank.png") ) { @Override protected void onClick(AjaxRequestTarget target) { } }; blankLink.getImage().add(new AttributeModifier("alt", true, new Model(""))); add(blankLink); return blankLink; } ImageAjaxLink link = new ImageAjaxLink( id, new ResourceReference( getClass(), "../img/icons/silk/delete.png") ) { @Override protected void onClick(AjaxRequestTarget target) { secMgrConfig.getFilterChain().getRequestChains().remove( chain ); target.addComponent( tablePanel ); } }; link.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("AbstractLayerGroupPage.th.remove", link))); return link; }
/** Constructs the panel with a link containing an image and a label. */ public ImageAjaxLink(String id, PackageResourceReference imageRef, String label) { super(id); link = new AjaxLink<T>("link") { @Override public void onClick(AjaxRequestTarget target) { ImageAjaxLink.this.onClick(target); } @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); attributes .getAjaxCallListeners() .add(ImageAjaxLink.this.getAjaxCallListener()); } }; add(link); link.add(image = new Image("image", imageRef)); link.add(new Label("label", label)); }
upLink.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("SecurityFilterChainsPanel.th.up", upLink))); upLink.setOutputMarkupId(true); add( upLink); downLink.getImage().add(new AttributeModifier("alt", true, new ParamResourceModel("SecurityFilterChainsPanel.th.down", downLink))); downLink.setOutputMarkupId(true); add( downLink);
Component removeLink(String id, IModel<LayerGroupEntry> itemModel) { final LayerGroupEntry entry = itemModel.getObject(); ImageAjaxLink<Object> link = new ImageAjaxLink<Object>( id, new PackageResourceReference( getClass(), "../../img/icons/silk/delete.png")) { private static final long serialVersionUID = 4050942811476326745L; @Override protected void onClick(AjaxRequestTarget target) { items.remove(entry); target.add(layerTable); } }; link.getImage() .add( new AttributeModifier( "alt", new ParamResourceModel("LayerGroupEditPage.th.remove", link))); return link; }
@Override public void onClick(AjaxRequestTarget target) { ImageAjaxLink.this.onClick(target); }
upLink.getImage() .add( new AttributeModifier( "alt", new ParamResourceModel("GeofenceServerPage.up", upLink))); upLink.setOutputMarkupId(true); add(upLink); downLink.getImage() .add( new AttributeModifier( "alt", new ParamResourceModel("GeofenceServerPage.down", downLink))); downLink.setOutputMarkupId(true); add(downLink); editLink.getImage() .add( new AttributeModifier( "alt", new ParamResourceModel("GeofenceServerPage.edit", editLink))); editLink.setOutputMarkupId(true); add(editLink);
upLink.getImage().add(new AttributeModifier("alt", new ParamResourceModel("up", upLink))); upLink.setOutputMarkupId(true); add(upLink); downLink.getImage() .add(new AttributeModifier("alt", new ParamResourceModel("down", downLink))); downLink.setOutputMarkupId(true); add(downLink);
upLink.getImage() .add( new AttributeModifier( "alt", new ParamResourceModel("GeofenceServerAdminPage.up", upLink))); upLink.setOutputMarkupId(true); add(upLink); downLink.getImage() .add( new AttributeModifier( new ParamResourceModel( "GeofenceServerAdminPage.down", downLink))); downLink.setOutputMarkupId(true); add(downLink); editLink.getImage() .add( new AttributeModifier( new ParamResourceModel( "GeofenceServerAdminPage.edit", editLink))); editLink.setOutputMarkupId(true); add(editLink);
upLink.getImage() .add( new AttributeModifier( new ParamResourceModel( "SecurityFilterChainsPanel.th.up", upLink))); upLink.setOutputMarkupId(true); add(upLink); downLink.getImage() .add( new AttributeModifier( new ParamResourceModel( "SecurityFilterChainsPanel.th.down", downLink))); downLink.setOutputMarkupId(true); add(downLink);