I'm trying to integrate a 3rd party javascript library in to Tapestry via a
mixin. The way it works is that the library adds behavior to fields that
have a certain css class. All the mixin needs to do is @Import the proper js
& css, and add a css class to the field.

I tried adding it with:
    void beginRender(MarkupWriter writer) {
        writer.attributes("class", "some_class");
    }

This works if the field doesn't have a class already, but if it does, then
the mixin doesn't add the class (as specified by the javadoc for
writer.attributes - if there's already a value, then the value you pass is
ignored).

Is there any way to append to an attribute or do I just have to always
remember to add the css class when using that mixin?

Thanks,
Donny

Reply via email to