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 dynamic text box?
- 3. テキストを作る方法<a ref> tag in business layer in ASP
- 4. How to support other languages in Azure blob storage?
- 5. を渡す値は<a href= > tag
- 6. <a href> inside a button in wordpress
- 7. Spring RMI to other to remote
- 8. Generics/templates in python?
- 9. $(文書).onを使用する方法(「上..クリック<a tag?
- 10. プレイフレームワーク:私は<a href="http://www.playframework.org/documentation/1.2.3/templates#tags" rel="nofollow">custom Play! framework tag</a>にパラメータとしてフィールドの名前を渡したいカスタムタグ
- 11. window.open()と<a href="'> in Struts2
- 12. アクションメッセージtag in struts2
- 13. <a name=... in post form
- 14. リンクは<a href> tag when content has .com inside
- 15. <a href="#"> when the anchor tag only triggers a jQuery action without redirecting the user?
- 16. Windows "Documents and Settings" in other languages
- 17. "a href" Tag with WatiN
- 18. タグ内<a href="....."></a></td> DOUBLE_WHITESPCE in query href
- 19. は(<a href="http://www.sitefinity.com/devnet/forums/sitefinity/developing-with-sitefinity/mapping-a-widget-template-to-a-user-control-in-sitefinity-5.aspx" rel="nofollow">SiteFinity's forums</a>にクロスポスト)SiteFinity 5
- 20. <a href="javascript:foo(this)"> passes Window, I want the tag element itself
- 21. デザイン<a href>, <button>, <input> in JSP
- 22. タグ<a name> on portlet rendering in Websphere Portal
- 23. R:因子レベル、recode rest to 'other'
- 24. 文字列とCharStream <'a> in FParsec
- 25. プレイタグが<a href="http://www.playframework.org/documentation/1.2.4/templates#Invoketagbody" rel="nofollow">docs</a>から身体
- 26. HTML <hr> tag strange display
- 27. jQueryの要素が</p> <p><a href="http://www.bennadel.com/blog/1563-jQuery-Comments-Plug-in-To-Access-HTML-Comments-For-DOM-Templating.htm#blogcommentform" rel="nofollow">creating jquery template</a></p> <p>で
- 28. UbuntuのMVファイルが<a href="/questions/tagged/ubuntu" class="post-tag" title="show questions tagged 'ubuntu'" rel="tag">ubuntu</a>で
- 29. EL in <sec:authorize>アクセス属性
- 30. センター<img /> +</p> <p><a /> inside table and overflow auto in IE7