came up with a new version that works (i believe with ajax
only, and with one textarea for the moment). i'm by no means an ajax
expert (hmm, in fact, i dislike javascript :) so this is a call to
wicket ajax gurus: could you help me improve this code?
usage:
(...)
final NicEditTextAreaBehavior
NicEditTextAreaBehavior behavior = new NicEditTextAreaBehavior();
textarea.add(behavior);
(...)
form.add(new AjaxFallbackButton(submit, form) {
@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return
getAjaxCallDecorator() {
return nicEditTextAreaBehavior.NICEDIT_AJAX_BUTTON_DECORATOR;
}
ie so that just doing textarea.add(new NicEditTextAreaBehavior());
suffices. maybe you've got an idea?
anyway, after all these hacks seem to work!
francisco
On Tue, Jun 17, 2008 at 8:11 PM
into some problem using it. should this belong
to the wiki as well?
francisco
public class NicEditTextAreaBehavior extends AbstractBehavior {
private ComponentTextAreaString textArea;
private Boolean fullPanel = Boolean.TRUE;
private static final
NicEditTextAreaBehavior extends AbstractBehavior {
private ComponentTextAreaString textArea;
private Boolean fullPanel = Boolean.TRUE;
private static final ResourceReference NICEDIT_JAVASCRIPT =
new JavascriptResourceReference(NicEditTextAreaBehavior.class