Ok, I've made an in depth article on the wiki for this:
http://wiki.github.com/dpp/liftweb/how-to-make-radio-lists-and-drop-downs-from-enumerations
Let me know if I'm missing anything.
Strom
On Oct 28, 5:53 pm, Naftoli Gugenheim wrote:
> The wiki on GitHub. You probably only need a GitHub accou
I had actually thought about the upgrade paths for DB schemas and I was
thinking of coding up a schema executor that would store a schema version in
the db and could then be used to apply appropriate "diff" or "clean" schemas
against the DB as needed. I think schemifier generally does a very good j
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
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 wiki on GitHub. You probably only need a GitHub account.
-
Strom 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 wants to post this in
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 wrote:
> +1 -- nice detailed
+1 -- nice detailed writeup
-Ross
On Oct 28, 2009, at 8:38 PM, Naftoli Gugenheim wrote:
>
> Why not put it on the wiki? :)
>
> -
> Strom wrote:
>
>
> Thanks again Ross!
>
> I also found out that I could use the ChoiceHolder.toForm method for a
> little less
Why not put it on the wiki? :)
-
Strom 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 who are having troub
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 f
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 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 this with
(untested, uncompiled, and generally just a suggestion ;-) )
XHTML:
var exchangeMethod: Box[ExchangeMethod.Value] = Empty
bind("item", xhtml",
"exchangeMethod" -> { (ns: NodeSeq) =>
(SHtml.radio(ExchangeMethod.elements.map(_.toString).toList,
exc
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 tab
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:
Snippet:
def SnippetName(xhtml:NodeSeq): NodeSeq = {
var exchangeMethod: Box[ExchangeMethod.Value] = Empty
...
bind("item", xhtml,
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 poin
Thanks. I greatly appreciate it.
-
David Pollak 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 Gugenheim wrote:
>
> This may be more
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 ext
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 enumera
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 h
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 :
On Wed, Oct 28, 2009 at 9:21 AM, David Pollak 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 AM, Ross Mellgren wrote:
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 wrote:
>
> I had to slog through some factory maker stuff recently. What I found
> out was that it was amazingly flexible, but
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.
LiftRules.stripComments.de
Perhaps David can shed more light on it... I didn't write the strip
comments stuff nor the FactoryMaker stuff and David has yet to detail
how that stuff actually works or when it should be used. To that end,
I can see the issue here and don't disagree.
Cheers, Tim
On 28 Oct 2009, at 15:20,
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(...)
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("sub
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
Yes. Thanks alot Tim.
On Wed, Oct 28, 2009 at 9:32 AM, Timothy Perrett wrote:
>
> Jack,
>
> LiftRules.exceptionHandler.prepend {
> case (Props.RunModes.Production, r, e) => {
> Log.error("IMPORTANT IMPORTANT IMPORTANT: Unhandeled error
> occoured!!",e)
> // your LiftResp
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 wrote:
> Please see LiftRules.stripComments.
>
> You can do Li
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
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 liftweb@googlegroups.
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.
foo ->
"stats":"foo"
And if that leaf element contains attributes we do not convert it
automatically to JSON object as you expe
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.
32 matches
Mail list logo