gsp

    0熱度

    1回答

    我被困在一個點,在那裏我從域中獲取列表並將其保存到另一個列表中。我如何通過參數去新創建的列表 的代碼看起來如下喜歡: params.max = Math.min(max ?: 10, 100) params.offset = params.offset as Integer ?: 0 Calendar date = Calendar.getInstance();

    1熱度

    1回答

    我有多個.gsp視圖使用一個Grails模板文件,被稱爲是這樣的: <g:render template="/template/mail/notification/notification_email" model="[ title: 'A string', text: 'Another string', ]"/> 不過,我想移動A string和Another stri

    0熱度

    1回答

    我在g:link中的相同params屬性中添加命名參數和映射時遇到問題。 我可以把命名參數,例如: <g:link action="action" controller="controller" params='[hello:"hello",world:"world"]'>test</g:link> 或者我可以在控制器中的地圖和使用,在GSP鏈接參數,如: <g:link action="ac

    0熱度

    1回答

    我必須在我的項目中上傳文件。但是當我取消對話框時,以前上傳的文件正在消失。即使取消對話框後,是否有辦法維持第一個選定的文件。 這裏是我的代碼 <div class="input-field" id="uploadAuditReport"> <label class="active">Upload Audit Report *</label> <input type="file"

    0熱度

    2回答

    我想在src/groovy/GSPFormatter中注入groovyPageRenderer, 如何在不調用新構造函數的情況下做到這一點? 編輯 package gsprenderer import spud.core.FormatterInterface import grails.gsp.PageRenderer class GSPFormatter implements Forma

    0熱度

    1回答

    在grails中,假設您有一個名爲'MainProject'的項目,我的默認索引是http://localhost:8080/MainProject/,與此確切URL關聯的頁面是views/index.gsp。 我想項目的起始鏈接不是http://localhost:8080/MainProject/而是類似http://localhost:8080/MainProject/users/login

    -1熱度

    1回答

    是否有任何將標識添加到<g:link>標記? 在我.gsp文件,我有以下代碼: <g:link controller="application" action="index" id="my_id">My Link</g:link> 的Grails產生以下HTML: <a href="application/index">My Link</a> 按照grails documentation,

    0熱度

    1回答

    嗨,我在Grails中很新,在grails中有一個非常簡單的問題,我希望有人能幫助我。 我有一個簡單的域類人如下: class Person { String name // name of the person Date dob // date of birth } // end of class 我已經在我的數據庫幾個人的條目。 在另一種形式中,我想讓用戶從下拉

    0熱度

    1回答

    在grails項目中,添加內部工程,但如果我將代碼複製到外部CSS中,我添加的CSS代碼不會執行。對於整個項目來說,.css文件是正確加載並顯示的,但對於我輸入爲內部CSS的特定行代碼,如果放置在外部CSS而不是內部,則它們不會執行。 GSP頁:(內部CSS的作品,因爲它應該) <head> <meta charset="utf-8"/> <meta name="viewpor

    0熱度

    1回答

    從Register.gsp頁面當我提交表單時,它呈現良好並進入列表頁面。但問題是它不保存任何數據。如果我通過dbconsole添加數據,則list.gsp顯示數據。可能是愚蠢的問題,但我在Grails中很初學。提前致謝。 域類: package userreg class Customer { String name Date birthday String gender Strin