Skip to content

d6y/MatchWithoutCurrentValueExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Match Without Current Value Example

A MatchWithoutCurrentValue example for Lift 2.6.

Scenario

We have a Menu.param matching /product/{id}.

There is one known product ID: 1.

Expected Behaviour

  • A request of /product/1 should produce a "product information" page which simply echos the product ID.

  • A request of /product/2 should redirect the user to the home page.

Try it...

$ sbt
> container:start

Try the above URLs:

Code

The Menu.param is created and added to site map in Boot.scala. This is also where our "database" lives.

The ProductInfo and rendering class is in code.snippet/products.scala.

The HTML page is src/main/webapp/product/star.html

About

Example of using MatchWithoutCurrentValue

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published