[Lift] Re: Snippet name clashes

2009-06-01 Thread feelgood

What is about:
lift:path.Snippet.action /

Where there is following exclusive cases for path:
1 path is a relative path from one of the packages denoted by
LiftRules.addToPackages to a Snippet class
2 path is a path from the _root_ to the Snippet class.

And the Lift can sequentially try each case for resolve Snippet to
use.

On 21 май, 03:45, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Wed, May 20, 2009 at 12:02 PM, Alex Boisvert boisv...@intalio.comwrote:



  2009/5/20 David Pollak feeder.of.the.be...@gmail.com

  On Wed, May 20, 2009 at 9:38 AM, Alex Boisvert boisv...@intalio.comwrote:

  Maybe an optional package attribute?

  e.g.,

  lift:snippet package=com.example type=Foo.bar form=POST
      ...
  /lift:snippet

  Dude... you're so 2008 with that syntax... :-)

  Yes, I know... I just couldn't come to terms with using dots in my XML
  elements.   I guess I have issues ;)

  The current syntax is:

  lift:Foo.bar form=Post.../lift:Foo.bar

  I guess we can add a package attribute anyway, although it breaks the
  whole Snippet lookup mechanism (not the reflection code, but the partial
  functions).

  It seems it would be natural to use XML namespaces for mapping to Scala
  packages.

  LiftRules.mapNamespaceToPackage(http://com.example.myapp.widgets; -
  com.example.myapp.widgets)

  and then,

  html ... xmlns:example=http://com.example.myapp.snippets;

    example:Foo.bar ... /example:Foo.bar

  ?

 Interesting... it might impact rendering performance, but it's nice and
 flexible.



  alex

 --
 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: Snippet name clashes

2009-05-20 Thread Alex Boisvert
Maybe an optional package attribute?

e.g.,

lift:snippet package=com.example type=Foo.bar form=POST
...
/lift:snippet

alex

On Wed, May 20, 2009 at 9:19 AM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Tue, May 19, 2009 at 9:28 PM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 Hi,
 As far as I understand it is not possible to specify the FQCN of a snippet
 class in a snippet tag. Is this true? If so, there might be name clashes:
 Just imagine popular names like user, customer, item, etc.

 This will be particularly important in the OSGi space where you can create
 extensible applications: You do not know in advance, which modules are
 added.

 Hence on the long run I think we need something like namespacing. What do
 you think?


 What do you propose as the syntax?

 It's possible to create page-specific snippets so a fair number of the name
 clashes go away, but yes, for global snippets, there might be name clashes.



 Cheers
 Heiko
 --
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: www.scalamodules.org
 Lift, the simply functional web framework: liftweb.net





 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://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: Snippet name clashes

2009-05-20 Thread Derek Chen-Becker
Well, I don't know that it prevents all name clashes, but you have to use
LiftRules.addToPackages to tell Lift which packages to search for snippet
and view classes.



On Tue, May 19, 2009 at 10:28 PM, Heiko Seeberger 
heiko.seeber...@googlemail.com wrote:

 Hi,
 As far as I understand it is not possible to specify the FQCN of a snippet
 class in a snippet tag. Is this true? If so, there might be name clashes:
 Just imagine popular names like user, customer, item, etc.

 This will be particularly important in the OSGi space where you can create
 extensible applications: You do not know in advance, which modules are
 added.

 Hence on the long run I think we need something like namespacing. What do
 you think?

 Cheers
 Heiko
 --
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: www.scalamodules.org
 Lift, the simply functional web framework: liftweb.net

 


--~--~-~--~~~---~--~~
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: Snippet name clashes

2009-05-20 Thread David Pollak
On Tue, May 19, 2009 at 9:28 PM, Heiko Seeberger 
heiko.seeber...@googlemail.com wrote:

 Hi,
 As far as I understand it is not possible to specify the FQCN of a snippet
 class in a snippet tag. Is this true? If so, there might be name clashes:
 Just imagine popular names like user, customer, item, etc.

 This will be particularly important in the OSGi space where you can create
 extensible applications: You do not know in advance, which modules are
 added.

 Hence on the long run I think we need something like namespacing. What do
 you think?


What do you propose as the syntax?

It's possible to create page-specific snippets so a fair number of the name
clashes go away, but yes, for global snippets, there might be name clashes.



 Cheers
 Heiko
 --
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: www.scalamodules.org
 Lift, the simply functional web framework: liftweb.net

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://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: Snippet name clashes

2009-05-20 Thread David Pollak
On Wed, May 20, 2009 at 9:38 AM, Alex Boisvert boisv...@intalio.com wrote:

 Maybe an optional package attribute?

 e.g.,

 lift:snippet package=com.example type=Foo.bar form=POST
 ...
 /lift:snippet


Dude... you're so 2008 with that syntax... :-)

The current syntax is:

lift:Foo.bar form=Post.../lift:Foo.bar

I guess we can add a package attribute anyway, although it breaks the whole
Snippet lookup mechanism (not the reflection code, but the partial
functions).




 alex

 On Wed, May 20, 2009 at 9:19 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:



 On Tue, May 19, 2009 at 9:28 PM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 Hi,
 As far as I understand it is not possible to specify the FQCN of a
 snippet class in a snippet tag. Is this true? If so, there might be name
 clashes: Just imagine popular names like user, customer, item, etc.

 This will be particularly important in the OSGi space where you can
 create extensible applications: You do not know in advance, which modules
 are added.

 Hence on the long run I think we need something like namespacing. What do
 you think?


 What do you propose as the syntax?

 It's possible to create page-specific snippets so a fair number of the
 name clashes go away, but yes, for global snippets, there might be name
 clashes.



 Cheers
 Heiko
 --
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: www.scalamodules.org
 Lift, the simply functional web framework: liftweb.net





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





 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://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: Snippet name clashes

2009-05-20 Thread Alex Boisvert
2009/5/20 David Pollak feeder.of.the.be...@gmail.com



 On Wed, May 20, 2009 at 9:38 AM, Alex Boisvert boisv...@intalio.comwrote:

 Maybe an optional package attribute?

 e.g.,

 lift:snippet package=com.example type=Foo.bar form=POST
 ...
 /lift:snippet


 Dude... you're so 2008 with that syntax... :-)


Yes, I know... I just couldn't come to terms with using dots in my XML
elements.   I guess I have issues ;)


The current syntax is:

 lift:Foo.bar form=Post.../lift:Foo.bar

 I guess we can add a package attribute anyway, although it breaks the whole
 Snippet lookup mechanism (not the reflection code, but the partial
 functions).


It seems it would be natural to use XML namespaces for mapping to Scala
packages.

LiftRules.mapNamespaceToPackage(http://com.example.myapp.widgets; -
com.example.myapp.widgets)

and then,

html ... xmlns:example=http://com.example.myapp.snippets;

  example:Foo.bar ... /example:Foo.bar

?

alex

--~--~-~--~~~---~--~~
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: Snippet name clashes

2009-05-20 Thread David Pollak
On Wed, May 20, 2009 at 12:02 PM, Alex Boisvert boisv...@intalio.comwrote:

 2009/5/20 David Pollak feeder.of.the.be...@gmail.com



 On Wed, May 20, 2009 at 9:38 AM, Alex Boisvert boisv...@intalio.comwrote:

 Maybe an optional package attribute?

 e.g.,

 lift:snippet package=com.example type=Foo.bar form=POST
 ...
 /lift:snippet


 Dude... you're so 2008 with that syntax... :-)


 Yes, I know... I just couldn't come to terms with using dots in my XML
 elements.   I guess I have issues ;)


 The current syntax is:

 lift:Foo.bar form=Post.../lift:Foo.bar

 I guess we can add a package attribute anyway, although it breaks the
 whole Snippet lookup mechanism (not the reflection code, but the partial
 functions).


 It seems it would be natural to use XML namespaces for mapping to Scala
 packages.

 LiftRules.mapNamespaceToPackage(http://com.example.myapp.widgets; -
 com.example.myapp.widgets)

 and then,

 html ... xmlns:example=http://com.example.myapp.snippets;

   example:Foo.bar ... /example:Foo.bar

 ?


Interesting... it might impact rendering performance, but it's nice and
flexible.




 alex

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://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
-~--~~~~--~~--~--~---