This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes CommandLink in Subview Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "CommandLink in Subview" Watch "CommandLink in Subview" New topic

CommandLink in Subview

Raj Maheshwari
Ranch Hand

Joined: Jul 02, 2004
Posts: 34

Is there a restriction on having something like:

<h:form id="Logout_FORM">

<h:commandLink action="#{loggedUsers.logout}" value="Logout1" id="register_submit1" />


Inside a <f:subview> in a file like Header.jsp

This file then gets included in home.jsp as :


<%@include file="/Header.jsp"%>

</f:verbatim >

My problem is that this never works. If I have the former code (commandlink) copy pasted directly in home.jsp it works. But including it does not. Why is that?


Sergey Smirnov
Ranch Hand

Joined: May 29, 2003
Posts: 167
Your subj says about subview, but the code snippet contains f:verbatim. So, what the tag you have problem with? If you ask about f:verbatim, you should not put any control elements, such as command link. f:verbatim is a transient component. it means it and its subtree does not stored in the component tree.

Sergey :
Raj Maheshwari
Ranch Hand

Joined: Jul 02, 2004
Posts: 34
Thanks for the reply.

As I mentioned, the <f:verbatim> has a include which includes a file called Header.jsp. My Header.jsp has the <f:subview> (and the f:subview contains the h:commandLink).

So will that work? I even tried to not wrap the include statement inside the f:verbatim and that did not do the trick for me.

Raj Maheshwari
Ranch Hand

Joined: Jul 02, 2004
Posts: 34
Ok mybad. It works. I just had to redeploy.

I agree. Here's the link:
subject: CommandLink in Subview
Similar Threads
working with t:commandNavigation2
verbatim tag
Navigation Problem
Form Being Rendered Outside of the Page
jsp:include in JSF JSP