• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting the submitted form name

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone know how to get the submitted form name in JSF. I was thinking that it would be stored somewhere in Faces Context. I'm pretty sure that its not in the HTTPServletRequest object in Faces Context. It's important for me to get the name of the form that is submitted.

Thanks.
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, in my experience, questions like that usually indicate you're trying to solve some other problem. And it's just possible that brute-force access to the underlying HTML form name might not be the most graceful solution to that outer problem when you're using JSF. So it would be good if you could tell us more about what you want to accomplish and why, as opposed to jumping right into "how".

As far as the "how" goes, the digested JSF view is in a tree structure anchored by the ViewRoot and there are various accessor methods that allow running up and down the View. But stuff like that I don't do very often and I've been doing JSF for a long time. There's usually a simpler, more portable solution.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic