Search in sources :

Example 6 with Width

use of org.apache.tapestry5.beaneditor.Width in project tapestry-5 by apache.

the class KaptchaImage method beginRender.

boolean beginRender(MarkupWriter writer) {
    Link link = resources.createEventLink("image");
    writer.element("img", "src", link.toURI(), "width", producer.getWidth(), "height", producer.getHeight());
    resources.renderInformalParameters(writer);
    writer.end();
    return false;
}
Also used : Link(org.apache.tapestry5.http.Link)

Aggregations

Test (org.testng.annotations.Test)3 MarkupWriter (org.apache.tapestry5.MarkupWriter)2 Width (org.apache.tapestry5.beaneditor.Width)1 PropertyConduit (org.apache.tapestry5.beanmodel.PropertyConduit)1 InternalPropertyConduit (org.apache.tapestry5.beanmodel.internal.InternalPropertyConduit)1 Link (org.apache.tapestry5.http.Link)1 Request (org.apache.tapestry5.http.services.Request)1 Session (org.apache.tapestry5.http.services.Session)1 Label (org.apache.tapestry5.internal.plastic.asm.Label)1 ExceptionInfo (org.apache.tapestry5.ioc.services.ExceptionInfo)1 LocalVariable (org.apache.tapestry5.plastic.LocalVariable)1