Search Results

Search found 178 results on 8 pages for 'lift'.

Page 2/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Possible to not use ID field but another column name? in Lift

    - by bstevens90
    I am connected to a oracle database from a scala/lift webapp. I have been able to successfully pull information from the database as I wished but am having one issue. For each table I want to access I am required to add an ID field so that the app will work with the trait IdPK. What mapper class or trait can I use to override this? I have been trying to find one but been unable to locate it. Figured people have not always had an ID field on every table they make that is just called ID... class DN_REC extends LongKeyedMapper[DN_REC] with IdPK { def getSingleton = DN_REC object dn_rec_id extends MappedInt(this){ } This is what I am talking about. I would like to use the dn_rec_id as my primary key as it is on the table. Thanks

    Read the article

  • How many Scala web-frameworks are there?

    - by Prikrutil
    Hello! I've just started learning Scala and the first thing I'm going to implement is a tiny web-application. I've been using Erlang for the last year to implement server-side software, but I've never wrote web-applications before. It will be a great experience. Here is my question: are there web-frameworks for Scala except for Lift? Don't get me wrong, Lift looks awesome. I just want to know how many frameworks there are so that I can then choose between them. It's always a good to have a choice, but I the only thing I found was Lift.

    Read the article

  • Having a white space issue with scala, I think?

    - by Uruhara747
    I'm trying to write a script to make generating Lift projects quicker but I believe i'm running into a white space issue. val strLiftGen = "mvn archetype:generate -U-DarchetypeGroupId=net.liftweb\ -DarchetypeArtifactId=lift-archetype-blank\ -DarchetypeVersion=1.0\ -DremoteRepositories=http://scala-tools.org/repo-releases-DgroupId=" + args(0)"-DartifactId=" + args(1)"-Dversion=1.0-SNAPSHOT */" Anyone care to hit the newb with the stick of wisdom and tell me a smart way of handling a long string like this?

    Read the article

  • S.redirectTo leads always to a blank screen

    - by Jaime Ocampo
    I am now playing a little bit with lift (2.8.0), and all the features in LiftRules work as intended. But I haven't been able to use S.redirectTo at all. I always ends with a blank screen, no matter what. No error messages at all! As an example, I have the following form: ... <lift:logIn.logInForm form="post"> <p><login:name /></p> <p><login:password /></p> <p><login:submit /></p> </lift:logIn.logInForm> ... And the code is: object LogIn extends helper.LogHelper { ... def logInForm(in: NodeSeq): NodeSeq = { var name = "" var password = "" def login() = { logger.info("name: " + name) logger.info("password: " + password) if (name == "test1") S.redirectTo("/example") if (name == "test2") S.redirectTo("/example.html") if (name == "test3") S.redirectTo("example.html") S.redirectTo("/") } bind("login", in, "name" -> SHtml.text(name, name = _), "password" -> SHtml.password(password, password = _), "submit" -> SHtml.submit("Login", login)) } } The method 'login' is invoked, I can check that in the log information. But as I said, no matter which name I enter, I always end with a blank screen, although 'examples.html' is available when being accessed directly in the browser. How should I invoke S.redirectoTo in order to navigate to 'examples.html'? Also, why don't I receive an error message (I am logging at a debug level)? I think all the configuration in Boot is correct, since all LitRules examples (statelessRewrite, dispatch, viewDispatch, snippets) work fine.

    Read the article

  • Why people define class, trait, object inside another object in Scala?

    - by Zwcat
    Ok, I'll explain why I ask this question. I begin to read Lift 2.2 source code these days. In Lift, I found that, define inner class and inner trait are very heavily used. object Menu has 2 inner traits and 4 inner classes. object Loc has 18 inner classes, 5 inner traits, 7 inner objects. There're tons of codes write like this. I wanna to know why the author write it like this. Is it because it's the author's personal taste or a powerful use of language feature?

    Read the article

  • scala jpa notifying hibernate

    - by coubeatczech
    Hi, i just tried to play a little with Scala Jpa, Downladed and run the basic lift-jpa-basic maven archetype, it works, but when I try to add my own @Entity, there is Unknown entity exception thrown. So what do I need to tell the environment to notify my entities? Thanks for answering.

    Read the article

  • Dispatch functions

    - by Uruhara747
    What exactly are dispatch functions? I've googled them and all is vague. They seem to just be nested blocks/closures inside of other functions? Speaking from a scala/lift point..but i assume it's universal, i've seen them mentioned in ruby as well.

    Read the article

  • scala: Adding attributes (odd and even rows) to xml table

    - by Debilski
    In a Lift application, I’d like to add a special tag which takes the <tbody> part of the next table and adds odd and even classes (for example) to each <tr> tag. Alternating, of course. While I have found a way to add another attribute to all <tr> tags, there are still a few problems left (see code below). First, it doesn’t work. cycle.next is called too often, so in the end, everything is an odd row. Other problems are that the code doesn’t exclude inner tables (so a nested <tr> would be transformed as well) and that it also affects the <thead> part of the table. Ideas to make this code work? (Of course, if there already is a lift-based solution – without jQuery – for this, I’ll gratefully take it.) class Loop(val strs: String*) { val stream_iter = Stream.continually(strs.toStream).flatten.iterator def next = stream_iter.next } val cycle = new Loop("even", "odd") val rr = new RewriteRule { override def transform(n: Node): Seq[Node] = n match { case elem : Elem => elem match { case Elem(_, "tr", att @ _, _, _*) => elem % Attribute(None, "class", Text( List(att.get("class").getOrElse("").toString, cycle.next).reduceLeft(_+" "+_).trim ), Null) toSeq case other => other } case other => other } } val rt = new RuleTransformer(rr) val code = <table> <thead><tr><td>Don’t</td><td>transform this</td></tr></thead> <tbody> <tr class="otherclass"> <td>r1c1</td><td>r1c2</td> </tr> <tr> <td>r2c1</td><td>r2c2</td> </tr> <tr> <td>r3c1</td><td>r3c2</td> </tr> </tbody> </table> println(rt(code))

    Read the article

  • Tool to assist loading servers into a rack??

    - by MikeJ
    Is there any kind of tool to assist in loading an unloading servers? I realized that I lack both height and upper body strength to remove servers from the upper tiers of a rack? I could not find the name or type of equipment that folks are using to do this kind of work safely?

    Read the article

  • Optional attribute values in MappedField

    - by David Brooks
    I'm new to Scala and Lift, coming from a slightly odd background in PLT Scheme. I've done a quick search on this topic and found lots of questions but no answers. I'm probably looking in the wrong place. I've been working my way through tutorials on using Mapper to create database-backed objects, and I've hit a stumbling block: what types should be used to stored optional attribute values. For example, a simple ToDo object might comprise a title and an optional deadline (e.g. http://rememberthemilk.com). The former would be a MappedString, but the latter could not be a MappedDateTime since the type constraints on the field require, say, defaultValue to return a Date (rather than a Date or null/false/???). Is an underlying NULL handled by the MappedField subclasses? Or are there optional equivalents to things like MappedInt, MappedString, MappedDateTime that allow the value to be NULL in the database? Or am I approaching this in the wrong way?

    Read the article

  • OpenSSL compatible API for Scala?

    - by pfleidi
    Hello, I'm working on a project with a friend. He's implementing his software in Ruby and I'm doing my stuff in Scala (with Lift). We're using some asynchronous encryption and he is using the ruby OpenSSL bindings for that: key = OpenSSL::PKey::RSA.generate(4096) self.public_key = key.public_key self.private_key = key What I'm looking for is a simple API which is compatible to OpenSSL and runs on the JVM. I need it to create key-pairs and to encrypt and sign our payload. Do you have any suggestions?

    Read the article

  • Setting cookie in LiftFilter

    - by Gero
    Hi, How do I set a cookie in a LiftFilter.doFilter method? I tried to set the cookie as follows (stripped some code): class AuthenticationFilter extends LiftFilter { override def doFilter(request: ServletRequest, response: ServletResponse , chain: FilterChain) { val cookie = new HTTPCookie("SomeCookie", Full("" + System.nanoTime), Empty, Full("/authentication"), Full(60 * 60 * 24 * 14), Empty, Empty) cookie.setPath("/somePath") S.addCookie(cookie) val httpResp = response.asInstanceOf[HttpServletResponse] httpResp.sendRedirect("/some/page.html") } } However, when I check the browsers cookie, no cookie is set (apart from JSESSIONID), and I know the doFilter method is being executed because of logging messages and the fact that the browser is redirected to /some/page.html. I'm using Scala 2.8, Lift 2.1-SNAPSHOT and the app is running is GAE (1.3.6, only tested on dev_appserver so far). Any ideas? Thanks, Gero

    Read the article

  • rewrite not a member of LiftRules

    - by José Leal
    Hi guys, I was following http://www.assembla.com/wiki/show/liftweb/URL_Rewriting tutorial for url rewritting in liftweb.. but I get this error: error: value rewrite is not a member of object net.liftweb.http.LiftRules .. it is really odd.. and the documentation says that it exists. I'm using idea IDE, and I've done everything from scratch, using the lift maven blank archifact. Some more info: [INFO] ------------------------------------------------------------------------ [INFO] Building Joseph3 [INFO] task-segment: [tomcat:run] [INFO] ------------------------------------------------------------------------ [INFO] Preparing tomcat:run [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [yuicompressor:compress {execution: default}] [INFO] nb warnings: 0, nb errors: 0 [INFO] artifact org.mortbay.jetty:jetty: checking for updates from scala-tools.org [INFO] artifact org.mortbay.jetty:jetty: checking for updates from central [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [INFO] [scala:compile {execution: default}] [INFO] Checking for multiple versions of scala [INFO] /home/dpz/Scala/Doit/Joseph3/src/main/scala:-1: info: compiling [INFO] Compiling 2 source files to /home/dpz/Scala/Doit/Joseph3/target/classes at 1274922123910 [ERROR] /home/dpz/Scala/Doit/Joseph3/src/main/scala/bootstrap/liftweb/Boot.scala:16: error: value rewrite is not a member of object net.liftweb.http.LiftRules [INFO] LiftRules.rewrite.prepend(NamedPF("ProductExampleRewrite") { [INFO] ^ [ERROR] one error found [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1(Exit value: 1) [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19 seconds [INFO] Finished at: Thu May 27 03:02:07 CEST 2010 [INFO] Final Memory: 20M/175M [INFO] ------------------------------------------------------------------------ Process finished with exit code 1 enter code here

    Read the article

  • Different Scala Actor Implementations Overview

    - by Stefan K.
    I'm trying to find the 'right' actor implementation for my thesis. I realized there is a bunch of them and it's a bit confusing to pick one. Personally I'm especially interested in remote actors, but I guess a complete overview would be helpful to many others. This is a pretty general question, so feel free to answer just for the implementation you know about. I know about the following Scala Actor implementations (SAI). Please add the missing ones. Scala 2.7 (difference to) Scala 2.8 Akka (http://www.akkasource.org/) Lift (http://liftweb.net/) Scalaz (http://code.google.com/p/scalaz/) What are the target use-cases for these SAIs (lightweight vs. "heavy" enterprise framework)? do they support remote actors? What shortcomings do remote actors have in the SAIs? How is their performace? How active is there community? How easy are they to get started? How good is the documentation? How easy are they to extend? How stable are they? Which projects are using them? What are their shortcomings? What are their design principles? Are they thread based or event based (receive/ react) or both? Nested receiveS hotswapping the Actor’s message loop

    Read the article

  • Liftweb Menu customization

    - by DataSurfer
    I want to create a menu that looks like: HOME | FOO | BAR | ABOUT | CONTACT How might I go about doing this? Here is what I have tried: <lift:Menu.builder ul:class="menu" li_item:class="current" /> and ul.menu li { display: inline; list-style-type: none; text-transform: uppercase; border-right: 1px solid white; padding-right: 5px; } li.current span { background: white; color: black; padding: 5px 5px 3px 5px; font-size: 11px; } li.current a, a:visited, a:link { color: white; padding: 5px 5px 3px 5px; font-size: 11px; } This gets close, but it doesn't look quite right. Also you end up with an extra line at the end. I want the lines to be the same height as the text. http://lh5.ggpht.com/_5DxlOp9F12k/S2aFQHfupzI/AAAAAAAAJiY/Ds0IpEyu78I/s800/menu.png

    Read the article

  • Tab Sweep - Devoxx questions, GlassFish Rest, APAC Java, Lift, JEPs, tools, ...

    - by alexismp
    Recent Tips and News on Java, Java EE 6, GlassFish & more : • Submit a question for Devoxx 2011 Keynotes (Moderator questions) • Devoxx for Java developers (The Java blog) • GlassFish REST Client: ComplexExample.java (Jason) • Oracle Technology Network site for Asia-Pacific developers (OTN APAC) • Notes on deploying Lift apps to GlassFish (Antonio) • Using JSR-250's @PostConstruct Annotation to Replace Spring's InitializingBean (DZone) • The future is in the JEPs (Stephen) • Comparison of Eclipse 3.6 and IntelliJ IDEA 10.5: Pros and Cons (Dzone)

    Read the article

  • Ensure house map maze with lifts can be solved?

    - by Philipp Lenssen
    In my game we see the floors of a house from the side, and the hero can take lifts -- a lift either goes up (to the next lift upwards), or down (to the next lift downwards), depending on the arrow as shown, and there's always a pair of exactly two lifts connected. That's the only way the hero can move vertically, though he can freely move horizontally. The house map is a randomized 11x5 grid with different items, and unpassable walls to the far left, far right, and sometimes in one of the two middle positions: My question: How can I ensure the map is always randomized yet always solvable and that the hero, starting at the left side of the bottom floor, can always leave it via any upwards-pointing lift at the top floor? For what it's worth I'm using the Lua language for development. Thanks so much!

    Read the article

  • Does Exchange 2010 lift the restriction that DL addresses must be in Active Directory?

    - by Justin Grant
    We'd like to enable end-users to be able to create and maintain their own email distribution lists in Exchange 2010, where those lists may include users inside the company but also customers, partners, etc. who are outside the company. One of the limitations in Exchange 2007 (see this question) was that any member of a DL had to have an entry in active directory. You couldn't just take a group of email addresses (both inside and outside my company) and create an Exchange DL with those addresses without involving Active Directory admins to create entries for each external user. For a company creating hundreds of small mailing lists every month, this was an unacceptable IT expense. So we had to use a separate mailing list solution (GNU mailman) for DLs which included external users. Is this limitation relaxed in Exchange 2010 so we can throw away GNU mailman and use Exchange instead?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >