S.? in MappedCountry

19 views
Skip to first unread message

Andrew Mullins

unread,
May 22, 2013, 2:56:23 PM5/22/13
to lif...@googlegroups.com
What's the best way around this?
I have a scheduled task that runs outside of S scope and need to access the value of a country field on a Mapper object. When I try to print the value of the country field, I get an error:
"Attempted to use resource bundles outside of an initialized S scope. S only usable when initialized, such as during request processing. Did you call S.? from Boot?"
I've noticed the same error when I try to call toString on the value of a country field from inside a util.Schedule(() => { println(locationInstance.country.is.toString) }).

I just updated from 2.4 to 2.5-RC5 and have not had this error before now.
I'm guessing I'll have to write my own MappedCountry implementation...

David Pollak

unread,
May 22, 2013, 2:59:06 PM5/22/13
to liftweb
S.initIfUnitted(mock Lift Session) { // your code
}



--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net

Andrew Mullins

unread,
May 22, 2013, 7:56:47 PM5/22/13
to lif...@googlegroups.com
Awesome. Just what I needed. Thanks, David.
Reply all
Reply to author
Forward
0 new messages