I try to replace a TextArea with a HiddenField (or in next step with a
Panel).

before:
<textarea wicket:id="messageInput" rows="6" cols="20">Input comes
here</textarea>

after:
<input wicket:id="messageInput" type="hidden" />

I added a Behaviour to the TextArea:
    public void bind(Component c)
    {
        target = c;

        HiddenField hiddenField = new HiddenField(target.getId(),
target.getModel());

        target.replaceWith(hiddenField);
    }

but get error:
Component messageInput must be applied to a tag of type 'input', not
'<textarea cols="20" rows="6" wicket:id="messageInput">' (line 0, column 0)

How?
-- 
View this message in context: 
http://www.nabble.com/Replace-a-component-with-another-component-by-adding-a-Behaviour-tf4067951.html#a11559560
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to