• 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

Issue with h:commandButton tag

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I got strucked with one issue.

I would like to display a button using h:CommandButton tag(but it should not be a submit or reset button.)

The code used in my application is as below :


But the rendered html is like this :


Please let me know how can I make type="button" instead of type="submit".
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this is impossible to have an input whose type is button instead of submit. If you have the type attribute set to button It won't submit your form and therefore it won't execute the action you added. However you can simply use HTML tags instead of JSF tags.
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
you can even use the richfaces A4J command button.. use the Richfaces jar file for JSF

for live demo; please follow the following link

http://livedemo.exadel.com/richfaces-demo/richfaces/commandButton.jsf?c=commandButton&tab=usage
 
reply
    Bookmark Topic Watch Topic
  • New Topic