You could try:
object Config{
def error(xs) = {
S.error(xs)
fadeOutErrors(5 seconds, 1 second)
}
}
and call Config.error(xs) instead of S.error(xs)
or something similar. I'm sure someone can come up with a more elegant
solution than this. Just the first thing that popped into my
It's not make sense for my project.
I separate business transaction from UI logic.
When create or update business model will occur notice or error,
and then do something for UI by the business transaction
for example:
business:
def MyBusinessTransaction(v: String) : Option[MyModel] = {
val
Hello Marius,
I have an other question about S.error.
When I use: S.error(can not delete this department.)
I get:
try{jQuery(#lift__noticesContainer__).each(function(i) {this.innerHTML =
divErrorullican not delete./li/ul /div;});} catch (e) {}
What I want this
I think this particular use case is very interesting. There should be a
flexible (LiftRules or in the Msgs snippet) mechanism for making this
behavior flexible... doing it for all users, doing it on a user-by-user
basis.
Please open a ticket at http://github.com/dpp/liftweb/issues referencing
On Dec 9, 3:41 pm, Xuefeng Wu ben...@gmail.com wrote:
Hello Marius,
I have an other question about S.error.
When I use: S.error(can not delete this department.)
I get:
try{jQuery(#lift__noticesContainer__).each(function(i) {this.innerHTML =
divErrorullican not delete./li/ul /div;});}
You don't need to configure anything in boot.
Assume this is an Ajax function:
def howdy: JsCmd = {
S.error(howdy error)
fadeOutErrors(5 seconds, 1 second)
}
... in your snippet you can say:
SHtml.a(Text(Click me)(howdy _)
If you want to fade out errors in a page and not via
Are you using field validate into an Ajax context or not? If not using
something like:
def howdy = {
S.error(howdy error)
spanHello there/span ++
head{Script(OnLoad(fadeOutErrors(5 seconds, 1 second)))}
/head
}
from your snippet should be ok.
If you are using validate from an
Yes, I do something like
// do the DB stuff
vmyMapper.validate match {
case Nil =
case xs = S.error(xs)
}
But I should always add fadeOutErrors(5 seconds, 1 second)?
I want lift highlight every error/notice information.
On Tue, Dec 8, 2009 at 5:56 PM, Marius marius.dan...@gmail.com
Yes you need to send down fadeOut... call
def myFunc: JsCmd = {
// do some DB stuff
vmyMapper.validate match {
case Nil = Noop
case xs = S.error(xs); fadeOutErrors(5 seconds, 1 second)
}
}
On Dec 8, 3:01 pm, Xuefeng Wu ben...@gmail.com wrote:
Yes, I do something like
// do the DB
I think It's better I could configure it, but not code every where.
On Tue, Dec 8, 2009 at 9:23 PM, Marius marius.dan...@gmail.com wrote:
Yes you need to send down fadeOut... call
def myFunc: JsCmd = {
// do some DB stuff
vmyMapper.validate match {
case Nil = Noop
case xs =
Please see this:
http://groups.google.com/group/liftweb/browse_thread/thread/972562da2c40ce88/ea30455fc11d4e1f?hl=enlnk=gstq=notice+fade#ea30455fc11d4e1f
If you are using Ajax, notices could easily fade out.
Br's,
Marius
On Dec 8, 8:02 am, Xuefeng Wu ben...@gmail.com wrote:
Hi,
I want to
Yes, it's my wanted.
How could I configure it at boot?
On Tue, Dec 8, 2009 at 3:44 PM, Marius marius.dan...@gmail.com wrote:
Please see this:
http://groups.google.com/group/liftweb/browse_thread/thread/972562da2c40ce88/ea30455fc11d4e1f?hl=enlnk=gstq=notice+fade#ea30455fc11d4e1f
If you are
12 matches
Mail list logo