• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
shrihari mundada
Greenhorn
Posts: 4
  • 0
  • 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">
<hutputText 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.
 
Yahya Arshad
Greenhorn
Posts: 26
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic