Martijn Dashorst wrote:
> PasswordTextField {
>       protected String getInputType()
>       {
>               return "password";
>       }
> }
> 
> TextField {
>       /**
>        * Subclass should override this method if this textfields mappes on
> a different
>        * input type as text. Like PasswordField or HiddenField.
>        *
>        * @return The input type of this textfield, default is 'text'
>        */
>       protected String getInputType()
>       {
>               return null;
>       }
> }

Maybe so, but this is what I get when I use a RequiredTextField coupled 
to an <input type="password"/>:

org.apache.wicket.markup.MarkupException: Component password must be 
applied to a tag with 'type' attribute matching 'text', not 'password'
[markup = file:/usr/local/.pr/jb/test_classes/unit/PasswordPage.html
<html>
<head><title>Password required test page</title></head>
<body>
<span wicket:id="errors"/>
<form wicket:id="form">
<input type="password" wicket:id="password"/>
<!--<input type="text" wicket:id="password"/>-->
</form>
</body>
</html>
, index = 11, current = '<input type="password" wicket:id="password"/>' 
(line 6, column 1)]

...

You can grab the code from 
https://issues.apache.org/jira/browse/WICKET-768 if you want to try this 
yourself.

DR

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to