Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Grails 在另一个自定义标记库中动态调用自定义标记库_Grails_Dynamic_Gsp_Taglib - Fatal编程技术网

Grails 在另一个自定义标记库中动态调用自定义标记库

Grails 在另一个自定义标记库中动态调用自定义标记库,grails,dynamic,gsp,taglib,Grails,Dynamic,Gsp,Taglib,我已经制作了两个自定义标记库,即tabContainer和tab def tabContainer = { attrs, body -> println("body: "+body()) out << '<div class="tab-content">' << body() << '</div>' } def tabContainer={attrs,body-> println(“body:+body()) o

我已经制作了两个自定义标记库,即tabContainer和tab

def tabContainer = { attrs, body ->
    println("body: "+body())
    out << '<div class="tab-content">' << body() << '</div>'
}
def tabContainer={attrs,body->
println(“body:+body())

out像这样更改您的标签。这对我有用

out << '<div class="tab-pane ' + (attrs.active == "true" ? 'active' : '') + '" id="' + attrs.id + '">' << body() << '</div>'
out
<myUI:tabContainer>
    <myUI:tab id="hello1">Hello1 contents</myUI:tab>
    <myUI:tab id="hello2" active="true">Hello2 contents</myUI:tab>
</myUI:tabContainer>
out << '<div class="tab-pane ' + (attrs.active == "true" ? 'active' : '') + '" id="' + attrs.id + '">' << body() << '</div>'