如何在javascript中传递jsf commandLink操作属性值
我需要传递jsf commandLink标记的action属性的字符串值 这是我的密码:如何在javascript中传递jsf commandLink操作属性值,jsf,Jsf,我需要传递jsf commandLink标记的action属性的字符串值 这是我的密码: <h:commandLink id='link' action="#{Bean.selectLink}" onclick="myFunction(document.getElementById('link'))"> </h:commandLink> //value is coming as null //值为空 我还尝试了onclick=“myFunction(this)
<h:commandLink id='link' action="#{Bean.selectLink}"
onclick="myFunction(document.getElementById('link'))">
</h:commandLink>
//value is coming as null
//值为空
我还尝试了onclick=“myFunction(this)”
,但由于commandLink操作,它的值在导航之前作为页面的url出现。我想传递action属性的值,即“#{Bean.selectLink}”
我尝试将其作为onclick=“myFunction(#{Bean.selectLink})”传递
,但它显示错误PropertyNotFoundException:在Bean中找不到selectLink属性
我尝试了oncomplete
属性来代替onclick,但是没有发生任何事情
请帮我弄清楚这件事。谢谢
提前感谢您的帮助。您能提供任何示例代码吗?嗨,自行车手,我编辑了我的问题。你能检查一下吗。