Depending on the structure of the XML, attributes and child elements
are being lost. This can be seen in example 4, where the attribute
expiry_date and the child element status have been dropped.
It would also appear when XML is being converted to JSON attributes
are being flattened to elements.
Hi Jonathan,
Current toJson conversion does not support this case very well. The
transformation rule is such that from each leaf XML element a JSON
field is generated.
statsfoo/stats -
stats:foo
And if that leaf element contains attributes we do not convert it
automatically to JSON object as
I would like to have one error page that appears when any exception
occurs. How would I do that?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Lift group.
To post to this group, send email to
Jack,
LiftRules.exceptionHandler.prepend {
case (Props.RunModes.Production, r, e) = {
Log.error(IMPORTANT IMPORTANT IMPORTANT: Unhandeled error
occoured!!,e)
// your LiftResponse here
RedirectResponse(/error)
}
}
Does that clear it up for
LiftRules.stripComments(false)
generates following error message:
Boot.scala:61: error: wrong number of arguments for method apply: ()()
= Boolean in trait Vendor
LiftRules.stripComments(false)
On 27 Okt., 16:52, David Pollak feeder.of.the.be...@gmail.com wrote:
Please see
Yes. Thanks alot Tim.
On Wed, Oct 28, 2009 at 9:32 AM, Timothy Perrett timo...@getintheloop.euwrote:
Jack,
LiftRules.exceptionHandler.prepend {
case (Props.RunModes.Production, r, e) = {
Log.error(IMPORTANT IMPORTANT IMPORTANT: Unhandeled error
occoured!!,e)
//
Looking at the definition:
val stripComments: FactoryMaker[() = Boolean] =
new FactoryMaker(() = {() = {
if (Props.devMode)
false
else true
}}) {}
try doing:
LiftRules.stripComments(false){}
Cheers, Tim
On 28 Oct 2009, at 13:22, Yousry Abdallah wrote:
The lift-modules/lift-widgets test Boot.scala contains menu entries:
val entries = Menu(Loc(Home, List(index), Home),
Menu(Loc(submenu1, List(submenu1), submenu1)),
Menu(Loc(submenu2, List(submenu2), submenu2)),
Menu(Loc(submenu3, List(submenu3), submenu3),
I downloaded the library source yesterday and stumbled on the
(abstract) factory pattern in the LiftRules Class.
Do you think this is the desired way to change a parameter?
Sometimes you use simple assignment:
LiftRules.useXhtmlMimeType = false
or you apply a value:
LiftRules.setSiteMap(...)
I had to slog through some factory maker stuff recently. What I found
out was that it was amazingly flexible, but that made the simple case
non-obvious. For the simple case (set site-wide), the way I found to
to do it was
factory.default(() = defaultValue)
e.g.
Yeah, the signatures are convuluted... gotta change them to
FactoryMaker[Boolean] rather than FactoryMaker[() = Boolean]
On Wed, Oct 28, 2009 at 8:34 AM, Ross Mellgren dri...@gmail.com wrote:
I had to slog through some factory maker stuff recently. What I found
out was that it was amazingly
On Wed, Oct 28, 2009 at 9:21 AM, David Pollak feeder.of.the.be...@gmail.com
wrote:
Yeah, the signatures are convuluted... gotta change them to
FactoryMaker[Boolean] rather than FactoryMaker[() = Boolean]
See http://github.com/dpp/liftweb/issues/#issue/141
On Wed, Oct 28, 2009 at 8:34
First, I rewrite URLs like /user/harryh to /user?uid=harryh
Also, requests to http://m.harryh.org/foo/bar get rewritten to /
subdomain/mobile/foo/bar
Doing this with the following code:
val urlRewriter: LiftRules.RewritePF = NamedPF(URLRewrite) {
case RewriteRequest(ParsePath(user :: uid ::
Has anyone figure out how to bind enumerations as radio buttons or a
drop down list?
I have an enumeration:
object ExchangeMethod extends Enumeration {
val Pickup = Value(Pickup)
val Ship = Value(Ship)
val PickupOrShip = Value(Pickup or Ship)
}
And I want to put radio buttons in an html
SHtml.selectObj[ExchangeMethod.Value](ExchangeMethod.elements.map(el
= (el, el.toString)), Empty, selected = println(selected))
?
-Ross
On Oct 28, 2009, at 2:59 PM, Strom wrote:
Has anyone figure out how to bind enumerations as radio buttons or a
drop down list?
I have an enumeration:
What is the goal of this system? Is it to be a nice, useful ticketing system
that will serve as a demo to Lift? Or is it also to be a product that will
eventually compete with other issue trackers such as Lift?
If you're thinking big then I would suggest to think in terms of flexibility
and
Thanks. I greatly appreciate it.
-
David Pollakfeeder.of.the.be...@gmail.com wrote:
I opened a ticket for this. I'll expose functionality so you can register
stateful snippets as part of the request process.
On Sun, Oct 25, 2009 at 1:09 PM, Naftoli
The goal is to have a system that we can use for Lift's issue tracking. I
don't know that it has to be as big and bad as, say, JIRA, but it needs to
work well, have a reasonable set of features, and be usable by other people
if they want it. I'm open to suggestions on architecture, but at this
Hey Ross. Thanks for the tips. I found out you have to call the toList
() method before you can map the enumeration elements.
So it would be like this:
XTHML:
item:exchangeMethod /
Snippet:
def SnippetName(xhtml:NodeSeq): NodeSeq = {
var exchangeMethod: Box[ExchangeMethod.Value] = Empty
...
I hear that.
Personally I think it would be more maintainable, not less; there's just a bit
more upfront complexity, although it's something I've already done and I can
share my code. You could trivially have flexible user-defined fields. In my
project you can edit the fields and the lookup
(untested, uncompiled, and generally just a suggestion ;-) )
XHTML:
item:exchangeMethod
method:input / method:label /
/item
var exchangeMethod: Box[ExchangeMethod.Value] = Empty
bind(item, xhtml,
exchangeMethod - { (ns: NodeSeq) =
It's a bug. Please open a ticket for it. I'll get it fixed tonight.
On Wed, Oct 28, 2009 at 11:03 AM, harryh har...@gmail.com wrote:
First, I rewrite URLs like /user/harryh to /user?uid=harryh
Also, requests to http://m.harryh.org/foo/bar get rewritten to /
subdomain/mobile/foo/bar
Doing
Thanks again Ross!
I also found out that I could use the ChoiceHolder.toForm method for a
little less customization (saves a ton of code though).
The following rundown is for newbies like me who are having trouble
with radio buttons and enumerations. Please see the enumeration
definition in my
Why not put it on the wiki? :)
-
Stromstrommo...@gmail.com wrote:
Thanks again Ross!
I also found out that I could use the ChoiceHolder.toForm method for a
little less customization (saves a ton of code though).
The following rundown is for newbies like me
+1 -- nice detailed writeup
-Ross
On Oct 28, 2009, at 8:38 PM, Naftoli Gugenheim wrote:
Why not put it on the wiki? :)
-
Stromstrommo...@gmail.com wrote:
Thanks again Ross!
I also found out that I could use the ChoiceHolder.toForm method for a
I would post on the wiki, but I've never added content to a wiki, and
I can't create an account for the LiftWiki (only admins can make new
accounts?). If someone wants to post this information on there
somewhere, go for it!
Strom
On Oct 28, 5:39 pm, Ross Mellgren dri...@gmail.com wrote:
+1 --
The wiki on GitHub. You probably only need a GitHub account.
-
Stromstrommo...@gmail.com wrote:
I would post on the wiki, but I've never added content to a wiki, and
I can't create an account for the LiftWiki (only admins can make new
accounts?). If someone
Hi all,
I have a silly question about the directory.
How can i get the subfolders and all the files in the specify
directory, such as /images .
I want to use the Dtree to show these files and folders .
Thanks for any suggestion ! :)
Cheers,
Neil
The best you can hope for is to try to access the ServletContext:
http://tomcat.apache.org/tomcat-5.5-doc/servletapi/index.html
Specifically, the getResourcePaths call:
http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/ServletContext.html#getResourcePaths%28java.lang.String%29
On
29 matches
Mail list logo