1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
<!-- JSF Hack for the Display Tag -->
<!-- 1. Create a dummy actionLink, w/ no value -->
<h:commandLink id="editUserLink" action="#{userForm.edit}">
<f:param name="from"/>
<f:param name="username"/>
</h:commandLink>
<!-- 2. Write your own JavaScript function that's easy to call -->
<script type="text/javascript">
function viewUser(username) {
clear_editUser();
var f = document.forms['editUser'];
f.elements['editUser:_link_hidden_'].value='editUser:editUserLink';
f.elements['username'].value=username;
f.elements['from'].value='list';
f.submit();
} |
Partager