Thanks for responding Marius. You're right, my doSearch method
doesn't need the msg parameter -- that was just an artifact of
transforming an example (removed now). As far as my specific issue, I
guess you're saying the best solution is for the framework to add
overload def -%(in: NodeSeq =
Thanks for responding Marius. You're right, my doSearch method
doesn't need the msg parameter -- that was just an artifact of
transforming an example (removed now). As far as my specific issue, I
guess you're saying the best solution is for the framework to add
overload def -%(in: NodeSeq =
In the short term you would solve it as I suggested:
Use in your bind
searchBox -% doSearch
and define your doSearch as:
def doSearch: NodeSeq = {
... do your stuff here
}
Actually thinking more into it there is a good reason for -% to not
have a (NodeSeq) = NodeSeq support. -% means that
You could also do it like this:
bind(ajax, xhtml,
searchBox -% SHtml.ajaxText(, q = SetHtml(resultz,
Yawni.query(q))
) ++ Script(JqOnLoad(SetValueAndFocus(myfield, )))
SetValueAndFocus is already in JqJsCmds but it really should in in
JsCmds as it does not depend on JQuery.
Hi, Marius -
Ok, I think I catch the drift of your solution. You said:
bind(ajax, xhtml,
searchBox -% SHtml.ajaxText(, q = SetHtml(resultz,
Yawni.query(q))
) ++ Script(JqOnLoad(SetValueAndFocus(myfield, )))
which is missing a paren -- I think you meant:
Yes you understanding is correct.
FocusOnLoad is not an appropriate solution for your particular problem
as -% and FocusOnLoad operate on two different types which are not
interchangeable due to attributes preservation as you well noticed.
Besides the solution I posted above is similar with what
On Mar 6, 10:57 am, Marius marius.dan...@gmail.com wrote:
Actually thinking more into it there is a good reason for -% to not
have a (NodeSeq) = NodeSeq support. -% means that it preserves the
attributes specified in the template to the resulting node.But having
a bunch of attributes we
The fundamental problem is that at the top bind level you want to use
FocusOnLoad which returns a NodeSeq, but you also want bind to pass along the
attributes, which has to operate at a lower level. So you can use bind twice,
nested.
Try this pattern:
bind(pre, xhtml,
label - {ns: NodeSeq =
Hello,
Bumping my own post since I hadn't received any feedback on this in a
few weeks. Maybe I didn't describe my issue well ?
Thanks in advance,
- Luke
On Feb 21, 8:12 pm, Luke Nezda lne...@gmail.com wrote:
Hello,
I am new to Scala and Lift. I am having a problem using 2 features
On 22 feb., 04:12, Luke Nezda lne...@gmail.com wrote:
Hello,
I am new to Scala and Lift. I am having a problem using 2 features
together which seem to work fine individually. Here's a simplified
piece of the code:
class Ajax {
def someResult(q:String) = spansome results for query
10 matches
Mail list logo