Phil Marneweck wrote:
>
> How do I do a read only input box in a form view. I assume you need to
> do a present-as like in the following code.
>
>
> (defview employee-element-form-view (:type form :inherit-from
> '(:scaffold employee-element))
>   (^id :hidep t)
>   (company-name :present-as (..what must go here for readonly..)
>   (start-date :reader (compose #'format-date #'start-date))
>   (end-date :reader (compose #'format-date #'end-date))
>   )

There's no support for this right now but it's very easy to
implement.

Just add a READ-ONLY slot to class FORM-PRESENTATION and make
the implementations of RENDER-VIEW-FIELD-VALUE honor it by
adding the "disabled" attribute. After this you'll be able
to write

  (field :present-as foo :read-only t)

in your view declaration.

For plain text input fields all of this can be done in formview.lisp.
The class for text fields is misnamed^Wcalled INPUT-PRESENTATION.

  Leslie


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to