HtmlMenuRenderer generates like bellow form tags. It generates double target="_BLANK" , then cause javascript error.
<li><form method="post" action="/ar/control/invoice.pdf" target="_BLANK" name="InvoiceSubTabBar_pdf_LF_8"><input name="invoiceId" value="8010" type="hidden"/></form><a target="_BLANK" href="javascript:document.InvoiceSubTabBar_pdf_LF_8.submit()">PDF</a></li>
document.InvoiceSubTabBar_pdf_LF_8 is undefined @ javascript:document.InvoiceSubTabBar_pdf_LF_8.submit()
jleroux: to reproduce
For example, edit applications/accounting/webapp/accounting/WEB-INF/controller.xml like this.
<request-map uri="invoice.pdf">
<security https="true" auth="true"/>
<event name="test" type="java" path="org.ofbiz.webapp.event.TestEvent" invoke="test"/> <= add this
<response name="success" type="view" value="InvoicePDF"/>
</request-map>
And in invoice screen, click 'PDF' button. Exist or not exist above line, generated html is different.
As is
~event: PDF rendered
<li><a target="_BLANK" href="/ar/control/invoice.pdf?invoiceId=8010">PDF</a></li>
event: PDF not rendered
<li><form method="post" action="/ar/control/invoice.pdf" target="_BLANK" name="InvoiceSubTabBar_pdf_LF_8"><input name="invoiceId" value="8010" type="hidden"/></form><a target="_BLANK" href="javascript:document.InvoiceSubTabBar_pdf_LF_8.submit()">PDF</a></li>
patched
~event: PDF rendered
<li><a target="_BLANK" href="/ar/control/invoice.pdf?invoiceId=8010">PDF</a></li>
event: PDF rendered
<li><form method="post" action="/ar/control/invoice.pdf" target="_BLANK" name="InvoiceSubTabBar_pdf_LF_8"><input name="invoiceId" value="8010" type="hidden"/></form><a href="javascript:document.InvoiceSubTabBar_pdf_LF_8.submit()">PDF</a></li>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1422207 13f79535-47bb-0310-9956-ffa450edef68