Ali,

that's a nice idea. But I think it has some disadvantages: The TextInput component would have to change the entire tag. So it would have to be responsible not only for input tags, but for the static representation as a span or div as well.

I am not a friend of putting that much functionality into basic Form components.

Maybe it is an alternative to use the HTML standards to switch from editable to static textinputs? You can simply set the attribute disabled="disabled".


Timo



Ali Zaid schrieb:
Hi Guys;

I have been working with the RC1 and I found it wonderful, today I
came across something that make me think about new thing to add to
wicket (unless it is there and I don't know)

The thing is, I want to create some Information sheet (I always do
;)), and I need to show info, and give the user the ability to press
edit and edit this info, what I used to do is to create 2 panels, one
that show the info as text, and the other is the form. and the other
trick is to add 2 components to the field and show or hide one
depending on what mode the user in.

Since I'm lazy, and wicket has beed designed to make us even more lazy
than before ;), I would suggest this

TextField tf = new TextField("name");

now what wicket would expect is to have a tag for this in html that
looks like this

<input type="text" wicket:id="name" />

now come the lazy part why don't we add something to it to make it
render as a simple Label, something like:

tf.preview(true);

or

tf.renderAsLabel(true);

now if this can be done for all the form component in my openion this
would be really useful, tell you the truth I'm so excited about Ajax
in place edit of 1.2, and I'm trying to use it in a new project I'm
writting in wicket! but still the above is really worth allot in my
openion.

--
Regards, Ali
-----
Fight back spam! Download the Blue Frog.
http://www.bluesecurity.com/register/s?user=YWxsb2NoaTI5Nzk%3D


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to