How can I call a template with a variable number of arguments that have Html type in play?
I created a template in play2 defined like the following:
@(tabs: Html*)
<div class="btn-group" style="margin-bottom:20px">
@for((tab,index) <- tabs.zipWithIndex){
<a class="btn btn-mini btn-info active" id="display-hierarchy-@index" href="javascript:void(0)"><i class="icon icon-random icon-white"></i></a>
}
</div>
@for((tab,index) <- tabs.zipWithIndex){
<div id="display-hierarchy-tab-@index" class="onetab">
@tab
</div>
}
I tried to call it like
@views.html.tabs({
<a>tab1</a>
},{
<a>tab2</a>
})
I tried other varios combinations but it fails with:
type mismatch; found : scala.xml.Elem required: play.api.templates.Html