mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
ww-1184
git-svn-id: https://svn.apache.org/repos/asf/incubator/webwork2@396273 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<script>
|
||||
|
||||
<#if (parameters.customOnsubmitEnabled?default(false))>
|
||||
<script>
|
||||
<#--
|
||||
Enable auto-select of optiontransferselect tag's entries upon containing form's
|
||||
submission.
|
||||
-->
|
||||
var containingForm = document.getElementById("${parameters.id}");
|
||||
dojo.require("dojo.event.connect");
|
||||
<#if (parameters.optiontransferselectIds?if_exists?size > 0)>
|
||||
var containingForm = document.getElementById("${parameters.id}");
|
||||
<#assign selectObjIds = parameters.optiontransferselectIds.keySet() />
|
||||
<#list selectObjIds as selectObjectId>
|
||||
dojo.event.connect(containingForm, "onsubmit",
|
||||
@@ -21,6 +23,7 @@ var containingForm = document.getElementById("${parameters.id}");
|
||||
</#list>
|
||||
</#if>
|
||||
<#if (parameters.optiontransferselectDoubleIds?if_exists?size > 0)>
|
||||
var containingForm = document.getElementById("${parameters.id}");
|
||||
<#assign selectDoubleObjIds = parameters.optiontransferselectDoubleIds.keySet() />
|
||||
<#list selectDoubleObjIds as selectObjId>
|
||||
dojo.event.connect(containingForm, "onsubmit",
|
||||
@@ -42,6 +45,7 @@ var containingForm = document.getElementById("${parameters.id}");
|
||||
submission
|
||||
-->
|
||||
<#if (parameters.updownselectIds?if_exists?size > 0)>
|
||||
var containingForm = document.getElementById("${parameters.id}");
|
||||
<#assign tmpIds = parameters.updownselectIds.keySet() />
|
||||
<#list tmpIds as tmpId>
|
||||
dojo.event.connect(containingForm, "onsubmit",
|
||||
@@ -56,8 +60,9 @@ var containingForm = document.getElementById("${parameters.id}");
|
||||
});
|
||||
</#list>
|
||||
</#if>
|
||||
|
||||
</script>
|
||||
</#if>
|
||||
|
||||
|
||||
</table>
|
||||
</form>
|
||||
|
||||
@@ -1,57 +1,68 @@
|
||||
</form>
|
||||
|
||||
|
||||
<#if (parameters.customOnsubmitEnabled?if_exists)>
|
||||
<script>
|
||||
function customOnsubmit() {
|
||||
<#--
|
||||
Code that will auto-select optiontransferselect elements upon containing form submission
|
||||
--><#t/>
|
||||
<#if (parameters.optiontransferselectIds?if_exists?size > 0)><#t/>
|
||||
// Code that will auto-select optiontransferselect elements upon containing form submission
|
||||
<#assign selectTagIds = parameters.optiontransferselectIds.keySet()/><#t/>
|
||||
<#list selectTagIds as tmpId><#t/>
|
||||
// auto-select optiontrasferselect (left side) with id ${tmpId}
|
||||
var selectObj = document.getElementById("${tmpId}");
|
||||
selectAllOptions(selectObj);
|
||||
selectUnselectMatchingOptions(selectObj, null, "unselect", false, "key");
|
||||
<#if parameters.optiontransferselectIds.get(tmpId)?exists><#t/>
|
||||
<#assign selectTagHeaderKey = parameters.optiontransferselectIds.get(tmpId).toString()/><#t/>
|
||||
selectUnselectMatchingOptions(selectObj, "${selectTagHeaderKey}", "unselect", false, "key");
|
||||
</#if><#t/>
|
||||
</#list><#t/>
|
||||
</#if><#t/>
|
||||
<#if (parameters.optiontransferselectDoubleIds?if_exists?size > 0) ><#t/>
|
||||
<#assign doubleSelectTagIds = parameters.optiontransferselectDoubleIds.keySet()/><#t/>
|
||||
<#list doubleSelectTagIds as tmpDoubleId><#t/>
|
||||
// auto-select optiontransferselect (right side) with id ${tmpDoubleId}
|
||||
var doubleSelectObj = document.getElementById("${tmpDoubleId}");
|
||||
selectAllOptions(doubleSelectObj);
|
||||
selectUnselectMatchingOptions(doubleSelectObj, null, "unselect", false, "key");
|
||||
<#if parameters.optiontransferselectDoubleIds.get(tmpDoubleId)?exists><#t/>
|
||||
<#assign doubleSelectTagHeaderKey = parameters.optiontransferselectDoubleIds.get(tmpDoubleId)/><#t/>
|
||||
selectUnselectMatchingOptions(doubleSelectObj, "${doubleSelectTagHeaderKey}", "unselect", false, "key");
|
||||
</#if><#t/>
|
||||
</#list><#t/>
|
||||
</#if><#t/>
|
||||
|
||||
<#--
|
||||
Code that will auto select updownselect elements upon its containing form submission
|
||||
--><#t/>
|
||||
<#if (parameters.updownselectIds?if_exists?size > 0)><#t/>
|
||||
// Code that will auto select updownselect elements upon its containing form submission
|
||||
<#assign updownselectTagIds = parameters.updownselectIds.keySet() /><#t/>
|
||||
<#list updownselectTagIds as tmpUpdownselectTagId><#t/>
|
||||
var updownselectObj = document.getElementById("${tmpUpdownselectTagId}");
|
||||
selectAllOptions(updownselectObj);
|
||||
selectUnselectMatchingOptions(updownselectObj, null, "unselect", false, "key");
|
||||
<#if parameters.updownselectIds.get(tmpUpdownselectTagId)?exists><#t/>
|
||||
<#assign updownselectHeaderKey = parameters.updownselectIds.get(tmpUpdownselectTagId) /><#t/>
|
||||
selectUnselectMatchingOptions(updownselectObj, "${updownselectHeaderKey}", "unselect", false, "key");
|
||||
</#if><#t/>
|
||||
</#list><#t/>
|
||||
</#if><#t/>
|
||||
}
|
||||
<#--
|
||||
Enable auto-select of optiontransferselect tag's entries upon containing form's
|
||||
submission.
|
||||
-->
|
||||
dojo.require("dojo.event.connect");
|
||||
<#if (parameters.optiontransferselectIds?if_exists?size > 0)>
|
||||
var containingForm = document.getElementById("${parameters.id}");
|
||||
<#assign selectObjIds = parameters.optiontransferselectIds.keySet() />
|
||||
<#list selectObjIds as selectObjectId>
|
||||
dojo.event.connect(containingForm, "onsubmit",
|
||||
function(evt) {
|
||||
var selectObj = document.getElementById("${selectObjectId}");
|
||||
selectAllOptions(selectObj);
|
||||
selectUnselectMatchingOptions(selectObj, null, "unselect", false, "key");
|
||||
<#if parameters.optiontransferselectIds.get(selectObjectId)?exists>
|
||||
<#assign selectTagHeaderKey = parameters.optiontransferselectIds.get(selectObjectId)/>
|
||||
selectUnselectMatchingOptions(selectObj, "${selectTagHeaderKey}", "unselect", false, "key");
|
||||
</#if>
|
||||
});
|
||||
</#list>
|
||||
</#if>
|
||||
<#if (parameters.optiontransferselectDoubleIds?if_exists?size > 0)>
|
||||
var containingForm = document.getElementById("${parameters.id}");
|
||||
<#assign selectDoubleObjIds = parameters.optiontransferselectDoubleIds.keySet() />
|
||||
<#list selectDoubleObjIds as selectObjId>
|
||||
dojo.event.connect(containingForm, "onsubmit",
|
||||
function(evt) {
|
||||
var selectObj = document.getElementById("${selectObjId}");
|
||||
selectAllOptions(selectObj);
|
||||
selectUnselectMatchingOptions(selectObj, null, "unselect", false, "key");
|
||||
<#if parameters.optiontransferselectDoubleIds.get(selectObjId)?exists>
|
||||
<#assign selectTagHeaderKey = parameters.optiontransferselectDoubleIds.get(selectObjId)/>
|
||||
selectUnselectMatchingOptions(selectObj, "${selectTagHeaderKey}", "unselect", false, "key");
|
||||
</#if>
|
||||
});
|
||||
</#list>
|
||||
</#if>
|
||||
|
||||
|
||||
<#--
|
||||
Enable auto-select of all elements of updownselect tag upon its containing form
|
||||
submission
|
||||
-->
|
||||
<#if (parameters.updownselectIds?if_exists?size > 0)>
|
||||
var containingForm = document.getElementById("${parameters.id}");
|
||||
<#assign tmpIds = parameters.updownselectIds.keySet() />
|
||||
<#list tmpIds as tmpId>
|
||||
dojo.event.connect(containingForm, "onsubmit",
|
||||
function(evt) {
|
||||
var updownselectObj = document.getElementById("${tmpId}");
|
||||
selectAllOptions(updownselectObj);
|
||||
selectUnselectMatchingOptions(updownselectObj, null, "unselect", false, "key");
|
||||
<#if parameters.updownselectIds.get(tmpId)?exists>
|
||||
<#assign tmpHeaderKey = parameters.updownselectIds.get(tmpId) />
|
||||
selectUnselectMatchingOptions(updownselectObj, "${tmpHeaderKey}", "unselect", false, "key");
|
||||
</#if>
|
||||
});
|
||||
</#list>
|
||||
</#if>
|
||||
</script>
|
||||
</#if>
|
||||
|
||||
|
||||
<#--
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<#if (parameters.validate?default(false) == false)><#rt/>
|
||||
<#if parameters.onsubmit?exists><#rt/>
|
||||
${tag.addParameter('onsubmit', "${parameters.onsubmit}; customOnsubmit(); return true;") }
|
||||
${tag.addParameter('onsubmit', "${parameters.onsubmit}; return true;") }
|
||||
<#else>
|
||||
${tag.addParameter('onsubmit', "customOnsubmit(); return true;") }
|
||||
${tag.addParameter('onsubmit', "return true;") }
|
||||
</#if>
|
||||
</#if>
|
||||
<form<#rt/>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<#if parameters.validate?default(false) == true>
|
||||
<script src="${base}/struts/xhtml/validation.js"></script>
|
||||
<#if parameters.onsubmit?exists>
|
||||
${tag.addParameter('onsubmit', "${parameters.onsubmit}; customOnsubmit(); return validateForm_${parameters.id}();")}
|
||||
${tag.addParameter('onsubmit', "${parameters.onsubmit}; return validateForm_${parameters.id}();")}
|
||||
<#else>
|
||||
${tag.addParameter('onsubmit', "customOnsubmit(); return validateForm_${parameters.id}();")}
|
||||
${tag.addParameter('onsubmit', "return validateForm_${parameters.id}();")}
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
<form id="myAction" name="myForm" onsubmit="submitMe(); customOnsubmit(); return true;" action="myAction" method="POST" enctype="myEncType" title="mytitle">
|
||||
<form id="myAction" name="myForm" onsubmit="submitMe(); return true;" action="myAction" method="POST" enctype="myEncType" title="mytitle">
|
||||
<table class="wwFormTable">
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function customOnsubmit() {}
|
||||
</script>
|
||||
|
||||
<!-- javascript that is needed for tooltips -->
|
||||
<script language="JavaScript" type="text/javascript">dojo.require("dojo.widget.html.Tooltip");dojo.require("dojo.fx.html");</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script src="/struts/xhtml/validation.js"></script>
|
||||
<form namespace="" id="myAction" name="myForm" onsubmit="submitMe(); customOnsubmit(); return validateForm_myAction();" action="myAction" method="POST" enctype="myEncType" title="mytitle">
|
||||
<form namespace="" id="myAction" name="myForm" onsubmit="submitMe(); return validateForm_myAction();" action="myAction" method="POST" enctype="myEncType" title="mytitle">
|
||||
<table class="wwFormTable"> <tr>
|
||||
<td class="tdLabel"></td>
|
||||
<td> <script language="javascript" src="/struts/optiontransferselect/optiontransferselect.js"></script>
|
||||
@@ -20,13 +20,14 @@
|
||||
|
||||
|
||||
<script>
|
||||
function customOnsubmit() {
|
||||
|
||||
// Code that will auto select updownselect elements upon its containing form submission
|
||||
var updownselectObj = document.getElementById("myAction_myUpDownSelectTag");
|
||||
selectAllOptions(updownselectObj);
|
||||
selectUnselectMatchingOptions(updownselectObj, null, "unselect", false, "key");
|
||||
}
|
||||
dojo.require("dojo.event.connect");
|
||||
var containingForm = document.getElementById("myAction");
|
||||
dojo.event.connect(containingForm, "onsubmit",
|
||||
function(evt) {
|
||||
var updownselectObj = document.getElementById("myAction_myUpDownSelectTag");
|
||||
selectAllOptions(updownselectObj);
|
||||
selectUnselectMatchingOptions(updownselectObj, null, "unselect", false, "key");
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- javascript that is needed for tooltips -->
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
<form id="testNamespaceAction" name="myForm" onsubmit="customOnsubmit(); return true;" action="/testNamespace/testNamespaceAction.action" method="POST">
|
||||
<form id="testNamespaceAction" name="myForm" onsubmit="return true;" action="/testNamespace/testNamespaceAction.action" method="POST">
|
||||
<table class="wwFormTable">
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function customOnsubmit() {}
|
||||
</script>
|
||||
|
||||
<!-- javascript that is needed for tooltips -->
|
||||
<script language="JavaScript" type="text/javascript">dojo.require("dojo.widget.html.Tooltip");dojo.require("dojo.fx.html");</script>
|
||||
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
<form id="foo" onsubmit="customOnsubmit(); return true;" action="/foo.jsp">
|
||||
<form id="foo" onsubmit="return true;" action="/foo.jsp">
|
||||
<table class="wwFormTable">
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function customOnsubmit() {}
|
||||
</script>
|
||||
|
||||
<!-- javascript that is needed for tooltips -->
|
||||
<script language="JavaScript" type="text/javascript">dojo.require("dojo.widget.html.Tooltip");dojo.require("dojo.fx.html");</script>
|
||||
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
<form id="testNamespaceAction" name="myForm"onsubmit="customOnsubmit(); return true;" action="/testNamespace/testNamespaceAction.jspa" method="POST">
|
||||
<form id="testNamespaceAction" name="myForm"onsubmit="return true;" action="/testNamespace/testNamespaceAction.jspa" method="POST">
|
||||
<table class="wwFormTable">
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function customOnsubmit() {}
|
||||
</script>
|
||||
|
||||
<!-- javascript that is needed for tooltips -->
|
||||
<script language="JavaScript" type="text/javascript">dojo.require("dojo.widget.html.Tooltip");dojo.require("dojo.fx.html");</script>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<form namespace="" id="myAction" name="myForm" onsubmit="submitMe(); customOnsubmit(); return true;" action="myAction" method="POST" enctype="myEncType" title="mytitle">
|
||||
<form namespace="" id="myAction" name="myForm" onsubmit="submitMe(); return true;" action="myAction" method="POST" enctype="myEncType" title="mytitle">
|
||||
<table class="wwFormTable"> <tr>
|
||||
<td class="tdLabel"></td>
|
||||
<td> <script language="javascript" src="/struts/optiontransferselect/optiontransferselect.js"></script>
|
||||
@@ -19,13 +19,14 @@
|
||||
|
||||
|
||||
<script>
|
||||
function customOnsubmit() {
|
||||
|
||||
// Code that will auto select updownselect elements upon its containing form submission
|
||||
var updownselectObj = document.getElementById("myAction_myUpDownSelectTag");
|
||||
selectAllOptions(updownselectObj);
|
||||
selectUnselectMatchingOptions(updownselectObj, null, "unselect", false, "key");
|
||||
}
|
||||
dojo.require("dojo.event.connect");
|
||||
var containingForm = document.getElementById("myAction");
|
||||
dojo.event.connect(containingForm, "onsubmit",
|
||||
function(evt) {
|
||||
var updownselectObj = document.getElementById("myAction_myUpDownSelectTag");
|
||||
selectAllOptions(updownselectObj);
|
||||
selectUnselectMatchingOptions(updownselectObj, null, "unselect", false, "key");
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- javascript that is needed for tooltips -->
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
<form id="test" onsubmit="customOnsubmit(); return true;" action="test.html">
|
||||
<form id="test" onsubmit="return true;" action="test.html">
|
||||
<table class="wwFormTable">
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function customOnsubmit() {}
|
||||
</script>
|
||||
|
||||
<!-- javascript that is needed for tooltips -->
|
||||
<script language="JavaScript" type="text/javascript">dojo.require("dojo.widget.html.Tooltip");dojo.require("dojo.fx.html");</script>
|
||||
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
<form id="testNamespaceAction" name="myForm"onsubmit="customOnsubmit(); return true;" action="/testNamespace/testNamespaceAction.jspa" method="POST">
|
||||
<form id="testNamespaceAction" name="myForm"onsubmit="return true;" action="/testNamespace/testNamespaceAction.jspa" method="POST">
|
||||
<table class="wwFormTable">
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function customOnsubmit() {}
|
||||
</script>
|
||||
|
||||
<!-- javascript that is needed for tooltips -->
|
||||
<script language="JavaScript" type="text/javascript">dojo.require("dojo.widget.html.Tooltip");dojo.require("dojo.fx.html");</script>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<form id="myFormId" name="myForm" onsubmit="customOnsubmit(); return true;" action="/testAction.action">
|
||||
<form id="myFormId" name="myForm" onsubmit="return true;" action="/testAction.action">
|
||||
<table class="wwFormTable">
|
||||
<tr>
|
||||
<td class="tdLabel"><label for="myId" class="label">MyLabel:
|
||||
@@ -15,10 +15,6 @@
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function customOnsubmit() { }
|
||||
</script>
|
||||
|
||||
<!-- javascript that is needed for tooltips -->
|
||||
<script language="JavaScript" type="text/javascript">dojo.require("dojo.widget.html.Tooltip");dojo.require("dojo.fx.html");</script>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<form id="myFormId" name="myForm" onsubmit="customOnsubmit(); return true;" action="/testAction.action">
|
||||
<form id="myFormId" name="myForm" onsubmit="return true;" action="/testAction.action">
|
||||
<table class="wwFormTable">
|
||||
<tr>
|
||||
<td class="tdLabel"><label for="myId" class="label">MyLabel:
|
||||
@@ -15,9 +15,5 @@
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function customOnsubmit() { }
|
||||
</script>
|
||||
|
||||
<!-- javascript that is needed for tooltips -->
|
||||
<script language="JavaScript" type="text/javascript">dojo.require("dojo.widget.html.Tooltip");dojo.require("dojo.fx.html");</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<form id="myFormId" name="myForm" onsubmit="customOnsubmit(); return true;" action="/testAction.action">
|
||||
<form id="myFormId" name="myForm" onsubmit="return true;" action="/testAction.action">
|
||||
<table class="wwFormTable">
|
||||
<tr>
|
||||
<td class="tdLabel"><label for="myId" class="label">MyLabel:
|
||||
@@ -15,10 +15,6 @@
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function customOnsubmit() { }
|
||||
</script>
|
||||
|
||||
<!-- javascript that is needed for tooltips -->
|
||||
<script language="JavaScript" type="text/javascript">dojo.require("dojo.widget.html.Tooltip");dojo.require("dojo.fx.html");</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user