PageRenderTime 16ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/main/resources/template/simple/yuipushbutton.ftl

http://struts2yuiplugin.googlecode.com/
Freemarker Template | 40 lines | 38 code | 2 blank | 0 comment | 12 complexity | 685dfc95307a535f40ac0c4331529e80 MD5 | raw file
 1
 2<input type="button"<#rt/>
 3<#if parameters.id?exists>
 4 id="${parameters.id?html}"<#rt/>
 5</#if>
 6<#if parameters.name?exists>
 7 name="${parameters.name?html}"<#rt/>
 8</#if>
 9<#if parameters.nameValue?exists>
10 value="<@s.property value="parameters.nameValue"/>"<#rt/>
11</#if>
12<#if parameters.disabled?default(false)>
13 disabled="disabled"<#rt/>
14</#if>
15<#if parameters.cssClass?exists>
16 class="${parameters.cssClass?html}"<#rt/>
17</#if>
18<#if parameters.cssStyle?exists>
19 style="${parameters.cssStyle?html}"<#rt/>
20</#if>
21<#if parameters.tabindex?exists>
22 tabindex="${parameters.tabindex?html}"<#rt/>
23</#if>/>
24
25<#if parameters.noscript?default(false) == false>
26<script type="text/javascript">
27<#if !parameters.customClickListener>
28  <#include "/${parameters.templateDir}/simple/default-pushbutton-listener.ftl" />
29</#if>
30  function ${parameters.widget}Ready() {
31    var ${parameters.widget} = new YAHOO.widget.Button("${parameters.id}", { type:"push" });
32    ${parameters.widget}.addListener("click", ${parameters.clickListener}, "${parameters.formId?default("")}", false);    
33  }
34  <#if parameters.formId?exists>
35  YAHOO.util.Event.onAvailable("${parameters.formId}", ${parameters.widget}Ready);
36  <#else>
37  YAHOO.util.Event.onDOMReady(${parameters.widget}Ready);
38  </#if>
39</script>
40</#if>