2009/5/20 David Pollak <[email protected]>
>
>
> On Wed, May 20, 2009 at 9:38 AM, Alex Boisvert <[email protected]>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... :-)
>
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---