If I pass in params, then the template will have to check for this param and
write appropriate HTML. (is this correct?) What about situations where you
want to add JavaScript onchange="EditEvent()" as an attribute. Again, add
this as a param and check for it in the template? If this is correct, then
eventually the template will check for all possible attributes just to write
copy. It seems easier to have a passthru that will allow the user to type
anything they want and it will be placed in the tag.
Thoughts?
----- Original Message -----
From: "Rickard Öberg" <ri...@xp...>
To: "Matt Baldree" <ma...@sm...>
Cc: "Webwork-Developer" <web...@li...>
Sent: Thursday, November 22, 2001 2:14 AM
Subject: Re: [Webwork-devel] ui tag feature
> Matt Baldree wrote:
>
> > I have the need to disable some of the form input field controls. This
> > includes being able to disable check boxes, radio buttons, text, text
area,
> > etc. I added a passthru attribute that passes the value directly to the
> > template. This allows me to pass DISABLED, READONLY, and other custom
form
> > input attributes without having to mimic all their attributes. Is this a
> > common need or is there a more preferred way of doing this?
> >
> > i.e.
> > <ui:textfield label="'Model'" name="'model'"
> > value="@golfCart/cart/model/description" passthru="DISABLED"/>
>
> You can pass in any parameter you want by using the <param> tag. For
> example:
> <ui:textfield label="'Model'" name="'model'"
> value="@golfCart/cart/model/description">
> <webwork:param name="'disabled'" value="true"/>
> </ui:textfield>
>
> /Rickard
>
> --
> Rickard Öberg
>
>
>
|