Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Commandlink problem  RSS feed

 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a when is click this window it will go to sample page,but when i try to right click and open in new window its goes to the login page or previous page ..Can anybody suggest some idea how to solve this issue...

thanks
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A h:commandLink is intented to be used to submit a form. Rather use hutputLink with a plain vanilla link value for navigation.
 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
The output link is fordirect navigation from the current page to another page or a website.
I want to pass in certain params to the link and submit the form when the user rightclicks on the link and says open in a new window or tab.

Is there a better way to do this?
[ September 03, 2008: Message edited by: Mary Cole ]
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot invoke a POST request (submit a form) on rightclicking the link and opening the target in new window. Thus, JSF can't do anything for you here. Best what you can do is to invoke a plain vanilla GET request using a hutputLink with the parameters set in f:param.

Or simply avoid rightclicking by using a button instead of link.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!