[Lift] Re: [scala] Google App Engine for Scala!

2009-06-08 Thread Amit Kumar Verma

Hi All,

I have made a simple test project http://testinggwe.appspot.com/ . For
new development it good we can use Datastore and JPA but can we deploy
existing project on GAE.

Thanks  Regards
Amit Kumar Verma

On Apr 20, 7:40 pm, Atsuhiko Yamanaka atsuhiko.yaman...@gmail.com
wrote:
 Hi,

 On Mon, Apr 20, 2009 at 11:24 PM, 刘浩 sniperliu...@gmail.com wrote:
  Thanks a lot.

  I will try.

 I want to share my Author.scala and Book.scala for further references.
 I have pasted them at
  http://gist.github.com/98561

 Sincerely,
 --
 Atsuhiko Yamanaka
 JCraft,Inc.
 1-14-20 HONCHO AOBA-KU,
 SENDAI, MIYAGI 980-0014 Japan.
 Tel +81-22-723-2150
 +1-415-578-3454
 Fax +81-22-224-8773
 Skype callto://jcraft/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: your first Lift application on GAE/J

2009-06-08 Thread Amit Kumar Verma

Hi Atsuhiko,

I trying the steps u have given but getting this error when execute
the STEP 3

$ mvn package

[INFO] Scanning for projects...
[INFO]

[INFO] Building test
[INFO]task-segment: [package]
[INFO]

[INFO] [resources: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] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:compile {execution: default}]
[INFO] Checking for multiple versions of scala
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:testCompile {execution: default}]
[INFO] Checking for multiple versions of scala
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory: /home/amit/scalaWorkspace/test/
target/surefire-reports

---
 T E S T S
---
Running test.test.test.AppTest
[Fatal Error] :3:4: The markup in the document following the root
element must be well-formed.


Please advise, what could be the reason of this error.

And what is the meaning of STEP 4 and STEP 5

$ appengine-java-sdk-1.2.0/bin/dev_appserver.sh target/test-1.0-
SNAPSHOT

$ appengine-java-sdk-1.2.0/bin/appcfg.sh update target/test-1.0-
SNAPSHOT

where is this appengine-java-sdk-1.2.0 is located ???



Thanks  Regards
Amit Kumar Verma

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Object typecast to Mapper

2009-04-27 Thread Amit Kumar Verma

Hi All,

Thanks again, for support. Made many things more clear.

Thanks
Amit Kumar Verma

On Apr 22, 1:35 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Amit,
 Class.forName(...) is called reflection in Scala/Java land.  It allows you
 to get a class based on a String.  You can then create a new instance of the
 class with the newInstance() method.  However, what you get is an instance
 of Object... and you have to case it into something else before using it.

 In Java, there's only one way to cast things:

 Object o = someClass.newInstance();
 FooBar fb = (FooBar) o;

 In Scala, there are two ways to cast (one is safer and less verbose, the
 other is intentionally more verbose):

 val a: AnyRef = someClass.newInstance
 val fb: FooBar = a.asInstanceOf[FooBar]

 or (the radically better way)
 a match {
   case fb: FooBar = ...
   case _ = ...

 }

 Hope this helps.

 Thanks,

 David

 On Mon, Apr 20, 2009 at 4:41 AM, Amit Kumar Verma cdac.a...@gmail.comwrote:





  Hi All,

  This is a sample function for making an object from string at run
  time. Here we are not casting the object but creating one. I wanted
  the same thing for casting the object.

  public static Object bindObject(Class className) {
         Object objOutput = null;
         try {
             String sClassName = className.getPackage().getName().concat
  (.Wrap.concat(className.getSimpleName()));
             objOutput = Class.forName(sClassName.replaceFirst
  (com.vtech, com.vtech.appxtension)).newInstance();
         } catch (Exception e) {
             try {
                 objOutput = Class.forName(className.getName
  ()).newInstance();
             } catch (Exception e1) {
                 e1.printStackTrace();
             }
         }

         return objOutput;
     }

  Thanks to all for kind support..
  Amit Kumar Verma

  On Apr 18, 8:51 pm, Timothy Perrett timo...@getintheloop.eu wrote:
   So your talking about reflection right? Take a look at scala Manifests
   (which aide getting round type erasure) - other than that scala supports
  all
   the normal reflection tooling that Java does.

   Tim

   On 18/04/2009 06:56, Amit Kumar Verma cdac.a...@gmail.com wrote:

