I use the AjaxEditableLabel and related components and I've subclassed them overriding the onBeforeRender adding a call that checks if it should be in edit mode, then its just a matter of setEnabled(false) to keep the AjaxEditableLabel as a label.
-Clint On Wed, Dec 2, 2009 at 3:24 AM, Pieter Degraeuwe < [email protected]> wrote: > Hmm, that seems to be an easier solution; this way I, don't need to wrap > everyting in a panel... > > Thanks for that tip ! > > On Wed, Dec 2, 2009 at 10:21 AM, Daan van Etten <[email protected]> wrote: > > > Ah, I misread your original question. > > Maybe you can use Wicket Fragments for each type of input. > > http://wicket.apache.org/examplefragments.html > > > > Regards, > > > > Daan van Etten > > > > On Wed, 2009-12-02 at 10:19 +0100, Pieter Degraeuwe wrote: > > > I'll go for the 'each detail' has a panel, and create these detail > Panels > > > via a factory. > > > > > > Thanks all of you. > > > > > > On Wed, Dec 2, 2009 at 10:12 AM, Ernesto Reinaldo Barreiro < > > > [email protected]> wrote: > > > > > > > Reuse the complex markup and use different detail panels for each > > detail? > > > > Maybe via some factory....? > > > > > > > > Ernesto > > > > > > > > On Wed, Dec 2, 2009 at 10:06 AM, Pieter Degraeuwe < > > > > [email protected]> wrote: > > > > > > > > > I want to avoid this, since I wanted to reuse the (complex) > markup... > > > > > Is there no way around this? > > > > > > > > > > On Wed, Dec 2, 2009 at 10:02 AM, Giambalvo, Christian < > > > > > [email protected]> wrote: > > > > > > > > > > > Keep it simple and write 2 panels. > > > > > > > > > > > > > > > > > > -----Ursprüngliche Nachricht----- > > > > > > Von: Pieter Degraeuwe [mailto:[email protected]] > > > > > > Gesendet: Mittwoch, 2. Dezember 2009 09:55 > > > > > > An: [email protected] > > > > > > Betreff: How to write markup if type of component is not known > > yet... > > > > > > > > > > > > Hi all, > > > > > > > > > > > > I want to write a panel which kan render in 2 modes: editable and > > > > > > read-only. > > > > > > In read-only mode all my components are just labels. In edit > mode, > > are > > > > > > these > > > > > > labels replaced by input fields (e.g. Textfields, DropDowns, etc) > > > > > > > > > > > > The problem is now that I only want to write one markup (since > all > > > > > > components are ordered in a quite complex hierarchy....) > > > > > > Wicket complains now that tag type must be input instead of > span... > > > > > > > > > > > > Is there any way around this. (Or am I doing bad practices...) > > > > > > > > > > > > regards, > > > > > > > > > > > > Pieter > > > > > > > > > > > > > > > > > > -- > > > > > > Pieter Degraeuwe > > > > > > Systemworks bvba > > > > > > Belgiëlaan 61 > > > > > > 9070 Destelbergen > > > > > > GSM: +32 (0)485/68.60.85 > > > > > > Email: [email protected] > > > > > > visit us at http://www.systemworks.be > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: [email protected] > > > > > > For additional commands, e-mail: [email protected] > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Pieter Degraeuwe > > > > > Systemworks bvba > > > > > Belgiëlaan 61 > > > > > 9070 Destelbergen > > > > > GSM: +32 (0)485/68.60.85 > > > > > Email: [email protected] > > > > > visit us at http://www.systemworks.be > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > > -- > Pieter Degraeuwe > Systemworks bvba > Belgiëlaan 61 > 9070 Destelbergen > GSM: +32 (0)485/68.60.85 > Email: [email protected] > visit us at http://www.systemworks.be >
