aspose file tools
The moose likes JSF and the fly likes Issue with h:commandButton tag Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Issue with h:commandButton tag" Watch "Issue with h:commandButton tag" New topic
Author

Issue with h:commandButton tag

Durga Krishna
Greenhorn

Joined: Apr 05, 2007
Posts: 28
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

Joined: Jun 21, 2008
Posts: 80
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

Joined: Jul 30, 2008
Posts: 43
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

The woods are lovely, dark and deep, But I have promises to keep; And miles to go before I sleep, And miles to go before I sleep. - Robert Frost
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Issue with h:commandButton tag
 
Similar Threads
obtaining parameters of hidden fields combined with multiple form tags
JBoss Seam - Problems with page navigation
Question on BUTTON name/value pairs sent from JSP
Selectmanylistbox disables submit button
AJAX call works in ie6 but not in firefox