Hi

Thanx Leslie, I had a look at the presentation classes but could not
decide whether I should create a new presentation like for hidden and
text or just try to hack the current input-presentation. I will have a
look at hacking the input-presentation now. I am no HTML expert but is
there not a difference between disabled and readonly?


On Fri, 2009-11-13 at 10:28 +0100, Leslie P. Polzer wrote:
> 
> 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