Something mangled your code, but with a little deciphering I think what you
are trying to do is add a class to the input button by replacing the
beginRender method of Submit?

You can't extend Submit and override the beginRender method. The
beginRender method isn't public...

Have you considered a mixin? Or perhaps just including the class names in
the tml? Submit supports informal parameters.

Josh

On Thu, Feb 9, 2012 at 2:39 PM, Russell John-Baptistr <rjb...@yahoo.com>wrote:

> I originally put this on SO... But received no love!!
>
> I have a submit button component that I created called FoundationButton.
> This button is decorated with the formatting of the foundation framework (
> http://foundation.zurb.com/). I had it working like a charm. Then when I
> made my component extend the built in Tapestry Submit component, it lost
> all its decorations! Below is my class:
>
> public class FoundationButton extends Submit {
>
> @Parameter(name = "value", required = true, allowNull =
> false,defaultPrefix="literal")
> private String show; private Element buttonElement; @Environmental
> buttonElement = writer
> private Heartbeat heartbeat; void beginRender(MarkupWriter writer)
> {.element("input", "class", "nice small radius blue button");
> Runnable() { public void run
> final String showTime= this.show; Runnable command = new
> () { buttonElement.attributes("type", "submit");
> }; heartbeat.defer(command); } void afterR
> buttonElement.attributes("value",showTime); } ender(MarkupWriter writer) {
> writer.end();
> }
> }
>
> Pretty sure beginRender doesn't get called anymore!

Reply via email to