Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.0.11
-
None
-
Tomcat server 5.5 on Ubuntu Linux.
Description
I have created a component that looks like this:
public class HeraldryShieldIMG
{
@Parameter(value="64")
@Property
private int _width;
@Parameter(value="76")
@Property
private int _height;
@Parameter(value="literal:Heraldry")
@Property
private String _altText;
@Parameter(required=true)
private BaseHeraldry _heraldry;
@Inject
private ComponentResources _resources;
@BeginRender
public void beginRender(MarkupWriter writer)
{
Link link = _resources.createPageLink("ShowHeraldryShield", false, new Object[]
);
writer.element("img",
"src", link.toAbsoluteURI()+".png",
"width", ""+_width,
"height", ""+_height,
"alt", _altText);
_resources.renderInformalParameters(writer);
}
@AfterRender
void afterRender(MarkupWriter writer)
}
Now if I use it like this:
<t:HeraldryShieldIMG heraldry="page.webUser.userAccount.heraldry" align="middle" />
in a template I would think that the informal parameter "align" would be rendered into my current "img"-tag. It is not. Neither is "style"/"class"/etc. What did I not do, all the examples I can find with _resources.renderInformalParameters(writer); do nothing special to indicate that they accept informal parameters (at least not what I can see). In tapestry 4.x there was an option indicating if a component accepted informal parameters - how is this decided now?