No, but i think that for disabled textfields read only is a nice option, because you can still select the text.
Anyway, if you want to have read only text field, you should disable it. Because if it is not disabled, user can still change the text (fake post) and the model gets updated. With disabled component there is not this problem. -Matej Johan Compagner wrote: > But disabled and readonly are not the same in html.. > > johan > > > On 12/14/06, *Eelco Hillenius* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Exactly, that's the way to go, and that's why onDisabled is in there! > > Eelco > > On 12/14/06, Matej Knopp <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > wrote: > > I'd rather override isEnabled and onDisabled, e.g. > > > > new TextField() { > > boolean isEnabled() { > > return isTextFieldReadOnly; > > } > > void onDisabled(final ComponentTag tag) { > > tag.put("readonly", "readonly"); > > } > > } > > > > -Matej > > > > Martijn Dashorst wrote: > > > AttributeModifier readonly = new AttributeModifier("readonly", > true, > > > "readonly"); > > > readonly.setEnabled (isTextFIeldReadOnly); > > > textfield.add(readonly); > > > > > > Martijn > > > > > > On 12/14/06, Carfield Yim <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > >> For Wicket 1.3, look like this is not working, once I add > > >> [readonly=""] at the markup the field is readonly for sure. > > >> > > >> Just wonder can I Programmatically set readonly property of form > > >> component at wicket 1.3? > > >> > > >> On 11/21/06, Otan <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > >>> I'm using Wicket 2.0 > > >>> > > >>> I can make a TextField readonly by doing this. > > >>> tf.add(new AttributeModifier("readonly", new Model("readonly"))); > > >>> with this markup > > >>> <input wicket:id="username" name="un" type="text" readonly="" /> > > >>> > > >>> Does Wicket provides a method that make me do something like > this > > >>> to a form component? > > >>> tf.setReadOnly(false); > > >>> > > >>> just like how it's easy in Wicket to setEnabled() a component. > > >>> > > >>> > > >>> > ------------------------------------------------------------------------- > > >>> Take Surveys. Earn Cash. Influence the Future of IT > > >>> Join SourceForge.net's Techsay panel and you'll get the > chance to share your > > >>> opinions on IT & business topics through brief surveys - and > earn cash > > >>> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > > >>> > > >>> _______________________________________________ > > >>> Wicket-user mailing list > > >>> Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > > >>> https://lists.sourceforge.net/lists/listinfo/wicket-user > > >>> > > >>> > > >>> > > >> > ------------------------------------------------------------------------- > > > >> Take Surveys. Earn Cash. Influence the Future of IT > > >> Join SourceForge.net's Techsay panel and you'll get the chance > to share your > > >> opinions on IT & business topics through brief surveys - and > earn cash > > >> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > > >> _______________________________________________ > > >> Wicket-user mailing list > > >> Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > > >> https://lists.sourceforge.net/lists/listinfo/wicket-user > > >> > > > > > > > > > > > > -- > > > > get professional wicket training and consultation > > http://www.wicket-support.com > > > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net 's Techsay panel and you'll get the chance > to share your > > opinions on IT & business topics through brief surveys - and earn > cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > > _______________________________________________ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------ > > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user -- get professional wicket training and consultation http://www.wicket-support.com ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user