I disagree with the unglyness you are talking about just because
Snipets are UI elements. However you can preserve the attributes from
the markup such as:
def doit(xhtml: NodeSeq): NodeSeq = {
bind("f", xhtml,
"text" -%> SHtml.text("name", println _)
)
}
and in the markup
<lift:MySnippet.doit>
<f:text class="abc" size="3"/>
</lift:MySnippet.doit>
On Mar 5, 2:07 pm, Julian Backes <[email protected]> wrote:
> Hi,
>
> I'm trying to get my first form in Lift running and I'm having the
> following problem:
>
> I use for example SHtml.text(..) to create a text input element.
> Unfortunately, this element has no specific class or id such that I can
> customize it using CSS or whatever.
>
> I know that I can add some parameters to SHtml.text(..) which are passed
> to the generated form element but this means that I have style
> information in my scala code. And this is, in my opinion, very ugly.
>
> Is there a better solution?
>
> I could imagine something like <e:myfield class="somecssclass"/>. This
> class information is accessible in scala so the form generator could
> automatically add it to the generated element...
>
> Thanks in advance for your help!!
>
> Julian
--
You received this message because you are subscribed to the Google Groups
"Lift" 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/liftweb?hl=en.