Thymleaf中的<option value =“value1,value2”>

时间:2015-06-10 06:03:54

标签: thymeleaf

我想做点什么

class BingWorker(object):
    def __init__(self):
        self.gm_worker = gearman.GearmanWorker(['localhost:4730'])

    def callBing(self, gearman_worker, gearman_job):
        print "In worker ", gearman_job.data
        return "Kools"

    def run(self):
        completed_job_request = self.gm_worker.register_task('bingmedia', self.callBing)
        self.gm_worker.work()

if __name__ == '__main__':
    BingWorker().run()
在thymleaf中。我知道一个值,我所要做的就是

<option value="value1,value2"> 

如何在Thyemleaf的select选项中传递两个值。

1 个答案:

答案 0 :(得分:0)

正确使用模板: &lt; option th:value =“$ {value1} +''+ $ {value2}”&gt;