Hi,
I am using behaviors for beforeRender and onRender to add html markups.
private void init() {
add(HeaderContributor.forCss(MyButton.class, "MyButton.css"));
add(new AbstractBehavior() {
private static final long serialVersionUID = 1L;
@Override
public void beforeRender(Component component) {
component.getResponse().write(Consts.getBeforeRender());
}
@Override
public void onRendered(Component component) {
component.getResponse().write(Consts.getOnRenedered());
}
});
}
in order to get:
<span class="button"><input type="submit" name="foo" value="yout text"
/></span>
This works great!
BUT,
sometimes, when the button should be disabled, I want to have this instead
in the markup:
<del class="button"><span>yout text</span></del>
The problem is that when constructing the button, I don't know the enable
status.
I set button.setEnabled only after creating it.
Is there a way to change the markup when someone sets to enable-false?
Thanks
--
Eyal Golan
[EMAIL PROTECTED]
Visit: http://jvdrums.sourceforge.net/