Derek,

Loc is type-safe.  The default Loc that takes no parameters is probably what
you're looking at.  But take a look at:
http://github.com/dpp/liftweb/tree/master/sites/example/src/main/scala/net/liftweb/example/lib/WikiStuff.scala

The WikiStuff Loc has a WikiLoc parameter which describes the wiki page.  If
you look at line 97, the WikiLoc is used to calculate the link text.

Thanks,

David

On Thu, Dec 11, 2008 at 8:58 AM, Derek Chen-Becker <[EMAIL PROTECTED]>wrote:

> Right, sorry. I should have been more clear. The definition of LinkText is:
>
> case class LinkText[T](val text : 
> (T<http://scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/sitemap/Loc/LinkText.T.html>)
> => NodeSeq<http://www.scala-lang.org/docu/files/api/scala/xml/NodeSeq.html>
> ) extends Product<http://www.scala-lang.org/docu/files/api/scala/Product.html>
>
> I'm just wondering what "T" is supposed to represent since the text val
> expects a function (T) => NodeSeq. All of the example code I can find
> essentially ignores the param of type T, like this:
>
> val fooText = new LinkText( ignore => Text("something that does not use the
> ignore parameter"))
>
> When I look in Loc.scala I can't quite figure out what that's supposed to
> be. I see that by default it has something to do with foundParam, but I
> can't quite get my head around that, either. It looks like it has something
> to do with the rewrite function on Loc, and I know you gave an example of
> the Wiki page using these things but I've been staring at so much code the
> past few weeks that it's starting to blur together. Am I correct that it
> allows you to determine the link text off of the type-safe parameter
> returned from a rewrite?
>
> Thanks,
>
> Derek
>
> On Thu, Dec 11, 2008 at 9:35 AM, David Pollak <
> [EMAIL PROTECTED]> wrote:
>
>> Are you referring to Loc.LinkText?  It's the calculation of the text that
>> appears by default in the menu item's Link.
>>
>> On Thu, Dec 11, 2008 at 6:16 AM, Derek Chen-Becker <[EMAIL PROTECTED]
>> > wrote:
>>
>>> I've been going back and forth through the code and I can't figure out
>>> what the in parameter for LinkText is supposed to be. I can't find any
>>> example code using it; everything that I find seems to just ignore the
>>> parameter.
>>>
>>> Thanks,
>>>
>>> Derek
>>>
>>>
>>>
>>
>>
>> --
>> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to