• Post Reply Bookmark Topic Watch Topic
  • New Topic

Prevent appending the jsessionid  RSS feed

 
James Greenberg
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
Inside a <h:dataTable> (running GlassFish v2) I have this code:

showUserInfo - is a JavaScript function which opens a new window, but JSF renders the code by appending a jsessionid which results into a JavaScript error on the client-side when the user clicks the link, because it is rendered like this:

The jsessionid is appended when the user first visits the page, or when he restarts the browser and comes back to this page.
I tried replacing hutpuLink by <a href> but since the code is inside an h:dataTable the JSF throws an error about bad code.
Any hints on how else to try to solve this issue?
 
Ryan Slominski
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too bad this questions is several years old because I think I know the solution. Here is the solution anyways:

Use the onclick attribute instead of the value attribute. You'll want to prevent the default action so make sure to end with a return false. It would look something like:



With this solution the jsessionid isn't prevented, but doesn't affect the JavaScript.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!