On Tue, Dec 9, 2008 at 2:58 PM, Derek Chen-Becker <[EMAIL PROTECTED]>wrote:
> Awesome!
>
> Derek
>
> PS - I just got two of the same email from you at 4:25 and 4:38. Did you
> hit send twice or is something going on with the list?
I was on my EVDO modem in a poor coverage area and GMail told me that it
failed to deliver the message, so I hit "Send" again and I guess GMail
didn't de-dup the messages. :-)
>
>
> On Tue, Dec 9, 2008 at 4:38 PM, David Pollak <
> [EMAIL PROTECTED]> wrote:
>
>> I looks like a defect to me. I'll work on fixing it Thursday.
>>
>> On Tue, Dec 9, 2008 at 2:04 PM, Derek Chen-Becker <[EMAIL PROTECTED]>wrote:
>>
>>> This is both a comment and a question. I'd like to be able to have a Menu
>>> with a Loc pointing at "/help/". By using the strPairToLink method on the
>>> Loc object, I can use it as both an entry into the help system. This allows
>>> me to effectively bring up "/help/index" due to Lift converting trailing
>>> slashes to "/index", and I can use the boolean parameter to allow access to
>>> all files under the help subdirectory. In order to make this work, though, I
>>> need to define the menu like:
>>>
>>> val helpMenu = Menu(Loc("HelpHome", ("help" :: "" :: Nil) -> true,
>>> "Help"))
>>>
>>> Note the empty string as part of the path definition. If I omit this,
>>> then files under the help subdirectory are accessible, but the link
>>> generated by Menu.builder is "/help". Because it omits the trailing slash it
>>> seems that Lift tries to open the directory as a template XML file and I get
>>> an internal server error (500, stack trace at the end of the email). My
>>> question is whether this is the intended way of doing what I want, or if
>>> I've missed some other way to define this in a single Menu entry (yes, I
>>> could do two, with one hidden). With a server like apache, if I request a
>>> directory without the trailing slash it will respond with a 301 redirect to
>>> the same URL, but with a trailing slash. Should Lift be modified to follow
>>> this behavior?
>>>
>>> One more related issue is that even if I define my Menu as I've shown
>>> above, if I try to use "/help" in the URL without the trailing slash, I get
>>> a directory listing instead of the index.html, which I would expect.
>>>
>>> I'm not sure if this is all under Lift's purview or if some of it should
>>> be handled by chaining in the filter.
>>>
>>> Derek
>>>
>>> PS - Here's the stack trace if I omit the fake "slash":
>>>
>>> ERROR - Exception being returned to browser when processing Req(List(),
>>> Map(), ParsePath(List(help),,true,false), , GetRequest, null)
>>> java.lang.IllegalArgumentException: line 1 does not exist
>>> at scala.io.Source.getLine(Source.scala:280)
>>> at scala.io.Source.report(Source.scala:368)
>>> at scala.io.Source.reportError(Source.scala:355)
>>> at scala.io.Source.reportError(Source.scala:344)
>>> at
>>> scala.xml.parsing.MarkupParser$class.reportSyntaxError(MarkupParser.scala:1113)
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Lift, the simply functional web framework http://liftweb.net
>> Collaborative Task Management http://much4.us
>> Follow me: http://twitter.com/dpp
>> Git some: http://github.com/dpp
>>
>>
>>
>
> >
>
--
Lift, the simply functional web framework http://liftweb.net
Collaborative Task Management http://much4.us
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 [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
-~----------~----~----~----~------~----~------~--~---