This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passth value using javascript in jsf  RSS feed

 
anwar pasha
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i pass the value using java script below example:

when am clicking on button i have to pass the toolIds value to backing bean.

t:commandButton id="programLink3" value="" action=#{backing.updateBannerImage}
/
f:param name="toolId" value="2222"/
/t:commandButton


can you send the sample code for this.
 
maganti lava
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think there is no use of javascript. You can directly send the value via f:param. with the help of the <h:commandLink>.
Ex: <h:commandLink action="#{backing.updateBannerImage}" id="programLink3">
<f:param name="toolId" id="toolId" value="2222"/ >
</h:commandLink>


If you write like this, you can get the value in the backing bean thourgh request parameter.
 
anwar pasha
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i use indivisible commanlink am not getting param value ,if am using in datatable tag its working fine
ex:<t:dataTable>
<t:column>
<h:commandLink action="#{backing.updateBannerImage}" id="programLink3">
<f:param name="toolId" id="toolId" value="2222"/ >
</h:commandLink>

<t:dataTable>








 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!