Grails
  1. Grails
  2. GRAILS-4287

when using g:pageProperty with g:applyLayout and content tag there is a missing left < char in javascript tag

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: View technologies
    • Labels:
      None
    • Environment:
      ubuntu, netbeans, groovy 1.6, grails 1.1, jdk 1.6

      Description

      I am trying to include javascript via g:javascript within my view but left most tag char < is missing

      <g:javascript library="prototype/animation" /> in view.gsp should produce:
      <script type="text/javascript" src="/GrailsFaster/js/prototype/animation.js"></script>

      but it instead produces:
      script type="text/javascript" src="/GrailsFaster/js/prototype/animation.js"></script>

      example:

      mainLayout.gsp:

      <html>
      <head>
      <title><g:layoutTitle default="Grails" /></title>
      <link rel="stylesheet" href="$

      {createLinkTo(dir:'css',file:'main.css')}

      " />
      <g:layoutHead />
      </head>
      <body>
      <g:layoutBody />
      </body>
      </html>

      myLayout.gsp:

      <html>
      <head>
      <meta name="layout" content="main" />
      <title><g:pageProperty name="page.title" default="Defaultni titlek" /></title>
      <g:pageProperty name="page.headExt" default="" />
      </head>
      <body>
      <g:pageProperty name="page.menu" default="" />
      <g:layoutBody/>
      </body>
      </html>

      view.gsp:

      <g:applyLayout name="myLayout">
      <content tag="title">Title sample</content>
      <content tag="headExt"><g:javascript library="prototype/animation" /></content>
      <content tag="menu"><g:render template="/menu/menu" model="['menuData':menuData]" /></content>
      BODY CONTENT
      </g:applyLayout>

        Issue Links

          Activity

          Hide
          Daniel Guryca added a comment -

          It is buggy every time when g:javascript is inserted within <content> tag

          Show
          Daniel Guryca added a comment - It is buggy every time when g:javascript is inserted within <content> tag

            People

            • Assignee:
              Unassigned
              Reporter:
              Daniel Guryca
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Last Reviewed:

                Development