Get your CodeRanch badge!*
The moose likes JSF and the fly likes How to code this in JSF? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to code this in JSF?" Watch "How to code this in JSF?" New topic
Author

How to code this in JSF?

Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
I'd like to code something that is not quite a <h:commandLink> and not quite an <h utputLink>:

1.It should be rendered as an HTML link.
2.Clicking on it should not submit the form (unlike commandLink).
3.It should carry out on some action on the server (like the action property of a commandLink), and based on the result of that action foward or redirect you to an appropriate page in the web app.

Does anyone know how to do this?


There is no emoticon for what I am feeling!
Rick Beaver
Ranch Hand

Joined: Dec 14, 2004
Posts: 464
Will a command link with immediate=true and action=#{yourBean.yourMethod} work for ya?


ph34r my 133t j4v4 h4><0r1ng sk177z
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
Originally posted by Rick Beaver:
Will a command link with immediate=true and action=#{yourBean.yourMethod} work for ya?


Unfortunately not, because there are already immediate fields I don't want to figure into this interaction. Also, I don't want this page to be created on the server at all because (1) there's no values being posted and (2) this isn't the page that will be rendered.

What I've noticed as I've been developing in JSF is that a lot of unnecessary execution happening on the server, and the more I use JSF the less I like it. My biggest beef is that it's a page-centric framework rather that a action-centric framework. For example, when the user clicks on a link or button they are primarily asking for an action to be done, and there may be no need to recreate the structure of the current page to do this action.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to code this in JSF?
 
Similar Threads
CommandLink in Subview
Model update problem
commandLink not working properly
f:param
having navigation probelms using h:commandLink