• Post Reply Bookmark Topic Watch Topic
  • New Topic

Links without JavaScript

 
Eiji Seki
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am a Struts veteran beggining with JSF playing with tutorials and stuff.
I want to know if there is a way to work with regular dynamic links intead of the always-use-javascript way. More exactly, I want a link object that referers to a navigation name like "home", for example:



But instead of using javascript, simply reads the configuration and renders a html output like



pretty much like Struts' ActionForward. I understand why using javascript in links is good sometimes, but it also limits the user capability of accessing directly a link or using the "open in new window" feature.

Thanks for any help.
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The javascript in the link is used to post a form to the server. If you have an idea how to submit the form by clicking the link, but without using javascript let us know.
There are two standard components that represent link. Those are commandLink and outputLink. The first on is using for form submition, the secord one is for the regular ckickable link that points directly to the page.
 
Eiji Seki
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The point is that I don't need to submit a form with the link. I just want to use a navigation case configuration to dynamicaly create the link.
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at http://blog.exadel.com/?p=19
Basically, it might be better to un-learn Struts to ride JSF horse effectively. I know, it is hard.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!