According the Lift wiki, I know the "View First" concept of Lift. That's very different from any framework I used. Take the basic JSP things as the example, I could write
<a href="post/new"> Create a new post</a>
in the page, and write the logic in a servlet. How can I do things like this with lift? I wrote the same tag in a template and when I accessed this page I got 404 error. But if I add a Menu to the SiteMap, things goes well. Is there any possible to make a link without making a new Menu? I am a beginner of Lift and Scala. Thanks in advance.<a href> tag to access other templates in lift?
0
A
答えて
1
Yes, it is possible.
Just don't call LiftRules.setSiteMap at your boot class, then Lift will let you access every pages under your webapp/ directory. You could test your code in this mode.
But this will also lead to no access control, so be careful.
2
When everything is declared in your SiteMap, you can have Lift generate the links for youの使用方法
0
リンクをアクセス可能にするが、サイトマップには表示されないようにすることもできます(サイトマップを使用したくない場合は、ブライアンの答えになる)
SiteMap(Menu("PreClass")/"preClass" >> Hidden)
サイトマップを有効にしたままにしておくと、アクセスを厳重に管理する方が良いと思われます。
関連する問題
- 1. ページは<a href> tag in IE, jquery is attached to the a href
- 2. <a href> tag in TextBox in GridView
- 3. 「<A href' tag in dynamic text box?
- 4. テキストを作る方法<a ref> tag in business layer in ASP
- 5. How to support other languages in Azure blob storage?
- 6. <a href..> html tag
- 7. ステージングデータフローテンプレートジョブがデータフロー<a href="https://cloud.google.com/dataflow/docs/templates/creating-templates" rel="nofollow noreferrer">Creating Templates</a>ガイドに続き
- 8. を渡す値は<a href= > tag
- 9. <a href=''> not working on the other pages
- 10. <a > tag dynamically text generation issue
- 11. ボタンonclickのみが動作します。<a onclick> tag doesn't work in javascript when sending parameter to another page
- 12. Stringを取得するためのActivity Contextの<a href tag which has dynamic values. how to open that url in webview?
- 13. Cloudtrail to Cloudwatch to other account
- 14. Spring RMI to other to remote
- 15. なぜ<a href> tag doesn't work inside a form
- 16. <a href> inside a button in wordpress
- 17. Generics/templates in python?
- 18. iframe to other web side
- 19. $(文書).onを使用する方法(「上..クリック<a tag?
- 20. プレイフレームワーク:私は<a href="http://www.playframework.org/documentation/1.2.3/templates#tags" rel="nofollow">custom Play! framework tag</a>にパラメータとしてフィールドの名前を渡したいカスタムタグ
- 21. Pre-Compiled Templates in Phoenix
- 22. アクションメッセージtag in struts2
- 23. <a href="#id"> to a javascript
- 24. window.open()と<a href="'> in Struts2
- 25. <a name=... in post form
- 26. リンクは<a href> tag when content has .com inside
- 27. は、複数のエクスポート<a href="https://drive.google.com/open?id=0BzAJnxmL2vZodmJSRU1XWnNVSHM" rel="nofollow">,link to data in csv file</a><br>
- 28. <a href="#"> when the anchor tag only triggers a jQuery action without redirecting the user?
- 29. リンクを挿入する方法<a href> tag from database
- 30. シミュレート "<a href>" in Angular