Scala is a static language, so the class for casting must be known at
compile time.  It's not possible to construct a String at runtime and
cast
an object into a class represented by that String. 

But we use this feature in Java for casting the objects.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Object typecast to Mapper

2009-04-18 Thread Amit Kumar Verma

Hi David,

Sorry I used dynamic binding which was not correct.
But in the previous thread you said :

Scala is a static language, so the class for casting must be known at
compile time.  It's not possible to construct a String at runtime and
cast
an object into a class represented by that String. 

But we use this feature in Java for casting the objects.

I will write this to scala group.

I have also written you about the road map of lift.

Thanks for your support
Amit Kumar verma

On Apr 17, 8:30 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Fri, Apr 17, 2009 at 2:00 AM, Amit Kumar Verma cdac.a...@gmail.comwrote:



  Hi David,

  thanks, this is working fine. Problem is resolved.

  But dynamic binding is feature of java then why Scala don't support
  this.

 I'm sorry, I don't understand what dynamic binding is.  Scala supports
 casting just like Java.





  This is an important feature.

  Thanks again
  Amit Kumar Verma

  On Apr 13, 10:10 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   I think it's best to use the built-in JSON creation code and keep the
  code
   as JsCmd as long as possible.

   Here's a snippet that will place the JSON for all the Users in the page.
   I'm including the whole project as well:

   class HelloWorld {
     def json: NodeSeq = Script(jsonForAll(User))

     private def jsonForAll[T : Mapper[T]](meta: MetaMapper[T]): JsCmd =
     JsArray(meta.findAll.map(_.asJs) :_*)

   }

   If you have further questions, please update the project and mark the
  places
   in the code where you have a question and we'll work from there.

   Thanks,

   David

   On Mon, Apr 13, 2009 at 2:07 AM, Amit Kumar Verma cdac.a...@gmail.com
  wrote:

Hi David,

Thanks for ur replies, I just want to make a generic function which
will take an object of mapper and returns the json string of the same.

I have written only two function
1. This will be called by ajax call :

   def getJSONString(xhtml: Group):NodeSeq = {
      getJSONStringGeneric(TestGearLogin)  // here 'TestGearLogin' is
a mapper object
   }

2. function to make JSON string i.e

def getJSONStringGeneric(anyObject :Any):NodeSeq = {

      var sJSONString = {\bindings\: [;

     anyObject match {
          case mm: MetaMapper[_] =  // this line is giving error
           mm.findAll.map(userdetails = {

             var tempJSON = ;

             val ret = new StringBuilder

             ret.append({)
             ret.append(userdetails.getSingleton.appendFieldToStrings
(userdetails))
             ret.append(})

              tempJSON = ret.toString();

             // some manipulation for making correct JSON
              tempJSON = tempJSON.replaceAll(\\{,\\{\);
             tempJSON = tempJSON.replaceAll(\\},\\\});
             tempJSON = tempJSON.replaceAll(=,\:\);
             tempJSON = tempJSON.replaceAll(, , \,\);
             tempJSON += ,;

             sJSONString +=tempJSON
         });
     }

     sJSONString = sJSONString.substring(0,sJSONString.length-1); //
for slicing the last comma
     sJSONString += ]};

     Text(sJSONString);
 }

I changed the code as you suggested but getting the error as I posted.
Please advise.

Thanks
Amit Kumar Verma

On Apr 10, 9:46 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 I think the .asJs method on all Mapper instances should give you the
object
 in JavaScript representation.
 If you can post an entire file, I can work on helping you if the
  above
 doesn't work.

 On Thu, Apr 9, 2009 at 6:53 AM, Amit Kumar Verma 
  cdac.a...@gmail.com
