を行っている可能性setStyleClass方法を持っている場合は
if (!cycle.isRewinding()) {
Object value = getValue();
if (value != null) {
String styleClass;
String insert = null;
Format format = getFormat();
if (format == null) {
insert = value.toString();
}
else {
insert = format.format(value);
}
styleClass = getStyleClass();
if (styleClass == null) {
/* No classes specified */
styleClass = MY_CLASS;
}
else {
/* Append the preserveWhiteSpace class to the string listing the style classes. */
styleClass += " " + MY_CLASS;
}
if (styleClass != null) {
writer.begin("span");
writer.attribute("class", styleClass);
renderInformalParameters(writer, cycle);
}
writer.print(insert, getRaw());
if (styleClass != null) {
/* </span> */
writer.end();
}
}
}
}
のように、基本的に見えましたか?独自のInsertSpanコンポーネントを作成してみませんか? Insertのソースを見るだけで、どのようにシンプルなのか分かります...カットアンドペーストすることは自由です。オープンソースです。
さらに、Tapestry 5にアップグレードしてみてください。 Tapestry 4は約4年間で積極的に開発されていません。