- This topic has 8 replies, 6 voices, and was last updated 15 years, 11 months ago by
amir55.
-
AuthorPosts
-
Rick GenevaMemberI am trying to get a really simple operation to work on JSF and it won’t do what I want it to.
The JSF config:
<navigation-rule> <from-view-id>userLogin.jsp</from-view-id> <navigation-case> <from-outcome>success</from-outcome> <to-view-id>home.jsp</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-outcome>failure</from-outcome> <to-view-id>userLogin.jsp</to-view-id> </navigation-case> </navigation-rule> <managed-bean> <description>Bean used to handle all User-based operations.</description> <managed-bean-name>UserBean</managed-bean-name> <managed-bean-class>gprsm.web.jsf.bean.UserBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean>
The bean is in fact returning “success” but I always get the loginUser.jsp view in the browser. What am I doing wrong?
Riyad KallaMemberDid you mean loginUser.jsp (what you typed below) or userLogin.jsp (what si in the snippet above)?
You can try and remove the <from-view-id> tag to make the navigation rules global to make sure that isn’t the problem, you can also try prefixing a / before the paths, like /home.jsp and so forth.
groepaz1MemberI had the same problem,
I downloaded the jsf-jars from sun and replaced the myeclipse jars
-> works!!To MyEclipse – Team:
Keep working on the quality!!! Before the useres loose confidence!!
support-eugeneMemberWe bundle Sun RI 1.1. Did you use 1.1_01? Are you sure your problem was with the Jars not with the code?
groepaz1MemberYes I am sure the problem was not related to the code!
I did not change anything at the code level, just the jars ->works.
fstevebMemberI am having the same problem.
I have two jsp pages. The first is a jsf page with a button. The next page is another jsf page with some controls on it. Both pages display if I put the .faces address on the address bar.
Here is what the button looks like:<h:commandButton id="submit" action="success" value="Submit"/>
I added navigation to the faces-config like this:
<navigation-rule> <from-view-id>/sample.jsp</from-view-id> </navigation-rule> <navigation-rule> <from-view-id>/first.jsp</from-view-id> <navigation-case> <from-action>success</from-action> <to-view-id>/sample.jsp</to-view-id> </navigation-case> </navigation-rule>
I tried removing some of the nav rule stuff like you suggested.
@support-rkalla wrote:You can try and remove the <from-view-id> tag to make the navigation rules global to make sure that isn’t the problem, you can also try prefixing a / before the paths, like /home.jsp and so forth.
<navigation-rule> <navigation-case> <from-action>success</from-action> <to-view-id>/sample.jsp</to-view-id> </navigation-case> </navigation-rule>
No change.
When I click the button, nothing happens. From what I read, this is all I need to do.
Riyad KallaMemberYour button must be in a form.
amir55Participanthi all
I just want to use jsf redirect rather than next jstl one
<c:redirect url=”/page.faces”>
<c:param name=”left” value=”${leftBody.left}” />
</c:redirect>when I use
<jsf:redirect url=”/page.faces” > // here Iget error jsf:redirect unknown
<f:param name=”left” value=”${leftBody.left}” />
</jsf:edirect>so many thanks
Amir
amir55Participanthi again
I could not find any way how to use in jsf framework libraries any :
1 – how to do import a jsp file
2 – include
3 – forward
4 – redirect
5 – also how to pass paramters as f:param and not c:param for jstl.I do not want to use jstl or jsp components as I lose some features of the view.
I donot want link like comaand or button but jusrt forward with a paramter with it.
As Simple As That
please reply ASAP if you may
Amir
a
-
AuthorPosts