wrote:

  copied the the same code but getting this error

  type arguments [_] do not conform to trait MetaMapper's type
  parameter
  bounds [A : net.liftweb.mapper.Mapper[A]]
   TravelMerchantTest/src/main/
  scala/com/vtech/travelmerchant/snippet  default.scala   line 142
  1239284830763   85593

  Actually I am trying to make the JSON object using a mapper object.
  My
  function is this :

  def getJSONStringGeneric(anyObject :Any):NodeSeq = {

       //Console.println(anyObject.getClass 
  +anyObject.getClass);

       //Console.println(anyObject.getClass.getName 
  +anyObject.getClass.getName);

       //var objTemp = anyObject.asInstanceOf[MetaMapper
  [TestGearLogin]];

       var sJSONString = {\bindings\: [;

       anyObject match {
            case mm: MetaMapper[_] =
             mm.findAll.map(
                      (userdetails: Mapper[_]) ={

               var tempJSON = ;

               val ret = new StringBuilder

               ret.append({)

   ret.append(userdetails.getSingleton.appendFieldToStrings
  (userdetails))

               ret.append(})

               // ret will be like

[Lift] Re: Object typecast to Mapper

2009-04-17 Thread Amit Kumar Verma

Hi David,

thanks, this is working fine. Problem is resolved.

But dynamic binding is feature of java then why Scala don't support
this.
This is an important feature.

Thanks again
Amit Kumar Verma

On Apr 13, 10:10 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 I think it's best to use the built-in JSON creation code and keep the code
 as JsCmd as long as possible.

 Here's a snippet that will place the JSON for all the Users in the page.
 I'm including the whole project as well:

 class HelloWorld {
   def json: NodeSeq = Script(jsonForAll(User))

   private def jsonForAll[T : Mapper[T]](meta: MetaMapper[T]): JsCmd =
   JsArray(meta.findAll.map(_.asJs) :_*)

 }

 If you have further questions, please update the project and mark the places
 in the code where you have a question and we'll work from there.

 Thanks,

 David

 On Mon, Apr 13, 2009 at 2:07 AM, Amit Kumar Verma cdac.a...@gmail.comwrote:





  Hi David,

  Thanks for ur replies, I just want to make a generic function which
  will take an object of mapper and returns the json string of the same.

  I have written only two function
  1. This will be called by ajax call :

     def getJSONString(xhtml: Group):NodeSeq = {
        getJSONStringGeneric(TestGearLogin)  // here 'TestGearLogin' is
  a mapper object
     }

  2. function to make JSON string i.e

  def getJSONStringGeneric(anyObject :Any):NodeSeq = {

        var sJSONString = {\bindings\: [;

       anyObject match {
            case mm: MetaMapper[_] =  // this line is giving error
             mm.findAll.map(userdetails = {

               var tempJSON = ;

               val ret = new StringBuilder

               ret.append({)
               ret.append(userdetails.getSingleton.appendFieldToStrings
  (userdetails))
               ret.append(})

                tempJSON = ret.toString();

               // some manipulation for making correct JSON
                tempJSON = tempJSON.replaceAll(\\{,\\{\);
               tempJSON = tempJSON.replaceAll(\\},\\\});
               tempJSON = tempJSON.replaceAll(=,\:\);
               tempJSON = tempJSON.replaceAll(, , \,\);
               tempJSON += ,;

               sJSONString +=tempJSON
           });
       }

       sJSONString = sJSONString.substring(0,sJSONString.length-1); //
  for slicing the last comma
       sJSONString += ]};

       Text(sJSONString);
   }

  I changed the code as you suggested but getting the error as I posted.
  Please advise.

  Thanks
  Amit Kumar Verma

  On Apr 10, 9:46 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   I think the .asJs method on all Mapper instances should give you the
  object
   in JavaScript representation.
   If you can post an entire file, I can work on helping you if the above
   doesn't work.

   On Thu, Apr 9, 2009 at 6:53 AM, Amit Kumar Verma cdac.a...@gmail.com
  wrote:

copied the the same code but getting this error

type arguments [_] do not conform to trait MetaMapper's type parameter
bounds [A : net.liftweb.mapper.Mapper[A]]
 TravelMerchantTest/src/main/
scala/com/vtech/travelmerchant/snippet  default.scala   line 142
1239284830763   85593

Actually I am trying to make the JSON object using a mapper object. My
function is this :

def getJSONStringGeneric(anyObject :Any):NodeSeq = {

     //Console.println(anyObject.getClass 
+anyObject.getClass);

     //Console.println(anyObject.getClass.getName 
+anyObject.getClass.getName);

     //var objTemp = anyObject.asInstanceOf[MetaMapper
[TestGearLogin]];

     var sJSONString = {\bindings\: [;

     anyObject match {
          case mm: MetaMapper[_] =
           mm.findAll.map(
                    (userdetails: Mapper[_]) ={

             var tempJSON = ;

             val ret = new StringBuilder

             ret.append({)

             ret.append(userdetails.getSingleton.appendFieldToStrings
(userdetails))

             ret.append(})

             // ret will be like
{username=222,password=222,audit_dt=2009-04-06
00:00:00.0,login_pid=26}

             tempJSON = ret.toString();

             tempJSON = tempJSON.replaceAll(\\{,\\{\);
             tempJSON = tempJSON.replaceAll(\\},\\\});
             tempJSON = tempJSON.replaceAll(=,\:\);
             tempJSON = tempJSON.replaceAll(, , \,\);
             tempJSON += ,;

             sJSONString +=tempJSON
                   }
                   )
     }

     sJSONString = sJSONString.substring(0,sJSONString.length-1); //
for slicing the last comma
     sJSONString += ]};

     Text(sJSONString);
 }

but not getting a way of doing this. Please advise.

Thanks
Amit Kumar Verma

On Apr 9, 6:14 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
 Howdy,
 Scala is a static language, so the class for casting must be known at
 compile time

[Lift] Road Map of Lift

2009-04-17 Thread Amit Kumar Verma

Hi David,

We are using the lift-scala framework for our development and thinking
about it even more seriously. Can you please give some information on
Roadmap of development of Lift framework. It will be more useful if it
will give a brief description on areas on which framework is working
on.


Thanks
Amit Kumar Verma

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Object typecast to Mapper

2009-04-13 Thread Amit Kumar Verma

Hi David,

Thanks for ur replies, I just want to make a generic function which
will take an object of mapper and returns the json string of the same.

I have written only two function
1. This will be called by ajax call :

def getJSONString(xhtml: Group):NodeSeq = {
   getJSONStringGeneric(TestGearLogin)  // here 'TestGearLogin' is
a mapper object
}

2. function to make JSON string i.e

def getJSONStringGeneric(anyObject :Any):NodeSeq = {

  var sJSONString = {\bindings\: [;

  anyObject match {
  case mm: MetaMapper[_] =  // this line is giving error
mm.findAll.map(userdetails = {

  var tempJSON = ;

  val ret = new StringBuilder

  ret.append({)
  ret.append(userdetails.getSingleton.appendFieldToStrings
(userdetails))
  ret.append(})

  tempJSON = ret.toString();

  // some manipulation for making correct JSON
  tempJSON = tempJSON.replaceAll(\\{,\\{\);
  tempJSON = tempJSON.replaceAll(\\},\\\});
  tempJSON = tempJSON.replaceAll(=,\:\);
  tempJSON = tempJSON.replaceAll(, , \,\);
  tempJSON += ,;

  sJSONString +=tempJSON
  });
  }

  sJSONString = sJSONString.substring(0,sJSONString.length-1); //
for slicing the last comma
  sJSONString += ]};

  Text(sJSONString);
  }


I changed the code as you suggested but getting the error as I posted.
Please advise.

Thanks
Amit Kumar Verma


On Apr 10, 9:46 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 I think the .asJs method on all Mapper instances should give you the object
 in JavaScript representation.
 If you can post an entire file, I can work on helping you if the above
 doesn't work.

 On Thu, Apr 9, 2009 at 6:53 AM, Amit Kumar Verma cdac.a...@gmail.comwrote:





  copied the the same code but getting this error

  type arguments [_] do not conform to trait MetaMapper's type parameter
  bounds [A : net.liftweb.mapper.Mapper[A]]
   TravelMerchantTest/src/main/
  scala/com/vtech/travelmerchant/snippet  default.scala   line 142
  1239284830763   85593

  Actually I am trying to make the JSON object using a mapper object. My
  function is this :

  def getJSONStringGeneric(anyObject :Any):NodeSeq = {

       //Console.println(anyObject.getClass 
  +anyObject.getClass);

       //Console.println(anyObject.getClass.getName 
  +anyObject.getClass.getName);

       //var objTemp = anyObject.asInstanceOf[MetaMapper
  [TestGearLogin]];

       var sJSONString = {\bindings\: [;

       anyObject match {
            case mm: MetaMapper[_] =
             mm.findAll.map(
                      (userdetails: Mapper[_]) ={

               var tempJSON = ;

               val ret = new StringBuilder

               ret.append({)

               ret.append(userdetails.getSingleton.appendFieldToStrings
  (userdetails))

               ret.append(})

               // ret will be like
  {username=222,password=222,audit_dt=2009-04-06
  00:00:00.0,login_pid=26}

               tempJSON = ret.toString();

               tempJSON = tempJSON.replaceAll(\\{,\\{\);
               tempJSON = tempJSON.replaceAll(\\},\\\});
               tempJSON = tempJSON.replaceAll(=,\:\);
               tempJSON = tempJSON.replaceAll(, , \,\);
               tempJSON += ,;

               sJSONString +=tempJSON
                     }
                     )
       }

       sJSONString = sJSONString.substring(0,sJSONString.length-1); //
  for slicing the last comma
       sJSONString += ]};

       Text(sJSONString);
   }

  but not getting a way of doing this. Please advise.

  Thanks
  Amit Kumar Verma

  On Apr 9, 6:14 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
   Howdy,
   Scala is a static language, so the class for casting must be known at
   compile time.  It's not possible to construct a String at runtime and
  cast
   an object into a class represented by that String.

   However, casting to a known class is easy in Scala... and it's done
   primarily using pattern matching.  The following code:

     def foo(in: Any) = in match {
       case mm: MetaMapper[_] =
         mm.findAll.map(
           (m: Mapper[_]) =
           m.asJs
         )
       case _ =
     }

   Does what I think you want.  It takes an incoming instance, in and
  matches
   it against being an instance of MetaMapper[_].  This means its some type
  of
   MetaMapper (we don't know or care what the type parameter is).  If it is
  a
   MetaMapper, it's assigned to the mm variable.  We can then call findAll
  on
   that variable and we have a bunch of Mapper[_] instances.  Note that I
   explicitly called out the type of m in the function, but that line could
  be
   re-written mm.findAll.map(m = m.asJs) because the compiler infers the
  type
   of m.

   Does this help?

   Thanks,

   David

   On Thu, Apr 9, 2009 at 3:55 AM, Amit Kumar Verma cdac.a...@gmail.com

[Lift] Object typecast to Mapper

2009-04-09 Thread Amit Kumar Verma

Hi All,

I am trying to type cast an scala object to its mapper object

1 def getJSONString(anyObject :Object):NodeSeq = {

2 var obj = anyObject.asInstanceOf[anyObject.getClass
().getName()];

3 obj.findAll.map(userdetails = {
// some code will go here
 }
 Text(any string)
  }


but i am getting erroe as expected [ but found ( on line 2.

please help me to typecast the object to its mapper object.

Thanks
Amit Kumar Verma

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Removing xmlns:lift=http://liftweb.net/ in rendered page

2009-03-02 Thread Amit Kumar Verma

Hi David.

HTML validator throws one error because of this line ?xml
version=1.0 encoding=UTF-8? . In this way our application will
never pass W3C html validation.

thanks
Amit Kumar Verma

On Feb 28, 4:20 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Marc,

 It's possible that an Ajax transaction could take place subsequent to a page
 load that would insert XHTML on the page that contains something in the lift
 namespace.  That's why I say that one removes the namespace at one's peril
 and we are not going to support such a feature.  It's fraught with too many
 potential problems.

 Thanks,

 David

 On Fri, Feb 27, 2009 at 3:16 PM, Marc Boschma
 marc+lift...@boschma.cxmarc%2blift...@boschma.cx



  wrote:
  I think what Ross is asking for isn't necessarily a bad thing for a given
  page which doesn't actually use the lift namespace after all processing
  has occurred.
  Think of it in a more general sense: how do I filter any namespace that
  isn't actually present in the result XML? This is actually an important
  question from a security perspective as I may not want to divulge a name
  space that is used internally. eg. a cms name space expressed in a
  previous thread. If plug-ins or similar functionality is to be supported in
  the future the resolution of this issue is probably a must.

  To my mind it should be possible to search the XML for all used name spaces
  and then to remove any name spaces declared but not present.

  Whether or not the lift name space is treated specially or not is
  an implementation issue...

  It should also be possible to raise an error if an element exists in a XML
  result that has a name space that shouldn't be present (the counter
  example).

  Marc

  On 28/02/2009, at 1:54 AM, David Pollak wrote:

  On Fri, Feb 27, 2009 at 6:08 AM, rossputin rossaj...@gmail.com wrote:

  Hi.

  Sure, I understand it is required as the xml is processed, is there a
  post process operation in the pipeline anywhere ?

  Ross,

  Lift emits XHTML to the browser that contains tags with lift:xxx attributes
  to support the Comet services and also used the lift:gc attribute to support
  other services until we found a significant defect in Firefox and jQuery and
  decided to use another mechanism to replace the lift:gc attributes.  Lift
  makes active use of the lift namespace.  The xmlns:lift attribute is removed
  at your peril and the removal will not be supported on this list.

  Thanks,

  David

  Thanks,

  Ross.

  On Feb 27, 1:59 pm, Timothy Perrett timo...@getintheloop.eu wrote:
   Ross,

   You cannot remove this namespace as it is needed to make it valid XHTML
  -
   Scala XML processing uses a strict xml processer to ensure that the
  markup
   is valid and complete before outputting it. Because we use lift:mybound
  /
   the namespace is required for the parser to pass that markup xml as
  valid I
   do believe.

   Tim

   On 27/02/2009 13:40, rossputin rossaj...@gmail.com wrote:

Hi.

Sure, its something I do to simplify as much as possible any
unnecessary tags or attributes.  I suppose it is a practice I picked
up while using Cocoon.  Ultimately, I just want the purest xhtml
output possible, hopefully revealing as little about the platform
which produced it as possible.

Ross.

On Feb 27, 1:31 pm, Viktor Klang viktor.kl...@gmail.com wrote:
May I ask why?

Cheers,
Viktor

On Fri, Feb 27, 2009 at 1:23 PM, rossputin rossaj...@gmail.com
  wrote:

Hi.

I am using lift 1.0.  I was hoping to remove the
   'xmlns:lift=http://
liftweb.net/' element from :

?xml version=1.0 encoding=UTF-8?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
  http://
   www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns:lift=http://liftweb.net/; xmlns=
 http://www.w3.org/1999/
xhtml

Thanks.

Ross.

On Feb 27, 12:18 pm, Timothy Perrett timo...@getintheloop.eu
  wrote:
Hey Ross,

Which element are you referring to? Head items? What version of
  lift are
you
using? (you can find out by looking in pom.xml under the lift-*
dependencies)

Thanks

Tim

On 27/02/2009 11:36, rossputin rossaj...@gmail.com wrote:

Hi.

I must admit I have not worked my way through the book yet, but I
  was
wondering if it is possible to remove the xmlns:lift=http://
liftweb.net/ attribute on the html element in the rendered page?

Thanks.

Ross.

--
Viktor Klang
Senior Systems Analyst

  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp

--~--~-~--~~~---~--~~
You received

[Lift] Postgre DB connection issue

2009-02-25 Thread Amit Kumar Verma

Hi
all,
Boot.scala is costomised for jndi connection. Web.xml is also correct.
I am using apache-tomcat -6.0.10 and have context like this
-
Resource name=jdbc/mysqlDS
  auth=Container
  type=javax.sql.DataSource
  driverClassName=com.p6spy.engine.spy.P6SpyDriver
  url=jdbc:postgresql://192.168.0.30:5000/somedbname
  username=someusername
  password=somepassword
  maxActive=4
  maxIdle=0
  maxWait=11000
/

I have p6spy.jar both in my lib and endorsed folder of tomcat, and
even in lib of project but I am not able to connect to the postgre db.
I am getting following error
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC
driver class 'com.p6spy.engine.spy.P6SpyDriver'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource
(BasicDataSource.java:766)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection
(BasicDataSource.java:540)
at bootstrap.liftweb.DBVendor$.newConnection(Boot.scala:40)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:70)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:70)
at net.liftweb.util.Full.flatMap(Can.scala:259)
at net.liftweb.mapper.DB$.newConnection(DB.scala:70)
at net.liftweb.mapper.DB$.getConnection(DB.scala:87)
at net.liftweb.mapper.DB$.use(DB.scala:241)
at net.liftweb.mapper.MetaMapper$class.findMapDb
(MetaMapper.scala:158)
at com.vtech.travelmerchant.model.MLoginMapper$.findMapDb
(MLoginMapper.scala:7)
at net.liftweb.mapper.MetaMapper$class.findAll
(MetaMapper.scala:136)
at com.vtech.travelmerchant.model.MLoginMapper$.findAll
(MLoginMapper.scala:7)
at com.vtech.travelmerchant.snippet.login.loginUser$1
(login.scala:39)
at com.vtech.travelmerchant.snippet.login$$anonfun$getLogin
$1.apply(login.scala:44)
at com.vtech.travelmerchant.snippet.login$$anonfun$getLogin
$1.apply(login.scala:44)
at net.liftweb.http.S$NFuncHolder$$anonfun$apply$51.apply
(S.scala:644)
at net.liftweb.http.S$NFuncHolder$$anonfun$apply$51.apply
(S.scala:644)
at scala.List.map(List.scala:
734)
please help me, where I am going wrong.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Snippet issue

2009-02-25 Thread Amit Kumar Verma

Hi All,

By default lift calls is bind in the way

lift:OperatorLoginAction.doLogin

 /* some HTML code here */

lift:OperatorLoginAction.doLogin

which means the class OperatorLoginAction should be in snippet
folder. But I want to make is more structureded and my hierarchy is
like this

snippet
  - entity
- operator
  - OperatorLoginAction

then how will I invoke doLogin method of this class.

I tried lift:entity.operator.OperatorLoginAction.doLogin  even
lift:snippet.entity.operator.OperatorLoginAction.doLogin
but this is not working, throwing error

WARN - Snippet Failure: SnippetFailure(/loginpage.html - ParsePath
(List(loginpage.html),true,false),Full
(com.vtech.myproject.snippet.entity.operator.OperatorLoginAction.doLogin),Class
Not Found)


please help me to make it work.

Thanks
amit


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Postgre DB connection issue

2009-02-25 Thread Amit Kumar Verma

Hi David,

Problem was with jar file only, It should be present in endorsed
folder under tomcat.
thanks it is working now.

Amit

On Feb 25, 7:24 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Amit,
 Is the JAR containing the com.p6spy.engine.spy.P6SpyDriver class in Tomcat's
 lib directory?

 Thanks,

 David

 On Wed, Feb 25, 2009 at 5:28 AM, Amit Kumar Verma cdac.a...@gmail.comwrote:





  Hi
  all,
  Boot.scala is costomised for jndi connection. Web.xml is also correct.
  I am using apache-tomcat -6.0.10 and have context like this
  -
  Resource name=jdbc/mysqlDS
   auth=Container
   type=javax.sql.DataSource
   driverClassName=com.p6spy.engine.spy.P6SpyDriver
   url=jdbc:postgresql://192.168.0.30:5000/somedbname
   username=someusername
   password=somepassword
   maxActive=4
   maxIdle=0
   maxWait=11000
 /

  I have p6spy.jar both in my lib and endorsed folder of tomcat, and
  even in lib of project but I am not able to connect to the postgre db.
  I am getting following error
  org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC
  driver class 'com.p6spy.engine.spy.P6SpyDriver'
 at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource
  (BasicDataSource.java:766)
 at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection
  (BasicDataSource.java:540)
 at bootstrap.liftweb.DBVendor$.newConnection(Boot.scala:40)
 at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:70)
 at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:70)
 at net.liftweb.util.Full.flatMap(Can.scala:259)
 at net.liftweb.mapper.DB$.newConnection(DB.scala:70)
 at net.liftweb.mapper.DB$.getConnection(DB.scala:87)
 at net.liftweb.mapper.DB$.use(DB.scala:241)
 at net.liftweb.mapper.MetaMapper$class.findMapDb
  (MetaMapper.scala:158)
 at com.vtech.travelmerchant.model.MLoginMapper$.findMapDb
  (MLoginMapper.scala:7)
 at net.liftweb.mapper.MetaMapper$class.findAll
  (MetaMapper.scala:136)
 at com.vtech.travelmerchant.model.MLoginMapper$.findAll
  (MLoginMapper.scala:7)
 at com.vtech.travelmerchant.snippet.login.loginUser$1
  (login.scala:39)
 at com.vtech.travelmerchant.snippet.login$$anonfun$getLogin
  $1.apply(login.scala:44)
 at com.vtech.travelmerchant.snippet.login$$anonfun$getLogin
  $1.apply(login.scala:44)
 at net.liftweb.http.S$NFuncHolder$$anonfun$apply$51.apply
  (S.scala:644)
 at net.liftweb.http.S$NFuncHolder$$anonfun$apply$51.apply
  (S.scala:644)
 at scala.List.map(List.scala:
  734)
  please help me, where I am going wrong.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: lift with MS Sequel

