Update of
/var/cvs/contributions/CMSContainer/cmsc/taglib/src/java/com/finalist/cmsc/taglib/image
In directory
james.mmbase.org:/tmp/cvs-serv6193/cmsc/taglib/src/java/com/finalist/cmsc/taglib/image
Modified Files:
Tag: b1_5
LinkedImagesTag.java
Log Message:
CMSC-1127 Added the possibility to pass an (ImageMagick) template to the
linkedimages tag.
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/taglib/src/java/com/finalist/cmsc/taglib/image
See also: http://www.mmbase.org/jira/browse/CMSC-1127
Index: LinkedImagesTag.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer/cmsc/taglib/src/java/com/finalist/cmsc/taglib/image/LinkedImagesTag.java,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -b -r1.5 -r1.5.2.1
--- LinkedImagesTag.java 10 May 2008 16:31:24 -0000 1.5
+++ LinkedImagesTag.java 29 Oct 2008 08:43:58 -0000 1.5.2.1
@@ -65,6 +65,8 @@
/** Holds value of property max. */
private Attribute max = Attribute.NULL;
+ /** Holds value of property template. */
+ private Attribute template = Attribute.NULL;
public void setPosition(String position) throws JspTagException {
this.position = getAttribute(position);
@@ -120,6 +122,10 @@
this.popup = getAttribute(popup);
}
+ public void setTemplate(String template) throws JspTagException {
+ this.template = getAttribute(template);
+ }
+
/**
* This tag returns links to content.
@@ -184,6 +190,7 @@
String crop = imagerel.getStringValue("crop");
String legendType = imagerel.getStringValue("legend");
boolean popup = imagerel.getBooleanValue("popup");
+ String template = null;
if (this.width != Attribute.NULL && this.height !=
Attribute.NULL) {
width = this.width.getInt(this, 0);
@@ -217,8 +224,12 @@
// Issue NIJ-149: legendType was not set
imgTag.setLegendtype(legendType);
+ if (this.template != Attribute.NULL) {
+ template = this.template.getString(this);
+ }
+
imgTag.setExternalAttributes(getOtherAttributes());
- String templateStr = imgTag.getTemplate(image, null, width,
height, crop);
+ String templateStr = imgTag.getTemplate(image, template, width,
height, crop);
Dimension dim = imgTag.getDimension(image, templateStr);
Node cachedNode = imgTag.getServletNode(image, templateStr);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs