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
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forum:
JSF
URL for managed-bean.handlerMethod
Sajan Patel
Ranch Hand
Posts: 77
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I have following
1) Action Handler
public class MyHandler { public String showMyPage(){ // get value from myID parameter from request FacesContext context = FacesContext.getCurrentInstance(); context.getExternalContext().getRequest().getParameter("myID"); // Initializing JSF item here as per that myID return "success"; } }
2) face-config
<managed-bean> <managed-bean-name>myHandler</managed-bean-name> <managed-bean-class>us.state.myApp.logging.MyHandler</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <navigation-rule> <navigation-case> <from-action>#{myHandler.showMyPage}</from-action> <from-outcome>success</from-outcome> <to-view-id>/myJSP.jsp</to-view-id> </navigation-case> </navigation-rule>
Now I would like to create URL to access this Handler class
e.g.
http://localhost:9080/myApp/faces/myHandler?action=showMyPage&myID=5
Any help will be appreciate.
Enjoy,
Sajan Patel
Hang a left on main. Then read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
JSF <h:commandButton action> not working
connection b/w Two pages
Why isn't redirct working?
Which Package to Import to Use FacesContext's getRequestMap()?
DataTable problem
More...