Hi,
I'm using MyFaces 1.1.5 with Tomahawk 1.1.7. Within my dataTable, I want a
link in each row to submit a form. So I have ...
<t:column>
<f:facet name="header">
<h:commandLink
actionListener="#{TamperingReportController.sortDataList}"
onclick="processing(this);">
<f:attribute name="sortField" value="getName" />
<t:outputText value="Driver Name"/>
</h:commandLink>
</f:facet>
<h:form>
<h:inputHidden
value="#{currentRow.licenseNumber}"></h:inputHidden>
<h:commandLink
action="#{DriverTransactionReportController.submit}">
<t:outputText value="#{currentRow.name}" />
</h:commandLink>
</h:form>
</t:column>
but when the link renders, it does not submit the form, in fact it doesn't
do anything (just has a "#" appended after the URL). Here's how the link
renders. Any thoughts about what I'm doing wrong? - Dave
<form id="tamperingReport:tamperingTable:0:_idJsp6"
name="tamperingReport:tamperingTable:0:_idJsp6" method="post"
action="/apps/dor/online/interlock/reports/tamperingReport.jsf"
enctype="application/x-www-form-urlencoded"><input type="hidden"
id="tamperingReport:tamperingTable:0:_idJsp6:_idJsp7"
name="tamperingReport:tamperingTable:0:_idJsp6:_idJsp7" value="594571506" />
# Blechar, Dona <input type="hidden"
name="tamperingReport:tamperingTable:0:_idJsp6_SUBMIT" value="1" /><input
type="hidden" name="tamperingReport:tamperingTable:0:_idJsp6:_link_hidden_"
/><input type="hidden" name="tamperingReport:tamperingTable:0:_idJsp6:_idcl"
/><script type="text/javascript"><!--
function clear_tamperingReport_3AtamperingTable_3A0_3A_5FidJsp6()
{
clearFormHiddenParams_tamperingReport_tamperingTable_0__idJsp6('tamperingReport:tamperingTable:0:_idJsp6');
}
function
clearFormHiddenParams_tamperingReport_tamperingTable_0__idJsp6(currFormName)
{
var f =
document.forms['tamperingReport:tamperingTable:0:_idJsp6'];
f.elements['tamperingReport:tamperingTable:0:_idJsp6:_link_hidden_'].value='';
f.elements['tamperingReport:tamperingTable:0:_idJsp6:_idcl'].value='';
f.target='';
}
clearFormHiddenParams_tamperingReport_tamperingTable_0__idJsp6();
//--></script><input type="hidden" name="javax.faces.ViewState"
id="javax.faces.ViewState"
value="rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAE3cHQAHC9yZXBvcnRzL3RhbXBlcmluZ1JlcG9ydC5qc3A="
/></form>
--
View this message in context:
http://old.nabble.com/Trouble-with-commandLink-POSTing-a-form-tp27637839p27637839.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.