Re: [Lift] labels for inputs
Thanks Naftoli, that did it. I wonder, why use a new method -% for attribute preservation? Naftoli Gugenheim wrote: This was changed. Instead, with the regular arrow - attributes are not preserved at all, and a new arrow was introduced -% that preserves all attributes from the template as is. This is in addition to being able to pass attributes to many SHtml methods; being able to add attributes to the returned NodeSeq; binding on attributes; and attribute snippets. - Chris Lewisburningodzi...@gmail.com wrote: Hello list, I was looking for a way to attach label elements to form inputs (via DOM id), and I came across this thread: http://www.mail-archive.com/liftweb@googlegroups.com/msg04821.html This suggests that bind points, when expanded, result in elements that have any attribute under the bind point namespace merged into the result element. This isn't working in 1.1-M7, unless I'm misunderstanding something. Given this template code: lift:Order.allOrders tr tdorder:status order:id=status//td /tr /lift:Order.allOrders I should see a DOM id of status on the resulting element, right? Instead it's just ignored. Am I doing something wrong? thanks! chris -- 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=. -- 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=. -- 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=.
Re: [Lift] labels for inputs
One reason is that the regular arrow takes a NodeSeq which can't necessarily have attributes; for example it might be a few Elems. The new arrow takes Elem which can. - Chris Lewisburningodzi...@gmail.com wrote: Thanks Naftoli, that did it. I wonder, why use a new method -% for attribute preservation? Naftoli Gugenheim wrote: This was changed. Instead, with the regular arrow - attributes are not preserved at all, and a new arrow was introduced -% that preserves all attributes from the template as is. This is in addition to being able to pass attributes to many SHtml methods; being able to add attributes to the returned NodeSeq; binding on attributes; and attribute snippets. - Chris Lewisburningodzi...@gmail.com wrote: Hello list, I was looking for a way to attach label elements to form inputs (via DOM id), and I came across this thread: http://www.mail-archive.com/liftweb@googlegroups.com/msg04821.html This suggests that bind points, when expanded, result in elements that have any attribute under the bind point namespace merged into the result element. This isn't working in 1.1-M7, unless I'm misunderstanding something. Given this template code: lift:Order.allOrders tr tdorder:status order:id=status//td /tr /lift:Order.allOrders I should see a DOM id of status on the resulting element, right? Instead it's just ignored. Am I doing something wrong? thanks! chris -- 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=. -- 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=. -- 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=. -- 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=.
[Lift] labels for inputs
Hello list, I was looking for a way to attach label elements to form inputs (via DOM id), and I came across this thread: http://www.mail-archive.com/liftweb@googlegroups.com/msg04821.html This suggests that bind points, when expanded, result in elements that have any attribute under the bind point namespace merged into the result element. This isn't working in 1.1-M7, unless I'm misunderstanding something. Given this template code: lift:Order.allOrders tr tdorder:status order:id=status//td /tr /lift:Order.allOrders I should see a DOM id of status on the resulting element, right? Instead it's just ignored. Am I doing something wrong? thanks! chris -- 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=.