Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8454745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:06:29+00:00 2026-06-10T12:06:29+00:00

hope to explain my problem better now , I am using play 2 framework

  • 0

hope to explain my problem better now , I am using play 2 framework with java to develop a sketching system with html5 canvas.

the front end will be composed of 3 different views (pages). one for rendering the html5 canvas , one for rendering a submit form and display tags. And a third page as an administrator page.
want to create these views and be able to navigate from one rendered view or page to another.

Sorry if it is a basic question but kind of new to play framework.

any suggestion for me.

I know the @helper tags are used but don’t seem to know how to go about it.

thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:06:30+00:00Added an answer on June 10, 2026 at 12:06 pm

    You don’t need to use @helper or @tags they are for including templates in other templates, just use common rendering, first create the files:

    • app/views/canvas.scala.html
    • app/views/edit.scala.html
    • app/views/admin.scala.html

    So then in your Appliaction controller create three actions representing each view

    public static Result canvas(){
        return(views.html.canvas.render());    
    }
    
    public static Result canvas(){
        return(views.html.edit.render());    
    }
    
    public static Result canvas(){
        return(views.html.admin.render());    
    }
    

    For each action you also need to create a route in conf/routes to ‘translate’ given URL to proper action (first is default):

    GET   /             controllers.Application.canvas()
    GET   /edit         controllers.Application.edit()
    GET   /admin        controllers.Application.admin()
    

    Finally in each view add that block, to get the ‘main menu’ displayed on every page. Note: use reverseRouting as a href of links to make sure they are always correct – even if you change something in routes (de facto, here you could use @tags for including this block from one file to many views, however place it manually now):

    <div class="main-nav">
        <a href='@routes.Application.canvas()'>Canvas page</a>
        <a href='@routes.Application.edit()'>Edit form</a>
        <a href='@routes.Application.admin()'>Admin area</a>
    </div>
    

    You have now sample for basic application with 3 actions, with separate view for each.

    At the end, don’t be angry with me, but you need to spent more time studying official documentation and included Java samples. I showed you basic scenario, which allows you to navigate between three pages and nothing else. Most probably it’s not enought to write working app, however describing it makes no sense – as it’s described yet in the docs and demonstrated in samples.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope I can explain this problem right, it's a bit confusing for me.
I hope I can explain my problem in a way that it's clear for
I have a complicated problem and I hope to explain it clearly possible... I
Image describing the problem http://img215.imageshack.us/img215/3725/20100314235127schedule2.jpg I hope the image above can explain what I
I hope I can explain this properly. I'm using flashDevelop for an avatar creation
I hope to explain my problem simple in order to get good feedback :)
To help better explain my Question, here is what i have: I am using
Hello I will try my best to explain my problem and I really hope
let me try to explain my problem. I'm currently trying to develop a small
This is in my opinion an abstract problem and I hope I can explain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.