• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaScript error when using a f:param in a h:commandLink

 
Jan Buchholdt
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I’m new to JSF and a very simple example that result in a javascript error. I hope that somebody can explain to me what I am doing wrong. I am trying to add an extra parameter to a link using the following example.


When I click the link I get the following javascript error: document.forms.j_id_id16.JanIsTestingParam is undefined

Looking at the html it’s clear to me that the problem is that there is no hidden input field named JanIsTestingParam and I could solve it by adding it manually:

If I do that the javascript error disappears.

But I have seen several examples that seem to work so I guess that I am doing something wrong. Please help.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic