• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CommandLink in Subview

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Is there a restriction on having something like:


<h:form id="Logout_FORM">

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

</h:form>

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

This file then gets included in home.jsp as :

<f:verbatim>

<%@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?


Thanks

Raj
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 : https://ajax4jsf.dev.java.net/
 
Raj Maheshwari
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sergey
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.

Thanks,
Raj
 
Raj Maheshwari
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok mybad. It works. I just had to redeploy.

Thanks
-raj
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic