Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Issue with h:commandButton tag  RSS feed

 
Durga Krishna
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • 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".
 
Hany Shafik
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • 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.
 
Sumeet Singh Aryan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!