2009-02-17 Thread Amit Kumar Verma

Thanks a lot. I will check this out and inform you.

On Feb 16, 6:17 pm, TylerWeir tyler.w...@gmail.com wrote:
 Hi Amit,

 If you open up the pom.xml file that lives in the root of your
 project, you'll see what versions of jars are used.

 For example, I have:
 [snip]
   properties
 scala.version2.7.3/scala.version
   /properties
 [/snip]

 This will set which version of scala to use.

 [snip]
 dependency
   groupIdnet.liftweb/groupId
   artifactIdlift-core/artifactId
   version0.11-SNAPSHOT/version
 /dependency
 [/snip]

 This tells maven to pull 0.11-SNAPSHOT of lift-core.  There is an
 entry for each jar, so update all of them to the appropriate version.

 If you're going to jump to 0.11-SNAPSHOT you should use scala 2.7.3,
 so make both of the changes together.

 Also, if you're on OS X/linux/unix* your maven repository is by
 default located in your home dir, ~/.m2  I don't know about Windows,
 I think your need to set it explicitly.

 Poke around in your ~/.m2/ and you'll see how things are laid out.

 As for eclipse, I have no idea, I use vim, so I can't help.

 Tyler

 On Feb 16, 2:13 am, Amit Kumar Verma cdac.a...@gmail.com wrote:

  Hi All,

  Thanks for your valuable time and support. It is great to know that
  now lift is supporting Microsoft SQL Server and Oracle 10g. Now just
  to test that. But before doing that I need to take the update of
  lift.

  How can I update lift version. Currently I am using lift 0.10-
  SNAPSHOT , eclipse 3.3.0  and scala 2.7.0 for my development.
  Actually  I don't know where lift is installed or jar s kept. I mean
  this was created in stone age and now I am not using maven for
  compiling or creating lift application.

  will you please tell me how to update lift.

  Thanks
  Amit Kumar Verma

  Tim Perrett wrote:
   Awesome - I use both of these and get defo test the MSSQL drivers
   2moro (GMT)...

   On 10 Feb 2009, at 18:51, David Pollak wrote:

Folks,

Al Thompson just checked in support for SQL Server and Oracle.
Please test these configurations.

Thanks,

David

On Mon, Feb 9, 2009 at 9:12 AM, David Pollak 
feeder.of.the.be...@gmail.com
 wrote:

On Sun, Feb 8, 2009 at 10:16 PM, Amit Kumar Verma
cdac.a...@gmail.com wrote:

Hi,

do lift support MSSQL db ?

Lift's mapper currently supports PostgreSQL, MySQL, Derby, H2, etc.

I'm expecting MS SQL and Oracle support by end of week.

You can use JPA for other DB support.

Thanks
Amit Kumar Verma

--
Lift, the simply functional web frameworkhttp://liftweb.net
Beginning Scalahttp://www.apress.com/book/view/1430219890
Follow me:http://twitter.com/dpp
Git some:http://github.com/dpp

--
Lift, the simply functional web frameworkhttp://liftweb.net
Beginning Scalahttp://www.apress.com/book/view/1430219890
Follow me:http://twitter.com/dpp
Git some:http://github.com/dpp

   Tim Perrett
   print application architect

   t: +44 (0) 78144 34 791
   e: he...@timperrett.com
   w: timperrett.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] lift with MS Sequel

2009-02-09 Thread Amit Kumar Verma

Hi,

do lift support MSSQL db ?


Thanks
Amit Kumar Verma

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---