Did you try the 'enabled' property of components? That should block input for form components, and put the appropriate attribute in the tag. Looking at it, I see it's a bit rough around the edged, but it should basically work.
Eelco On 11/7/06, Erik Brakkee <[EMAIL PROTECTED]> wrote: > > > On 11/6/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > use an attrib modifier to append readonly="readonly" attrib, or just > disable the formcomponent > > It seems that the readonly modifier can only be applied with <input > type="text"/> so that is not a general solution. The other one disabling the > form works, but suggests that the fields are editable even though form > submission has no effect. Also, the second one is an all or nothing solution > enabling or disabling all fields at once. > > It looks like I have to develop something myself. I am going to think hard > now on what to do: develop custom forms and panels for read-only versions or > develop a generic mechanism. > > Cheers > Erik > > > > > -igor > > > > > > > > > > On 11/6/06, Erik Brakkee < [EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > > > > > > In my application I have the situation that when an object reaches a > > > certain state, it can no longer be modified or in some cases only > > > parts of the entities state may be modified. > > > > > > As a result, what I need is a method of easily creating read-only > > > versions of a form where some or all fields have become read only. I > > > want to do this without duplicating information so a solution where I > > > create a read-only version and a read-write version for the same > > > entity is not really a solution for me. > > > > > > Of course, I could always roll my own by defining a special panel for > > > every basic form component, such as: > > > > > > <wicket:panel> > > > <span wicket:id="readonly">Label here</span> > > > <input type="text" wicket:id="readwrite"></input> > > > </wicket:panel> > > > > > > and then enabling only one of these components depending on the context. > > > > > > Is there already a standard solution for this somewhere? > > > > > > Cheers > > > Erik > > > > > > > ------------------------------------------------------------------------- > > > 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 > > > [email protected] > > > > 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 > > [email protected] > > 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 > [email protected] > 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 [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
