For stable identifers, see the Scala Language Specification, section 8.1.4: http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaReference.pdf
You can also see this discussion: http://old.nabble.com/About-Class-Type-match-td22309426.html Short answer is that you cannot pattern match against the result of a method invocation (foo.toString). A stable identifier must be a val (something that is calculated and will not change for the duration of the pattern match and be upper case or in back-ticks. So, in your case: val doc = "Foo" // can't match against doc because it looks like something you want to extract val Doc = "Foo" // can match against Doc On Fri, Dec 18, 2009 at 3:48 AM, ortis <[email protected]> wrote: > i have problem with rewriting > > if i do something like this > LiftRules.rewrite.append { > case RewriteRequest(ParsePath(List("Documents"), _, > _, _), _, _) => > RewriteResponse(List("Documents", "VZN" )) > } > > evrything works fine but if i do > > val doc = "Documents" > > LiftRules.rewrite.append { > case RewriteRequest(ParsePath(List(doc), > _, _, _), _, _) => > RewriteResponse(List("Documents", > "VZN" )) > } > in browser i can see only : The Requested URL / was not found on this > server > > if i do > > LiftRules.rewrite.append { > case RewriteRequest(ParsePath(List > ( something.toString ), _, _, _), _, _) => > RewriteResponse(List("Documents", > "VZN" )) > } > i get error "stable identifier required" > > Is there something i do not know about rewriting, or problem is in > something else. I'm new in scala and lift, and > i can't find any solution for this for now > > Can anybody help? > > very thanks > > majo > > > -- > > 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]<liftweb%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- 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.
