Hi,

I have a TextField repeated many times that has a certain type, validate, and 
class attributes set. Only the value and id changes.

What is the proper Tapestry way to prevent the repeating of all those options?

For example, if a css class changes, I want to set it in one place not a 100.

I attempted to create a component with the tml:

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"; 
xmlns:p="tapestry:parameter">
<t:content>
    <t:TextField t:id="input"
                 ...custom attrs here..."/>
</t:content>
</html>

And the Java:

public class CustomInput {

    @Inject
    private Environment environment;

    @Component(id = "input", publishParameters = "value")
    private TextField input;

    public String getClientId() {
        return input.getClientId();
    }
}

But this didn't work. The rendered field didn't have the type or validate attrs 
set.

Would this be a better job for a mixin?

Thanks,

Casey
-- 
Casey Link

Outskirts Labs { http://outskirtslabs.com }

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to