Form - LabelField

Hi,

in the sampler under
FormBasic
there is a UUID field in the form.

In the example it looks like ‘label form field’ having a label and a text. I did check the source code of this example but I did not figure out how this field was created. To be more precise - it is casted to TextField at one point so I assume that it is TextField. But I did not figure out how to make a TextField look like that UUID field in the example.

What am I missing?

I am trying to create a form where some fields are editable and some are not and I am not satisfied with the look of ‘disabled’ text field.

Thanks

Igor

Did you try setReadOnly(true)? In the sampler, since there’s a getter, but no setter method, in the Person bean it’s considered to be read-only. You can do the same if you are using a BeanItem, or if not, you’ll need to mark it as read-only.

Thanks a lot. That did the trick. I will read the API more carefully next time before asking a question (I did miss the setReadOnly(boolean) method).

Igor

What? And rob me of an opportunity to answer the few questions I
can
answer in the forums… :smiley: