");
+ }
+
+ // if we are not show the text link, then the image is the clickable element
+ if (link.getShowLink() == false)
+ {
+ renderActionLinkAnchor(context, out, link);
+ }
+
+ out.write(Utils.buildImageTag(context, image, (String)link.getValue(), "absmiddle"));
+
+ if (link.getShowLink() == false)
+ {
+ out.write("");
}
else
{
- String href = link.getHref();
-
- // prefix the web context path if required
- linkBuf.append("');
-
- StringBuilder buf = new StringBuilder(350);
- if (link.getImage() != null)
- {
- int padding = link.getPadding();
if (padding != 0)
{
- // TODO: make this width value a property!
- buf.append("");
+ out.write(" | ");
}
- if (link.getShowLink() == false)
- {
- buf.append(linkBuf.toString());
- }
-
- // TODO: allow configuring of alignment attribute
- buf.append(Utils.buildImageTag(context, link.getImage(), (String)link.getValue(), "absmiddle"));
-
- if (link.getShowLink() == false)
- {
- buf.append("");
- }
- else
- {
- if (padding != 0)
- {
- buf.append(" | ");
- }
- else
- {
- // TODO: add horizontal spacing as component property
- buf.append("");
- }
-
- buf.append(linkBuf.toString());
- buf.append(Utils.encode(link.getValue().toString()));
- buf.append("");
-
- if (padding == 0)
- {
- buf.append("");
- }
- }
-
- if (padding != 0)
- {
- buf.append(" | ");
- }
+ // else the text is the clickable element
+ renderActionLinkAnchor(context, out, link);
+ out.write(Utils.encode(link.getValue().toString()));
+ out.write("");
+ }
+
+ if (padding != 0)
+ {
+ out.write(" |
");
+ }
+ }
+ else
+ {
+ // no image, so text is the clickable element
+ renderActionLinkAnchor(context, out, link);
+ out.write(Utils.encode(link.getValue().toString()));
+ out.write("