Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

passth value using javascript in jsf

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>








 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic