Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

navigating from one page (which has a jsp:include) to another page in jsf  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using a jsp:include tag in my jsp page. the included jsp has a <h:commandLink action="sucess"/> tag.
Now when my parent jsp gets translated it has the link which i have inlcuded. when i click on the link it does not get navigated to the page which should be on the action success.
i have made appropriate entries in the faces-config.xml. please suggest some solution.

parent jsp will look like below :

<html>
<f:view>
<h:form>
<h:commandLink action="test1">
<h:outputText value="link1"/>
</h:commandLink>
<jsp:include page="child.jsp">
</h:form>
</f:view>
</html>

the child.jsp has a link as shown in the above description, now when i click on the link of that included page it should navigate to the page as per the outcome success.

please let me know the solution.
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you enclosing <jsp:include> tag in <f:verbatim> tags ??? is there any input field in any of the page....
 
shrihari mundada
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying.
i am not posting it in f:verbatim tags..

i have tried adding different entries in faces-config.xml.

the structure is parent.jsp has child.jsp included in it.
so i added a navigation rule for the command link which is in child.jsp and ultimately gets included in parent.jsp as:

<from-view-id>parent.jsp</from-view-id>
<from-outcome>success</from-outcome>
<to-view-id>test.jsp</to-view-id>

even i tried changing the from-view-id tag value to child.jsp, yet it does not get navigated to the test.jsp page. it remains on the same page.
please suggest a solution , on how do i navigate from a link to another page which is of the included jsp.
 
Yahya Arshad
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First try to use simple navigation for your page than go for using included page...
first try that your navigation rule work fine for single page

correct pattern for navigation rule is




second thing don't use commandLink for just purpose of navigation use it only for doing some thing which need processing on data.
 
shrihari mundada
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i tried navigating from a single page when i click on that link and i navigated successfully.
it is not navigating only when the link is from a included page.
i am using commandLink because i want to perform some action when i click on that link.
 
Everybody's invited. Even this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!