Re: [Lift] Re: Passing attributes to bound elements

2010-01-31 Thread Adam Warski
Hello,

> > This was considered later on a defect, and not a feature. To preserve
> > markup attributes in your bind use -%> instead of ->
> 
> thanks, although the -%> is missing support for the .toForm, as it returns a 
> Box[NodeSeq]. And for % you need an Elem. Any ideas how to deal with that? :)
> 
> What are you applying toForm to?

In this case it is a MappedDate.
But I've worked around the problem using jquery (all I wanted to do is add the 
datepicker anyway): I can wrap the bound element using a ..., and then lookup all elements with that class, 
and for each get the child and apply the datepicker creation.

-- 
Adam Warski
http://www.warski.org
http://www.softwaremill.eu




-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Re: Passing attributes to bound elements

2010-01-29 Thread David Pollak
On Fri, Jan 29, 2010 at 12:15 AM, Adam Warski  wrote:

> Hello,
>
> > This was considered later on a defect, and not a feature. To preserve
> > markup attributes in your bind use -%> instead of ->
>
> thanks, although the -%> is missing support for the .toForm, as it returns
> a Box[NodeSeq]. And for % you need an Elem. Any ideas how to deal with that?
> :)
>

What are you applying toForm to?


>
> --
> Adam Warski
> http://www.warski.org
> http://www.softwaremill.eu
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Re: Passing attributes to bound elements

2010-01-29 Thread Adam Warski
Hello,

> This was considered later on a defect, and not a feature. To preserve
> markup attributes in your bind use -%> instead of ->

thanks, although the -%> is missing support for the .toForm, as it returns a 
Box[NodeSeq]. And for % you need an Elem. Any ideas how to deal with that? :)

-- 
Adam Warski
http://www.warski.org
http://www.softwaremill.eu




-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: Passing attributes to bound elements

2010-01-28 Thread Marius
This was considered later on a defect, and not a feature. To preserve
markup attributes in your bind use -%> instead of ->

Br's,
Marius

On Jan 29, 12:38 am, Adam Warski  wrote:
> When trying to use datepicker on a form, I found a post (by Derek 
> Chen-Becker) from august which says:
>
> "OK, the key there is the entrydate id. If you look at
> src/main/webapp/index.html, you'll see the markup in the "Add Entry" form:
>
>            
>
> That e:id attribute gets merged so that the resulting element has the
> attribute id="entrydate" set (likewise for maxlength). This is a convenient
> way of setting attributes on templates that will be bound in your snippets. "
>
> And I wanted to use this way of setting attributes on elements, but it 
> doesn't seem to work - no attributes get rendered on the resulting element. 
> Is this still supported? (the only difference from the example is that I 
> don't use "e:id" but my own prefix which I then bind to in my snippet)
>
> --
> Adam Warskihttp://www.warski.orghttp://www.softwaremill.eu

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.