-
1. Re: Passing Java Script Variable to a4j:commandButton
ilya_shaikovsky Nov 19, 2010 4:26 AM (in response to richfaces76)something like:
<script type="text/javascript">
function onContributionWizardAfterAddEntry(entries) {
var uploadedEntry = entries[0].entryId;
}</script>
<a4j:commandButton tabindex="1"
image="../img/submit.gif"
styleClass="uploadersubmit"
onmouseover="this.src='../img/submit_over.gif';"
onmouseout="this.src='../img/submit.gif';"
action="#{objectivelistaction.uploadMediaEntry(uploadedEntry'}"
oncomplete="#{rich:component('uploadPanel')}.hide();disabled=true;"
reRender="portfolioList"><a4j:actionparam name="jsparam" escape="false" value="onContributionWizardAfterAddEntry(something)"
</a4j:commandButton>
I have not actually checked live but I have just other sample which shows it live http://livedemo.exadel.com/richfaces-demo/richfaces/actionparam.jsf last one there.