Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSF
Search Coderanch
Advance search
Google search
Register / Login
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
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
JSF
JSF <h:commandButton action> not working
Adnan Gondal
Ranch Hand
Posts: 35
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all!
<h:commandButton action>
is not working in following code snippest.
bean(Employee.java):-
public String deleteEmployee(){ return "success3"; }
JSF
page(delete-employee.xhtml):-
<h:form> <h:commandButton action="employee.deleteEmployee" type="submit" value="delete"/> </h:form>
Faces-config.xml:-
<managed-bean> <description>Employee navigation</description> <managed-bean-name>employee</managed-bean-name> <managed-bean-class>erpJavaFiles.Employee</managed-bean-class> <managed-bean-scope>application</managed-bean-scope> </managed-bean> <navigation-rule> <from-view-id>/add-Employee.xhtml</from-view-id> <navigation-case> <from-outcome>success</from-outcome> <to-view-id>/CRM.xhtml</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-outcome>failure</from-outcome> <to-view-id>/home.xhtml</to-view-id> <redirect/> </navigation-case> </navigation-rule> <navigation-rule> <from-view-id>/delete-employe.xhtml</from-view-id> <navigation-case> <from-outcome>success3</from-outcome> <to-view-id>/CRM.xhtml</to-view-id> </navigation-case> </navigation-rule>
Second navigation rule is not working but the first navigation rule is working. Thanks in advance.
B Nirvan
Ranch Hand
Posts: 82
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Change action="employee.deleteEmployee" to action="#{employee.deleteEmployee}"
regards,
Nirvan.
Those cherries would go best on cherry cheesecake. Don't put those cherries on this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
redirection from backbean
In Rich Faces rich:panelMenu a4j:commandButton action not called
navigation problems
Beginners Querylogue!
commandLink param problem
More...